Creating branch 2.2.3 of project
diff --git a/doc/org.eclipse.egf.doc.user/.project b/doc/org.eclipse.egf.doc.user/.project
new file mode 100644
index 0000000..7ee326d
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/.project
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.doc.user</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <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>
+ </natures>
+</projectDescription>
diff --git a/doc/org.eclipse.egf.doc.user/DEPRECATED-topics_GettingStarted.xml b/doc/org.eclipse.egf.doc.user/DEPRECATED-topics_GettingStarted.xml
new file mode 100644
index 0000000..a48f939
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/DEPRECATED-topics_GettingStarted.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?NLS TYPE="org.eclipse.help.toc"?>
+<!--
+ 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
+ -->
+
+<toc label="Getting Started" link_to="toc.xml#gettingstarted">
+ <topic label="EGF by pictures">
+ <topic href="html/gettingStarted/nutshell_fcore/nutshell_fcore.html" label="Basic">
+ </topic>
+ <topic href="html/gettingStarted/nutshell_pattern/nutshell_pattern.html" label="Pattern">
+ </topic>
+ </topic><topic href="html/gettingStarted/mainFeatures/mainFeatures.html" label="Main features">
+ </topic><topic href="html/gettingStarted/nutshell_examples/nutshell_examples.html" label="Examples">
+ </topic>
+</toc>
diff --git a/doc/org.eclipse.egf.doc.user/META-INF/MANIFEST.MF b/doc/org.eclipse.egf.doc.user/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..2e190f4
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/META-INF/MANIFEST.MF
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.doc.user; singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Require-Bundle:
+ org.eclipse.help
+Bundle-ActivationPolicy: lazy
diff --git a/doc/org.eclipse.egf.doc.user/about.html b/doc/org.eclipse.egf.doc.user/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/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/doc/org.eclipse.egf.doc.user/build.properties b/doc/org.eclipse.egf.doc.user/build.properties
new file mode 100644
index 0000000..e4ef81d
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/build.properties
@@ -0,0 +1,20 @@
+##
+# 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
+##
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ plugin.properties,\
+ html/,\
+ toc.xml,\
+ topics_FactoryComponents.xml,\
+ topics_GettingStarted.xml,\
+ topics_Reference.xml
+
diff --git a/doc/org.eclipse.egf.doc.user/html/about.html b/doc/org.eclipse.egf.doc.user/html/about.html
new file mode 100644
index 0000000..64c2e39
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/about.html
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?><!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 content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
+<title>About</title>
+
+<script src="../../advanced/synchWithToc.js" type="text/javascript" xml:space="preserve"> </script>
+<script type="text/javascript">if( self == top ){ window.location.replace( "../../index.jsp?topic=/org.eclipse.jdt.doc.isv/about.html");}</script>
+<script type="text/javascript">
+<!--
+if (parent.ContentToolbarFrame && parent.ContentToolbarFrame.setButtonState) parent.ContentToolbarFrame.setButtonState("toggle_highlight","hidden");
+-->
+</script>
+
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>December 15, 2009</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" shape="rect">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" shape="rect">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/org.eclipse.egf.doc.user/html/book.css b/doc/org.eclipse.egf.doc.user/html/book.css
new file mode 100644
index 0000000..19bb3fa
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/book.css
@@ -0,0 +1,30 @@
+@import "../PRODUCT_PLUGIN/book.css";
+
+span.control {
+ font-weight: bold;
+}
+
+span.name {
+ font-style: italic;
+}
+
+span.code {
+ font-family: monospace;
+}
+
+p.nav_footer {
+ font-weight: bold;
+}
+
+p.nav_footer a {
+ font-weight: bold;
+ font-style: italic;
+}
+
+.code-block {
+ font-family: monospace;
+ white-space: pre;
+ background: #e4e3f1;
+ margin:10px;
+ padding: 5px;
+}
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/installation/installation.html b/doc/org.eclipse.egf.doc.user/html/gettingStarted/installation/installation.html
new file mode 100644
index 0000000..1ea9a19
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/installation/installation.html
@@ -0,0 +1,43 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+
+<meta name="copyright" content="Copyright (c) Thales Corporate Services S.A.S, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="author" content="Benoit Langlois" >
+<meta name="keywords" content="egf"/>
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+<title>Installation of EGF and First Steps</title>
+</HEAD>
+<BODY BGCOLOR="#ffffff">
+
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+ <tbody>
+ <tr>
+ <td colspan="2" align="left" bgcolor="#0080c0" valign="top">
+ <h2><font face="Arial,Helvetica"><font color="#ffffff">
+ Installation of EGF and First Steps
+ </font></font></h2>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+
+<p class="Para"><i>Prerequisite</i>: Eclipse 3.5.1 or Eclipse 3.5.2</p>
+
+<p class="Para"><i>First steps</i>:</p>
+
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">Example: <a href="../nutshell_examples/nutshell_examples.html">EMF Wrapper</a></li>
+ <li CLASS="Item"><a href="../../../../org.eclipse.egf.engine.doc/html/tutorial/part1/egf-tutorial-fc1.html">Tutorial</a>: Understanding and developping factory components</li>
+ <li CLASS="Item"><a href="../../../../org.eclipse.egf.engine.doc.pattern/html/tutorial/part1/egf-tutorial-pattern1.html">Tutorial</a>: Understanding and developping patterns</li>
+ <li CLASS="Item">Visit the <a href="http://wiki.eclipse.org/EGF_Tutorial_and_Use_Cases">EGF Wiki</a>, Tutorial section which provides tutorial and exercices</li>
+</ul>
+
+
+</body>
+</html>
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/mainFeatures/mainFeatures.html b/doc/org.eclipse.egf.doc.user/html/gettingStarted/mainFeatures/mainFeatures.html
new file mode 100644
index 0000000..b6cb420
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/mainFeatures/mainFeatures.html
@@ -0,0 +1,102 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+
+<meta name="copyright" content="Copyright (c) Thales Corporate Services S.A.S, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="author" content="Benoit Langlois" >
+<meta name="keywords" content="egf"/>
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+<title>Main Features of EGF</title>
+</HEAD>
+<BODY BGCOLOR="#ffffff">
+
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+ <tbody>
+ <tr>
+ <td colspan="2" align="left" bgcolor="#0080c0" valign="top">
+ <h2><font face="Arial,Helvetica"><font color="#ffffff">
+ Main Features of EGF
+ </font></font></h2>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+
+<a name="GeneralFeatures"><h3>General Features</h3></a>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">EGF can start from a simple project; EGF adds incrementally all the required <b>project properties</b> for running: project bundle, dependencies</li>
+ <li CLASS="Item">EGF is <b>platform-aware</b>: execution with resources in the workspace first else in the platform</li>
+ <li CLASS="Item">Set the EGF preferences: console, model settings, activity validation</li>
+ <li CLASS="Item">An activity (factory component, task) is stored in a <b>fcore</b> file; an fcore stores a set of activities</li>
+</ul>
+<br/>
+
+<a name="GeneralCommands"><h3>General Commands</h3></a>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">Activity <b>creation</b> (Factory component, Task): [File][New][Other][EGF section][EGF Activity]</li>
+ <li CLASS="Item">An activity <b>execution</b>:
+ <ul CLASS="UnorderedList">
+ <li CLASS="Item">Dynamically: right-click on a factory component or task elements, and [Run EGF Activity...]</li>
+ <li CLASS="Item">Fcore execution: [Right-click][Run EGF Activity...]</li>
+ </ul>
+ </li>
+</ul>
+
+<br/>
+
+<a name="StructuralFeatures"><h3>Structural Features</h3></a>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">An <b>activity</b> is unit of execution.
+ <ul CLASS="UnorderedList">
+ <li CLASS="Item">An activity contains a set of contracts (i.e., the actity parameters)</li>
+ <li CLASS="Item">A contract has a type, a mode (input, output, intput/output), a default value (depends on the type)</li>
+ </ul>
+ </li>
+ <li CLASS="Item">A <b>factory component</b> (FC) is an activity.</li>
+ <ul CLASS="UnorderedList">
+ <li CLASS="Item">A FC contains a set of viewpoints. A viewpoint defines a type of generation data (e.g., domain, mapping, pattern).</li>
+ <li CLASS="Item">A FC contains an <b>orchestration</b>.
+ <ul CLASS="UnorderedList">
+ <li CLASS="Item">An orchestration contains a context, with the same characteristics than a contract</li>
+ <li CLASS="Item">An orchestration contains an ordered set of activity invocations (to factory component or task)</li>
+ <li CLASS="Item">An activity invocation provides values to the invoked activity: from 1) local values to the invocation, 2) the orchestration context, 3) the factory component contracts</li>
+ <li CLASS="Item">A factory component hierarchy requires at least a task call to execute productively something</li>
+ </ul>
+ </li>
+ </ul>
+ </li>
+ <li CLASS="Item">A <b>task</b> is an activity. It is linked to a Java class that implements the expected behavior.</li>
+ <li CLASS="Item">A <b>domain viewpoint</b> is a viewpoint.
+ <ul CLASS="UnorderedList">
+ <li CLASS="Item">A domain viewpoint declares a domain with a URI (platform:/plugin/...)</li>
+ <li CLASS="Item">The domain is used in activity invocations through a URI type that references the domain</li>
+ </ul>
+ </li>
+ <li CLASS="Item">A <b>pattern viewpoint</b> is a viewpoint.
+ <ul CLASS="UnorderedList">
+ <li CLASS="Item">A pattern viewpoint contains pattern libraries which contains pattern libraries and patterns</li>
+ <li CLASS="Item">A pattern has 1) a specification, where are declared the pattern parameters, 2) an implementation that contains methods</li>
+ <li CLASS="Item">Pattern methods are in written in a language, for instance Jet for model-to-text transformation</li>
+ <li CLASS="Item">Pattern can inherit from a super-pattern, can call patterns with a context injection or not</li>
+ </ul>
+ </li>
+</ul>
+
+
+<a name="Extensibility"><h3>Extensibility</h3></a>
+<p class="Para">EGF is extensible by nature</p>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">Adding new type</li>
+ <li CLASS="Item">Adding new viewpoint</li>
+ <li CLASS="Item">Adding new orchestration type</li>
+ <li CLASS="Item">Adding new language and engine for pattern</li>
+</ul>
+
+
+</body>
+</html>
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_examples/images/EMFWrapper_1.png b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_examples/images/EMFWrapper_1.png
new file mode 100644
index 0000000..3ca5623
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_examples/images/EMFWrapper_1.png
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_examples/images/EMFWrapper_1_1.png b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_examples/images/EMFWrapper_1_1.png
new file mode 100644
index 0000000..e909508
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_examples/images/EMFWrapper_1_1.png
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_examples/images/Thumbs.db b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_examples/images/Thumbs.db
new file mode 100644
index 0000000..d735c98
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_examples/images/Thumbs.db
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_examples/images/egf_pictures.ppt b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_examples/images/egf_pictures.ppt
new file mode 100644
index 0000000..f752266
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_examples/images/egf_pictures.ppt
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_examples/nutshell_examples.html b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_examples/nutshell_examples.html
new file mode 100644
index 0000000..60314e9
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_examples/nutshell_examples.html
@@ -0,0 +1,72 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+
+<meta name="copyright" content="Copyright (c) Thales Corporate Services S.A.S, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="author" content="Benoit Langlois" >
+<meta name="keywords" content="egf"/>
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+<title>EGF examples</title>
+</HEAD>
+<BODY BGCOLOR="#ffffff">
+
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+ <tbody>
+ <tr>
+ <td colspan="2" align="left" bgcolor="#0080c0" valign="top">
+ <h2><font face="Arial,Helvetica"><font color="#ffffff">
+ EGF examples
+ </font></font></h2>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+<a name="ExampleEMFWrapper"><h2 class="Head">EMF Wrapper</h2></a>
+
+<h3 class="Head">1. Purpose</h3>
+<p class="Para"><i>Tool</i>: EMF generation + model documentation generation</p>
+<p class="Para"><i>Learning</i>: understanding 1) how an EGF activity is structured, 2) how to enrich the EMF generation</p>
+
+<h3 class="Head">2. Scenario</h3>
+
+<p class="Para">Create and execute the EMF Wrapper:</p>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">Create a genmodel file from an ecore model file</li>
+ <li CLASS="Item">On the genmodel, [Right-click][Create EMF Wrapper]</li>
+ <li CLASS="Item">An fcore file is created</li>
+ <li CLASS="Item">Open the fcore file</li>
+ <li CLASS="Item">The production plan examplifies an ordered list of Java task calls with an IN parameter passing</li>
+ <li CLASS="Item">To execute the factory component, on the factory component or the fcore file, [Right-click][Run EGF Activity...]</li>
+ <li CLASS="Item">Model, edit, editor APIs are generated, and an html model document in the plug-in with the <i>doc</i> extension</li>
+</ul>
+<br/>
+
+<p align="left">
+ <img src="./images/EMFWrapper_1_1.png" alt="EMF Wrapper Example"/>
+</p>
+<br/>
+
+<p class="Para">More understanding:</p>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">Add a new generation step: on the production plan, [New Child][Production Plan Invocation], and invoke a factory component or task previously created</li>
+ <li CLASS="Item">Have a look on a Java task: on a <i>Production Plan Invocation</i> step, [Right-click][Open Activity]. This opens the fcore resource which contains the Java task. On the <i>Java Task</i> node, the <i>value</i> property indicates the Java class path.</li>
+ <li CLASS="Item">Deep customization: the Java Classes inherits from the <i>EgfEmfAbstractTask</i> which could be redefined in order to have a specific generation behavior.</li>
+ <li CLASS="Item">Pattern overview: [Right click][Open activity] on the <i>EmfDocGenHtml</i> step. This open the <i>EmfDocGenHtml</i> factory component. Then, visit the patterns which generate the htlm documentation.</li>
+</ul>
+
+
+
+<h2 class="Head">Other examples</h2>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">Visit the <a href="http://wiki.eclipse.org/EGF">EGF Wiki</a>, section Factory Components</li>
+</ul>
+
+
+
+</body>
+</html>
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic1.png b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic1.png
new file mode 100644
index 0000000..a8fcc2e
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic1.png
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic10.png b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic10.png
new file mode 100644
index 0000000..58d24e6
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic10.png
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic10_commented.png b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic10_commented.png
new file mode 100644
index 0000000..6550bac
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic10_commented.png
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic11.png b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic11.png
new file mode 100644
index 0000000..74619d3
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic11.png
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic1_commented.png b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic1_commented.png
new file mode 100644
index 0000000..a31e98d
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic1_commented.png
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic2.png b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic2.png
new file mode 100644
index 0000000..f048eb4
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic2.png
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic2_commented.png b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic2_commented.png
new file mode 100644
index 0000000..24d77bb
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic2_commented.png
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic3.png b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic3.png
new file mode 100644
index 0000000..88e1fcb
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic3.png
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic3_commented.png b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic3_commented.png
new file mode 100644
index 0000000..b807762
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic3_commented.png
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic4.png b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic4.png
new file mode 100644
index 0000000..58b34d0
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic4.png
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic4_commented.png b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic4_commented.png
new file mode 100644
index 0000000..9ecd87e
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic4_commented.png
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic5.png b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic5.png
new file mode 100644
index 0000000..31223d1
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic5.png
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic6.png b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic6.png
new file mode 100644
index 0000000..7df54f8
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic6.png
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic7.png b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic7.png
new file mode 100644
index 0000000..9dba2c4
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic7.png
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic8_commented.png b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic8_commented.png
new file mode 100644
index 0000000..3f69d81
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic8_commented.png
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic9.png b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic9.png
new file mode 100644
index 0000000..f265c7d
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pic9.png
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pictures.ppt b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pictures.ppt
new file mode 100644
index 0000000..9b94e71
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/images/egf_pictures.ppt
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/nutshell_fcore.html b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/nutshell_fcore.html
new file mode 100644
index 0000000..e49abff
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_fcore/nutshell_fcore.html
@@ -0,0 +1,77 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+
+<meta name="copyright" content="Copyright (c) Thales Corporate Services S.A.S, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="author" content="Benoit Langlois" >
+<meta name="keywords" content="egf"/>
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+<title>EGF by pictures - Basic</title>
+</HEAD>
+<BODY BGCOLOR="#ffffff">
+
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+ <tbody>
+ <tr>
+ <td colspan="2" align="left" bgcolor="#0080c0" valign="top">
+ <h2><font face="Arial,Helvetica"><font color="#ffffff">
+ EGF by pictures - Basic
+ </font></font></h2>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+
+<a name="egf_pic1"><h1>Project and fcore files</h1></a>
+<p align="left">
+ <img src="./images/egf_pic1_commented.png" alt="fcore files"/>
+</p>
+
+<a name="egf_pic2"><h1>Factory component and task</h1></a>
+<p class="Para"><b>Factory component</b> = contracts (= parameters) + viewpoints (= organization of generation data) + orchestration (factory component or task invocation)</p>
+<p align="left">
+ <img src="./images/egf_pic2_commented.png" alt="Factory component"/>
+</p>
+
+<p class="Para"><b>Task</b> = atomic execution unit</p>
+<p align="left">
+ <img src="./images/egf_pic3_commented.png" alt="Task"/>
+</p>
+
+<!--
+<p align="left">
+ <img src="./images/egf_pic4_commented.png" alt="Task"/>
+</p>
+-->
+
+<a name="egf_pic7"><h1>Activity invocation</h1></a>
+<!--
+<p align="left">
+ <img src="./images/egf_pic7.png" alt="Activity invocation"/>
+</p>
+-->
+
+<p align="left">
+ <img src="./images/egf_pic8_commented.png" alt="Activity invocation"/>
+</p>
+<p class="Para">The principle of [Factory component/Task] invocation is the same between factory components</p>
+
+<a name="egf_pic10"><h1>Task implementation</h1></a>
+<p align="left">
+ <img src="./images/egf_pic10_commented.png" alt="Task implementation"/>
+</p>
+
+
+<a name="egf_pic11"><h1>Dynamic execution of an activity</h1></a>
+<p class="Para">Validate and execute an activity</p>
+<p align="left">
+ <img src="./images/egf_pic11.png" alt="Dynamic execution of an activity"/>
+</p>
+
+</body>
+</html>
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/images/Thumbs.db b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/images/Thumbs.db
new file mode 100644
index 0000000..6986840
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/images/Thumbs.db
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/images/egf_pic1.png b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/images/egf_pic1.png
new file mode 100644
index 0000000..ef727c3
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/images/egf_pic1.png
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/images/egf_pic1_1_commented.png b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/images/egf_pic1_1_commented.png
new file mode 100644
index 0000000..7436245
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/images/egf_pic1_1_commented.png
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/images/egf_pic1_2_commented.png b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/images/egf_pic1_2_commented.png
new file mode 100644
index 0000000..645b259
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/images/egf_pic1_2_commented.png
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/images/egf_pic1_3.png b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/images/egf_pic1_3.png
new file mode 100644
index 0000000..cce48d2
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/images/egf_pic1_3.png
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/images/egf_pic1_4.png b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/images/egf_pic1_4.png
new file mode 100644
index 0000000..b9c5ca0
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/images/egf_pic1_4.png
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/images/egf_pic1_5.png b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/images/egf_pic1_5.png
new file mode 100644
index 0000000..3ffd7aa
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/images/egf_pic1_5.png
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/images/egf_pic1_6.png b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/images/egf_pic1_6.png
new file mode 100644
index 0000000..bca816b
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/images/egf_pic1_6.png
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/images/egf_pic1_7_commented.png b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/images/egf_pic1_7_commented.png
new file mode 100644
index 0000000..a02b770
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/images/egf_pic1_7_commented.png
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/images/egf_pic1_8_commented.png b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/images/egf_pic1_8_commented.png
new file mode 100644
index 0000000..3b92633
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/images/egf_pic1_8_commented.png
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/images/egf_pictures.ppt b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/images/egf_pictures.ppt
new file mode 100644
index 0000000..932bbaf
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/images/egf_pictures.ppt
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/nutshell_pattern.html b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/nutshell_pattern.html
new file mode 100644
index 0000000..2b9a80d
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/gettingStarted/nutshell_pattern/nutshell_pattern.html
@@ -0,0 +1,60 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+
+<meta name="copyright" content="Copyright (c) Thales Corporate Services S.A.S, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="author" content="Benoit Langlois" >
+<meta name="keywords" content="egf"/>
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+<title>EGF by pictures - Pattern</title>
+</HEAD>
+<BODY BGCOLOR="#ffffff">
+
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+ <tbody>
+ <tr>
+ <td colspan="2" align="left" bgcolor="#0080c0" valign="top">
+ <h2><font face="Arial,Helvetica"><font color="#ffffff">
+ EGF by pictures - Pattern
+ </font></font></h2>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+
+<h2>Definition: Pattern = reusable and customizable solution to a recurrent problem.</h2>
+
+<a name="egf_pic1_1"><h1>Editing a Pattern by User Interface</h1></a>
+<p align="left">
+ <img src="./images/egf_pic1_1_commented.png" alt="Pattern UI"/>
+</p>
+<br/>
+<br/>
+
+<a name="egf_pic1_2"><h1>Specification View of a Pattern</h1></a>
+<p align="left">
+ <img src="./images/egf_pic1_2_commented.png" alt="Pattern specification"/>
+</p>
+<p class="Para">Example of language for implementation: a model-to-text language (e.g., Jet) for text generation from a model, or a language, such as Java, to apply a systematic behavior.</p>
+<br/>
+<br/>
+
+<a name="egf_pic1_7"><h1>Implementation View of a Pattern</h1></a>
+<p align="left">
+ <img src="./images/egf_pic1_7_commented.png" alt="fcore files"/>
+</p>
+<br/>
+<br/>
+
+<a name="egf_pic1_8"><h1>Pattern Execution by Task Invocation</h1></a>
+<p align="left">
+ <img src="./images/egf_pic1_8_commented.png" alt="fcore files"/>
+</p>
+
+</body>
+</html>
diff --git a/doc/org.eclipse.egf.doc.user/html/notices.html b/doc/org.eclipse.egf.doc.user/html/notices.html
new file mode 100644
index 0000000..e78068b
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/notices.html
@@ -0,0 +1,32 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<meta name="copyright" content="Copyright (c) THALES, 2007. All rights reserved." >
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <link rel="stylesheet" href="book.css" charset="ISO-8859-1" type="text/css">
+ <title>Legal Notices</title>
+</head>
+<body>
+
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+ <tbody>
+ <tr>
+ <td colspan="2" align="left" bgcolor="#0080c0" valign="top">
+ <h2><font face="Arial,Helvetica"><font color="#ffffff">
+ Notices
+ </font></font></h2>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+
+<p>
+The material in this guide is Copyright (c) 2009-2010 Thales Corporate Services S.A.S.
+</p>
+<p>
+<a href="about.html">Terms and conditions regarding the use of this guide.</a>
+</p>
+</body>
+</html>
diff --git a/doc/org.eclipse.egf.doc.user/html/overview/images/egfPerspective.jpg b/doc/org.eclipse.egf.doc.user/html/overview/images/egfPerspective.jpg
new file mode 100644
index 0000000..d6c19b8
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/overview/images/egfPerspective.jpg
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/overview/images/egfPerspectiveLarge.jpg b/doc/org.eclipse.egf.doc.user/html/overview/images/egfPerspectiveLarge.jpg
new file mode 100644
index 0000000..0afaf08
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/overview/images/egfPerspectiveLarge.jpg
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/overview/images/exampleFCAssembly.jpg b/doc/org.eclipse.egf.doc.user/html/overview/images/exampleFCAssembly.jpg
new file mode 100644
index 0000000..6668d85
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/overview/images/exampleFCAssembly.jpg
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/overview/images/exampleFCAssemblyLarge.jpg b/doc/org.eclipse.egf.doc.user/html/overview/images/exampleFCAssemblyLarge.jpg
new file mode 100644
index 0000000..60bb7ff
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/overview/images/exampleFCAssemblyLarge.jpg
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/html/overview/overview.html b/doc/org.eclipse.egf.doc.user/html/overview/overview.html
new file mode 100644
index 0000000..11c6a1f
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/overview/overview.html
@@ -0,0 +1,82 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+
+<meta name="copyright" content="Copyright (c) Thales Corporate Services S.A.S, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="author" content="Benoit Langlois" >
+<meta name="keywords" content="egf,overview, factory component, factory,orchestration, viewpoint, generation pattern"/>
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+<title>EGF Overview</title>
+</HEAD>
+<BODY BGCOLOR="#ffffff">
+
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+ <tbody>
+ <tr>
+ <td colspan="2" align="left" bgcolor="#0080c0" valign="top">
+ <h2><font face="Arial,Helvetica"><font color="#ffffff">
+ EGF (Eclipse Generation Factories) Overview
+ </font></font></h2>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+
+<a name="introduction"><h2>Introduction</h2></a>
+
+<p class="Para">In order to improve software development industrialization, a major step consists in mass-producing software. This mass-production must be customizable, and must be able to support complex, large-scale and heterogeneous generations. Given the todayÂ’s available Eclipse tools, the issue here is not to provide either a new transformation engine (model-to-model, model-to-text, text-to-model, text-to-text) or DSL editor but to realize their integration for flexible software mass-production. This is the <a href="http://www.eclipse.org/proposals/egf/">purpose of EGF</a>.</p>
+
+<p class="Para">EGF federates generation around the pivotal element of factory component. A factory component is a unit of generation with a clear objective of generation. It has a contract to declare the factory component parameters. Contrary to a classic generation which aggregates all the generation parameters, generation data are organized by viewpoints, such as generation pattern, license description or deployment declaration. Altogether, viewpoints explicitly configure all the generation parameters. The generation orchestration is defined by a production plan. A generation step of the production plan can either be a Java task or, by assembly, an invocation to another factory component. Regarding the lifecycle, a factory component can be edited and executed.</p>
+
+<p class="Para">A factory component encapsulates generation know-how. A portfolio is a consistent set of factory components with a common generation objective, valuable for a development team or a user community. The purpose is to create off-the-shelf factory components. For instance, a technical infrastructure factory provides all the needed mechanisms for an application development (e.g., transaction management, persistence policy).</p>
+
+
+<a name="example"><h2>Example of customization with generation patterns</h2></a>
+
+<p class="Para">The following figure exemplifies a generation by factory component assembly: some factory components have an assembly role while others generate. This generation reuses a viewpoint provided by EGF, a M2T (model-to-text) generation pattern viewpoint for the definition of generation patterns. Those generation patterns, Jet-based today, supports pattern inheritance. This means a M2T generation can overload another one. In this example, by default, the EMF model/edit/editor generation is applied. It can be specialized by inherited patterns. The same principle can be applied to other generations other than EMF, for instance to web services or documentation.</p>
+
+<p align="center">
+ <img src="./images/exampleFCAssembly.jpg" alt="Example of factory component assembly with EGF"/>
+</p>
+<p align="center">
+ <i>Figure 1. Example of factory component assembly with EGF</i>
+</p>
+
+<p class="Para">Next figure presents the EGF perspective. With the view on the left-hand side, the factory component developer develops his own factory components, while with the view on the right-hand side he visualizes the deployed and reusable factory components. This figure shows the viewpoint/orchestration structure of a factory component and the generation delegation between factory components with parameter passing.</p>
+
+<p align="center">
+ <img src="./images/egfPerspective.jpg" alt="The EGF perspective"/>
+</p>
+<p align="center">
+ <i>Figure 2. The EGF perspective</i>
+</p>
+
+
+<a name="twoLevels"><h2>Two levels of factory component development</h2></a>
+
+<p class="Para">As presented in the previous example, the most natural way to put factory components into practice is to develop and assemble factory components. The objective is to create valuable factory components, either for oneÂ’s team or larger development teams, and to reuse them in different generation chains. The issue is to figure out generation practices, how to implement and compose them with factory components, and the generation variability.</p>
+
+<p class="Para">Factory components can be used to address simple generations. But flexibility and customization need more sophisticated mechanisms. For meeting this need, EGF offers the ability to extend the default factory component structure and generation behavior. i) One can add its own viewpoints in order to add new generation data structures, and to augment the capability to parameterize generations. This implies associated factory components are able to use those new viewpoints. ii) One can add its own orchestration types. This means orchestration is not restricted to a unique orchestration notation and engine.</p>
+
+<p class="Para">Industrialization of large-scale development cannot be sum up to a succession of generators. It involves an architecture description of core components, technological generation components with their extensions, and the definition of their generation lifecycles. EGF brings one stone to this tooling aspect.</p>
+
+
+<a name="relationship"><h2>EGF relationships</h2></a>
+
+<p class="Para">Related EGF topics:</p>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">Definition of generation architecture</li>
+ <li CLASS="Item">Generation composition (generation redefinition and extensibility, merge, include/override)</li>
+ <li CLASS="Item">Generation orchestration</li>
+ <li CLASS="Item">Definition of technical and business generation portfolios</li>
+ <li CLASS="Item">Product lines</li>
+</ul>
+
+
+</body>
+</html>
diff --git a/doc/org.eclipse.egf.doc.user/html/whatsNew/egf_whatsnew.html b/doc/org.eclipse.egf.doc.user/html/whatsNew/egf_whatsnew.html
new file mode 100644
index 0000000..94928c9
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/html/whatsNew/egf_whatsnew.html
@@ -0,0 +1,70 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <head>
+ <meta name="copyright" content="Copyright (c) THALES, 2007. All rights reserved." >
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
+ <title>What's New in EGF 0.2.3</title>
+ <script language="JavaScript" type="text/javascript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"> </script>
+ </head>
+
+<body>
+
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+ <tbody>
+ <tr>
+ <td colspan="2" align="left" bgcolor="#0080c0" valign="top">
+ <h2><font face="Arial,Helvetica"><font color="#ffffff">
+ What's New in EGF 0.2.3
+ </font></font></h2>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+
+<p class="Para">The <a href="http://wiki.eclipse.org/EGF_Roadmap">EGF Roadmap</a> is accessible on the Wiki</p>
+
+</br>
+
+
+<h3>EGF 0.2.3 - Eclipse 3.5.1:</h3>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">Task inheritance</li>
+</ul>
+
+
+<h3>EGF 0.2.2 - Eclipse 3.5.1:</h3>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">EGF structure: generation workflow - In/Out/Output parameter management complete</li>
+ <li CLASS="Item">Pattern: Introduction of pattern injection and model-driven pattern strategy</li>
+ <li CLASS="Item">Portfolio: EMF wrapper</li>
+</ul>
+
+
+<h3>EGF 0.2.1 - Eclipse 3.5.1:</h3>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">EGF structure: improvement of the generation workflow</li>
+ <li CLASS="Item">Pattern: Introduction of a method template editor and pattern strategy; improvement of pattern call</li>
+</ul>
+
+
+<h3>EGF 0.2.0 - Eclipse 3.5:</h3>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">Common features: Persistence of factory components and tasks in fcore files; dynamic execution of factory component and task; UI improvement</li>
+ <li CLASS="Item">EGF structure: Extensibility of EGF in order to support contributions (e.g. new viewpoints); support of output, input/output parameters for workflow definition</li>
+ <li CLASS="Item">Pattern: Introduction of pattern inheritance, pattern call; infrastructure able to support new engines</li>
+</ul>
+
+
+<h3>EGF 0.1.0 - Eclipse 3.5:</h3>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">Edition and execution of factory component</li>
+ <li CLASS="Item">Generation Pattern edition and execution with Jet-1</li>
+</ul>
+
+
+
+</body>
+</html>
diff --git a/doc/org.eclipse.egf.doc.user/plugin.properties b/doc/org.eclipse.egf.doc.user/plugin.properties
new file mode 100644
index 0000000..d892142
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/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 Guide (Incubation)
+providerName=Eclipse Modeling Project
diff --git a/doc/org.eclipse.egf.doc.user/plugin.xml b/doc/org.eclipse.egf.doc.user/plugin.xml
new file mode 100644
index 0000000..75a1fab
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/plugin.xml
Binary files differ
diff --git a/doc/org.eclipse.egf.doc.user/toc.xml b/doc/org.eclipse.egf.doc.user/toc.xml
new file mode 100644
index 0000000..f343cad
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/toc.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?NLS TYPE="org.eclipse.help.toc"?>
+<!--
+ 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
+ -->
+
+<toc label="EGF Eclipse Generation Factories Guide">
+ <topic href="html/overview/overview.html" label="Overview">
+ <anchor id="egfOverviews"/>
+ </topic>
+ <topic label="Getting Started">
+ <anchor id="gettingstarted"/>
+ </topic>
+ <topic label="Tutorials">
+ <anchor id="egfEngineTutorials"/>
+ </topic>
+ <topic label="Concepts">
+ <anchor id="concepts"/>
+ </topic>
+ <topic label="Tasks">
+ <anchor id="tasks"/>
+ </topic>
+ <!--<topic label="Process">
+ <anchor id="process"/>
+ </topic>-->
+ <topic label="Reference">
+ <anchor id="reference"/>
+ </topic>
+ <topic label="Factory Component Portfolio">
+ <anchor id="factoryComponents"/>
+ </topic>
+ <topic label="What's new" href="html/whatsNew/egf_whatsnew.html"/>
+ <topic label="Legal" href="html/notices.html"/>
+</toc>
diff --git a/doc/org.eclipse.egf.doc.user/topics_FactoryComponents.xml b/doc/org.eclipse.egf.doc.user/topics_FactoryComponents.xml
new file mode 100644
index 0000000..e024c30
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/topics_FactoryComponents.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?NLS TYPE="org.eclipse.help.toc"?>
+<!--
+ 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
+ -->
+
+<toc label="Factory Component Portfolio" link_to="toc.xml#factoryComponents">
+ <topic label="Core">
+ <anchor id="core"/>
+ </topic>
+ <topic label="Utilities">
+ <anchor id="utilities"/>
+ </topic>
+ <topic label="Users">
+ <anchor id="users"/>
+ </topic>
+</toc>
diff --git a/doc/org.eclipse.egf.doc.user/topics_GettingStarted.xml b/doc/org.eclipse.egf.doc.user/topics_GettingStarted.xml
new file mode 100644
index 0000000..76145c2
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/topics_GettingStarted.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?NLS TYPE="org.eclipse.help.toc"?>
+<!--
+ 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
+ -->
+
+<toc label="Getting Started" link_to="toc.xml#gettingstarted">
+ <topic href="html/gettingStarted/installation/installation.html" label="Installation and First Steps">
+ </topic><topic href="html/gettingStarted/mainFeatures/mainFeatures.html" label="Main features">
+ </topic><topic href="html/gettingStarted/nutshell_examples/nutshell_examples.html" label="Examples">
+ </topic>
+</toc>
diff --git a/doc/org.eclipse.egf.doc.user/topics_Reference.xml b/doc/org.eclipse.egf.doc.user/topics_Reference.xml
new file mode 100644
index 0000000..4090b28
--- /dev/null
+++ b/doc/org.eclipse.egf.doc.user/topics_Reference.xml
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc.pattern/.project b/doc/org.eclipse.egf.engine.doc.pattern/.project
new file mode 100644
index 0000000..dfdab7e
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc.pattern/.project
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.engine.doc.pattern</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <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>
+ </natures>
+</projectDescription>
diff --git a/doc/org.eclipse.egf.engine.doc.pattern/META-INF/MANIFEST.MF b/doc/org.eclipse.egf.engine.doc.pattern/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..517e00c
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc.pattern/META-INF/MANIFEST.MF
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.engine.doc.pattern; singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Require-Bundle:
+ org.eclipse.help
+Bundle-ActivationPolicy: lazy
diff --git a/doc/org.eclipse.egf.engine.doc.pattern/about.html b/doc/org.eclipse.egf.engine.doc.pattern/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc.pattern/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/doc/org.eclipse.egf.engine.doc.pattern/build.properties b/doc/org.eclipse.egf.engine.doc.pattern/build.properties
new file mode 100644
index 0000000..4b237e9
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc.pattern/build.properties
@@ -0,0 +1,18 @@
+##
+# 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
+##
+bin.includes = META-INF/,\
+ about.html,\
+ plugin.xml,\
+ plugin.properties,\
+ contexts.xml,\
+ html/,\
+ toc.xml,\
+ toc_GettingStarted.xml
diff --git a/doc/org.eclipse.egf.engine.doc.pattern/contexts.xml b/doc/org.eclipse.egf.engine.doc.pattern/contexts.xml
new file mode 100644
index 0000000..451af76
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc.pattern/contexts.xml
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc.pattern/html/book.css b/doc/org.eclipse.egf.engine.doc.pattern/html/book.css
new file mode 100644
index 0000000..20041f7
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc.pattern/html/book.css
@@ -0,0 +1,30 @@
+@import "../PRODUCT_PLUGIN/book.css";
+
+span.control {
+ font-weight: bold;
+}
+
+span.name {
+ font-style: italic;
+}
+
+span.code {
+ font-family: monospace;
+}
+
+p.nav_footer {
+ font-weight: bold;
+}
+
+p.nav_footer a {
+ font-weight: bold;
+ font-style: italic;
+}
+
+.code-block {
+ font-family: monospace;
+ white-space: pre;
+ background: #e4e3f1;
+ margin:10px;
+ padding: 5px;
+}
diff --git a/doc/org.eclipse.egf.engine.doc.pattern/html/editor/editor.html b/doc/org.eclipse.egf.engine.doc.pattern/html/editor/editor.html
new file mode 100644
index 0000000..e1b8571
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc.pattern/html/editor/editor.html
@@ -0,0 +1,48 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+ <head>
+ <meta name="copyright" content="Copyright (c) THALES, 2007. All rights reserved." >
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
+ <title>Pattern editor</title>
+ </head>
+ <body>
+ <h1>Pattern editor</h1>
+
+ <p>The Pattern editor provides specialized features for editing a pattern model.</p>
+ <p>The editor includes the following features:</p>
+ <ul>
+ <li>Multiple pages editor : one page per concept</li>
+ <li>Names validation : pattern, parameters, methods</li>
+ <li>Automatic generation of internal content</li>
+ <li>Links with external editors : templates and Java code</li>
+ </ul>
+ <p>
+ The only ways to invoke the Pattern editor
+ is either by double-clicking an in-development pattern in the <a href="../../../org.eclipse.egf.engine.doc/html/reference/views/views-factoryComponentExplorer.html">Factory Component Explorer</a> view,
+ or by double-clicking a deployed one in the <a href="../../../org.eclipse.egf.engine.doc/html/reference/views/views-factoryComponents.html">Factory Components</a> view.
+ </p>
+ <p>
+ The editor is also automatically invoked when a new pattern is created, using the <a href="../../../org.eclipse.egf.engine.doc/html/reference/wizards/wizards-new-pattern.html">New Pattern Wizard</a>.
+ </p>
+ <p><img border="0" src="../../../org.eclipse.egf.engine.doc/html/images/ngrelc.png" alt="Related concepts"></p>
+ <p>
+ <a href="../../../org.eclipse.egf.engine.doc/html/concepts/pattern.html">Pattern</a>
+ </p>
+ <p><img border="0" src="../../../org.eclipse.egf.engine.doc/html/images/ngrelr.png" alt="Related Reference"></p>
+ <p>
+ The editor pages are detailed in the following sections :<br>
+ <a href="page/overview.html">Overview Page</a><br>
+ <a href="page/production.html">Production Page</a><br>
+ <a href="page/specification.html">Specification Page</a><br>
+ <a href="page/inheritance.html">Inheritance Page</a><br>
+ <a href="page/implementation.html">Implementation Page</a><br>
+ </p>
+ <p>
+ Views allowing the editor to be opened :<br>
+ <a href="../../../org.eclipse.egf.engine.doc/html/reference/views/views-factoryComponentExplorer.html">Factory Component Explorer</a><br>
+ <a href="../../../org.eclipse.egf.engine.doc/html/reference/views/views-factoryComponents.html">Factory Components</a><br>
+ </p>
+ </body>
+</html>
diff --git a/doc/org.eclipse.egf.engine.doc.pattern/html/editor/images/implementation/CreateNewAction.png b/doc/org.eclipse.egf.engine.doc.pattern/html/editor/images/implementation/CreateNewAction.png
new file mode 100644
index 0000000..34d0afb
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc.pattern/html/editor/images/implementation/CreateNewAction.png
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc.pattern/html/editor/images/implementation/GenerateMethodActionProperties.png b/doc/org.eclipse.egf.engine.doc.pattern/html/editor/images/implementation/GenerateMethodActionProperties.png
new file mode 100644
index 0000000..6413606
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc.pattern/html/editor/images/implementation/GenerateMethodActionProperties.png
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc.pattern/html/editor/images/implementation/ImplementationViewers.png b/doc/org.eclipse.egf.engine.doc.pattern/html/editor/images/implementation/ImplementationViewers.png
new file mode 100644
index 0000000..ff79323
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc.pattern/html/editor/images/implementation/ImplementationViewers.png
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc.pattern/html/editor/images/implementation/InternalMethodContentEdition.png b/doc/org.eclipse.egf.engine.doc.pattern/html/editor/images/implementation/InternalMethodContentEdition.png
new file mode 100644
index 0000000..48ae5eb
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc.pattern/html/editor/images/implementation/InternalMethodContentEdition.png
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc.pattern/html/editor/images/implementation/InternalMethodProperties.png b/doc/org.eclipse.egf.engine.doc.pattern/html/editor/images/implementation/InternalMethodProperties.png
new file mode 100644
index 0000000..9cd2a00
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc.pattern/html/editor/images/implementation/InternalMethodProperties.png
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc.pattern/html/editor/images/inheritance/SelectParent.png b/doc/org.eclipse.egf.engine.doc.pattern/html/editor/images/inheritance/SelectParent.png
new file mode 100644
index 0000000..7b46692
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc.pattern/html/editor/images/inheritance/SelectParent.png
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc.pattern/html/editor/images/specification/ChooseModel.png b/doc/org.eclipse.egf.engine.doc.pattern/html/editor/images/specification/ChooseModel.png
new file mode 100644
index 0000000..d686924
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc.pattern/html/editor/images/specification/ChooseModel.png
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc.pattern/html/editor/images/specification/TypeSelection.png b/doc/org.eclipse.egf.engine.doc.pattern/html/editor/images/specification/TypeSelection.png
new file mode 100644
index 0000000..c281272
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc.pattern/html/editor/images/specification/TypeSelection.png
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc.pattern/html/editor/page/implementation.html b/doc/org.eclipse.egf.engine.doc.pattern/html/editor/page/implementation.html
new file mode 100644
index 0000000..b034c9d
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc.pattern/html/editor/page/implementation.html
@@ -0,0 +1,98 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <head>
+ <meta name="copyright" content="Copyright (c) THALES, 2007. All rights reserved." >
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <link rel="stylesheet" href="../../book.css" charset="ISO-8859-1" type="text/css">
+ <title>Pattern Editor Implementation Page</title>
+</head>
+<body>
+<h1>Implementation Page</h1>
+ <p>
+ The implementation page defines the pattern implemented behavior.<br/>
+ The implementation is splitted into two concepts :<br/>
+ <ul>
+ <li>The definition of reusable behaviors, named the <a href="#internalMethods"><b>internal methods</b></a>.</li>
+ <li>The orchestration of the usage of the available behaviors, named the <a href="#generateMethod"><b>generate method</b></a>.</li>
+ </ul>
+ <p align="center">
+ <img src="../images/implementation/ImplementationViewers.png" alt="Implementation viewers overview"/>
+ </p>
+ <p>
+ <a name="internalMethods">
+ <h2>The Pattern internal methods section</h2>
+ </a>
+ <p>
+ This is a collection of defined internal methods (behaviors).<br/>
+ <p>
+ A new method can be added by clicking the <b>Add</b> button. It's having a default name (something like <i>newMethodXXX</i>).<br/>
+ </p>
+ <p>
+ To modify a method, click it's representation on the left collection. A new section named <b>Internal method properties</b> appears on the right.
+ <p align="center">
+ <img src="../images/implementation/InternalMethodProperties.png" alt="Internal method properties"/><br/>
+ </p>
+ The method can be renamed (Name field), its content edited (Content link), and its orchestration modified (Sub-list below).<br/>
+ <ul>
+ <li>
+ The name needs to be unique within edited pattern.<br/>
+ It must be the same as parent method one (whatever level the parent may be), in case of overriding need.
+ </li>
+ <li>
+ Clicking the <b>Content</b> link does open the associated JET editor.<br/>
+ <p align="center">
+ <img src="../images/implementation/InternalMethodContentEdition.png" alt="Editing internal method"/>
+ </p>
+ The editor is displaying the internal method name.<br/>
+ To save changes to the implementation, simply save this editor.
+ </li>
+ <li>
+ The orchestration is having sense in the case of an override only.<br/>
+ See the <a href="#generateMethod">Generate method section</a> as of how to use this list, only calls to Super can be added here.
+ </li>
+ </ul>
+ </p>
+ <p>
+ An existing method can be removed.<br/>
+ Select it on the left collection, and click the <b>Remove</b> button.
+ </p>
+ </p>
+ </p>
+ <p>
+ <a name="generateMethod">
+ <h2>The Generate method section</h2>
+ </a>
+ This method is about orchestrating the inherited or local internal methods.<br/>
+ This is defining the pattern behavior as a whole, and is the only visible entry point from outside the pattern.
+ <p>
+ To invoke a new action (ie behavior), click the <b>Add</b> button.<br/>
+ A new dialog opens.<br/>
+ <p align="center">
+ <img src="../images/implementation/CreateNewAction.png" alt="Create a new action"/>
+ </p>
+ <ul>
+ <li>Select the <b>Internal method call</b> action to invoke one of current pattern internal methods.</li>
+ <li>Select the <b>Call to another pattern</b> action to invoke another pattern, as part of current behavior.</li>
+ <li>Select the <b>Super method call</b> action to either invoke parent orchestration (no parameter) or one of the inherited internal methods (parameter).</li>
+ </ul>
+ </p>
+ <p>
+ You can click an action (left viewer) to see its properties.<br/>
+ A new section (<b>Selected action properties</b>) appears on the right side.<br/>
+ <p align="center">
+ <img src="../images/implementation/GenerateMethodActionProperties.png" alt="Display action properties"/>
+ </p>
+ The action properties can not be modified textually, but using the <b>Browse</b> button instead.
+ </p>
+ <p>
+ To organize the orchestration, select an action on the left viewer, and click the <b>Up</b> or <b>Down</b> buttons as required.
+ </p>
+ </p>
+ </p>
+ <p>
+ <img src="../../../../org.eclipse.egf.engine.doc/html/images/ngrelr.png" alt="Related Reference">
+ </p>
+ <a href="../editor.html">Pattern editor</a>
+</body>
+</html>
diff --git a/doc/org.eclipse.egf.engine.doc.pattern/html/editor/page/inheritance.html b/doc/org.eclipse.egf.engine.doc.pattern/html/editor/page/inheritance.html
new file mode 100644
index 0000000..fa1ce65
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc.pattern/html/editor/page/inheritance.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta name="copyright" content="Copyright (c) THALES, 2007. All rights reserved." >
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <link rel="stylesheet" href="../../book.css" charset="ISO-8859-1" type="text/css">
+ <title>Pattern Editor Inheritance Page</title>
+</head>
+
+<body>
+ <h1>Inheritance Page</h1>
+ <p>
+ The inheritance page defines the pattern parent hierarchy.<br/>
+ A pattern can inherit from another one at the uppermost.<br/>
+ <p>
+ The parent selection widget is made of two lists.
+ <ul>
+ <li>The first one, on the left is displaying all the potential parents.</li>
+ <li>The second one, on the right is showing the selected one.</li>
+ </ul>
+ <p>
+ To choose a parent, select it in the left list, and click the <b>></b> button.<br/>
+ Selecting a library disables both buttons.<br/>
+ No new pattern can be selected on the left viewer, and transfered to the right one.
+ </p>
+ </p>
+ <p align="center">
+ <img src="../images/inheritance/SelectParent.png" alt="Select parent pattern"/><br/>
+ </p>
+ <p>
+ To choose a new parent, remove currently selected one.<br/>
+ Click the selected pattern on the right viewer, and click the <b><</b> button.
+ </p>
+ <p>
+ <b>Important note</b>:<br/>
+ Only deployed patterns are shown in the left tree.
+ </p>
+ </p>
+ <p>
+ <img src="../../../../org.eclipse.egf.engine.doc/html/images/ngrelr.png" alt="Related Reference">
+ </p>
+ <a href="../editor.html">Pattern editor</a>
+<p>
+</body>
+</html>
diff --git a/doc/org.eclipse.egf.engine.doc.pattern/html/editor/page/overview.html b/doc/org.eclipse.egf.engine.doc.pattern/html/editor/page/overview.html
new file mode 100644
index 0000000..b63c836
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc.pattern/html/editor/page/overview.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta name="copyright" content="Copyright (c) THALES, 2007. All rights reserved." >
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <link rel="stylesheet" href="../../book.css" charset="ISO-8859-1" type="text/css">
+ <title>Pattern Editor Overview Page</title>
+</head>
+
+<body>
+ <h1>Overview Page</h1>
+ <p>
+ The overview page displays the pattern general information and links to the other pages of a pattern editor.<br/>
+ <h2>General Information section</h2>
+ <p>
+ <table border="1" cellspacing="0" cellpadding="5">
+ <tr>
+ <th>Field</th>
+ <th>Description</th>
+ <th>Modifiable</th>
+ <th>Default value</th>
+ </tr>
+ <tr>
+ <td align="left" valign="top">Name</td>
+ <td align="left" valign="top">The pattern logical name.</td>
+ <td align="left" valign="top">Yes</td>
+ <td align="left" valign="top">The name as specified in the pattern creation wizard.</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">Library id</td>
+ <td align="left" valign="top">The containing library full id.</td>
+ <td align="left" valign="top">No</td>
+ <td align="left" valign="top">Generated at library creation time.</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">Id</td>
+ <td align="left" valign="top">The pattern short id.</td>
+ <td align="left" valign="top">No</td>
+ <td align="left" valign="top">Generated at pattern creation time.</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">Description</td>
+ <td align="left" valign="top">A free text description. Should explain as much as possible the pattern goals and interactions.</td>
+ <td align="left" valign="top">Yes</td>
+ <td align="left" valign="top">Auto-generated description for <i>pattern name</i></td>
+ </tr>
+ </table>
+ </p>
+ <h2>Pattern Content section</h2>
+ <p>
+ Links to the other pages.
+ <br/>
+ <ul>
+ <li>The <a href="./production.html">Production</a> page defines the production parameters applicable to pattern production.</li>
+ <li>The <a href="./specification.html">Specification</a> page defines the pattern parameters and the condition linking those parameters.</li>
+ <li>The <a href="./inheritance.html">Inheritance</a> page defines the pattern parent.</li>
+ <li>The <a href="./implementation.html">Implementation</a> page defines the pattern operations and their templates.</li>
+ </ul>
+ </p>
+ </p>
+ <p>
+ <img border="0" src="../../../../org.eclipse.egf.engine.doc/html/images/ngrelr.png" alt="Related Reference">
+ </p>
+ <a href="../editor.html">Pattern editor</a>
+</body>
+</html>
diff --git a/doc/org.eclipse.egf.engine.doc.pattern/html/editor/page/production.html b/doc/org.eclipse.egf.engine.doc.pattern/html/editor/page/production.html
new file mode 100644
index 0000000..730f0b8
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc.pattern/html/editor/page/production.html
@@ -0,0 +1,64 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta name="copyright" content="Copyright (c) THALES, 2007. All rights reserved." >
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <link rel="stylesheet" href="../../book.css" charset="ISO-8859-1" type="text/css">
+ <title>Pattern Editor Production Page</title>
+</head>
+
+<body>
+ <h1>Production Page</h1>
+ <p>
+ The production page defines the production parameters applicable to pattern production.<br/>
+ <h2>Production options section</h2>
+ <p>
+ This section provides with specific production behaviors.<br/>
+ To modify default or inherited values, check the <i>Override production behavior</i> option.
+ <table border="1" cellspacing="0" cellpadding="5">
+ <tr>
+ <th>Field</th>
+ <th>Description</th>
+ <th>Values and meanings</th>
+ <th>Default value</th>
+ </tr>
+ <tr>
+ <td align="left" valign="top">Compilation step</td>
+ <td align="left" valign="top">Decide whether the pattern should be compiled as a Java class, or left as a JET file.</td>
+ <td align="left" valign="top">
+ <b>Compile</b> to transform the result in a Java class
+ , <b>Skip</b> to leave it as a JET file.
+ If the pattern is not compiled as a Java class, the Pattern Runner factory component won't be able to execute it.
+ </td>
+ <td>Compile</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">Buffer modification</td>
+ <td align="left" valign="top">Decide whether the default JET buffer management should be used (for compatibility), or modified by the pattern implementation as needed.</td>
+ <td align="left" valign="top">
+ <b>Enabled</b> to let the pattern production use buffers as needed. This is mandatory for the use of a Reporter at runtime with Pattern Runner.
+ <b>Disabled</b> to remain compatible with default JET buffer usage. Needed in the case of expected JET files content, as in EMF.
+ </td>
+ <td align="left" valign="top">Enabled</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">Destination path</td>
+ <td align="left" valign="top">Give the produced JET template file a specific path, relative to <i>templates</i> one in current factory component.</td>
+ <td align="left" valign="top">
+ <b>Empty</b>, the framework decides by itself the name, and the location of the resulting template file.
+ <b>A relative path, file name and extension included</b>, the framework sticks to given path. Needed in the case of expected JET files structure, as in EMF.
+ </td>
+ <td align="left" valign="top">Empty</td>
+ </tr>
+ </table>
+ <br/>
+ As mentionned earlier, those values are automatically inherited from the closest parent, if any.
+ </p>
+ </p>
+ <p>
+ <img border="0" src="../../../../org.eclipse.egf.engine.doc/html/images/ngrelr.png" alt="Related Reference">
+ </p>
+ <a href="../editor.html">Pattern editor</a>
+</body>
+</html>
diff --git a/doc/org.eclipse.egf.engine.doc.pattern/html/editor/page/specification.html b/doc/org.eclipse.egf.engine.doc.pattern/html/editor/page/specification.html
new file mode 100644
index 0000000..49962b4
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc.pattern/html/editor/page/specification.html
@@ -0,0 +1,108 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta name="copyright" content="Copyright (c) THALES, 2007. All rights reserved." >
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <link rel="stylesheet" href="../../book.css" charset="ISO-8859-1" type="text/css">
+ <title>Pattern Editor Specification Page</title>
+</head>
+
+<body>
+ <h1>Specification Page</h1>
+ <p>
+ The specification page defines the pattern parameters and the applicable condition for pattern matching.
+ <p>
+ A pattern with parameters act as the following piece of code at runtime :
+ <div class="code-block">
+<pre>for every tuple T of possible <a href="#parameters">parameters</a> values {
+ if (<a href="#condition">condition(T)</a>) {
+ generate(T);
+ }
+}</pre>
+ </div>
+ </p>
+
+ <p>
+ <a name="parameters">
+ <h2>The All Parameters section</h2>
+ </a>
+ This is the list of ordered parameters.<br/>
+ The following actions are available :
+ <ul>
+ <li><b>Add</b> is adding a new parameter to the pattern with a default name and type.</li>
+ <li><b>Remove</b> is removing the selected parameter.</li>
+ <li><b>Up</b> is swapping currently selected parameter with the previous one (higher in the list).</li>
+ <li><b>Down</b> is swapping the currently selected parameter with the next one (lower in the list).</li>
+ </ul>
+ This order is used in the condition class implementation, and at runtime for computation of the current tuple.<br/>
+ Thus inverting the elements may result in different runtime execution speed, depending on the condition content.
+ <h3>The Parameter properties section</h3>
+ The parameter properties are accessible through a details section.
+ <table border="1" cellspacing="0" cellpadding="5">
+ <tr>
+ <th>Field</th>
+ <th>Description</th>
+ <th>Modifiable</th>
+ <th>Default value</th>
+ </tr>
+ <tr>
+ <td align="left" valign="top">Name</td>
+ <td align="left" valign="top">
+ The parameter name. Used in the condition class and in the pattern templates.<br/>
+ This name should be unique in the whole pattern execution chain.
+ </td>
+ <td align="left" valign="top">Yes</td>
+ <td align="left" valign="top">newParameter<i>XXX</i></td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">Type</td>
+ <td align="left" valign="top">
+ The parameter type. Used in the condition class and in the pattern templates.<br/>
+ Each parameter can take a different type from a different metamodel, as long as it makes sense with the model
+ used when executing the pattern.
+ </td>
+ <td align="left" valign="top">Yes, through the <b>Browse...</b> button</td>
+ <td align="left" valign="top">EClass, from Ecore metamodel</i></td>
+ </tr>
+ </table>
+ <p>
+ The following action is available :
+ <ul>
+ <li>
+ <b>Browse...</b> is opening a new type selection window.
+ </li>
+ </ul>
+ <p align="center">
+ <img src="../images/specification/TypeSelection.png" alt="Parameter type selection window"/><br/>
+ </p>
+ It is displaying the available types for currently selected model (by default, Ecore metamodel). One can change the selected model by pressing the <b>Choose model...</b>
+ button. The EMF default load resource window is then displayed.<br/>
+ <p align="center">
+ <img src="../images/specification/ChooseModel.png" alt="Load Resource window"/><br/>
+ </p>
+ Although this window allows the user to select a resource from the file system or from the workspace, the user should always browse registered packages.
+ Once <b>Browse Registered Packages...</b> is hit, the Package Selection window is displayed. The user can now select a new model based on its base package URI.
+ Back to the type selection window, the new available types are displayed.
+ </p>
+ </p>
+ <p>
+ <a name="condition">
+ <h2>The Edit condition class section</h2>
+ </a>
+ It is just made of a single link to the condition class.<br/>
+ By clicking this link, the corresponding Java class is opened for edition.<br/>
+ For synchronization purpose, the content of this class is recomputed if the parameters list has changed.
+ It is also recomputed each time a Save command happens for the current editor.
+ <h3>The Condition class current content section</h3>
+ It is a text component showing the currently known content of the condition class.<br/>
+ Since there is no Java edition feature attach to this widget, it might only be helpful in consultation mode (that is when the content can not be changed).
+ This mode is activated only for deployed factory components.
+ </p>
+ </p>
+ <p>
+ <img border="0" src="../../../../org.eclipse.egf.engine.doc/html/images/ngrelr.png" alt="Related Reference">
+ </p>
+ <a href="../editor.html">Pattern editor</a>
+</body>
+</html>
diff --git a/doc/org.eclipse.egf.engine.doc.pattern/html/tutorial/DEPRECATED_common/images/TryIt.gif b/doc/org.eclipse.egf.engine.doc.pattern/html/tutorial/DEPRECATED_common/images/TryIt.gif
new file mode 100644
index 0000000..f4927a4
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc.pattern/html/tutorial/DEPRECATED_common/images/TryIt.gif
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc.pattern/html/tutorial/DEPRECATED_common/images/tag_1.gif b/doc/org.eclipse.egf.engine.doc.pattern/html/tutorial/DEPRECATED_common/images/tag_1.gif
new file mode 100644
index 0000000..4859d6f
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc.pattern/html/tutorial/DEPRECATED_common/images/tag_1.gif
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc.pattern/html/tutorial/DEPRECATED_common/images/tag_2.gif b/doc/org.eclipse.egf.engine.doc.pattern/html/tutorial/DEPRECATED_common/images/tag_2.gif
new file mode 100644
index 0000000..5ea43dc
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc.pattern/html/tutorial/DEPRECATED_common/images/tag_2.gif
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc.pattern/html/tutorial/DEPRECATED_common/images/tip.gif b/doc/org.eclipse.egf.engine.doc.pattern/html/tutorial/DEPRECATED_common/images/tip.gif
new file mode 100644
index 0000000..77b2451
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc.pattern/html/tutorial/DEPRECATED_common/images/tip.gif
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc.pattern/html/tutorial/part1/egf-tutorial-pattern1.html b/doc/org.eclipse.egf.engine.doc.pattern/html/tutorial/part1/egf-tutorial-pattern1.html
new file mode 100644
index 0000000..6e1ac80
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc.pattern/html/tutorial/part1/egf-tutorial-pattern1.html
@@ -0,0 +1,264 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>
+ EGF Tutorial - Pattern. First steps.
+ </title>
+ <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css" />
+
+ <meta name="copyright" content="Copyright (c) Thales Corporate Services S.A.S, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." />
+ <meta name="author" content="Benoit Langlois" />
+ <meta name="keywords" content="egf,pattern"/>
+</head>
+
+<body xml:lang="EN-US" lang="EN-US">
+
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+ <tbody>
+ <tr>
+ <td colspan="2" align="left" bgcolor="#0080c0" valign="top">
+ <h2><font face="Arial,Helvetica"><font color="#ffffff">
+ EGF Tutorial - Pattern. First steps.
+ </font></font></h2>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+<p class="Para">This first tutorial explains how to create and execute simple patterns with EGF. A pattern is a solution to a recurrent generation problem. A pattern is based on a language, for instance Jet for model-to-text transformations. The pattern technique allows pattern inheritance, delegation to other patterns in order to elaborate reusable and customizable generation solutions.</p>
+
+<br/>
+
+<h2 class="Head">1. Creation of pattern</h2>
+
+<h3 class="Head">1.1. Comprehension</h3>
+<p class="Para"><i>Pattern organization</i>. Patterns are organized by pattern libraries. A <b>pattern library</b> contains a set of patterns and a set of pattern libraries.</p>
+<p class="Para"><i>Pattern nature</i>. A <b>pattern nature</b> indicates which language the pattern implementation conforms to (e.g. Java, Jet).</p>
+<p class="Para"><i>Pattern views</i>. A pattern is visualized with three different folders: 1) Overview, 2) <b>Specification</b> which represents the external view of a pattern, 3) <b>Implementation</b> which represents the internal view of a pattern and where the pattern is implemented.</p>
+
+
+<h3 class="Head">1.2. Practice</h3>
+
+<p class="Para">The sequence of actions to <i>create a pattern</i>:</p>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">Create the <i>viewpoints</i> node - On a factory component, Commands: <i>[New Child][Viewpoint Container]</i></li>
+ <li CLASS="Item">Create the <i>Pattern Viewpoint</i> node - On the <i>Viewpoint Container</i> node, Commands: <i>[New Child][Pattern Viewpoint]</i></li>
+ <li CLASS="Item">Create a pattern library - On the pattern viewpoint, Commands: <i>[New Child][Library]</i></li>
+ <li CLASS="Item">Next, create a <i>pattern</i> - On the pattern library, Commands: <i>[New Child][JetNature Pattern | JavaNature Pattern]</i></li>
+ <li CLASS="Item">Edit the pattern - On the pattern, Commands: <i>[Double-click]</i> or <i>[Right-Click][Open]</i></li>
+ <li CLASS="Item">Set the pattern name</li>
+</ul>
+
+<h3 class="Head">1.3. Application</h3>
+<p class="Para">Create a pattern with the Jet nature.</p>
+
+<p align="left">
+ <img src="./images/egf_tut_pattern_1_1.png" alt="New pattern"/>
+</p>
+<p align="left"><i>Figure 1. Example of new pattern</i></p>
+
+<br/>
+
+<h2 class="Head">2. Definition of the pattern specification</h2>
+
+<h3 class="Head">2.1. Comprehension</h3>
+
+<p class="Para"><i>Specification view</i>. This view enables to set 1) the super-pattern of the current pattern when pattern inheritance is needed, 2) the pattern nature already set during the pattern creation, 3) the pattern parameters.</p>
+<p class="Para"><i>Pattern query and parameter</i>. The pattern applies queries over a resource that the pattern consumes, for instance a model. Each query record is successively stored in a parameter. The record process is described in the pattern implementation.</p>
+<p class="Para"><i>Pattern query</i>. EGF proposes a default model query. The query list is extensible.</p>
+<p class="Para"><i>Pattern parameter</i>. The pattern type is either a class defined in an ecore model or a Java type (class or interface).</p>
+
+
+<h3 class="Head">2.2. Practice</h3>
+<p class="Para">The sequence of actions to define <i>pattern parameters and their query</i>:</p>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">In the Specification view, in the Parameters section - Command: <i>[+]</i>, set the parameter name</li>
+ <li CLASS="Item">Set the parameter type - Command: choose the model and a class type</li>
+ <li CLASS="Item">Set the query - Command: choose the query, for instance <i>Basic query</i></li>
+</ul>
+
+<h3 class="Head">2.3. Application</h3>
+<p class="Para">Create an EClass parameter with the <i>Basic query</i> to navigate over the model.</p>
+
+<p align="left">
+ <img src="./images/egf_tut_pattern_1_2.png" alt="Pattern Specification View"/>
+</p>
+<p align="left"><i>Figure 2. Pattern Specification View</i></p>
+<br/>
+
+
+<h2 class="Head">3. Definition of the pattern implementation</h2>
+
+<h3 class="Head">3.1. Comprehension</h3>
+
+<p class="Para"><i>Implementation view</i>. This view enables to define pattern methods, the method orchestration, and local variables.</p>
+<p class="Para"><i>Pattern methods</i>. Four methods are predefined: header, init, preCondition and footer. Header is used for instance to declare the Jet declaration, init for the initialization of local variables (cf. explanation below), preCondition to filter records onto a query result. The user creates as many as methods s/he wants to implement the pattern. Each pattern method contents is supposed to conform to the pattern nature, for instance Jet-based code.</p>
+<p class="Para"><i>Pattern method orchestration</i>. The method orchestration defines the order to call available methods and patterns: methods local to the current pattern, methods from the super-patterns, pattern call with parameter context passing, pattern call with injection.</p>
+<p class="Para"><i>Pattern variables</i>. The pattern variables are accessible by any method of the current pattern. The type is either a class defined in an ecore model or a Java type (class or interface). Pattern variables can be initialized in the <i>init</i> method, update and used in the pattern methods.</p>
+
+
+<h3 class="Head">3.2. Practice</h3>
+<p class="Para">The sequence of actions to manage the <i>implementation methods</i>:</p>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">Use the palette to add/delete/rename/reorder a method.</li>
+ <li CLASS="Item">To edit method, double-click on a method of the <i>Implementation methods</i> list. Next, a pattern templates editor allows editing any other method.</li>
+</ul>
+
+<p class="Para">The sequence of actions to manage <i>variables</i>:</p>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">In the variables, to add a variable, Command: <i>[+]</i>, set the parameter name</li>
+ <li CLASS="Item">Set the parameter type - Command: click on the type and select the model / Java type</li>
+</ul>
+
+
+<p class="Para">The sequence of actions to manage the <i>method orchestration</i>:</p>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">Use the palette to add/delete/rename/reorder methods</li>
+ <li CLASS="Item">Drag and drop a method from the <i>Implementation methods</i> list</li>
+ <li CLASS="Item">For a super-method call, after clicking on <i>+</i>, choose the <i>method call</i> option, and next select the super-method.</li>
+</ul>
+
+
+<h3 class="Head">3.3. Application</h3>
+<p class="Para">Implement the default body method. Add the following Jet code:</p>
+ <font color="777777"><pre>
+Hello <%= parameter.getName() %>!
+ </pre></font>
+<p class="Para">Drag and drop the method in the pattern orchestration part.</p>
+
+
+<br/>
+
+<h2 class="Head">4. Configuration of the pattern execution</h2>
+
+<h3 class="Head">4.1. Comprehension - Principle of pattern execution</h3>
+<p class="Para">The following figure depicts how patterns are applied onto a domain resource.</p>
+
+<p align="left">
+ <img src="./images/egf_tut_pattern_1_3.png" alt="Pattern Execution"/>
+</p>
+<p align="left"><i>Figure 3. Pattern Execution</i></p>
+
+<p class="Para"><i>Pattern strategies</i>. A pattern strategy indicates how to apply patterns onto a resource. For instance, a pattern-oriented strategy successively applies a set of patterns onto a resource; a model-oriented strategy applies a set of patterns successively onto each model element. The model-driven strategy takes care of the model element order while the pattern-oriented strategy does not.</p>
+<p class="Para"><i>Tasks to execute patterns</i>. A task must be introduced in order to put in action all the elements described. This task must know:
+ <ol CLASS="UnorderedList">
+ <li> The resource applied on the patterns, for instance a model,</li>
+ <li> The selection of pattern(s) or the pattern library(ies),</li>
+ <li> The reporter (see below).</li>
+ </ol>
+</p>
+
+<p class="Para"><i>Domain resource</i>. Patterns are applied onto a resource, such as a domain model.</p>
+
+<p class="Para"><i>Pattern execution engines</i>. Patterns have a nature (e.g., Jet, Java). Then, at execution time, an engine executes a pattern according its nature. On the pattern flow, different pattern execution engines can be activated.</p>
+
+<p class="Para"><i>Reporter</i>. A reporter is typically useful for model-to-text transformation. Each pattern provides an output result that must be consolidated in one or several files. A reporter serves to report the result of the pattern implementation, for instance on the console or in a file.</p>
+<br/>
+
+<h3 class="Head">4.2. Practice</h3>
+<p class="Para">A task is used to execute a pattern or a set of patterns. This task must know: 1) the domain model, 2) the pattern or pattern library list, 3) the pattern strategy, and 4) the reporter. This tutorial uses the <i>Model-driven pattern strategy</i>. The use of pattern reporter is explained below.</p>
+<p class="Para">The sequence of actions to create a task for pattern execution:</p>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item"><i>Domain creation</i>. This step can be reused independently of the pattern usage.</li>
+ <ul CLASS="UnorderedList">
+ <li CLASS="Item">Step 1. Creation of the domain reference</li>
+ <ul CLASS="UnorderedList">
+ <li CLASS="Item">Creation of the domain viewpoint where domains are declared - On the Viewpoint Container, Command: [New Child][Domain Viewpoint]</li>
+ <li CLASS="Item">Creation of a domain reference - On the Domain Viewpoint, Command: [New Child][URI]. Next, in the Uri property, providing a Uri like <i>platform:/plugin/org.eclipse.egf.model/model/Fcore.ecore</i></li>
+ </ul>
+ <li CLASS="Item">Step 2. Creation of a domain parameter</li>
+ <ul CLASS="UnorderedList">
+ <li CLASS="Item">Creation of a domain reference as a production plan parameter - On the production plan, Command: [New Child][Orchestration Parameter Container]</li>
+ <li CLASS="Item">Creation of a parameter - On the Orchestration Parameter Container, Commands: [New Child][Orchestration Parameter]; Set the parameter name; Set the Domain property to the Uri created just before</li>
+ </ul>
+ </ul>
+ <br/>
+ <li CLASS="Item"><i>Configuration of the pattern call</i>.</li>
+ <ul CLASS="UnorderedList">
+ <li CLASS="Item">Creation of the pattern execution task - On the Production Plan node, Command: [Right-Click][Invoke Activity], and choose the <i>Model driven pattern strategy task [Task Java]</i></li>
+ <li CLASS="Item">Remove the <i>pattern.execution.reporter</i>, <i>pattern.call.back.handler</i> and <i>pattern.modeldriven.visitor</i> contracts</li>
+ <li CLASS="Item">Set the domain identification - On the new Activity / Invocation Contract Container / domain Invocation Contract, Command: 1) Set the Orchestration Parameter to the Orchestration Parameter newly created</li>
+ <li CLASS="Item">Set the pattern library - On the new Activity / Invocation Contract Container / pattern.ids Invocation Contract, Command: [New Child][Type Pattern List]; Next, [Click on the Elements Property], select the pattern library newly created</li>
+ </ul>
+</ul>
+
+<br/>
+
+
+<h3 class="Head">4.3. Application</h3>
+<p class="Para">Create a pattern task invocation as described above. Example of domain: <i>platform:/plugin/org.eclipse.egf.model/model/Fcore.ecore</i>.</p>
+
+<p class="Para">Finally, execute the factory component. The output is displayed on the console.</p>
+
+<br/>
+
+
+<h3 class="Head">4.4. Fixing pattern method errors</h3>
+<p class="Para">Patterns to be compiled are compiled when a pattern is saved. Errors may be raised and, as a consequence, the pattern execution would fail. Then:</p>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">At anytime, in order to regenerate pattern classes and methods: 1) delete the packages under the project <i>generated</i> folder, 2) right-click on the Pattern viewpoint, and apply the [Update generated elements] command on the Pattern viewpoint.</li>
+ <li CLASS="Item">Fixing the errors. Locate the errors in the generated methods, update the pattern methods accordingly, and save the pattern methods.</li>
+</ul>
+
+<br/>
+
+<h3 class="Head">4.5. Comprehension - Pattern Reporter</h3>
+<p class="Para"><i>Reporter class</i>. A reporter is a Java class which implements the PatternExecutionReporter class.</p>
+<p class="Para"><i>Collecting the result</i>. There are two methods to collect the execution result of one pattern: 1) the <i>loopFinished</i> method collects the result for one pattern and for one query tuple, 2) the <i>executionFinished</i> method collects the result for one pattern, which is the aggregation of the <i>loopFinished</i> method results.</p>
+<p class="Para"><i>Reporting the result</i>. The result is generally reported in with the selected media, e.g. a file.</p>
+
+<p class="Para">For more complex reports, refer to the <i>org.eclipse.egf.emf.docgen.html</i> plug-in which examplifies the case of result in a file and a specific folder.</p>
+
+<br/>
+
+<h3 class="Head">4.6. Practice</h3>
+
+<p class="Para">1. Create a reporter Java class like this one:</p>
+ <font color="777777"><pre>
+Package org.eclipse.egf.examples.uc1.reporter;
+
+import java.util.Map;
+
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.model.pattern.PatternContext;
+import org.eclipse.egf.model.pattern.PatternExecutionReporter;
+
+public class MyReporter implements PatternExecutionReporter{
+
+ @Override
+ public void executionFinished(String output, PatternContext context) {
+ // Message on the default console
+ System.out.println("Result of pattern:\n"+output);
+ // Message on the EGF console
+ EGFCorePlugin.getDefault().logInfo("Result of pattern:\n"+output);
+ }
+
+ @Override
+ public void loopFinished(String output, PatternContext context,
+ Map<String, Object> parameterValues) {
+ // TODO Auto-generated method stub
+ }
+
+}
+ </pre></font>
+
+<p class="Para">2. Complete the task with the reporter parameter:
+ <ul CLASS="UnorderedList">
+ <li CLASS="Item">Add a contract to the task created before</li>
+ <li CLASS="Item">For Behaviour/Invoked Contract property, select the <i>pattern.execution.reporter</i> contract (removed before!)</li>
+ <li CLASS="Item">Add the <i>Type Pattern Execution Reporter</i> and for value, select the pattern reporter class</li>
+ </ul>
+</p>
+
+<h2 class="Head">5. Pattern translation</h2>
+<p class="Para">The pattern contents is translated into an executable form. This takes into account pattern inheritance and other pattern mechanisms not explained in this tutorial (e.g., pattern call). Next, at execution time, a pattern engine, specific to the pattern nature, executes a pattern.</p>
+<p class="Para">Patterns are translated on the fly. One case requires to manually force pattern rebuild: pattern inheritance. Indeed, children are not notified that a super-pattern in the hierarchy is update. To force this translation:</p>
+
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">On the <i>Pattern viewpoint</i> which contains all the pattern libraries - Command: <i>[Right-Click][Update generated elements]</i> </li>
+</ul>
+
+
+</body>
+</html>
diff --git a/doc/org.eclipse.egf.engine.doc.pattern/html/tutorial/part1/images/egf_tut_pattern_1_1.png b/doc/org.eclipse.egf.engine.doc.pattern/html/tutorial/part1/images/egf_tut_pattern_1_1.png
new file mode 100644
index 0000000..f815d57
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc.pattern/html/tutorial/part1/images/egf_tut_pattern_1_1.png
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc.pattern/html/tutorial/part1/images/egf_tut_pattern_1_2.png b/doc/org.eclipse.egf.engine.doc.pattern/html/tutorial/part1/images/egf_tut_pattern_1_2.png
new file mode 100644
index 0000000..5e2ea34
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc.pattern/html/tutorial/part1/images/egf_tut_pattern_1_2.png
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc.pattern/html/tutorial/part1/images/egf_tut_pattern_1_3.png b/doc/org.eclipse.egf.engine.doc.pattern/html/tutorial/part1/images/egf_tut_pattern_1_3.png
new file mode 100644
index 0000000..1993b8b
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc.pattern/html/tutorial/part1/images/egf_tut_pattern_1_3.png
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc.pattern/plugin.properties b/doc/org.eclipse.egf.engine.doc.pattern/plugin.properties
new file mode 100644
index 0000000..4ad1c9b
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc.pattern/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 Pattern Documentation (Incubation)
+providerName=Eclipse Modeling Project
diff --git a/doc/org.eclipse.egf.engine.doc.pattern/plugin.xml b/doc/org.eclipse.egf.engine.doc.pattern/plugin.xml
new file mode 100644
index 0000000..435ea62
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc.pattern/plugin.xml
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc.pattern/toc.xml b/doc/org.eclipse.egf.engine.doc.pattern/toc.xml
new file mode 100644
index 0000000..9b8b04a
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc.pattern/toc.xml
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc.pattern/toc_GettingStarted.xml b/doc/org.eclipse.egf.engine.doc.pattern/toc_GettingStarted.xml
new file mode 100644
index 0000000..2427d6e
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc.pattern/toc_GettingStarted.xml
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/.project b/doc/org.eclipse.egf.engine.doc/.project
new file mode 100644
index 0000000..314c9e2
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/.project
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.engine.doc</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <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>
+ </natures>
+</projectDescription>
diff --git a/doc/org.eclipse.egf.engine.doc/META-INF/MANIFEST.MF b/doc/org.eclipse.egf.engine.doc/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..fa0be1a
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/META-INF/MANIFEST.MF
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.engine.doc; singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Require-Bundle:
+ org.eclipse.help,
+ org.eclipse.pde.core
+Bundle-ActivationPolicy: lazy
diff --git a/doc/org.eclipse.egf.engine.doc/about.html b/doc/org.eclipse.egf.engine.doc/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/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/doc/org.eclipse.egf.engine.doc/build.properties b/doc/org.eclipse.egf.engine.doc/build.properties
new file mode 100644
index 0000000..579d11f
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/build.properties
@@ -0,0 +1,27 @@
+
+##
+# 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
+##
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.xml,\
+ plugin.properties,\
+ html/,\
+ toc_FactoryComponents.xml,\
+ toc_GettingStarted.xml,\
+ topics_Concepts.xml,\
+ topics_Overviews.xml,\
+ topics_Reference_Api.xml,\
+ topics_Reference_Icons.xml,\
+ topics_Reference_Preferences.xml,\
+ topics_Reference_Views.xml,\
+ topics_Reference_Wizards_Edit.xml,\
+ topics_Reference_Wizards.xml
diff --git a/doc/org.eclipse.egf.engine.doc/html/book.css b/doc/org.eclipse.egf.engine.doc/html/book.css
new file mode 100644
index 0000000..19bb3fa
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/book.css
@@ -0,0 +1,30 @@
+@import "../PRODUCT_PLUGIN/book.css";
+
+span.control {
+ font-weight: bold;
+}
+
+span.name {
+ font-style: italic;
+}
+
+span.code {
+ font-family: monospace;
+}
+
+p.nav_footer {
+ font-weight: bold;
+}
+
+p.nav_footer a {
+ font-weight: bold;
+ font-style: italic;
+}
+
+.code-block {
+ font-family: monospace;
+ white-space: pre;
+ background: #e4e3f1;
+ margin:10px;
+ padding: 5px;
+}
diff --git a/doc/org.eclipse.egf.engine.doc/html/concepts/activity/activity.html b/doc/org.eclipse.egf.engine.doc/html/concepts/activity/activity.html
new file mode 100644
index 0000000..c1b8b60
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/concepts/activity/activity.html
@@ -0,0 +1,51 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+
+<meta name="copyright" content="Copyright (c) Thales Corporate Services S.A.S, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="author" content="Benoit Langlois" >
+<meta name="keywords" content="activity"/>
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+<title>Activity</title>
+</HEAD>
+<BODY BGCOLOR="#ffffff">
+
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+ <tbody>
+ <tr>
+ <td colspan="2" align="left" bgcolor="#0080c0" valign="top">
+ <h2><font face="Arial,Helvetica"><font color="#ffffff">
+ Activity
+ </font></font></h2>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+<a name="definition"><h2>Definition</h2></a>
+<p class="Para">An activity is a work unit with a work context. Applied to generation in EGF, an activity is a generation unit.</p>
+
+
+<a name="motivation"><h2>Motivation</h2></a>
+<p class="Para">An activity defines a work unit in a software process. The purpose of EGF is to target automated activities. Factory component and task are examples of activities. This list is extensible. For instance, process could be a candidate of new activity.</p>
+
+<a name="structure"><h2>Structure</h2></a>
+
+<p class="Para">An activity has a name, description and a set of contracts that represent the activity parameters. This basic structure is specialized afterward by activity subclasses, such as the factory component that contains viewpoints and an orchestration where activities can be called.</p>
+<br/>
+
+
+<p align="center">
+<img src="./images/activityStructure.jpg" alt="Activity Structure"/>
+</p>
+<p align="center">
+<i>Figure 1. Activity structure</i>
+</p>
+
+
+</body>
+</html>
diff --git a/doc/org.eclipse.egf.engine.doc/html/concepts/activity/images/activityStructure.jpg b/doc/org.eclipse.egf.engine.doc/html/concepts/activity/images/activityStructure.jpg
new file mode 100644
index 0000000..6a3ae7a
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/concepts/activity/images/activityStructure.jpg
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/concepts/activityInvocation/activityInvocation.html b/doc/org.eclipse.egf.engine.doc/html/concepts/activityInvocation/activityInvocation.html
new file mode 100644
index 0000000..ef7e717
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/concepts/activityInvocation/activityInvocation.html
@@ -0,0 +1,49 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+
+<meta name="copyright" content="Copyright (c) Thales Corporate Services S.A.S, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="author" content="Benoit Langlois" >
+<meta name="keywords" content="factory invocation, factory"/>
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+<title>Activity Invocation</title>
+</HEAD>
+<BODY BGCOLOR="#ffffff">
+
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+ <tbody>
+ <tr>
+ <td colspan="2" align="left" bgcolor="#0080c0" valign="top">
+ <h2><font face="Arial,Helvetica"><font color="#ffffff">
+ Activity invocation
+ </font></font></h2>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+<a name="definition"><h2>Definition</h2></a>
+<p class="Para">An activity invocation is a step of an orchestration which invokes either an activity, i.e. a factory component or Java task.</p>
+
+
+<a name="motivation"><h2>Motivation</h2></a>
+<p class="Para">An activity invocation corresponds to a delegation of work to another activity.</p>
+
+<a name="structure"><h2>Structure</h2></a>
+<p class="Para">A factory component delegates its work to a factory component or to a Java task. This creates a graph of activity dependencies (and not a tree, because an activaty can be used by several factory components). In a production plan, this graph of activity dependencies defines the execution order to execute activity factory components and Java tasks.</p>
+<p class="Para">A parameter of an activity invocation is linked to an activity contract. The parameter value is either the value of a factory component contract, an orchestration context, or a local value to the activity invocation.</p>
+
+<p align="center">
+ <img src="./images/activityInvocationStructure.jpg" alt="Activity Invocation Structure"/>
+</p>
+<p align="center">
+ <i>Figure 1. Activity Invocation Structure</i>
+</p>
+
+
+</body>
+</html>
diff --git a/doc/org.eclipse.egf.engine.doc/html/concepts/activityInvocation/images/activityInvocationStructure.jpg b/doc/org.eclipse.egf.engine.doc/html/concepts/activityInvocation/images/activityInvocationStructure.jpg
new file mode 100644
index 0000000..f60d88b
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/concepts/activityInvocation/images/activityInvocationStructure.jpg
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/concepts/asset/asset.html b/doc/org.eclipse.egf.engine.doc/html/concepts/asset/asset.html
new file mode 100644
index 0000000..2198a31
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/concepts/asset/asset.html
@@ -0,0 +1,57 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+
+<meta name="copyright" content="Copyright (c) Thales Corporate Services S.A.S, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="author" content="Benoit Langlois" >
+<meta name="keywords" content="asset"/>
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+<title>Asset</title>
+</HEAD>
+<BODY BGCOLOR="#ffffff">
+
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+ <tbody>
+ <tr>
+ <td colspan="2" align="left" bgcolor="#0080c0" valign="top">
+ <h2><font face="Arial,Helvetica"><font color="#ffffff">
+ Asset
+ </font></font></h2>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+<a name="definition"><h2>Definition</h2></a>
+<p class="Para">An asset is a software artifact defined and playing a role in a software development process.</p>
+
+
+<a name="motivation"><h2>Motivation</h2></a>
+<p class="Para">The purpose of a factory component is to automate production of software artifacts from input software artifacts. The term "Asset" is a generic term to designate any software artifact (e.g., a model, a document, code, a framework) used and produce by a factory component.</p>
+
+<a name="structure"><h2>Structure</h2></a>
+
+<p class="Para">An asset conforms to an asset type (e.g., a model, a language, a framework, a tool) defined in a language. This language is represented or not by a model. The list of asset types is open, however the major ones are: basic types (e.g., Integer, Boolean, etc.), model, (general or specific) language, framework, library, component and tool. Complex assets are broken down into assets. Complex assets can be built at once or at different stages across a software process. For instance, generation of tool code and configuration files of this tool can be built simultaneously or by several factory components.</p>
+<p class="Para">While an asset type is a logical representation, an asset has a physical representation (e.g., a web site asset is materialized by a set of html files). This physical representation must be taken into account during a generation. For executable assets, an asset behavior conforms to an execution semantics on a specific execution platform.</p>
+
+<p class="Para">Software product line engineering differentiates two kinds of asset: reusable assets and products. Reusable assets are usable or not as is, or partially, and need to be customized to give products. In software engineering, a product is for instance a software application.</p>
+
+<p align="center">
+<img src="./images/assetStructure.jpg" alt="Asset Structure"/>
+</p>
+<p align="center">
+<i>Figure 1. Example of assets</i>
+</p>
+
+
+<a name="inEgf"><h2>In EGF</h2></a>
+<p class="Para">An Orchestration used input/output data. Those data have a type defined 1) in the extendable default EGF basic type list, or 2) in a viewpoint (e.g., a domain model).</p>
+
+<br>
+
+</body>
+</html>
diff --git a/doc/org.eclipse.egf.engine.doc/html/concepts/asset/images/assetStructure.jpg b/doc/org.eclipse.egf.engine.doc/html/concepts/asset/images/assetStructure.jpg
new file mode 100644
index 0000000..3f6bb37
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/concepts/asset/images/assetStructure.jpg
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/concepts/contract/contract.html b/doc/org.eclipse.egf.engine.doc/html/concepts/contract/contract.html
new file mode 100644
index 0000000..8001d59
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/concepts/contract/contract.html
@@ -0,0 +1,49 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+
+<meta name="copyright" content="Copyright (c) Thales Corporate Services S.A.S, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="author" content="Benoit Langlois" >
+<meta name="keywords" content="contract"/>
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+<title>Contract</title>
+</HEAD>
+<BODY BGCOLOR="#ffffff">
+
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+ <tbody>
+ <tr>
+ <td colspan="2" align="left" bgcolor="#0080c0" valign="top">
+ <h2><font face="Arial,Helvetica"><font color="#ffffff">
+ Contract
+ </font></font></h2>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+
+<a name="definition"><h2>Definition</h2></a>
+
+<p class="Para">A contract is the declaration of a datum required for the execution of an activity, i.e. a factory component or task.</p>
+
+
+<a name="motivation"><h2>Motivation</h2></a>
+<p class="Para">A contract is a visible piece of information required to execute an activity. The set of contracts of an activity encapsulates internal information and represents the dependencies with other activities.</p>
+
+<a name="structure"><h2>Structure</h2></a>
+<p class="Para">Contract properties:</p>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">It has a mode: Input / Output / Input-Output</li>
+ <li CLASS="Item">It is mandatory or optional</li>
+ <li CLASS="Item">It is is a key/value association</li>
+ <li CLASS="Item">A value has a type that can be simple (e.g., a string value), complex (e.g., a list) or a reference (e.g., a domain model reference)
+ <li CLASS="Item">It can have a default value</li>
+</ul>
+
+</body>
+</html>
diff --git a/doc/org.eclipse.egf.engine.doc/html/concepts/domain/domain.html b/doc/org.eclipse.egf.engine.doc/html/concepts/domain/domain.html
new file mode 100644
index 0000000..a0dab12
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/concepts/domain/domain.html
@@ -0,0 +1,69 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+
+<meta name="copyright" content="Copyright (c) Thales Corporate Services S.A.S, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="author" content="Benoit Langlois" >
+<meta name="keywords" content="domain"/>
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+<title>Domain</title>
+</HEAD>
+<BODY BGCOLOR="#ffffff">
+
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+ <tbody>
+ <tr>
+ <td colspan="2" align="left" bgcolor="#0080c0" valign="top">
+ <h2><font face="Arial,Helvetica"><font color="#ffffff">
+ Domain
+ </font></font></h2>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+<a name="definition"><h2>Definition</h2></a>
+<p class="Para">
+A domain is a field of interest or knowledge <a href="#[1]">[1]</a><a href="#[3]">[3]</a>.
+</p>
+
+
+<a name="motivation"><h2>Motivation</h2></a>
+<p class="Para">A domain is characterized by the relevant objects (a.k.a. concepts) and their relationships. The relevance is relative to the problem at hand, and the decision of whether or not certain objects and relationships are relevant is made by the team who analyzes the domain in the context of a problem, which needs a solution (a.k.a. "Analysts.") <a href="#[2]">[2]</a>. A domain is scoped to maximize the satisfaction of the requirements of its stakeholders, it includes a set of concepts and terminology understood by practitioners in that area, and includes the knowledge of how to build software systems (or parts of software systems) in that area <a href="#[1]">[1]</a>.</p>
+
+<p class="Para">Examples of types of domains:</p>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">Business: focus on enterprise viewpoint (e.g., finance, aeronautics),</li>
+ <li CLASS="Item">Methodology: focus on development process viewpoint (e.g., OMG's <a href="http://www.omg.org/spec/SPEM/2.0/">SPEM</a>),</li>
+ <li CLASS="Item">Technology: focus on software viewpoint (e.g., language, platform description),</li>
+ <li CLASS="Item">Non-functional: focus on qualities of development (e.g., quality of service, architecture description).</li>
+</ul>
+
+<p class="Para">Domains can be quite large, for instance "Medical", "Legal". They can also be arranged in some hierarchical structure. For instance, the domain associated with the problem of finding immunizations for rapidly changing human viruses would be a sub-domain of "Medical" <a href="#[2]">[2]</a>.</p>
+
+
+<a name="structure"><h2>Structure</h2></a>
+<p class="Para">A domain user speaks with words of the domain language. This language has a syntax and semantics. A model characterizes a domain in capturing the syntax and semantics of this language domain. For short, we generally use the expression "domain model" but we always must keep in mind this relationship between a domain, a model and a language.</p>
+
+<p align="center">
+ <img src="./images/domainStructure.jpg" alt="Relationship between domain, model and language"/>
+</p>
+<p align="center">
+ <i>Figure 1. Relationship between domain, model and language</i>
+</p>
+
+
+<br>
+
+<dl>
+ <dt><a name="[1]">[1]</a> Czarnecki, K., and Eisenecker, U.W., <i>Generative Programming</i>, Addison-Wesley, 2000.</dt>
+ <dt><a name="[2]">[2]</a> Sánchez-Ruíz, A., Saeki, M., Langlois, B., Paiano, R., <i>Domain-Specific Software Development Terminology : Do we All Speak the Same Language?</i>, Proceeding of the 7th OOPSLA Workshop on Domain-Specific Modeling, 2007.</dt>
+ <dt><a name="[3]">[3]</a> Stahl, T., Volter, M., Bettin, J., Haase, A., Helsen, S., <i>Model-Driven Software Development</i>, Wiley, 2006.</dt>
+</dl>
+
+</body>
+</html>
diff --git a/doc/org.eclipse.egf.engine.doc/html/concepts/domain/images/domainStructure.jpg b/doc/org.eclipse.egf.engine.doc/html/concepts/domain/images/domainStructure.jpg
new file mode 100644
index 0000000..89fdab1
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/concepts/domain/images/domainStructure.jpg
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/concepts/dsl/dsl.html b/doc/org.eclipse.egf.engine.doc/html/concepts/dsl/dsl.html
new file mode 100644
index 0000000..ba6488d
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/concepts/dsl/dsl.html
@@ -0,0 +1,65 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+
+<meta name="copyright" content="Copyright (c) Thales Corporate Services S.A.S, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="author" content="Benoit Langlois" >
+<meta name="keywords" content="domain-specific language, domain specific language, dsl"/>
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+<title>DSL (Domain-Specific Language)</title>
+</HEAD>
+<BODY BGCOLOR="#ffffff">
+
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+ <tbody>
+ <tr>
+ <td colspan="2" align="left" bgcolor="#0080c0" valign="top">
+ <h2><font face="Arial,Helvetica"><font color="#ffffff">
+ DSL (Domain-Specific Language)
+ </font></font></h2>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+
+<a name="definition"><h2>Definition</h2></a>
+<p class="Para">A DSL (Domain-Specific Language) is a specialized and problem-oriented language <a href="#[1]">[1]</a>.</p>
+
+
+<a name="motivation"><h2>Motivation</h2></a>
+<p class="Para">A DSL is a specialized and problem-oriented language <a href="#[1]">[1]</a>. Contrarily to a General Purpose Language (GPL) (e.g., UML, Java or C#), a DSL serves to accurately describe a domain of knowledge. The interest to combine a DSL and a transformation function is to raise the abstraction level of software. A DSL user concentrates her/his efforts on domain description while complexity, design and implementation decisions and details are hidden <a href="#[2]">[2]</a>. The result of the transformation, the solution, is a part of a software application that is integrated later in the development process. The stake with DSLs is to improve productivity and software quality <a href="#[2]">[2]</a>.</p>
+
+<p align="center">
+ <img src="./images/dslGlobalView.jpg" alt="DSL Global view"/>
+</p>
+<p align="center">
+ <i>Figure 1. DSL Global view</i>
+</p>
+
+<a name="structure"><h2>Structure</h2></a>
+<p class="Para">A DSL is a language formalized by a model. A DSL description, given by a user, is a model instance. An abstract syntax corresponds to the DSL model and is independent of any representation (e.g., textual, graphical representation). On the contrary, a concrete syntax is the abstract syntax represented in a human-usable language (e.g., textual, graphical, tabular). As a consequence, a DSL viewpoint (where DSL descriptions are located) contains for every DSL description i) at least a model that conforms to the abstract syntax of the DSL, ii) different representations of the same DSL description.</p>
+
+<p align="center">
+ <img src="./images/dslStructure.jpg" alt="DSL structure"/>
+</p>
+<p align="center">
+ <i>Figure 2. DSL structure</i>
+</p>
+
+
+<br>
+
+<dl>
+ <dt><a name="[1]">[1]</a> Czarnecki, K., and Eisenecker, U.W., <i>Generative Programming</i>, Addison-Wesley, 2000.</dt>
+ <dt><a name="[2]">[2]</a> Sánchez-Ruíz, A., Saeki, M., Langlois, B., Paiano, R., <i>Domain-Specific Software Development Terminology : Do we All Speak the Same Language?</i>, Proceeding of the 7th OOPSLA Workshop on Domain-Specific Modeling, 2007.</dt>
+ <dt><a name="[3]">[3]</a> Stahl, T., Volter, M., Bettin, J., Haase, A., Helsen, S., <i>Model-Driven Software Development</i>, Wiley, 2006.</dt>
+</dl>
+
+
+</body>
+</html>
diff --git a/doc/org.eclipse.egf.engine.doc/html/concepts/dsl/images/dslGlobalView.jpg b/doc/org.eclipse.egf.engine.doc/html/concepts/dsl/images/dslGlobalView.jpg
new file mode 100644
index 0000000..a6f54ed
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/concepts/dsl/images/dslGlobalView.jpg
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/concepts/dsl/images/dslStructure.jpg b/doc/org.eclipse.egf.engine.doc/html/concepts/dsl/images/dslStructure.jpg
new file mode 100644
index 0000000..a6f5667
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/concepts/dsl/images/dslStructure.jpg
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/concepts/factoryComponent/factoryComponent.html b/doc/org.eclipse.egf.engine.doc/html/concepts/factoryComponent/factoryComponent.html
new file mode 100644
index 0000000..8baaed9
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/concepts/factoryComponent/factoryComponent.html
@@ -0,0 +1,101 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+
+<meta name="copyright" content="Copyright (c) Thales Corporate Services S.A.S, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="author" content="Benoit Langlois" >
+<meta name="keywords" content="factory component"/>
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+<title>Factory Component</title>
+</HEAD>
+<BODY BGCOLOR="#ffffff">
+
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+ <tbody>
+ <tr>
+ <td colspan="2" align="left" bgcolor="#0080c0" valign="top">
+ <h2><font face="Arial,Helvetica"><font color="#ffffff">
+ Factory Component
+ </font></font></h2>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+
+<a name="definition"><h2>Definition</h2></a>
+<p class="Para">A Factory Component is a deployable software generation unit aiming at producing assets from inputs assets.</p>
+
+
+<a name="motivation"><h2>Motivation</h2></a>
+<p class="Para">A factory component is a component with a set of contracts as the factory component parameters, a set of viewpoints and a generation orchestration.</p>
+<p class="Para">The purpose of factory components is to achieve simple to complex, small- to large-scale, and heterogeneous generations. Unlike to generators with a defined technical scope of generation (e.g., text or model transformation), a factory component can mix several generation techniques, produce complex assets, such as languages, framework or tools, and cover the complete production lifecycle of assets. An heterogeneous generation can be realized individually by a factory component or collectivelly by a set of factory components with a generation chain.</p>
+<p class="Para">A factory component cannot assume alone complex generations. For this reason, it delegates them to other factory components by assembly. Every factory component has a generation objective and realizes the generation it is specialized for.</p>
+<p class="Para">Regarding the process engineering, a factory component is an activity and contributes in the context of a work definition (cf. <a href="http://www.omg.org/spec/SPEM/2.0/">SPEM</a>, e.g. with the notion of process, phase, iteration, activity). The intent is to progressively replace manual development tasks by automated tasks. Then, a factory component is not only a technique but becomes, when intensively used, a vector for common generation practices. Next, it becomes to structure the software practice and the communication language between project team members. Over the time, the stake is to develop sharable factory component portfolios, i.e. homogeneous groups of generation topics extensible by mutual team enrichment.</p>
+
+<p align="center">
+ <img src="./images/factoryComponentGlobalView.jpg" alt="GLobal view of a Factory Component"/>
+</p>
+<p align="center">
+ <i>Figure 1. GLobal view of a Factory Component</i>
+</p>
+
+
+<a name="structure"><h2>Structure</h2></a>
+<p class="Para">A factory component consists of:</p>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">A set of <i>contracts</i>, for the declaration of the required parameters of the generation,</li>
+ <li CLASS="Item">A set of <i>viewpoints</i> for the declaration of the generation data organized by concerns,</li>
+ <li CLASS="Item">A generation <i>orchestration</i>.</li>
+</ul>
+
+<p class="Para">Beyond this structure, a factory component is generally specialized in function of its contents. Some factory components just contain viewpoint information (e.g., domain models, model-to-model mapping), others conduct the generation, or some are a conglomerate of viewpoints and orchestration. A factory component is hyper-specialized when it contains only one information type, such as generation patterns on a generation topic.</p>
+
+
+<a name="relationAndType"><h2>Relationships between factory components and factory component types</h2></a>
+<p class="Para">Two kinds of logical relationships exist between factory components.</p>
+<p class="Para">
+ <i>Delegation relationship</i>. A factory component delegates its work to another one. This implies that every used factory component has an identified generation role. The following figure presents a tool infrastructure factory component that delegates its generation to factory components for model management, model check, transformation and presentation with user interfaces. The model management API generation delegates its generation to two factory components, one for code generation (e.g., Java code) and another one for documentation (e.g., Java Doc.).
+</p>
+<p class="Para">
+ <i>Resource provider relationship</i>. In this case, a factory component has one or several viewpoints which provide generation information. For instance, a factory component contains generation patterns in a generation viewpoint (e.g., a web site generation).
+</p>
+
+<p align="center">
+ <img src="./images/factoryComponentAssembly.gif" alt="Assembly of a Factory Component"/>
+</p>
+<p align="center">
+ <i>Figure 2. Assembly of Factory Component</i>
+</p>
+
+<p class="Para">Finally, there are four types of factory components:</p>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item"><i>Productive factory component</i>: this kind of factory component is able to produce assets by itself,</li>
+ <li CLASS="Item"><i>Assembly factory component</i>: this kind of factory component delegates its generation to specialized factory components (i.e., productive or assembly factory components),</li>
+ <li CLASS="Item"><i>Resource provider factory component</i>: this kind of factory provides generation data, such as generation patterns or license policy,</li>
+ <li CLASS="Item"><i>Conglomerate factory component</i>: this kind of factory cumulates one or several of the previous factory component roles (i.e., productive, assembly, resource provider).</li>
+</ul>
+
+
+<a name="lifecycle"><h2>Factory Component Lifecycle</h2></a>
+<p class="Para">A factory component can adopt three kinds of stage during its lifecycle: development, execution and exchange. The <i>development</i>, or edition, consists in defining and populating the factory component contents. The <i>execution</i> is the stage when a factory component is activated and produces the expected assets.</p>
+
+<p align="center">
+ <img src="./images/factoryComponentLifecycle.jpg" alt="Factory Component Lifecycle"/>
+</p>
+<p align="center">
+ <i>Figure 3. Factory Component Lifecycle</i>
+</p>
+
+<p class="Para">
+<i>Exchange</i> is the last state. A factory component exchange consists in publishing (i.e., exporting) and harvesting (i.e., importing) factory components between teams and team members. The team that reuses off-the-shelf factory components integrate them in its generation chain, or specialize them.
+</p>
+
+<p>Development / execution / exchange is a first level of lifecycle. At the process level, there are complementary and inter-related lifecycles. There are in-the-small lifecycles, at the developer or team level, and in-the-large lifecycles at the company or community level where more and more complex factory component portfolio are developed and shared.</p>
+
+</body>
+</html>
diff --git a/doc/org.eclipse.egf.engine.doc/html/concepts/factoryComponent/images/factoryComponentAssembly.gif b/doc/org.eclipse.egf.engine.doc/html/concepts/factoryComponent/images/factoryComponentAssembly.gif
new file mode 100644
index 0000000..329f706
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/concepts/factoryComponent/images/factoryComponentAssembly.gif
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/concepts/factoryComponent/images/factoryComponentGlobalView.jpg b/doc/org.eclipse.egf.engine.doc/html/concepts/factoryComponent/images/factoryComponentGlobalView.jpg
new file mode 100644
index 0000000..13423e0
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/concepts/factoryComponent/images/factoryComponentGlobalView.jpg
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/concepts/factoryComponent/images/factoryComponentLifecycle.jpg b/doc/org.eclipse.egf.engine.doc/html/concepts/factoryComponent/images/factoryComponentLifecycle.jpg
new file mode 100644
index 0000000..579b5a2
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/concepts/factoryComponent/images/factoryComponentLifecycle.jpg
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/concepts/javaTask/images/JavaTaskStructure.jpg b/doc/org.eclipse.egf.engine.doc/html/concepts/javaTask/images/JavaTaskStructure.jpg
new file mode 100644
index 0000000..603353b
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/concepts/javaTask/images/JavaTaskStructure.jpg
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/concepts/javaTask/javaTask.html b/doc/org.eclipse.egf.engine.doc/html/concepts/javaTask/javaTask.html
new file mode 100644
index 0000000..b6fe359
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/concepts/javaTask/javaTask.html
@@ -0,0 +1,50 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+
+<meta name="copyright" content="Copyright (c) Thales Corporate Services S.A.S, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="author" content="Benoit Langlois" >
+<meta name="keywords" content="java task"/>
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+<title>Java Task</title>
+</HEAD>
+<BODY BGCOLOR="#ffffff">
+
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+ <tbody>
+ <tr>
+ <td colspan="2" align="left" bgcolor="#0080c0" valign="top">
+ <h2><font face="Arial,Helvetica"><font color="#ffffff">
+ Java Task
+ </font></font></h2>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+<a name="definition"><h2>Definition</h2></a>
+<p class="Para">A task is the basic activity for producing assets.</p>
+
+
+<a name="motivation"><h2>Motivation</h2></a>
+<p class="Para">A Java task is the basic technique to produce assets in Java. Example 1: patterns are processed by a Java task. Example 2: a text transformation factory component delegates in final its transformation to a text-to-text transformation Java task. The interest is to use any kind of tools with simple to sophisticated Java implementations.</p>
+
+<a name="structure"><h2>Structure</h2></a>
+
+<p class="Para">A java task is an activity called by an activity invocation. The task is associated to a Java class that implements the task.</p>
+
+<p align="center">
+ <img src="./images/JavaTaskStructure.jpg" alt="Java Task structure"/>
+</p>
+<p align="center">
+ <i>Figure 1. Java Task Structure</i>
+</p>
+
+<br>
+
+</body>
+</html>
diff --git a/doc/org.eclipse.egf.engine.doc/html/concepts/mapping/images/mappingRelationships.jpg b/doc/org.eclipse.egf.engine.doc/html/concepts/mapping/images/mappingRelationships.jpg
new file mode 100644
index 0000000..2c7e634
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/concepts/mapping/images/mappingRelationships.jpg
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/concepts/mapping/images/modelMapping.jpg b/doc/org.eclipse.egf.engine.doc/html/concepts/mapping/images/modelMapping.jpg
new file mode 100644
index 0000000..aea3177
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/concepts/mapping/images/modelMapping.jpg
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/concepts/mapping/mapping.html b/doc/org.eclipse.egf.engine.doc/html/concepts/mapping/mapping.html
new file mode 100644
index 0000000..e2770b8
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/concepts/mapping/mapping.html
@@ -0,0 +1,60 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+
+<meta name="copyright" content="Copyright (c) Thales Corporate Services S.A.S, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="author" content="Benoit Langlois" >
+<meta name="keywords" content="mapping"/>
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+<title>Mapping</title>
+</HEAD>
+<BODY BGCOLOR="#ffffff">
+
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+ <tbody>
+ <tr>
+ <td colspan="2" align="left" bgcolor="#0080c0" valign="top">
+ <h2><font face="Arial,Helvetica"><font color="#ffffff">
+ Mapping
+ </font></font></h2>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+<a name="definition"><h2>Definition</h2></a>
+<p class="Para">A mapping is a correspondence between model elements from source and target models.</p>
+
+
+<a name="motivation"><h2>Motivation</h2></a>
+<p class="Para">Mapping is useful for several types of application: model/domain equivalence (e.g., Eclipse/ECore or OMG's MOF to UML mapping), model transformation, merging, comparison, migration, definition of bridge, problem to solution relationship. The objective is to explicitly declare a correspondence between a source and a target and to use it in different aspects of the production. This allows more flexibility when the source, the target or the correspondence evolve.</p>
+
+<a name="structure"><h2>Structure</h2></a>
+
+<p class="Para">There exist four types of mapping relationship: [1-1], [1-N], [N-1] and [N-M].</p>
+
+
+<p align="center">
+ <img src="./images/mappingRelationships.jpg" alt="Possible mapping relationships between source and target model elements"/>
+</p>
+<p align="center">
+ <i>Figure 1. Possible mapping relationships between source and target model elements</i>
+</p>
+
+<p class="Para">The [1-1] and [1-N] mappings are the most used types of mapping (e.g., a concept is mapped into a UML class for the [1-1] mapping, or mapped into a UML Class and Attribute for the [1-N] mapping). With the [N-1] mapping, several source elements allows deducing one target element, for instance for model merge or model transformation. The [N-M] mapping means several source and target elements are jointly involved for the realization of one mapping. For reducing complexity and maintenance, the N cardinalities can be reduced in applying N times the same kind of mapping, such as transforming the [1-N] mapping into N [1-1] mappings. A mapping is stored in a mapping model containing all source to target model element relationships.</p>
+
+<p class="Para">Mappings, such as toward UML, need extensions (e.g., UML stereotypes and tagged values). Extensions are to be managed as model elements. As a consequence, there are two target models, the UML model and the extensions model, what infringes the rule to have one source and one target model. The solution is to compose the two target models in order to reduce them into one target model. The same operation can be applied at the source level.</p>
+
+<p align="center">
+ <img src="./images/modelMapping.jpg" alt="Model Mapping"/>
+</p>
+<p align="center">
+ <i>Figure 2. Model Mapping</i>
+</p>
+
+</body>
+</html>
diff --git a/doc/org.eclipse.egf.engine.doc/html/concepts/orchestration/images/orchestrationStructure.jpg b/doc/org.eclipse.egf.engine.doc/html/concepts/orchestration/images/orchestrationStructure.jpg
new file mode 100644
index 0000000..6008d9a
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/concepts/orchestration/images/orchestrationStructure.jpg
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/concepts/orchestration/orchestration.html b/doc/org.eclipse.egf.engine.doc/html/concepts/orchestration/orchestration.html
new file mode 100644
index 0000000..692af7a
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/concepts/orchestration/orchestration.html
@@ -0,0 +1,52 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+
+<meta name="copyright" content="Copyright (c) Thales Corporate Services S.A.S, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="author" content="Benoit Langlois" >
+<meta name="keywords" content="factory"/>
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+<title>Orchestration</title>
+</HEAD>
+<BODY BGCOLOR="#ffffff">
+
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+ <tbody>
+ <tr>
+ <td colspan="2" align="left" bgcolor="#0080c0" valign="top">
+ <h2><font face="Arial,Helvetica"><font color="#ffffff">
+ Orchestration
+ </font></font></h2>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+<a name="definition"><h2>Definition</h2></a>
+
+<p class="Para">An orchestration definies how to conduct a set of activities and how activities transform data.</p>
+
+
+<a name="motivation"><h2>Motivation</h2></a>
+<p class="Para">An orchestration is the logic to achieve a generation target. However, an orchestration is also a data workflow. Input data can be injected at different stages; an activity output is potentially an input of a next activity.</p>
+
+<a name="structure"><h2>Structure</h2></a>
+
+<p class="Para">An orchestration works with a data context, a set of activities, and a workflow which defines how to conduct the activities. A workflow conforms to a language (e.g., BPMN).</p>
+
+<p align="center">
+ <img src="./images/orchestrationStructure.jpg" alt="Orchestration structure"/>
+</p>
+<p align="center">
+ <i>Figure 1. Orchestra structure</i>
+</p>
+
+<br>
+
+
+</body>
+</html>
diff --git a/doc/org.eclipse.egf.engine.doc/html/concepts/pattern/images/generationPatternGlobalView.jpg b/doc/org.eclipse.egf.engine.doc/html/concepts/pattern/images/generationPatternGlobalView.jpg
new file mode 100644
index 0000000..2204a3c
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/concepts/pattern/images/generationPatternGlobalView.jpg
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/concepts/pattern/images/generationPatternProductionExecution.jpg b/doc/org.eclipse.egf.engine.doc/html/concepts/pattern/images/generationPatternProductionExecution.jpg
new file mode 100644
index 0000000..6ebb2b1
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/concepts/pattern/images/generationPatternProductionExecution.jpg
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/concepts/pattern/pattern.html b/doc/org.eclipse.egf.engine.doc/html/concepts/pattern/pattern.html
new file mode 100644
index 0000000..0aa56ba
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/concepts/pattern/pattern.html
@@ -0,0 +1,96 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+
+<meta name="copyright" content="Copyright (c) Thales Corporate Services S.A.S, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="author" content="Benoit Langlois" >
+<meta name="keywords" content="pattern, generation pattern"/>
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+<title>Generation Pattern</title>
+</HEAD>
+<BODY BGCOLOR="#ffffff">
+
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+ <tbody>
+ <tr>
+ <td colspan="2" align="left" bgcolor="#0080c0" valign="top">
+ <h2><font face="Arial,Helvetica"><font color="#ffffff">
+ Pattern
+ </font></font></h2>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+<a name="definition"><h2>Definition</h2></a>
+<p class="Para">A pattern is a solution to a recurrent generation problem. The objective is 1) to produce assets in series (code, frameworks, tools, etc.), 2) to customize a generation in order to fit project needs.</p>
+
+<a name="motivation"><h2>Motivation</h2></a>
+<p class="Para">The motivation is to produce assets with systematism and with the ability to tailor this generation. The pattern features are the following:</p>
+<ul>
+ <li>A pattern is an autonomous generation unit with <i>parameters and methods</i> which implement the pattern behavior.</li>
+ <li>The pattern <i>inheritance</i> allows the definition of standard behaviors and the ability to <i>customize</i> them afterwards by specialization.</li>
+ <li>The pattern delegation allows the ability to reuse existing patterns. The delegation can be a <i>simple delegation</i> or a delegation with a <i>pattern context injection</i> where the current pattern provides parameter values to the called pattern.</li>
+ <li>A parameter is a resource and can be from <i>any type</i>, e.g. a model, a file directory, a plugin.</li>
+ <li>A method conforms to a <i>language</i> specific to a concern, for instance to apply model-to-text transformations (e.g., with Jet). This language is identified by a <i>pattern nature</i>. A pattern nature is associated to a pattern engine. A pattern engine is able 1) to <i>translate</i> source code into an executable language, and 2) to <i>execute</i> it during an execution phase.</li>
+</ul>
+
+<p align="center">
+ <img src="./images/generationPatternGlobalView.jpg" alt="Generation Pattern GLobal View"/>
+</p>
+<p align="center">
+ <i>Figure 1. Generation Pattern GLobal View</i>
+</p>
+
+
+<a name="structure"><h2>Structure</h2></a>
+
+ <p class="Para">
+ <b>Pattern library</b>. Patterns are organized in pattern libraries. A pattern library allows both classifying and defining pattern execution blocks.
+ </p>
+ <br/>
+
+<p class="Para">
+ <b>Pattern</b>. A pattern contains an ordered set of parameters, an ordered set of methods, local variables. A pattern can inherit from another pattern (simple inheritance) and can call other patterns.
+</p>
+<p class="Para"><b>Pattern Parameter</b>. A pattern contains a set of parameters. A parameter has a name and type. A parameter type is a model element from an ecore amodel or a Java type.</p>
+<p class="Para">A pattern parameter is associated to a query applied on a input resource.</p>
+<p class="Para">The set of pattern parameters and their queries define a Cartesian product [P1 x P2 x ... x Pn]. At execution time, pattern methods are applied on each tuple of the query results. A pattern without parameter calls the pattern methods just one time.</p>
+
+<p class="Para"><b>Variables</b>. A pattern can work with local variables. The variable type is a model element or a Java type.</p>
+
+<p class="Para"><b>Method</b>. A method contains a description that conforms to a language (e.g., Jet). The most popular type of description is textual but it could be action semantics or an activity graph. A method can overload a method of a super-pattern. A method orchestration defines the order to apply methods and pattern calls at execution.</p>
+
+<p class="Para"><b>Pattern Inheritance</b>. Pattern inheritance serves to inherit of parameter definition and methods. For the Cartesian product, the super-patterns are considered first. A super-pattern can be defined in another a pattern library than the current pattern's library, or in a library from a different Factory Component.</p>
+
+<p class="Para"><b>Pattern Call</b>. A pattern call serves to reuse patterns.</p>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">Case 1. The called pattern has no parameter. It is a simple pattern delegation.</li>
+ <li CLASS="Item">Case 2. The called pattern has parameters. It is a delegation and the called pattern applies queries on each parameter.</li>
+ <li CLASS="Item">Case 3. A pattern call with parameter injection. The parameters of the called pattern are initialized by the pattern caller.</li>
+</ul>
+
+
+<a name="translationAndExecution"><h2>Process of translation and execution</h2></a>
+
+<p class="Para">Patterns are edited first (creation, update, deletion), processed to be executed, and executed.</p>
+
+<p class="Para"><b>Translation</b>.Translation transforms the pattern and its methods toward a target language (e.g., Jet form) understandable by an engine (e.g., the Jet engine). When needed, the translated code is compiled.</p>
+
+<p class="Para"><b>Execution</b>. At this step, the executable result of the translation is executed by an engine (e.g., the Jet model-to-text engine) according an execution strategy (e.g., pattern-oriented, resource-oriented strategies). The result of this execution is transmitted to a reporter.</p>
+<br>
+
+<p align="center">
+ <img src="./images/generationPatternProductionExecution.jpg" alt="Translation and Execution of Pattern"/>
+</p>
+<p align="center">
+ <i>Figure 3. Translation and Execution of Pattern</i>
+</p>
+
+
+</body>
+</html>
diff --git a/doc/org.eclipse.egf.engine.doc/html/concepts/productionPlan/images/productionPlanStructure.jpg b/doc/org.eclipse.egf.engine.doc/html/concepts/productionPlan/images/productionPlanStructure.jpg
new file mode 100644
index 0000000..e2dd06c
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/concepts/productionPlan/images/productionPlanStructure.jpg
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/concepts/productionPlan/productionPlan.html b/doc/org.eclipse.egf.engine.doc/html/concepts/productionPlan/productionPlan.html
new file mode 100644
index 0000000..b054415
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/concepts/productionPlan/productionPlan.html
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+
+<meta name="copyright" content="Copyright (c) Thales Corporate Services S.A.S, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="author" content="Benoit Langlois" >
+<meta name="keywords" content="production plan, orchestration"/>
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+<title>Production Plan</title>
+</HEAD>
+<BODY BGCOLOR="#ffffff">
+
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+ <tbody>
+ <tr>
+ <td colspan="2" align="left" bgcolor="#0080c0" valign="top">
+ <h2><font face="Arial,Helvetica"><font color="#ffffff">
+ Production Plan
+ </font></font></h2>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+<a name="definition"><h2>Definition</h2></a>
+<p class="Para">A production plan is an orchestration of activity invocations.</p>
+
+
+<a name="motivation"><h2>Motivation</h2></a>
+<p class="Para">Production plan is the default EGF orchestration. It is a simple workflow that consists in sequentially calling and executing activities.</p>
+
+<a name="structure"><h2>Structure</h2></a>
+
+<p class="Para"></p>
+
+
+</body>
+</html>
diff --git a/doc/org.eclipse.egf.engine.doc/html/concepts/viewpoint/images/viewpointStructure.jpg b/doc/org.eclipse.egf.engine.doc/html/concepts/viewpoint/images/viewpointStructure.jpg
new file mode 100644
index 0000000..0c64084
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/concepts/viewpoint/images/viewpointStructure.jpg
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/concepts/viewpoint/viewpoint.html b/doc/org.eclipse.egf.engine.doc/html/concepts/viewpoint/viewpoint.html
new file mode 100644
index 0000000..904edce
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/concepts/viewpoint/viewpoint.html
@@ -0,0 +1,76 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+
+<meta name="copyright" content="Copyright (c) Thales Corporate Services S.A.S, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="author" content="Benoit Langlois" >
+<meta name="keywords" content="viewpoint, architecture"/>
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+<title>Viewpoint</title>
+</HEAD>
+<BODY BGCOLOR="#ffffff">
+
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+ <tbody>
+ <tr>
+ <td colspan="2" align="left" bgcolor="#0080c0" valign="top">
+ <h2><font face="Arial,Helvetica"><font color="#ffffff">
+ Viewpoint
+ </font></font></h2>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+<a name="definition"><h2>Definition</h2></a>
+<p class="Para">A viewpoint is a software perspective with all the conventions for constructing and using it.</p>
+
+<a name="motivation"><h2>Motivation</h2></a>
+<p class="Para">The notion of viewpoint is introduced to decouple the generation concerns from the logic of generation itself realized by a activities (factory components, tasks). For instance, instead of declaring a mapping in code, it is explicitly declared in a mapping viewpoint with a mapping model. A generation can use several complementary viewpoints. Conversely, all the complementary viewpoints must cover all the generation concerns.</p>
+
+<p class="Para">Examples of viewpoints:</p>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">Model to model mapping (e.g., eCore-to-ecore, ecore-to-UML mappings)</li>
+ <li CLASS="Item">Generation with patterns</li>
+ <li CLASS="Item">DSL (Domain-Specific Language)</li>
+ <li CLASS="Item">Functional description</li>
+ <li CLASS="Item">Non-functional description (e.g., performance, safety, security)</li>
+ <li CLASS="Item">Architecture decisions</li>
+ <li CLASS="Item">Software product line decisions</li>
+ <li CLASS="Item">Deployment</li>
+ <li CLASS="Item">Licensing</li>
+</ul>
+
+<p class="Para">The structure of a specific viewpoint is presented in its own section. This section develops the generic concept of viewpoint and its relationship with the IEEE 1471-2000 <a href="#[1]">[1]</a> and ISO/IEC WD3 42010 - IEEE P42010/D3 <a href="#[2]">[2]</a> standards. The purpose of a viewpoint is to explicitly describe generation specifications and decisions. A viewpoint actually translates a generation concern and helps a software actor to express or understand a part of the generation description, and this without being polluted by implementation details. Regarding the software architecture description, generation description by viewpoint becomes a sub-part of the software architecture description.</p>
+
+<a name="structure"><h2>Structure</h2></a>
+
+<p class="Para">A viewpoint implements a software perspective with its own rationale, i.e. a purpose, choices and decisions, and practices. Several viewpoints can mutually implement the same perspective. For instance, the generation of a tool infrastructure requires mapping, non-functional (e.g., persistence), deployment viewpoints. A viewpoint is instatiated and stored in a model. The metamodel of this model formalizes a language, typically expressed with a DSL. Then, all the viewpoints jointly formalized the software architecture from the generation consideration.</p>
+
+<p align="center">
+ <img src="./images/viewpointStructure.jpg" alt="Viewpoint structure"/>
+</p>
+<p align="center">
+ <i>Figure 1. Viewpoint Structure</i>
+</p>
+
+<br>
+
+
+<a name="Extensibility"><h2>Extensibility</h2></a>
+<p>The list of viewpoints is variable with the project concerns. This implies that the structure where the viewpoints are described must be extensible and to meet evolution of generation needs.</p>
+
+<br>
+
+<dl>
+ <dt><a name="[1]">[1]</a> IEEE Standard 1471-2000, <i>IEEE Recommended Practice for Architectural Description of Software-Intensive Systems</i>, 21 September, 2000.</dt>
+ <dt><a name="[2]">[2]</a> ISO/IEC WD3 42010, IEEE P42010/D3, <i>Systems and software engineering - Architectural description</i>, 2008-09-14.</dt>
+</dl>
+
+
+</body>
+</html>
diff --git a/doc/org.eclipse.egf.engine.doc/html/images/contract-element-mandatory.png b/doc/org.eclipse.egf.engine.doc/html/images/contract-element-mandatory.png
new file mode 100644
index 0000000..46c9a46
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/images/contract-element-mandatory.png
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/images/factory-component-explorer-context-menu.png b/doc/org.eclipse.egf.engine.doc/html/images/factory-component-explorer-context-menu.png
new file mode 100644
index 0000000..4ac8fef
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/images/factory-component-explorer-context-menu.png
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/images/factory-component-explorer-context-menu1.png b/doc/org.eclipse.egf.engine.doc/html/images/factory-component-explorer-context-menu1.png
new file mode 100644
index 0000000..f2a8dd7
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/images/factory-component-explorer-context-menu1.png
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/images/factory-component-explorer-filtered-view.png b/doc/org.eclipse.egf.engine.doc/html/images/factory-component-explorer-filtered-view.png
new file mode 100644
index 0000000..51a256e
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/images/factory-component-explorer-filtered-view.png
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/images/factory-component-explorer-view-linking-enabled.png b/doc/org.eclipse.egf.engine.doc/html/images/factory-component-explorer-view-linking-enabled.png
new file mode 100644
index 0000000..44cf328
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/images/factory-component-explorer-view-linking-enabled.png
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/images/factory-component-explorer-view.png b/doc/org.eclipse.egf.engine.doc/html/images/factory-component-explorer-view.png
new file mode 100644
index 0000000..576690c
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/images/factory-component-explorer-view.png
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/images/factory-components-context-menu.png b/doc/org.eclipse.egf.engine.doc/html/images/factory-components-context-menu.png
new file mode 100644
index 0000000..6397f3f
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/images/factory-components-context-menu.png
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/images/factory-components-context-menu1.png b/doc/org.eclipse.egf.engine.doc/html/images/factory-components-context-menu1.png
new file mode 100644
index 0000000..73d3fe0
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/images/factory-components-context-menu1.png
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/images/factory-components-filtered-view.png b/doc/org.eclipse.egf.engine.doc/html/images/factory-components-filtered-view.png
new file mode 100644
index 0000000..2afdfe7
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/images/factory-components-filtered-view.png
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/images/factory-components-view.png b/doc/org.eclipse.egf.engine.doc/html/images/factory-components-view.png
new file mode 100644
index 0000000..f65bc56
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/images/factory-components-view.png
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/images/ngrelc.png b/doc/org.eclipse.egf.engine.doc/html/images/ngrelc.png
new file mode 100644
index 0000000..161e3aa
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/images/ngrelc.png
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/images/ngrelr.png b/doc/org.eclipse.egf.engine.doc/html/images/ngrelr.png
new file mode 100644
index 0000000..4726f8c
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/images/ngrelr.png
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/images/ngrelt.png b/doc/org.eclipse.egf.engine.doc/html/images/ngrelt.png
new file mode 100644
index 0000000..74bee2b
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/images/ngrelt.png
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_common_logger.html b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_common_logger.html
new file mode 100644
index 0000000..cbfc758
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_common_logger.html
@@ -0,0 +1,49 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>EGF Logger</title>
+<style type="text/css">@import url("../../book.css");</style>
+<style type="text/css">@import url("../../schema.css");</style>
+</HEAD>
+<BODY>
+<H1 style="text-align:center">EGF Logger</H1>
+<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Identifier: </h6>org.eclipse.egf.common.logger<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Since: </h6>0.2.0
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Description: </h6>Breaks the dependency towards UI for log purposes.<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Configuration Markup:</h6>
+<p></p>
+<p class="code SchemaDtd"><!ELEMENT <a name="e.extension">extension</a> (<a href="#e.logger">logger</a>*)></p>
+<p class="code SchemaDtd"><!ATTLIST extension</p>
+<p class="code SchemaDtdAttlist">point CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">id IDREF #IMPLIED</p><p class="code SchemaDtdAttlist">name CDATA #IMPLIED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.logger">logger</a> (EMPTY+)></p>
+<p class="code SchemaDtd"><!ATTLIST logger</p>
+<p class="code SchemaDtdAttlist">class CDATA #REQUIRED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>class</b> - The implementation of the expected services.
+Must implement IEGFLoggerFactory interface (either directly or not).</li>
+</ul>
+<br><h6 class="CaptionFigColumn SchemaHeader">Examples: </h6>[Enter extension point usage example here.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">API Information: </h6>[Enter API information here.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Supplied Implementation: </h6>[Enter information about supplied implementation of this extension point.]
+<p></p>
+
+<br>
+<p class="note SchemaCopyright">
+Copyright (c) 2009-2010 Thales Corporate Services S.A.S.<br>
+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 <a
+href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
+
+</p>
+</BODY>
+</HTML>
diff --git a/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_common_user_helper.html b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_common_user_helper.html
new file mode 100644
index 0000000..64d8a8f
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_common_user_helper.html
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>User enforced helper</title>
+<style type="text/css">@import url("../../book.css");</style>
+<style type="text/css">@import url("../../schema.css");</style>
+</HEAD>
+<BODY>
+<H1 style="text-align:center">User enforced helper</H1>
+<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Identifier: </h6>org.eclipse.egf.common.user_helper<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Since: </h6>1.2.0_M3
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Description: </h6>Breaks the dependency towards UI for helper purposes (such as resource handling with configuration management, ...).<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Configuration Markup:</h6>
+<p></p>
+<p class="code SchemaDtd"><!ELEMENT <a name="e.extension">extension</a> (<a href="#e.helperImplementation">helperImplementation</a>)></p>
+<p class="code SchemaDtd"><!ATTLIST extension</p>
+<p class="code SchemaDtdAttlist">point CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">id CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">name CDATA #IMPLIED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.helperImplementation">helperImplementation</a> EMPTY></p>
+<p class="code SchemaDtd"><!ATTLIST helperImplementation</p>
+<p class="code SchemaDtdAttlist">class CDATA #REQUIRED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>class</b> - The implementation of the expected services.
+Must implement IUserEnforced interface (either directly or not).</li>
+</ul>
+<br><h6 class="CaptionFigColumn SchemaHeader">Examples: </h6>[Enter extension point usage example here.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">API Information: </h6>[Enter API information here.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Supplied Implementation: </h6>[Enter information about supplied implementation of this extension point.]
+<p></p>
+
+<br>
+<p class="note SchemaCopyright">
+</p>
+</BODY>
+</HTML>
diff --git a/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_core_assetConfiguration.html b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_core_assetConfiguration.html
new file mode 100644
index 0000000..3380bfc
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_core_assetConfiguration.html
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>EGF Asset Configuration</title>
+<style type="text/css">@import url("../../book.css");</style>
+<style type="text/css">@import url("../../schema.css");</style>
+</HEAD>
+<BODY>
+<H1 style="text-align:center">EGF Asset Configuration</H1>
+<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Identifier: </h6>org.eclipse.egf.core.assetConfiguration<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Since: </h6>[Enter the first release in which this extension point appears.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Description: </h6>[Enter description of this extension point.]<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Configuration Markup:</h6>
+<p></p>
+<p class="code SchemaDtd"><!ELEMENT <a name="e.extension">extension</a> (<a href="#e.assetConfiguration">assetConfiguration</a>)+></p>
+<p class="code SchemaDtd"><!ATTLIST extension</p>
+<p class="code SchemaDtdAttlist">point CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">id CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">name CDATA #IMPLIED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.assetConfiguration">assetConfiguration</a> EMPTY></p>
+<p class="code SchemaDtd"><!ATTLIST assetConfiguration</p>
+<p class="code SchemaDtdAttlist">id CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">name CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">contextId CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">taskFactoryId CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">assetId CDATA #REQUIRED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>id</b> - </li>
+<li><b>name</b> - </li>
+<li><b>contextId</b> - </li>
+<li><b>taskFactoryId</b> - </li>
+<li><b>assetId</b> - </li>
+</ul>
+<br><h6 class="CaptionFigColumn SchemaHeader">Examples: </h6>[Enter extension point usage example here.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Supplied Implementation: </h6>[Enter information about supplied implementation of this extension point.]
+<p></p>
+
+<br>
+<p class="note SchemaCopyright">
+</p>
+</BODY>
+</HTML>
diff --git a/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_core_context.html b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_core_context.html
new file mode 100644
index 0000000..00ebc3f
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_core_context.html
@@ -0,0 +1,81 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>EGF Context</title>
+<style type="text/css">@import url("../../book.css");</style>
+<style type="text/css">@import url("../../schema.css");</style>
+</HEAD>
+<BODY>
+<H1 style="text-align:center">EGF Context</H1>
+<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Identifier: </h6>org.eclipse.egf.core.context<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Since: </h6>[Enter the first release in which this extension point appears.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Description: </h6>Extension point to define a context.<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Configuration Markup:</h6>
+<p></p>
+<p class="code SchemaDtd"><!ELEMENT <a name="e.extension">extension</a> (<a href="#e.context">context</a>)></p>
+<p class="code SchemaDtd"><!ATTLIST extension</p>
+<p class="code SchemaDtdAttlist">point CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">id CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">name CDATA #IMPLIED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.context">context</a> (<a href="#e.contextElement">contextElement</a>*)></p>
+<p class="code SchemaDtd"><!ATTLIST context</p>
+<p class="code SchemaDtdAttlist">id CDATA #REQUIRED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>id</b> - </li>
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.contextElement">contextElement</a> ((<a href="#e.contractElementRef">contractElementRef</a> | <a href="#e.key">key</a>) , <a href="#e.contextValue">contextValue</a>)></p>
+<p class="code SchemaDtd"><!ATTLIST contextElement</p>
+<p class="code SchemaDtdAttlist">id CDATA #REQUIRED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>id</b> - </li>
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.contextValue">contextValue</a> EMPTY></p>
+<p class="code SchemaDtd"><!ATTLIST contextValue</p>
+<p class="code SchemaDtdAttlist">value CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">class CDATA #IMPLIED</p>></p>
+<p></p>
+<p class="ConfigMarkupElementDesc">
+Define a readable string value.
+This value may be interpreted</p>
+<br>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>value</b> - The readable representation of the context element value.</li>
+<li><b>class</b> - A type holder describing the context value, if this context element does not point to a contract element.
+Thus this attribute is optional.</li>
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.contractElementRef">contractElementRef</a> EMPTY></p>
+<p class="code SchemaDtd"><!ATTLIST contractElementRef</p>
+<p class="code SchemaDtdAttlist">contractElementReferenceId CDATA #REQUIRED</p>></p>
+<p></p>
+<p class="ConfigMarkupElementDesc">
+Context element refers directly to identified contract element.</p>
+<br>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>contractElementReferenceId</b> - </li>
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.key">key</a> EMPTY></p>
+<p class="code SchemaDtd"><!ATTLIST key</p>
+<p class="code SchemaDtdAttlist">name CDATA #REQUIRED</p>></p>
+<p></p>
+<p class="ConfigMarkupElementDesc">
+Context element is a simple (key, value) holder.</p>
+<br>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>name</b> - </li>
+</ul>
+<br><h6 class="CaptionFigColumn SchemaHeader">Examples: </h6>[Enter extension point usage example here.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Supplied Implementation: </h6>[Enter information about supplied implementation of this extension point.]
+<p></p>
+
+<br>
+<p class="note SchemaCopyright">
+</p>
+</BODY>
+</HTML>
diff --git a/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_core_contract.html b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_core_contract.html
new file mode 100644
index 0000000..cf9f94e
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_core_contract.html
@@ -0,0 +1,76 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>EGF Contract</title>
+<style type="text/css">@import url("../../book.css");</style>
+<style type="text/css">@import url("../../schema.css");</style>
+</HEAD>
+<BODY>
+<H1 style="text-align:center">EGF Contract</H1>
+<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Identifier: </h6>org.eclipse.egf.core.contract<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Since: </h6>[Enter the first release in which this extension point appears.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Description: </h6>Extension point to define a contract.<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Configuration Markup:</h6>
+<p></p>
+<p class="code SchemaDtd"><!ELEMENT <a name="e.extension">extension</a> (<a href="#e.contract">contract</a>)></p>
+<p class="code SchemaDtd"><!ATTLIST extension</p>
+<p class="code SchemaDtdAttlist">point CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">id CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">name CDATA #IMPLIED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.contract">contract</a> (<a href="#e.contractElement">contractElement</a>)*></p>
+<p class="code SchemaDtd"><!ATTLIST contract</p>
+<p class="code SchemaDtdAttlist">id CDATA #REQUIRED</p>></p>
+<p></p>
+<p class="ConfigMarkupElementDesc">
+Defines a contract element list.</p>
+<br>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>id</b> - </li>
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.contractElement">contractElement</a> (<a href="#e.description">description</a>? , (<a href="#e.contractElementRef">contractElementRef</a>)*)*></p>
+<p class="code SchemaDtd"><!ATTLIST contractElement</p>
+<p class="code SchemaDtdAttlist">id CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">name CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">type CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">mandatory (true | false) </p>></p>
+<p></p>
+<p class="ConfigMarkupElementDesc">
+Defines a couple (name, type). Type has to be a java class. A contract element can reference another one through contractReferenceId attribute.</p>
+<br>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>id</b> - </li>
+<li><b>name</b> - Contract unique key.</li>
+<li><b>type</b> - </li>
+<li><b>mandatory</b> - Whether or not a context element must match this contract element.
+If the contract element is mandatory, it should be valued by a context element.
+If not set, the contract element is mandatory.</li>
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.contractElementRef">contractElementRef</a> EMPTY></p>
+<p class="code SchemaDtd"><!ATTLIST contractElementRef</p>
+<p class="code SchemaDtdAttlist">contractElementReferenceId CDATA #REQUIRED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>contractElementReferenceId</b> - </li>
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.description">description</a> EMPTY></p>
+<p class="code SchemaDtd"><!ATTLIST description</p>
+<p class="code SchemaDtdAttlist">id CDATA #REQUIRED</p>></p>
+<p></p>
+<p class="ConfigMarkupElementDesc">
+Define a description node.</p>
+<br>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>id</b> - </li>
+</ul>
+<br><h6 class="CaptionFigColumn SchemaHeader">Examples: </h6>[Enter extension point usage example here.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Supplied Implementation: </h6>[Enter information about supplied implementation of this extension point.]
+<p></p>
+
+<br>
+<p class="note SchemaCopyright">
+</p>
+</BODY>
+</HTML>
diff --git a/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_core_contractReferences.html b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_core_contractReferences.html
new file mode 100644
index 0000000..c6ca4ef
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_core_contractReferences.html
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>EGF ContractReferences</title>
+<style type="text/css">@import url("../../book.css");</style>
+<style type="text/css">@import url("../../schema.css");</style>
+</HEAD>
+<BODY>
+<H1 style="text-align:center">EGF ContractReferences</H1>
+<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Identifier: </h6>org.eclipse.egf.core.contractReferences<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Since: </h6>[Enter the first release in which this extension point appears.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Description: </h6>Extension point to define a contract reference.<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Configuration Markup:</h6>
+<p></p>
+<p class="code SchemaDtd"><!ELEMENT <a name="e.extension">extension</a> (<a href="#e.contractElementReference">contractElementReference</a>+)></p>
+<p class="code SchemaDtd"><!ATTLIST extension</p>
+<p class="code SchemaDtdAttlist">point CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">id CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">name CDATA #IMPLIED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.contractElementReference">contractElementReference</a> EMPTY></p>
+<p class="code SchemaDtd"><!ATTLIST contractElementReference</p>
+<p class="code SchemaDtdAttlist">id CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">referencedContractElementId CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">referencedContractElementName CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">referencedAssetId CDATA #REQUIRED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>id</b> - </li>
+<li><b>referencedContractElementId</b> - </li>
+<li><b>referencedContractElementName</b> - Deprecated.
+Keep it only to ensure backward compatibility.</li>
+<li><b>referencedAssetId</b> - </li>
+</ul>
+<br><h6 class="CaptionFigColumn SchemaHeader">Examples: </h6>[Enter extension point usage example here.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Supplied Implementation: </h6>[Enter information about supplied implementation of this extension point.]
+<p></p>
+
+<br>
+<p class="note SchemaCopyright">
+</p>
+</BODY>
+</HTML>
diff --git a/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_core_factoryComponent.html b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_core_factoryComponent.html
new file mode 100644
index 0000000..3c4b9c9
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_core_factoryComponent.html
@@ -0,0 +1,55 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>EGF Factory Component</title>
+<style type="text/css">@import url("../../book.css");</style>
+<style type="text/css">@import url("../../schema.css");</style>
+</HEAD>
+<BODY>
+<H1 style="text-align:center">EGF Factory Component</H1>
+<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Identifier: </h6>org.eclipse.egf.core.factoryComponent<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Since: </h6>[Enter the first release in which this extension point appears.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Description: </h6>Extension point to define a factory Component<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Configuration Markup:</h6>
+<p></p>
+<p class="code SchemaDtd"><!ELEMENT <a name="e.extension">extension</a> (<a href="#e.factoryComponent">factoryComponent</a>)></p>
+<p class="code SchemaDtd"><!ATTLIST extension</p>
+<p class="code SchemaDtdAttlist">point CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">id CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">name CDATA #IMPLIED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.factoryComponent">factoryComponent</a> (<a href="#e.description">description</a>)?></p>
+<p class="code SchemaDtd"><!ATTLIST factoryComponent</p>
+<p class="code SchemaDtdAttlist">id CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">name CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">contractId CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">domain CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">productionPlanId CDATA #IMPLIED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>id</b> - Asset identifier.</li>
+<li><b>name</b> - </li>
+<li><b>contractId</b> - Reference to a contract extension point through its id.</li>
+<li><b>domain</b> - Plug-in path to ecore domain model.</li>
+<li><b>productionPlanId</b> - Reference to a production plan extension point through its id.</li>
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.description">description</a> EMPTY></p>
+<p class="code SchemaDtd"><!ATTLIST description</p>
+<p class="code SchemaDtdAttlist">id CDATA #REQUIRED</p>></p>
+<p></p>
+<p class="ConfigMarkupElementDesc">
+Define a description node.</p>
+<br>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>id</b> - </li>
+</ul>
+<br><h6 class="CaptionFigColumn SchemaHeader">Examples: </h6>[Enter extension point usage example here.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Supplied Implementation: </h6>[Enter information about supplied implementation of this extension point.]
+<p></p>
+
+<br>
+<p class="note SchemaCopyright">
+</p>
+</BODY>
+</HTML>
diff --git a/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_core_factoryComponentReader.html b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_core_factoryComponentReader.html
new file mode 100644
index 0000000..47bbb4e
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_core_factoryComponentReader.html
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Factory Component reader</title>
+<style type="text/css">@import url("../../book.css");</style>
+<style type="text/css">@import url("../../schema.css");</style>
+</HEAD>
+<BODY>
+<H1 style="text-align:center">Factory Component reader</H1>
+<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Identifier: </h6>org.eclipse.egf.core.factoryComponentReader<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Since: </h6>[Enter the first release in which this extension point appears.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Description: </h6>[This extension-point allows contributors to read EGF elements in different manner.]<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Configuration Markup:</h6>
+<p></p>
+<p class="code SchemaDtd"><!ELEMENT <a name="e.extension">extension</a> (<a href="#e.reader">reader</a>)></p>
+<p class="code SchemaDtd"><!ATTLIST extension</p>
+<p class="code SchemaDtdAttlist">point CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">id CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">name CDATA #IMPLIED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.reader">reader</a> EMPTY></p>
+<p class="code SchemaDtd"><!ATTLIST reader</p>
+<p class="code SchemaDtdAttlist">id CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">class CDATA #REQUIRED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>id</b> - </li>
+<li><b>class</b> - </li>
+</ul>
+<br><h6 class="CaptionFigColumn SchemaHeader">Examples: </h6>[Enter extension point usage example here.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Supplied Implementation: </h6>[Enter information about supplied implementation of this extension point.]
+<p></p>
+
+<br>
+<p class="note SchemaCopyright">
+</p>
+</BODY>
+</HTML>
diff --git a/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_core_fcore.html b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_core_fcore.html
new file mode 100644
index 0000000..a58245e
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_core_fcore.html
@@ -0,0 +1,48 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>EGF Factory Core</title>
+<style type="text/css">@import url("../../book.css");</style>
+<style type="text/css">@import url("../../schema.css");</style>
+</HEAD>
+<BODY>
+<H1 style="text-align:center">EGF Factory Core</H1>
+<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Identifier: </h6>org.eclipse.egf.core.fcore<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Since: </h6>0.1.0
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Description: </h6>Exposes EGF Factory Core.<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Configuration Markup:</h6>
+<p></p>
+<p class="code SchemaDtd"><!ELEMENT <a name="e.extension">extension</a> (<a href="#e.fcore">fcore</a>*)></p>
+<p class="code SchemaDtd"><!ATTLIST extension</p>
+<p class="code SchemaDtdAttlist">point CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">id IDREF #IMPLIED</p><p class="code SchemaDtdAttlist">name CDATA #IMPLIED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.fcore">fcore</a> (EMPTY+)></p>
+<p class="code SchemaDtd"><!ATTLIST fcore</p>
+<p class="code SchemaDtdAttlist">id IDREF #REQUIRED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>id</b> - FactoryComponent identifier.</li>
+</ul>
+<br><h6 class="CaptionFigColumn SchemaHeader">Examples: </h6>[Enter extension point usage example here.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">API Information: </h6>[Enter API information here.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Supplied Implementation: </h6>[Enter information about supplied implementation of this extension point.]
+<p></p>
+
+<br>
+<p class="note SchemaCopyright">
+Copyright (c) 2009-2010 Thales Corporate Services S.A.S.<br>
+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 <a
+href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
+
+</p>
+</BODY>
+</HTML>
diff --git a/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_core_log4jConfigurer.html b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_core_log4jConfigurer.html
new file mode 100644
index 0000000..d851aee
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_core_log4jConfigurer.html
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Log4J Configurer</title>
+<style type="text/css">@import url("../../book.css");</style>
+<style type="text/css">@import url("../../schema.css");</style>
+</HEAD>
+<BODY>
+<H1 style="text-align:center">Log4J Configurer</H1>
+<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Identifier: </h6>org.eclipse.egf.core.log4jConfigurer<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Since: </h6>[Enter the first release in which this extension point appears.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Description: </h6>Breaks the dependency towards UI for log4j configuration.
+Only one contribution is expected.<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Configuration Markup:</h6>
+<p></p>
+<p class="code SchemaDtd"><!ELEMENT <a name="e.extension">extension</a> (<a href="#e.configurerImplementation">configurerImplementation</a>)></p>
+<p class="code SchemaDtd"><!ATTLIST extension</p>
+<p class="code SchemaDtdAttlist">point CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">id CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">name CDATA #IMPLIED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.configurerImplementation">configurerImplementation</a> EMPTY></p>
+<p class="code SchemaDtd"><!ATTLIST configurerImplementation</p>
+<p class="code SchemaDtdAttlist">class CDATA #REQUIRED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>class</b> - The implementation of the expected services.
+Must implement ILog4jConfigurer interface (either directly or not).</li>
+</ul>
+<br><h6 class="CaptionFigColumn SchemaHeader">Examples: </h6>[Enter extension point usage example here.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">API Information: </h6>[Enter API information here.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Supplied Implementation: </h6>[Enter information about supplied implementation of this extension point.]
+<p></p>
+
+<br>
+<p class="note SchemaCopyright">
+</p>
+</BODY>
+</HTML>
diff --git a/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_core_mapping.html b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_core_mapping.html
new file mode 100644
index 0000000..be210ab
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_core_mapping.html
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>EGF Mapping</title>
+<style type="text/css">@import url("../../book.css");</style>
+<style type="text/css">@import url("../../schema.css");</style>
+</HEAD>
+<BODY>
+<H1 style="text-align:center">EGF Mapping</H1>
+<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Identifier: </h6>org.eclipse.egf.core.mapping<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Since: </h6>[Enter the first release in which this extension point appears.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Description: </h6>Extension point to define a mapping.<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Configuration Markup:</h6>
+<p></p>
+<p class="code SchemaDtd"><!ELEMENT <a name="e.extension">extension</a> (<a href="#e.mapping">mapping</a>)+></p>
+<p class="code SchemaDtd"><!ATTLIST extension</p>
+<p class="code SchemaDtdAttlist">point CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">id CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">name CDATA #IMPLIED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.mapping">mapping</a> EMPTY></p>
+<p class="code SchemaDtd"><!ATTLIST mapping</p>
+<p class="code SchemaDtdAttlist">id CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">name CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">path CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">assetIdAsSource CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">assetIdAsTarget CDATA #REQUIRED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>id</b> - Mapping identifier.</li>
+<li><b>name</b> - Mapping name.</li>
+<li><b>path</b> - The ecore2ecore file defining the mapping.</li>
+<li><b>assetIdAsSource</b> - The identifier of asset that hosts the domain used as input in this mapping.</li>
+<li><b>assetIdAsTarget</b> - The identifier of asset that hosts the domain used as output in this mapping.</li>
+</ul>
+<br><h6 class="CaptionFigColumn SchemaHeader">Examples: </h6>[Enter extension point usage example here.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Supplied Implementation: </h6>[Enter information about supplied implementation of this extension point.]
+<p></p>
+
+<br>
+<p class="note SchemaCopyright">
+</p>
+</BODY>
+</HTML>
diff --git a/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_core_productionPlan.html b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_core_productionPlan.html
new file mode 100644
index 0000000..cc04fa0
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_core_productionPlan.html
@@ -0,0 +1,55 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>EGFproduction plan</title>
+<style type="text/css">@import url("../../book.css");</style>
+<style type="text/css">@import url("../../schema.css");</style>
+</HEAD>
+<BODY>
+<H1 style="text-align:center">EGFproduction plan</H1>
+<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Identifier: </h6>org.eclipse.egf.core.productionPlan<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Since: </h6>[Enter the first release in which this extension point appears.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Description: </h6>Extension point to define a production plan.<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Configuration Markup:</h6>
+<p></p>
+<p class="code SchemaDtd"><!ELEMENT <a name="e.extension">extension</a> (<a href="#e.productionPlan">productionPlan</a>)></p>
+<p class="code SchemaDtd"><!ATTLIST extension</p>
+<p class="code SchemaDtdAttlist">point CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">id CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">name CDATA #IMPLIED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.productionPlan">productionPlan</a> (<a href="#e.assetConfiguration">assetConfiguration</a>*)></p>
+<p class="code SchemaDtd"><!ATTLIST productionPlan</p>
+<p class="code SchemaDtdAttlist">id CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">contextId CDATA #IMPLIED</p>></p>
+<p></p>
+<p class="ConfigMarkupElementDesc">
+A production plan is a set of asset configuration id.</p>
+<br>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>id</b> - </li>
+<li><b>contextId</b> - </li>
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.assetConfiguration">assetConfiguration</a> EMPTY></p>
+<p class="code SchemaDtd"><!ATTLIST assetConfiguration</p>
+<p class="code SchemaDtdAttlist">id CDATA #REQUIRED</p>></p>
+<p></p>
+<p class="ConfigMarkupElementDesc">
+Reference to an asset configuration extension point through its id.</p>
+<br>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>id</b> - </li>
+</ul>
+<br><h6 class="CaptionFigColumn SchemaHeader">Examples: </h6>[Enter extension point usage example here.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Supplied Implementation: </h6>[Enter information about supplied implementation of this extension point.]
+<p></p>
+
+<br>
+<p class="note SchemaCopyright">
+</p>
+</BODY>
+</HTML>
diff --git a/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_core_taskFactory.html b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_core_taskFactory.html
new file mode 100644
index 0000000..09ef695
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_core_taskFactory.html
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>EGF Task Factory</title>
+<style type="text/css">@import url("../../book.css");</style>
+<style type="text/css">@import url("../../schema.css");</style>
+</HEAD>
+<BODY>
+<H1 style="text-align:center">EGF Task Factory</H1>
+<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Identifier: </h6>org.eclipse.egf.core.taskFactory<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Since: </h6>[Enter the first release in which this extension point appears.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Description: </h6>[Enter description of this extension point.]<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Configuration Markup:</h6>
+<p></p>
+<p class="code SchemaDtd"><!ELEMENT <a name="e.extension">extension</a> (<a href="#e.taskFactory">taskFactory</a>+)></p>
+<p class="code SchemaDtd"><!ATTLIST extension</p>
+<p class="code SchemaDtdAttlist">point CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">id CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">name CDATA #IMPLIED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.taskFactory">taskFactory</a> EMPTY></p>
+<p class="code SchemaDtd"><!ATTLIST taskFactory</p>
+<p class="code SchemaDtdAttlist">id CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">class CDATA #REQUIRED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>id</b> - </li>
+<li><b>class</b> - </li>
+</ul>
+<br><h6 class="CaptionFigColumn SchemaHeader">Examples: </h6>[Enter extension point usage example here.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Supplied Implementation: </h6>[Enter information about supplied implementation of this extension point.]
+<p></p>
+
+<br>
+<p class="note SchemaCopyright">
+</p>
+</BODY>
+</HTML>
diff --git a/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_model_delegatedValidator.html b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_model_delegatedValidator.html
new file mode 100644
index 0000000..ae8764a
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_model_delegatedValidator.html
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Delegated Validator</title>
+<style type="text/css">@import url("../../book.css");</style>
+<style type="text/css">@import url("../../schema.css");</style>
+</HEAD>
+<BODY>
+<H1 style="text-align:center">Delegated Validator</H1>
+<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Identifier: </h6>org.eclipse.egf.model.delegatedValidator<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Since: </h6>[Enter the first release in which this extension point appears.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Description: </h6>Breaks the dependency towards RootAsset for model validation.
+Only one contribution is expected.<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Configuration Markup:</h6>
+<p></p>
+<p class="code SchemaDtd"><!ELEMENT <a name="e.extension">extension</a> (<a href="#e.validationImplementation">validationImplementation</a>)></p>
+<p class="code SchemaDtd"><!ATTLIST extension</p>
+<p class="code SchemaDtdAttlist">point CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">id CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">name CDATA #IMPLIED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.validationImplementation">validationImplementation</a> EMPTY></p>
+<p class="code SchemaDtd"><!ATTLIST validationImplementation</p>
+<p class="code SchemaDtdAttlist">class CDATA #REQUIRED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>class</b> - The implementation of the expected services.
+Must implement IDelegatedValidator interface (either directly or not).</li>
+</ul>
+<br><h6 class="CaptionFigColumn SchemaHeader">Examples: </h6>[Enter extension point usage example here.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">API Information: </h6>[Enter API information here.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Supplied Implementation: </h6>[Enter information about supplied implementation of this extension point.]
+<p></p>
+
+<br>
+<p class="note SchemaCopyright">
+</p>
+</BODY>
+</HTML>
diff --git a/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_model_factoryComponentLoadingHelper.html b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_model_factoryComponentLoadingHelper.html
new file mode 100644
index 0000000..db87aec
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_model_factoryComponentLoadingHelper.html
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Factory Component Loading Helper</title>
+<style type="text/css">@import url("../../book.css");</style>
+<style type="text/css">@import url("../../schema.css");</style>
+</HEAD>
+<BODY>
+<H1 style="text-align:center">Factory Component Loading Helper</H1>
+<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Identifier: </h6>This extension-point allows contributors to read mdsofa elements in different manner..factoryComponentLoadingHelper<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Since: </h6>[Enter the first release in which this extension point appears.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Description: </h6>[This extension-point allows only one contributor to provide a factory component loading implementation.]<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Configuration Markup:</h6>
+<p></p>
+<p class="code SchemaDtd"><!ELEMENT <a name="e.extension">extension</a> (<a href="#e.factoryComponentLoadingHelper">factoryComponentLoadingHelper</a>)></p>
+<p class="code SchemaDtd"><!ATTLIST extension</p>
+<p class="code SchemaDtdAttlist">point CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">id CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">name CDATA #IMPLIED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.factoryComponentLoadingHelper">factoryComponentLoadingHelper</a> EMPTY></p>
+<p class="code SchemaDtd"><!ATTLIST factoryComponentLoadingHelper</p>
+<p class="code SchemaDtdAttlist">id CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">class CDATA #REQUIRED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>id</b> - </li>
+<li><b>class</b> - </li>
+</ul>
+<br><h6 class="CaptionFigColumn SchemaHeader">Examples: </h6>[Enter extension point usage example here.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Supplied Implementation: </h6>[Enter information about supplied implementation of this extension point.]
+<p></p>
+
+<br>
+<p class="note SchemaCopyright">
+</p>
+</BODY>
+</HTML>
diff --git a/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_pattern_extension.html b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_pattern_extension.html
new file mode 100644
index 0000000..eab3249
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_pattern_extension.html
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Pattern Extension</title>
+<style type="text/css">@import url("../../book.css");</style>
+<style type="text/css">@import url("../../schema.css");</style>
+</HEAD>
+<BODY>
+<H1 style="text-align:center">Pattern Extension</H1>
+<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Identifier: </h6>org.eclipse.egf.pattern.org.eclipse.egf.pattern.extension<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Since: </h6>[Enter the first release in which this extension point appears.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Description: </h6>[Enter description of this extension point.]<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Configuration Markup:</h6>
+<p></p>
+<p class="code SchemaDtd"><!ELEMENT <a name="e.extension">extension</a> (<a href="#e.flavor">flavor</a>)></p>
+<p class="code SchemaDtd"><!ATTLIST extension</p>
+<p class="code SchemaDtdAttlist">point CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">id CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">name CDATA #IMPLIED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.flavor">flavor</a> EMPTY></p>
+<p class="code SchemaDtd"><!ATTLIST flavor</p>
+<p class="code SchemaDtdAttlist">class CDATA #REQUIRED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>class</b> - </li>
+</ul>
+<br><h6 class="CaptionFigColumn SchemaHeader">Examples: </h6>[Enter extension point usage example here.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">API Information: </h6>[Enter API information here.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Supplied Implementation: </h6>[Enter information about supplied implementation of this extension point.]
+<p></p>
+
+<br>
+<p class="note SchemaCopyright">
+</p>
+</BODY>
+</HTML>
diff --git a/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_pattern_generatedPattern.html b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_pattern_generatedPattern.html
new file mode 100644
index 0000000..859d7a8
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_pattern_generatedPattern.html
@@ -0,0 +1,57 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>EGF Generated Pattern</title>
+<style type="text/css">@import url("../../book.css");</style>
+<style type="text/css">@import url("../../schema.css");</style>
+</HEAD>
+<BODY>
+<H1 style="text-align:center">EGF Generated Pattern</H1>
+<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Identifier: </h6>org.eclipse.egf.pattern.generatedPattern<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Since: </h6>[Enter the first release in which this extension point appears.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Description: </h6>EGF generated pattern extension point.
+
+Used to define generated patterns.
+A generated pattern is defined by an id, a template code string and a template engine type value.<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Configuration Markup:</h6>
+<p></p>
+<p class="code SchemaDtd"><!ELEMENT <a name="e.extension">extension</a> (<a href="#e.generatedPattern">generatedPattern</a>)+></p>
+<p class="code SchemaDtd"><!ATTLIST extension</p>
+<p class="code SchemaDtdAttlist">point CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">id CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">name CDATA #IMPLIED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.generatedPattern">generatedPattern</a> EMPTY></p>
+<p class="code SchemaDtd"><!ATTLIST generatedPattern</p>
+<p class="code SchemaDtdAttlist">id CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">templateCode CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">templateEngineType (jet) "jet"</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>id</b> - The unique id of the pattern in its containing library.
+A comment on characters that are allowed is needed here.</li>
+<li><b>templateCode</b> - The pattern code resulting from pattern generation.</li>
+<li><b>templateEngineType</b> - An attribute to define the template engine used to generate this pattern.
+If omitted, then it is <samp>jet</samp> by default.
+
+The attribute value will be one of the following:
+ <table border="0" width="80%">
+ <tr>
+ <td valign="jet" width="25"></td>
+ <td valign="jet" nowrap><b>jet</b></td>
+ <td valign="jet">- as JET template engine.</td>
+ </tr>
+ </table></li>
+</ul>
+<br><h6 class="CaptionFigColumn SchemaHeader">Examples: </h6>[Enter extension point usage example here.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Supplied Implementation: </h6>[Enter information about supplied implementation of this extension point.]
+<p></p>
+
+<br>
+<p class="note SchemaCopyright">
+</p>
+</BODY>
+</HTML>
diff --git a/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_pattern_pattern.html b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_pattern_pattern.html
new file mode 100644
index 0000000..1987e4e
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_pattern_pattern.html
@@ -0,0 +1,73 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>EGF Pattern</title>
+<style type="text/css">@import url("../../book.css");</style>
+<style type="text/css">@import url("../../schema.css");</style>
+</HEAD>
+<BODY>
+<H1 style="text-align:center">EGF Pattern</H1>
+<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Identifier: </h6>org.eclipse.egf.pattern.pattern<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Since: </h6>[Enter the first release in which this extension point appears.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Description: </h6>EGF pattern extension point.
+
+Used to define patterns and librairies.
+
+A library can contain either librairies or patterns (elements).
+It can also add specific description about how (which order) to use its elements.
+A pattern is defined by an id and an ecore model (that fully describes the pattern).<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Configuration Markup:</h6>
+<p></p>
+<p class="code SchemaDtd"><!ELEMENT <a name="e.extension">extension</a> (<a href="#e.library">library</a>)></p>
+<p class="code SchemaDtd"><!ATTLIST extension</p>
+<p class="code SchemaDtdAttlist">point CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">id CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">name CDATA #IMPLIED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.library">library</a> (<a href="#e.library">library</a> | <a href="#e.pattern">pattern</a>)+></p>
+<p class="code SchemaDtd"><!ATTLIST library</p>
+<p class="code SchemaDtdAttlist">id CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">name CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">productionOrchestration CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">runtimeOrchestration CDATA #IMPLIED</p>></p>
+<p></p>
+<p class="ConfigMarkupElementDesc">
+A new pattern library.</p>
+<br>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>id</b> - The id of the library.
+A comment on characters that are allowed is needed here.</li>
+<li><b>name</b> - The name of the library.
+Shown in the mdsofa explorer (the id being not exposed).
+A comment on characters that are allowed is needed here.</li>
+<li><b>productionOrchestration</b> - Defines the way the library should be used when being produced.
+It contains short library or pattern ids separated by comma (or white space) characters.</li>
+<li><b>runtimeOrchestration</b> - Defines the way the library should be used when being executed.
+It contains full library or pattern ids separated by comma (or white space) characters.</li>
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.pattern">pattern</a> EMPTY></p>
+<p class="code SchemaDtd"><!ATTLIST pattern</p>
+<p class="code SchemaDtdAttlist">id CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">name CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">definition CDATA #REQUIRED</p>></p>
+<p></p>
+<p class="ConfigMarkupElementDesc">
+A new pattern.</p>
+<br>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>id</b> - The unique id of the pattern in its containing library.
+A comment on characters that are allowed is needed here.</li>
+<li><b>name</b> - The pattern name.
+A comment on characters that are allowed is needed here.</li>
+<li><b>definition</b> - The ecore file defining the pattern.
+Each pattern is a subclass of the Pattern class as provided by the pattern model (pattern.ecore).</li>
+</ul>
+<br><h6 class="CaptionFigColumn SchemaHeader">Examples: </h6>[Enter extension point usage example here.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Supplied Implementation: </h6>[Enter information about supplied implementation of this extension point.]
+<p></p>
+
+<br>
+<p class="note SchemaCopyright">
+</p>
+</BODY>
+</HTML>
diff --git a/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_pattern_patternCondition.html b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_pattern_patternCondition.html
new file mode 100644
index 0000000..ad7fe96
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_pattern_patternCondition.html
@@ -0,0 +1,50 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>EGF pattern condition declaration</title>
+<style type="text/css">@import url("../../book.css");</style>
+<style type="text/css">@import url("../../schema.css");</style>
+</HEAD>
+<BODY>
+<H1 style="text-align:center">EGF pattern condition declaration</H1>
+<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Identifier: </h6>org.eclipse.egf.pattern.patternCondition<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Since: </h6>[Enter the first release in which this extension point appears.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Description: </h6>Pattern condition implementation pointer.<br>
+This extension point is intended to be used by pattern ui exclusively for declaration.<br>
+Reading these extensions is then left to a specific pattern execution.<br>
+So, you should not be using this extension point.<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Configuration Markup:</h6>
+<p></p>
+<p class="code SchemaDtd"><!ELEMENT <a name="e.extension">extension</a> (<a href="#e.conditionPointer">conditionPointer</a>)></p>
+<p class="code SchemaDtd"><!ATTLIST extension</p>
+<p class="code SchemaDtdAttlist">point CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">id CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">name CDATA #IMPLIED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.conditionPointer">conditionPointer</a> EMPTY></p>
+<p class="code SchemaDtd"><!ATTLIST conditionPointer</p>
+<p class="code SchemaDtdAttlist">patternId CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">class CDATA #REQUIRED</p>></p>
+<p></p>
+<p class="ConfigMarkupElementDesc">
+A pointer to a condition class for identified pattern.</p>
+<br>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>patternId</b> - Pattern full id having need for this condition.<br>
+Note that a pattern can have only one condition at a time, so its unique id is sufficient so as to find out which condition to use.</li>
+<li><b>class</b> - The pattern condition implementation fully qualified class name.<br>
+It must be instantiable by the plug-in declaring such an extension.</li>
+</ul>
+<br><h6 class="CaptionFigColumn SchemaHeader">Examples: </h6>[Enter extension point usage example here.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Supplied Implementation: </h6>[Enter information about supplied implementation of this extension point.]
+<p></p>
+
+<br>
+<p class="note SchemaCopyright">
+</p>
+</BODY>
+</HTML>
diff --git a/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_pattern_ui_patternGenerator.html b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_pattern_ui_patternGenerator.html
new file mode 100644
index 0000000..2a0d836
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_pattern_ui_patternGenerator.html
@@ -0,0 +1,49 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>EGF Pattern Generator</title>
+<style type="text/css">@import url("../../book.css");</style>
+<style type="text/css">@import url("../../schema.css");</style>
+</HEAD>
+<BODY>
+<H1 style="text-align:center">EGF Pattern Generator</H1>
+<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Identifier: </h6>org.eclipse.egf.pattern.ui.patternGenerator<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Since: </h6>[Enter the first release in which this extension point appears.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Description: </h6>MDSofa Pattern Generator extension point.
+Provides with asset that are capable of generating a new pattern through a generator class.<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Configuration Markup:</h6>
+<p></p>
+<p class="code SchemaDtd"><!ELEMENT <a name="e.extension">extension</a> (<a href="#e.patternGeneratorRoot">patternGeneratorRoot</a>)></p>
+<p class="code SchemaDtd"><!ATTLIST extension</p>
+<p class="code SchemaDtdAttlist">point CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">id CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">name CDATA #IMPLIED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.patternGenerator">patternGenerator</a> EMPTY></p>
+<p class="code SchemaDtd"><!ATTLIST patternGenerator</p>
+<p class="code SchemaDtdAttlist">class CDATA #REQUIRED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>class</b> - The implementation of the pattern generator.</li>
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.patternGeneratorRoot">patternGeneratorRoot</a> (<a href="#e.patternGenerator">patternGenerator</a>)+></p>
+<p class="code SchemaDtd"><!ATTLIST patternGeneratorRoot</p>
+<p class="code SchemaDtdAttlist">id CDATA #REQUIRED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>id</b> - The project name that is selected when calling for the generate action.</li>
+</ul>
+<br><h6 class="CaptionFigColumn SchemaHeader">Examples: </h6>[Enter extension point usage example here.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Supplied Implementation: </h6>[Enter information about supplied implementation of this extension point.]
+<p></p>
+
+<br>
+<p class="note SchemaCopyright">
+</p>
+</BODY>
+</HTML>
diff --git a/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_pattern_ui_patternProduction.html b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_pattern_ui_patternProduction.html
new file mode 100644
index 0000000..bd380ff
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_pattern_ui_patternProduction.html
@@ -0,0 +1,49 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Pattern production</title>
+<style type="text/css">@import url("../../book.css");</style>
+<style type="text/css">@import url("../../schema.css");</style>
+</HEAD>
+<BODY>
+<H1 style="text-align:center">Pattern production</H1>
+<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Identifier: </h6>org.eclipse.egf.pattern.ui.patternProduction<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Since: </h6>[Enter the first release in which this extension point appears.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Description: </h6>Pattern production extension point.
+Allows to point libraries and patterns to produce for a selected asset project.<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Configuration Markup:</h6>
+<p></p>
+<p class="code SchemaDtd"><!ELEMENT <a name="e.extension">extension</a> (<a href="#e.patternProductionRoot">patternProductionRoot</a>)></p>
+<p class="code SchemaDtd"><!ATTLIST extension</p>
+<p class="code SchemaDtdAttlist">point CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">id CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">name CDATA #IMPLIED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.patternProductionRoot">patternProductionRoot</a> (<a href="#e.libraryOrPatternReference">libraryOrPatternReference</a>)+></p>
+<p class="code SchemaDtd"><!ATTLIST patternProductionRoot</p>
+<p class="code SchemaDtdAttlist">id CDATA #REQUIRED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>id</b> - The project name that is selected when calling for the production action.</li>
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.libraryOrPatternReference">libraryOrPatternReference</a> EMPTY></p>
+<p class="code SchemaDtd"><!ATTLIST libraryOrPatternReference</p>
+<p class="code SchemaDtdAttlist">id CDATA #REQUIRED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>id</b> - The full id of the library or the pattern to produce.</li>
+</ul>
+<br><h6 class="CaptionFigColumn SchemaHeader">Examples: </h6>[Enter extension point usage example here.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Supplied Implementation: </h6>[Enter information about supplied implementation of this extension point.]
+<p></p>
+
+<br>
+<p class="note SchemaCopyright">
+</p>
+</BODY>
+</HTML>
diff --git a/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_pde_factoryComponentContent.html b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_pde_factoryComponentContent.html
new file mode 100644
index 0000000..0c88b93
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_pde_factoryComponentContent.html
@@ -0,0 +1,80 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Factory Component Content Wizards</title>
+<style type="text/css">@import url("../../book.css");</style>
+<style type="text/css">@import url("../../schema.css");</style>
+</HEAD>
+<BODY>
+<H1 style="text-align:center">Factory Component Content Wizards</H1>
+<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Identifier: </h6>org.eclipse.egf.pde.factoryComponentContent<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Description: </h6>This extension point provides for contributing wizards that create additional content of the EGF PDE Factory Component
+projects. After the plug-in manifest and key files have been
+created, these wizards can be used to add more files and
+extensions to the initial structure. A typical implementation
+of this wizard would add content based on a parametrized
+template customized based on the user choices in the wizard.
+The goal is to arrive at an asset that is does something
+useful right after the creation.<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Configuration Markup:</h6>
+<p></p>
+<p class="code SchemaDtd"><!ELEMENT <a name="e.extension">extension</a> (<a href="#e.wizard">wizard</a>*)></p>
+<p class="code SchemaDtd"><!ATTLIST extension</p>
+<p class="code SchemaDtdAttlist">point CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">id CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">name CDATA #IMPLIED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>point</b> - a fully qualified identifier of the target extension point</li>
+<li><b>id</b> - an optional identifier of the extension instance</li>
+<li><b>name</b> - an optional name of the extension instance</li>
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.wizard">wizard</a> (<a href="#e.description">description</a>?)></p>
+<p class="code SchemaDtd"><!ATTLIST wizard</p>
+<p class="code SchemaDtdAttlist">id CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">name CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">icon CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">class CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">category CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">ui-content (true | false) "true"</p><p class="code SchemaDtdAttlist">java (true | false) "true"</p><p class="code SchemaDtdAttlist">requiresActivator (true | false) "false"</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>id</b> - a unique name that will be used to identify this wizard.</li>
+<li><b>name</b> - a translatable name that will be used in UI representation
+of this wizard.</li>
+<li><b>icon</b> - a relative path of an icon that will be used to visually
+represent the wizard.</li>
+<li><b>class</b> - a fully qualified name of a class which implements
+<samp>org.eclipse.pde.ui.IPluginContentWizard</samp>.</li>
+<li><b>category</b> - an optional tag that can be used to associate content wizards with different target projects.</li>
+<li><b>ui-content</b> - a flag that indicates if the wizard will contribute code with user interface content. This flag will affect which plug-in class will be picked since (UI plug-ins extend <code>AbstractUIPlugin</code> class, while non-UI plug-ins extends <code>Plugin</code> base class). Since many contributions to Eclipse have UI content, this attribute is <code>true</code> by default.</li>
+<li><b>java</b> - a flag that indicates that the wizard will contribute Java content. Since most of the Eclipse plug-ins have Java code, the attribute is <code>true</code> by default. Set it to <code>false</code> if the plug-in will not have Java code (for example, documentation files only).</li>
+<li><b>requiresActivator</b> - Since 3.2. A boolean flag indicating whether the wizard contributes an activator class. If set to <code>true</code>, the wizard will appear in the New Plug-in Project wizard only when the user chooses to generate an activator to control the plug-in life cycle.</li>
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.description">description</a> (#PCDATA)></p>
+<p></p>
+<p class="ConfigMarkupElementDesc">
+Short description of this wizard.</p>
+<br><br>
+<h6 class="CaptionFigColumn SchemaHeader">Examples: </h6>The following is an example of this extension point:
+<pre class="Example"><span class="code SchemaTag">
+ <extension point=</span><span class="code SchemaCstring">"org.eclipse.egf.pde.factoryComponentContent"</span><span class="code SchemaTag">>
+ <wizard
+ name=</span><span class="code SchemaCstring">"Example Plug-in Content Generator"</span><span class="code SchemaTag">
+ icon=</span><span class="code SchemaCstring">"icons/content_wizard.gif"</span><span class="code SchemaTag">
+ class=</span><span class="code SchemaCstring">"com.example.xyz.ContentGeneratorWizard"</span><span class="code SchemaTag">
+ id=</span><span class="code SchemaCstring">"com.example.xyz.ExampleContentGenerator"</span><span class="code SchemaTag">>
+ <description>
+ Create an asset that depends on the JavaBundle Asset.
+ </description>
+ </wizard>
+ </extension>
+</span></pre>
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Supplied Implementation: </h6>MDsoFa PDE provides APIs for contributing content wizards based on customizable templates.
+<p></p>
+
+<br>
+<p class="note SchemaCopyright">
+/**
+ * Copyright (c) THALES, 2007. All rights reserved.
+ */
+
+</p>
+</BODY>
+</HTML>
diff --git a/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_query.html b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_query.html
new file mode 100644
index 0000000..1fe994c
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/reference/extension-points/org_eclipse_egf_query.html
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Pattern Query</title>
+<style type="text/css">@import url("../../book.css");</style>
+<style type="text/css">@import url("../../schema.css");</style>
+</HEAD>
+<BODY>
+<H1 style="text-align:center">Pattern Query</H1>
+<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Identifier: </h6>org.eclipse.egf.pattern.org.eclipse.egf.query<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Since: </h6>[Enter the first release in which this extension point appears.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Description: </h6>[Enter description of this extension point.]<p></p>
+<h6 class="CaptionFigColumn SchemaHeader">Configuration Markup:</h6>
+<p></p>
+<p class="code SchemaDtd"><!ELEMENT <a name="e.extension">extension</a> (<a href="#e.query">query</a>+)></p>
+<p class="code SchemaDtd"><!ATTLIST extension</p>
+<p class="code SchemaDtdAttlist">point CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">id CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">name CDATA #IMPLIED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+</ul>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.query">query</a> EMPTY></p>
+<p class="code SchemaDtd"><!ATTLIST query</p>
+<p class="code SchemaDtdAttlist">class CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">id CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">name CDATA #REQUIRED</p>></p>
+<p></p>
+<ul class="ConfigMarkupAttlistDesc">
+<li><b>class</b> - </li>
+<li><b>id</b> - </li>
+<li><b>name</b> - </li>
+</ul>
+<br><h6 class="CaptionFigColumn SchemaHeader">Examples: </h6>[Enter extension point usage example here.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">API Information: </h6>[Enter API information here.]
+<p></p>
+
+<h6 class="CaptionFigColumn SchemaHeader">Supplied Implementation: </h6>[Enter information about supplied implementation of this extension point.]
+<p></p>
+
+<br>
+<p class="note SchemaCopyright">
+</p>
+</BODY>
+</HTML>
diff --git a/doc/org.eclipse.egf.engine.doc/html/reference/icons.html b/doc/org.eclipse.egf.engine.doc/html/reference/icons.html
new file mode 100644
index 0000000..e8c3b85
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/reference/icons.html
@@ -0,0 +1,115 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <head>
+ <meta name="copyright" content="Copyright (c) THALES, 2007. All rights reserved.">
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
+ <title>EGF Engine icons</title>
+ <script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"> </script>
+ </head>
+
+ <body>
+ <h1>EGF Engine icons</h1>
+ <table cellspacing="0" cellpadding="5" border="1" width="50%">
+ <tbody>
+ <tr>
+ <td valign="middle" align="center">
+ <img src="../../../org.eclipse.egf.model.edit/icons/full/obj16/FactoryComponent.gif" alt="Factory Component">
+ </td>
+ <td valign="top">Factory Component</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="center">
+ <img src="../../../org.eclipse.egf.model.edit/icons/full/obj16/Domain.gif" alt="Domain">
+ </td>
+ <td valign="top">Domain</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="center">
+ <img src="../../../org.eclipse.egf.model.edit/icons/full/obj16/Specification.gif" alt="Viewpoints">
+ </td>
+ <td valign="top">Viewpoints</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="center">
+ <img src="../../../org.eclipse.egf.model.edit/icons/full/obj16/Contract.gif" alt="Contract">
+ </td>
+ <td valign="top">Contract viewpoint : set of contract elements</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="center">
+ <img src="../images/contract-element-mandatory.png" alt="Mandatory Contract Element">
+ </td>
+ <td valign="top">Mandatory Contract Element</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="center">
+ <img src="../../../org.eclipse.egf.model.edit/icons/full/obj16/ContractElement.gif" alt="Optional Contract Element">
+ </td>
+ <td valign="top">Optional Contract Element</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="center">
+ <img src="../../../org.eclipse.egf.model.edit/icons/full/obj16/PatternViewpoint.gif" alt="Pattern Viewpoint">
+ </td>
+ <td valign="top">Pattern viewpoint : set of pattern libraries</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="center">
+ <img src="../../../org.eclipse.egf.model.edit/icons/full/obj16/PatternLibrary.gif" alt="Pattern Library">
+ </td>
+ <td valign="top">Pattern Library</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="center">
+ <img src="../../../org.eclipse.egf.model.edit/icons/full/obj16/PatternModel.gif" alt="Pattern">
+ </td>
+ <td valign="top">Pattern</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="center">
+ <img src="../../../org.eclipse.egf.model.edit/icons/full/obj16/MappingViewpoint.gif" alt="Mapping Viewpoint">
+ </td>
+ <td valign="top">Mapping viewpoint : set of mappings</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="center">
+ <img src="../../../org.eclipse.egf.model.edit/icons/full/obj16/MappingModel.gif" alt="Mapping">
+ </td>
+ <td valign="top">Mapping</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="center">
+ <img src="../../../org.eclipse.egf.model.edit/icons/full/obj16/Factory.gif" alt="Factory">
+ </td>
+ <td valign="top">Factory</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="center">
+ <img src="../../../org.eclipse.egf.model.edit/icons/full/obj16/ProductionPlan.gif" alt="Production Plan">
+ </td>
+ <td valign="top">Production Plan</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="center">
+ <img src="../../../org.eclipse.egf.model.edit/icons/full/obj16/FactoryComponentInvocation.gif" alt="FactoryComponentInvocation">
+ </td>
+ <td valign="top">Factory Component Invocation</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="center">
+ <img src="../../../org.eclipse.egf.model.edit/icons/full/obj16/Context.gif" alt="Context">
+ </td>
+ <td valign="top">Context</td>
+ </tr>
+ <tr>
+ <td valign="middle" align="center">
+ <img src="../../../org.eclipse.egf.model.edit/icons/full/obj16/ContextElement.gif" alt="Context Element">
+ </td>
+ <td valign="top">Context Element</td>
+ </tr>
+ </tbody>
+ </table>
+ </body>
+</html>
\ No newline at end of file
diff --git a/doc/org.eclipse.egf.engine.doc/html/tutorial/part1/egf-tutorial-fc1.html b/doc/org.eclipse.egf.engine.doc/html/tutorial/part1/egf-tutorial-fc1.html
new file mode 100644
index 0000000..02106e5
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/tutorial/part1/egf-tutorial-fc1.html
@@ -0,0 +1,234 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>
+ EGF Tutorial - Factory Component. First steps.
+ </title>
+ <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css" />
+
+ <meta name="copyright" content="Copyright (c) Thales Corporate Services S.A.S, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." />
+ <meta name="author" content="Benoit Langlois" />
+ <meta name="keywords" content="egf,factory,component"/>
+</head>
+
+<body xml:lang="EN-US" lang="EN-US">
+
+<table border="0" cellpadding="2" cellspacing="0" width="100%">
+ <tbody>
+ <tr>
+ <td colspan="2" align="left" bgcolor="#0080c0" valign="top">
+ <h2><font face="Arial,Helvetica"><font color="#ffffff">
+ EGF Tutorial - Factory Component. First steps.
+ </font></font></h2>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+<p class="Para">This first tutorial explains how to create and execute simple factory components with EGF.</p>
+
+<br/>
+
+<h2 class="Head">1. Creation of factory component and task</h2>
+
+<h3 class="Head">1.1. Comprehension</h3>
+<p class="Para"><i>Generation activities</i>. A generation can be decomposed into generation stages down to the generation leaves which realize the effective generation tasks, such as producing an API. In EGF, this corresponds to <b>factory components</b> that delegate their generations, by an activity invocation, to other factory components until <b>tasks</b> that realizes a generation task. EGF proposes a task implementation in the Java language.</p>
+<p class="Para"><i>Storage</i>. Factory components and tasks are stored in <b>fcore</b> files.</p>
+
+<p align="center">
+ <img src="./images/egf_tut_fc_1_1.png" alt="EGF Activity Relationships"/>
+</p>
+<p align="center"><i>Figure 1. EGF Activity Relationships</i></p>
+
+
+<h3 class="Head">1.2. Practice</h3>
+
+<p class="Para">The sequence of actions to <i>create a factory component</i>:</p>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">First, create a project and a folder where the factory components and tasks will be located</li>
+ <li CLASS="Item">Creation of a Factory Component - Commands: <i>[File][New][EGF Activity]</i></li>
+ <li CLASS="Item">Select a project or a project folder, and set the fcore file name</li>
+ <li CLASS="Item">Click on Finish or Next, and select <i>Factory Component</i> for model object</li>
+ <li CLASS="Item">Click on Finish; the Factory Component is created</li>
+ <li CLASS="Item">Set the factory component name in the <i>Properties</i> view to better identify it later</li>
+</ul>
+
+<p class="Para">The sequence of actions is the same for creating a task: select <i>Task</i> as model object instead of <i>Factory Component</i>.</p>
+
+<p class="Para">A fcore file is a resource able to contain several activities, i.e. several factory components or tasks. In order to add a new activity in the same fcore file:</p>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">Right-Click on an activity - Commands: <i>[New Sibling]</i></li>
+ <li CLASS="Item">Select the activity type to create</li>
+</ul>
+<br/>
+
+<h3 class="Head">1.3. Application</h3>
+<p class="Para">During this tutorial, a Java class will be implemented. Then, it is better to start with a Java project.</p>
+<p class="Para">Create a Factory component named <i>HelloWorld</i> and a Task named <i>HelloWorldTask</i>.</p>
+
+<p align="center">
+ <img src="./images/egf_tut_fc_1_2.png" alt="New EGF Activity"/>
+</p>
+<p align="center"><i>Figure 2. New EGF Activity</i></p>
+<br/>
+
+<h2 class="Head">2. Creation of task contracts and task implementation</h2>
+
+<h3 class="Head">2.1. Comprehension</h3>
+
+<p class="Para"><i>Contracts</i>. In EGF, an activity parameter is named <b>Contract</b>. Factory component and task contracts are contained in a <i>Contract Container</i>. A <i>Contract</i> has a Name, Mode (IN, OUT, IN_OUT), is mandatory or not, has a <b>Type</b>, and possibly a default value.</p>
+
+<p align="center">
+ <img src="./images/egf_tut_fc_1_3.png" alt="Activity Contracts"/>
+</p>
+<p align="center"><i>Figure 3. Activity Contracts</i></p>
+
+<p class="Para"><i>Task declaration and implementation</i>. A task realizes an effective work. It is necessary to differentiate the task declaration, defined in a fcore model, from the task implementation, defined in a Java class. After its declaration, a task can be invoked by different factory components. The task implementation is the means to execute any generation tool, or something else in Java. The Java class implements an <i>ITaskProduction</i> interface. It can implement three methods: preExecute, doExecute, postExecute. The task methods have a context parameter to get, set and work with the task contracts. The link between the Task and the task Java class is realized at the task level.</p>
+
+<p align="center">
+ <img src="./images/egf_tut_fc_1_4.png" alt="Java Task and Java Task implementation"/>
+</p>
+<p align="center"><i>Figure 4. Java Task and Java Task implementation</i></p>
+
+
+<h3 class="Head">2.2. Practice</h3>
+<p class="Para">Task modeling - The sequence of actions to <i>create task contracts</i>:</p>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">Creation of the task contract container - Command: on a task, <i>[New Child][Task Contract Container]</i></li>
+ <li CLASS="Item">Creation of a task contract - Command: on the task contract container, <i>[New Child][Contract]</i></li>
+ <li CLASS="Item">Set the contract name, mode, and mandatory values</li>
+ <li CLASS="Item">Definition of the task contract type - Command: on the task contract, <i>[New Child][String|Integer...]</i></li>
+ <li CLASS="Item">Set the default value on the contract type with the <i>Value</i> property</li>
+</ul>
+
+<h3 class="Head">2.3. Application</h3>
+<p class="Para">Create a Task contract 'value' of String contract type with the (default) value 'World', as shown in the following figure.</p>
+
+<p align="center">
+ <img src="./images/egf_tut_fc_1_5.png" alt="Java Task Example"/>
+</p>
+<p align="center"><i>Figure 5. Java Task Example</i></p>
+
+
+<h3 class="Head">2.4. Practice</h3>
+<p class="Para">Task implementation - The sequence of actions to <i>create and associate a task Java Class</i>:</p>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">Create a Class which implements the <i>ITaskProduction</i> Interface</li>
+ <li CLASS="Item">Implement the task class</li>
+ <li CLASS="Item">Associate the task with the task Java class - Command: on the [Java Task], on the <i>Implementation</i> property, select a Java task class</li>
+</ul>
+
+<p align="center">
+ <img src="./images/egf_tut_fc_1_6.png" alt="Java Task / Java class association"/>
+</p>
+<p align="center"><i>Figure 6. Java Task / Java class association</i></p>
+
+<h3 class="Head">2.5. Application</h3>
+<p class="Para">Create a Java class <i>HelloWorld</i> that displays an parameterized Hello message. Example of code:</p>
+ <font color="777777"><pre>
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.fprod.producer.context.ITaskProductionContext;
+import org.eclipse.egf.fprod.producer.invocation.ITaskProduction;
+
+
+public class HelloWorld implements ITaskProduction {
+
+ @Override
+ public void doExecute(ITaskProductionContext productionContext,
+ IProgressMonitor monitor) throws InvocationException {
+ String value = productionContext.getInputValue("value", String.class);
+ String outputMessage = new String ("Hello " + value + "!");
+ // Message on the default console
+ System.out.println(outputMessage);
+ // Message on the EGF console
+ EGFCorePlugin.getDefault().logInfo(outputMessage);
+ }
+
+ @Override
+ public void preExecute(final ITaskProductionContext context, final IProgressMonitor monitor_p) throws InvocationException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void postExecute(final ITaskProductionContext context, final IProgressMonitor monitor_p) throws InvocationException {
+ // TODO Auto-generated method stub
+
+ }
+
+}
+ </pre></font>
+
+<p class="Para">Associate the <i>HelloWorld</i> class to the <i>HelloWorldTask</i> Java task.</p>
+
+<br/>
+
+<h2 class="Head">3. Task invocation in a factory component</h2>
+
+<h3 class="Head">3.1. Comprehension</h3>
+<p class="Para"><i>Orchestration</i>. The same task / factory component can be invoked by different factory components; the same factory component can invoke several factory component and/or tasks. Invocations to factory components and tasks are defined in an orchestration. EGF proposes a simple orchestration type named <b>production plan</b>. A production plan is a sorted list of activity invocations. A <b>task invocation</b> calls a task with the values required by the task contracts. The following figure details the first figure.</p>
+
+<p align="center">
+ <img src="./images/egf_tut_fc_1_7.png" alt="Factory Component Orchestration"/>
+</p>
+<p align="center"><i>Figure 7. Factory Component Orchestration</i></p>
+
+
+<h3 class="Head">3.2. Practice</h3>
+
+<p class="Para">The sequence of actions to <i>create a production plan</i>:</p>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">Commands: on a factory component, <i>[New Child][Production Plan]</i></li>
+</ul>
+
+<p class="Para">The sequence of actions to <i>create an invocation</i> in a production plan:</p>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">Commands: on a production plan, <i>[New Child][Production Plan Invocation]</i></li>
+ <li CLASS="Item">Set the Name with semantic meaning</li>
+ <li CLASS="Item">In the Activity section of the production plan invocation, set the <i>Invoked Activity</i> property: select a task or factory component</li>
+</ul>
+
+<p class="Para">The sequence of actions to <i>create task invocation values</i> in a task invocation:</p>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">First, create an invocation context - Commands: on a task invocation, <i>[New Child][Invocation Contract Container]</i></li>
+ <li CLASS="Item">For each task contract to be valued - Commands: on an invocation context container, <i>[New Child][Invocation Contract]</i></li>
+ <li CLASS="Item">On the invocation contract, in the <i>Invoked Contract</i> property of the <i>Behaviour</i> section, select the concerned task contract to be valued</li>
+ <li CLASS="Item">Definition of an Invocation Contract value - Commands: on an invocation contract, <i>[New Child][the activity contract type, e.g. String]</i></li>
+ <li CLASS="Item">Set the value</li>
+</ul>
+
+<p class="Para">The two last steps are necessary when the default value of the task contract must be redefined or is undefined and madatory.</p>
+
+<h3 class="Head">3.3. Application</h3>
+<p class="Para">Create a task invocation without Invocation Contract (the default value of the task contract is used) and one with.</p>
+
+
+<br/>
+
+<h2 class="Head">4. Execution of task and factory component</h2>
+
+<h3 class="Head">4.1. Comprehension</h3>
+<p class="Para"><i>Execution during the development phase</i>. During the development phase, there exist two modes to execute a task or factory component. 1) Dynamically, directly on a factory component or on a task, when the model is open. This mode is useful to simultaneously develop and test tasks and factory components. Before execution, it is controled that the model is valid. 2) On the fcore resource. This avoids to open the fcore resource.</p>
+<p class="Para"><i>Execution on the target platform</i>. After deployment in the target platform, the factory components, tasks, and fcore resources can be normally executed.</p>
+<p class="Para"><i>Preferences</i>. The EGF production settings are accessible via the EGF preferences.</p>
+
+
+<h3 class="Head">4.2. Practice</h3>
+
+<p class="Para">The sequence of actions to <i>execute a task or factory component dynamically</i>:</p>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">Commands: <i>[Right-Click][Run EGF Activity...]: on a task or a factory component</i></li>
+</ul>
+
+
+<p class="Para">The sequence of actions to <i>execute a fcore resource</i>:</p>
+<ul CLASS="UnorderedList">
+ <li CLASS="Item">Commands: <i>[Right-Click][Run EGF Activity...] on the fcore file</i></li>
+ <li CLASS="Item">If there are several factory components or tasks in the same fcore file, then it is necessary to select the activity to be executed</li>
+</ul>
+
+</body>
+</html>
diff --git a/doc/org.eclipse.egf.engine.doc/html/tutorial/part1/images/egf_tut_fc_1_1.png b/doc/org.eclipse.egf.engine.doc/html/tutorial/part1/images/egf_tut_fc_1_1.png
new file mode 100644
index 0000000..e5971c8
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/tutorial/part1/images/egf_tut_fc_1_1.png
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/tutorial/part1/images/egf_tut_fc_1_2.png b/doc/org.eclipse.egf.engine.doc/html/tutorial/part1/images/egf_tut_fc_1_2.png
new file mode 100644
index 0000000..563de53
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/tutorial/part1/images/egf_tut_fc_1_2.png
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/tutorial/part1/images/egf_tut_fc_1_3.png b/doc/org.eclipse.egf.engine.doc/html/tutorial/part1/images/egf_tut_fc_1_3.png
new file mode 100644
index 0000000..a27dc50
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/tutorial/part1/images/egf_tut_fc_1_3.png
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/tutorial/part1/images/egf_tut_fc_1_4.png b/doc/org.eclipse.egf.engine.doc/html/tutorial/part1/images/egf_tut_fc_1_4.png
new file mode 100644
index 0000000..287b462
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/tutorial/part1/images/egf_tut_fc_1_4.png
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/tutorial/part1/images/egf_tut_fc_1_5.png b/doc/org.eclipse.egf.engine.doc/html/tutorial/part1/images/egf_tut_fc_1_5.png
new file mode 100644
index 0000000..ca3027a
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/tutorial/part1/images/egf_tut_fc_1_5.png
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/tutorial/part1/images/egf_tut_fc_1_6.png b/doc/org.eclipse.egf.engine.doc/html/tutorial/part1/images/egf_tut_fc_1_6.png
new file mode 100644
index 0000000..d9964ac
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/tutorial/part1/images/egf_tut_fc_1_6.png
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/html/tutorial/part1/images/egf_tut_fc_1_7.png b/doc/org.eclipse.egf.engine.doc/html/tutorial/part1/images/egf_tut_fc_1_7.png
new file mode 100644
index 0000000..614b0af
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/html/tutorial/part1/images/egf_tut_fc_1_7.png
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/plugin.properties b/doc/org.eclipse.egf.engine.doc/plugin.properties
new file mode 100644
index 0000000..a760f67
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/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 Engine Guide (Incubation)
+providerName=Eclipse Modeling Project
diff --git a/doc/org.eclipse.egf.engine.doc/plugin.xml b/doc/org.eclipse.egf.engine.doc/plugin.xml
new file mode 100644
index 0000000..f07986e
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/plugin.xml
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/toc_FactoryComponents.xml b/doc/org.eclipse.egf.engine.doc/toc_FactoryComponents.xml
new file mode 100644
index 0000000..8e76871
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/toc_FactoryComponents.xml
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/toc_GettingStarted.xml b/doc/org.eclipse.egf.engine.doc/toc_GettingStarted.xml
new file mode 100644
index 0000000..c0f811e
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/toc_GettingStarted.xml
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/topics_Concepts.xml b/doc/org.eclipse.egf.engine.doc/topics_Concepts.xml
new file mode 100644
index 0000000..c498b0e
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/topics_Concepts.xml
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/topics_Overviews.xml b/doc/org.eclipse.egf.engine.doc/topics_Overviews.xml
new file mode 100644
index 0000000..9b18551
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/topics_Overviews.xml
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/topics_Reference_Api.xml b/doc/org.eclipse.egf.engine.doc/topics_Reference_Api.xml
new file mode 100644
index 0000000..20f0123
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/topics_Reference_Api.xml
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/topics_Reference_Icons.xml b/doc/org.eclipse.egf.engine.doc/topics_Reference_Icons.xml
new file mode 100644
index 0000000..ff608d1
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/topics_Reference_Icons.xml
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/topics_Reference_Preferences.xml b/doc/org.eclipse.egf.engine.doc/topics_Reference_Preferences.xml
new file mode 100644
index 0000000..274c9a7
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/topics_Reference_Preferences.xml
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/topics_Reference_Views.xml b/doc/org.eclipse.egf.engine.doc/topics_Reference_Views.xml
new file mode 100644
index 0000000..be4cd32
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/topics_Reference_Views.xml
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/topics_Reference_Wizards.xml b/doc/org.eclipse.egf.engine.doc/topics_Reference_Wizards.xml
new file mode 100644
index 0000000..d1cae7b
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/topics_Reference_Wizards.xml
Binary files differ
diff --git a/doc/org.eclipse.egf.engine.doc/topics_Reference_Wizards_Edit.xml b/doc/org.eclipse.egf.engine.doc/topics_Reference_Wizards_Edit.xml
new file mode 100644
index 0000000..bffc696
--- /dev/null
+++ b/doc/org.eclipse.egf.engine.doc/topics_Reference_Wizards_Edit.xml
Binary files differ
diff --git a/examples/runtime/org.eclipse.egf.example.emf.docgen.html/.project b/examples/runtime/org.eclipse.egf.example.emf.docgen.html/.project
new file mode 100644
index 0000000..11e107f
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.emf.docgen.html/.project
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.example.emf.docgen.html</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <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>
+ </natures>
+</projectDescription>
diff --git a/examples/runtime/org.eclipse.egf.example.emf.docgen.html/META-INF/MANIFEST.MF b/examples/runtime/org.eclipse.egf.example.emf.docgen.html/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..0f326bd
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.emf.docgen.html/META-INF/MANIFEST.MF
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Ex1
+Bundle-SymbolicName: org.eclipse.egf.example.emf.docgen.html;singleton:=true
+Bundle-Version: 0.2.2.qualifier
+Require-Bundle: org.eclipse.egf.eclipse.resources.mgt;bundle-version="0.2.1"
diff --git a/examples/runtime/org.eclipse.egf.example.emf.docgen.html/about.html b/examples/runtime/org.eclipse.egf.example.emf.docgen.html/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.emf.docgen.html/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/runtime/org.eclipse.egf.example.emf.docgen.html/build.properties b/examples/runtime/org.eclipse.egf.example.emf.docgen.html/build.properties
new file mode 100644
index 0000000..92333e3
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.emf.docgen.html/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+
+bin.includes = META-INF/,\
+ egf/,\
+ plugin.xml,\
+ model/,\
+ output/,\
+ output1/,\
+ about.html
+src.includes = about.html
diff --git a/examples/runtime/org.eclipse.egf.example.emf.docgen.html/egf/LibraryHtmlDoc.fcore b/examples/runtime/org.eclipse.egf.example.emf.docgen.html/egf/LibraryHtmlDoc.fcore
new file mode 100644
index 0000000..f6e0fe4
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.emf.docgen.html/egf/LibraryHtmlDoc.fcore
@@ -0,0 +1,29 @@
+<?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:types="http://www.eclipse.org/egf/1.0.0/types" xmi:id="_6rsIkQpYEd-pyqf4uNW3tw"
+ name="LibraryHtmlDoc">
+ <viewpointContainer xmi:id="_N71eYQprEd-7fqY_JLtg2w">
+ <viewpoints xmi:type="domain:DomainViewpoint" xmi:id="_OdNtIAprEd-7fqY_JLtg2w">
+ <domains xmi:type="domain:DomainURI" xmi:id="_SUbPQAprEd-7fqY_JLtg2w" uri="platform:/plugin/org.eclipse.egf.example.emf.docgen.html/model/library.ecore"/>
+ </viewpoints>
+ </viewpointContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_8VyS4ApYEd-pyqf4uNW3tw">
+ <invocations xmi:id="_9BcfAApYEd-pyqf4uNW3tw" name="Html Documentation Generation"
+ invokedActivity="fcore:FactoryComponent platform:/plugin/org.eclipse.egf.emf.docgen.html/egf/EmfDocGenHtml.fcore#_BxjIkAG0Ed-7fNNmMjB2jQ">
+ <invocationContractContainer xmi:id="_vVEUIAqQEd-o4MG7iLHReg">
+ <invocationContracts xmi:id="_wFpcgAqQEd-o4MG7iLHReg" invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.emf.docgen.html/egf/EmfDocGenHtml.fcore#_Yp4VcAprEd-7fqY_JLtg2w">
+ <type xmi:type="domain:TypeDomainURI" xmi:id="_yuVWAAqQEd-o4MG7iLHReg" domain="#_SUbPQAprEd-7fqY_JLtg2w"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_Rrl4YAqREd-o4MG7iLHReg" invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.emf.docgen.html/egf/EmfDocGenHtml.fcore#_7NKWkApbEd-pyqf4uNW3tw">
+ <type xmi:type="types:TypeString" xmi:id="_T3qHUAqREd-o4MG7iLHReg" description=""
+ value="org.eclipse.egf.library.doc"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_Vvw4cAqREd-o4MG7iLHReg" invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.emf.docgen.html/egf/EmfDocGenHtml.fcore#_AvXa4ApcEd-pyqf4uNW3tw">
+ <type xmi:type="types:TypeString" xmi:id="_XmE50AqREd-o4MG7iLHReg" value="html"/>
+ </invocationContracts>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+</fcore:FactoryComponent>
diff --git a/examples/runtime/org.eclipse.egf.example.emf.docgen.html/model/library.ecore b/examples/runtime/org.eclipse.egf.example.emf.docgen.html/model/library.ecore
new file mode 100644
index 0000000..fc62bf0
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.emf.docgen.html/model/library.ecore
@@ -0,0 +1,124 @@
+<?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="library"
+ nsURI="http://org.eclipse.egf.docgen.html/library.ecore/1.0.0" nsPrefix="lib">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This model describes the library domain."/>
+ </eAnnotations>
+ <eClassifiers xsi:type="ecore:EClass" name="Book" eSuperTypes="#//CirculatingItem">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+ <details key="constraints" value="TitleNotEmpty"/>
+ </eAnnotations>
+ <eAnnotations source="http://www.eclipse.org/egf/2010/GenDoc">
+ <details key="documentation" value="A book is written by an author, has a title and category.
Several borrowers can simultaneously take the same book because there are several copies of the same book."/>
+ </eAnnotations>
+ <eOperations name="bestBook">
+ <eParameters name="Param1" eType="#//Book"/>
+ <eParameters name="Param2" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eParameters name="N" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EShort"/>
+ </eOperations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="title" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="pages" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
+ defaultValueLiteral="100"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="category" eType="#//BookCategory"
+ unsettable="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="author" lowerBound="1"
+ eType="#//Writer" eOpposite="#//Writer/books"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Library" eSuperTypes="#//Addressable">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+ <details key="constraints" value="NameNotEmpty"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="writers" upperBound="-1"
+ eType="#//Writer" volatile="true" transient="true" derived="true" containment="true">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="group" value="#people"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="employees" upperBound="-1"
+ eType="#//Employee" volatile="true" transient="true" derived="true" containment="true">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="group" value="#people"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="borrowers" upperBound="-1"
+ eType="#//Borrower" volatile="true" transient="true" derived="true" containment="true">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="group" value="#people"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="stock" ordered="false"
+ upperBound="-1" eType="#//Item" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="books" ordered="false"
+ upperBound="-1" eType="#//Book" transient="true" derived="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="branches" upperBound="-1"
+ eType="#//Library" containment="true" eOpposite="#//Library/parentBranch"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="parentBranch" eType="#//Library"
+ eOpposite="#//Library/branches"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="people" upperBound="-1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="group"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Writer" eSuperTypes="#//Person">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
+ volatile="true" transient="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="books" upperBound="-1"
+ eType="#//Book" eOpposite="#//Book/author"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EEnum" name="BookCategory">
+ <eLiterals name="Mystery"/>
+ <eLiterals name="ScienceFiction" value="1"/>
+ <eLiterals name="Biography" value="2"/>
+ <eLiterals name="Fantasy" value="3"/>
+ <eLiterals name="Thriller" value="4"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Item" abstract="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="publicationDate" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDate"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Lendable" abstract="true" interface="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="copies" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="borrowers" ordered="false"
+ upperBound="-1" eType="#//Borrower" eOpposite="#//Borrower/borrowed"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="CirculatingItem" abstract="true" eSuperTypes="#//Item #//Lendable"/>
+ <eClassifiers xsi:type="ecore:EClass" name="Periodical" abstract="true" eSuperTypes="#//Item">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="title" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="issuesPerYear" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="AudioVisualItem" abstract="true" eSuperTypes="#//CirculatingItem">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="title" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="minutesLength" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="damaged" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="BookOnTape" eSuperTypes="#//AudioVisualItem">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="reader" eType="#//Person"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="author" eType="#//Writer"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="VideoCassette" eSuperTypes="#//AudioVisualItem">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="cast" upperBound="-1" eType="#//Person"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Borrower" eSuperTypes="#//Person">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="borrowed" upperBound="-1"
+ eType="#//Lendable" eOpposite="#//Lendable/borrowers"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Person" eSuperTypes="#//Addressable">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="firstName" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="lastName" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Employee" eSuperTypes="#//Person">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="manager" eType="#//Employee"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Addressable" abstract="true" interface="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="address" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/examples/runtime/org.eclipse.egf.example.emf.docgen.html/plugin.xml b/examples/runtime/org.eclipse.egf.example.emf.docgen.html/plugin.xml
new file mode 100644
index 0000000..359faec
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.emf.docgen.html/plugin.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<!--
+ 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/LibraryHtmlDoc.fcore">
+ </fcore>
+ </extension>
+
+</plugin>
diff --git a/examples/runtime/org.eclipse.egf.example.fcs/.project b/examples/runtime/org.eclipse.egf.example.fcs/.project
new file mode 100644
index 0000000..2cab7f5
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.fcs/.project
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.example.fcs</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <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>
+ </natures>
+</projectDescription>
diff --git a/examples/runtime/org.eclipse.egf.example.fcs/META-INF/MANIFEST.MF b/examples/runtime/org.eclipse.egf.example.fcs/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..e8ae242
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.fcs/META-INF/MANIFEST.MF
@@ -0,0 +1,9 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.example.fcs;singleton:=true
+Bundle-Version: 0.2.2.qualifier
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-ClassPath: .
+Bundle-ActivationPolicy: lazy
diff --git a/examples/runtime/org.eclipse.egf.example.fcs/build.properties b/examples/runtime/org.eclipse.egf.example.fcs/build.properties
new file mode 100644
index 0000000..03c2320
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.fcs/build.properties
@@ -0,0 +1,4 @@
+bin.includes = META-INF/,\
+ fc/,\
+ plugin.properties,\
+ plugin.xml
diff --git a/examples/runtime/org.eclipse.egf.example.fcs/fc/fc1.fcore b/examples/runtime/org.eclipse.egf.example.fcs/fc/fc1.fcore
new file mode 100644
index 0000000..e776b15
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.fcs/fc/fc1.fcore
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<fcore:FactoryComponent xmi:version="2.1"
+ xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:fcore="http://www.eclipse.org/egf/1.0.0/fcore"
+ xmlns:fprod="http://www.eclipse.org/egf/1.0.0/fprod" xmlns:types="http://www.eclipse.org/egf/1.0.0/types"
+ xmlns:ftask="http://www.eclipse.org/egf/1.0.0/ftask" xmi:id="Ko39UWVuEd64TpQQ4RciWw" name="FC1">
+ <contractContainer xmi:id="_SmBtAL-2Ed6E7J0w9U7NFQ">
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_S7e_oL-2Ed6E7J0w9U7NFQ" name="amount" mode="Out" invocationContracts="#_IDAaML-2Ed6E7J0w9U7NFQ">
+ <type xmi:type="types:TypeFloat" xmi:id="_MZ2CIb-3Ed61q9pxr2iF9w" value="100.0"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_1SUNMcLoEd6YQfrk65kDFw" name="price" mode="Out" invocationContracts="#_GpyuQb_nEd6gHIEE-OJ_Mw">
+ <type xmi:type="types:TypeFloat" xmi:id="_BV5T0MLpEd6YQfrk65kDFw" value="11.0"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_ljAQIMVjEd6ngr_25dSdnQ" name="rebate" invocationContracts="#_YeTqwMVjEd6ngr_25dSdnQ">
+ <type xmi:type="types:TypeFloat" xmi:id="_na9QQMVjEd6ngr_25dSdnQ"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_5siVYMnxEd62uJjVIIL53A" name="generatorAdapterFactory"
+ mode="Out" invocationContracts="#_HzSEYciDEd6oON34eIZwow">
+ <type xmi:type="types:TypeGeneratorAdapterFactory" xmi:id="_7EKPoMnxEd62uJjVIIL53A"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_aZgPYNW6Ed6dzvinGX1cMA" name="parameters" mandatory="true"
+ invocationContracts="#_OHww8NW6Ed6dzvinGX1cMA">
+ <type xmi:type="types:TypeList" xmi:id="_ceRjgNW6Ed6dzvinGX1cMA"/>
+ </contracts>
+ </contractContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="4w2VoabFEd692t-PG4ogiQ">
+ <invocations xmi:type="fprod:ProductionPlanInvocation" xmi:id="tKWXIabGEd69ANF1SOWYYg"
+ invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.example.task.h1/task_h1.fcore#1Zvd4LdCEd6AWpPtW_wFiQ">
+ <invocationContractContainer xmi:id="_GuhTgb-2Ed6E7J0w9U7NFQ">
+ <invocationContracts xmi:id="_bu7G8MVjEd6ngr_25dSdnQ" invokedContract="fcore:Contract platform:/plugin/org.eclipse.egf.example.task.h1/task_h1.fcore#_sZPqULpOEd6O-6ob3O13Lw">
+ <type xmi:type="types:TypeInteger" xmi:id="_wKWpUMVjEd6ngr_25dSdnQ" value="10"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_YeTqwMVjEd6ngr_25dSdnQ" factoryComponentContract="#_ljAQIMVjEd6ngr_25dSdnQ"
+ invokedContract="fcore:Contract platform:/plugin/org.eclipse.egf.example.task.h1/task_h1.fcore#_5TrVYMBtEd60u-W6Ywx4cQ"/>
+ <invocationContracts xmi:id="_GpyuQb_nEd6gHIEE-OJ_Mw" factoryComponentContract="#_1SUNMcLoEd6YQfrk65kDFw"
+ invokedContract="fcore:Contract platform:/plugin/org.eclipse.egf.example.task.h1/task_h1.fcore#_xfSXELpOEd6O-6ob3O13Lw">
+ <type xmi:type="types:TypeFloat" xmi:id="_S8tDYMVjEd6ngr_25dSdnQ"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_IDAaML-2Ed6E7J0w9U7NFQ" factoryComponentContract="#_S7e_oL-2Ed6E7J0w9U7NFQ"
+ invokedContract="fcore:Contract platform:/plugin/org.eclipse.egf.example.task.h1/task_h1.fcore#_2vwLILpOEd6O-6ob3O13Lw"/>
+ <invocationContracts xmi:id="_HzSEYciDEd6oON34eIZwow"
+ factoryComponentContract="#_5siVYMnxEd62uJjVIIL53A" invokedContract="fcore:Contract platform:/plugin/org.eclipse.egf.example.task.h1/task_h1.fcore#_PFOYwbshEd6hlL3ru-eQtQ"/>
+ <invocationContracts xmi:id="_OHww8NW6Ed6dzvinGX1cMA" factoryComponentContract="#_aZgPYNW6Ed6dzvinGX1cMA"
+ invokedContract="fcore:Contract platform:/plugin/org.eclipse.egf.example.task.h1/task_h1.fcore#_l2A5kdT3Ed6Pk6ruhJpBtQ"/>
+ </invocationContractContainer>
+ </invocations>
+ <invocations xmi:type="fprod:ProductionPlanInvocation" xmi:id="ID2loKbGEd692t-PG4ogiQ"
+ invokedActivity="fcore:FactoryComponent platform:/plugin/org.eclipse.egf.example.fcs/fc/fc2.fcore#6yt_IWV8Ed6WjOtbZOwqNA"/>
+ </orchestration>
+</fcore:FactoryComponent>
diff --git a/examples/runtime/org.eclipse.egf.example.fcs/fc/fc2.fcore b/examples/runtime/org.eclipse.egf.example.fcs/fc/fc2.fcore
new file mode 100644
index 0000000..4ddb8a4
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.fcs/fc/fc2.fcore
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<fcore:FactoryComponent xmi:version="2.1"
+ xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" 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"
+ xmi:id="6yt_IWV8Ed6WjOtbZOwqNA" name="FC2">
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="zwp8wKbGEd69ANF1SOWYYg">
+ <invocations xmi:type="fprod:ProductionPlanInvocation" xmi:id="28WcsKbGEd69ANF1SOWYYg"
+ invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.example.task.h2/task_h2.fcore#9hT-gKbGEd69ANF1SOWYYg"/>
+ </orchestration>
+</fcore:FactoryComponent>
diff --git a/examples/runtime/org.eclipse.egf.example.fcs/plugin.properties b/examples/runtime/org.eclipse.egf.example.fcs/plugin.properties
new file mode 100644
index 0000000..4fbfa82
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.fcs/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 Test FC (Incubation)
+providerName=Eclipse Modeling Project
diff --git a/examples/runtime/org.eclipse.egf.example.fcs/plugin.xml b/examples/runtime/org.eclipse.egf.example.fcs/plugin.xml
new file mode 100644
index 0000000..8284479
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.fcs/plugin.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin
+>
+ <extension
+ point="org.eclipse.egf.core.fcore">
+ <fcore
+ id="fc/fc1.fcore">
+ </fcore>
+ <fcore
+ id="fc/fc2.fcore">
+ </fcore>
+ </extension>
+
+</plugin>
diff --git a/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/.classpath b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/.classpath
new file mode 100644
index 0000000..9a34df0
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/.classpath
@@ -0,0 +1,8 @@
+<?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="src" path="generated"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/.project b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/.project
new file mode 100644
index 0000000..5c150a0
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.example.strategy.modeldriven</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/runtime/org.eclipse.egf.example.strategy.modeldriven/.settings/org.eclipse.jdt.core.prefs b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..8ab03fc
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Thu Dec 10 15:27:56 CET 2009
+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/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/META-INF/MANIFEST.MF b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..5f83267
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Strategy
+Bundle-SymbolicName: org.eclipse.egf.example.strategy.modeldriven;singleton:=true
+Bundle-Version: 0.2.2.qualifier
+Bundle-Activator: strategy.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.egf.pattern;visibility:=reexport,
+ org.eclipse.egf.pattern.ftask,
+ org.eclipse.egf.model.ftask;visibility:=reexport
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Export-Package: myLib,
+ strategy
diff --git a/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/build.properties b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/build.properties
new file mode 100644
index 0000000..b8d142f
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/build.properties
@@ -0,0 +1,35 @@
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml
+source.. = src/
+source.. = src/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ META-INF/MANIFEST.MF
+source.. = src/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ META-INF/MANIFEST.MF
+source.. = src/,\
+ generated/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ META-INF/MANIFEST.MF,\
+ .settings/,\
+ bin/,\
+ model/,\
+ templates/
+source.. = src/,\
+ generated/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ META-INF/MANIFEST.MF,\
+ .settings/,\
+ bin/,\
+ model/,\
+ templates/
diff --git a/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/default.fcore b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/default.fcore
new file mode 100644
index 0000000..e2319d7
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/default.fcore
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<fcore:FactoryComponent xmi:version="2.1"
+ xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" 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="_Sq3-AOWYEd6IuMdAhwYvKg"
+ name="Model driven strategy example">
+ <viewpointContainer xmi:id="_TtBXgOWYEd6IuMdAhwYvKg">
+ <viewpoints xmi:type="domain:DomainViewpoint" xmi:id="_UP7QQOWYEd6IuMdAhwYvKg">
+ <domains xmi:type="domain:DomainURI" xmi:id="_YptT8OWYEd6IuMdAhwYvKg" uri="platform:/plugin/org.eclipse.egf.example.strategy.modeldriven/model/mypackage.ecore"/>
+ </viewpoints>
+ <viewpoints xmi:type="pattern:PatternViewpoint" xmi:id="_c10vEOWYEd6IuMdAhwYvKg">
+ <libraries xmi:id="_dHixMOWYEd6IuMdAhwYvKg" name="myLib">
+ <elements xmi:type="pattern:Pattern" xmi:id="_RzMnwPuUEd6-V5xjQsdIkw" name="classPattern"
+ headerMethod="#_RzMnwfuUEd6-V5xjQsdIkw" footerMethod="#_RzNO0PuUEd6-V5xjQsdIkw"
+ initMethod="#_RzMnwvuUEd6-V5xjQsdIkw">
+ <methods xmi:id="_RzMnwfuUEd6-V5xjQsdIkw" name="header" patternFilePath="templates/pattern._RzMnwPuUEd6-V5xjQsdIkw/method._RzMnwfuUEd6-V5xjQsdIkw.pt"/>
+ <methods xmi:id="_RzMnwvuUEd6-V5xjQsdIkw" name="init" patternFilePath="templates/pattern._RzMnwPuUEd6-V5xjQsdIkw/method._RzMnwvuUEd6-V5xjQsdIkw.pt"/>
+ <methods xmi:id="_RzMnw_uUEd6-V5xjQsdIkw" name="body" patternFilePath="templates/pattern._RzMnwPuUEd6-V5xjQsdIkw/method._RzMnw_uUEd6-V5xjQsdIkw.pt"/>
+ <methods xmi:id="_RzNO0PuUEd6-V5xjQsdIkw" name="footer" patternFilePath="templates/pattern._RzMnwPuUEd6-V5xjQsdIkw/method._RzNO0PuUEd6-V5xjQsdIkw.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_puGhsPuUEd6-V5xjQsdIkw"
+ called="#_RzMnw_uUEd6-V5xjQsdIkw"/>
+ <orchestration xmi:type="pattern:BackCall" xmi:id="_t_r7UP64Ed6-wtqQkH9CMw"/>
+ <parameters xmi:id="_mjj4UPuUEd6-V5xjQsdIkw" name="parameter" type="http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_RzNO0vuUEd6-V5xjQsdIkw"
+ name="JET"/>
+ </elements>
+ <elements xmi:type="pattern:Pattern" xmi:id="_X0ajUPuUEd6-V5xjQsdIkw" name="attributePattern"
+ headerMethod="#_X0ajUfuUEd6-V5xjQsdIkw" footerMethod="#_X0ajVPuUEd6-V5xjQsdIkw"
+ initMethod="#_X0ajUvuUEd6-V5xjQsdIkw">
+ <methods xmi:id="_X0ajUfuUEd6-V5xjQsdIkw" name="header" patternFilePath="templates/pattern._X0ajUPuUEd6-V5xjQsdIkw/method._X0ajUfuUEd6-V5xjQsdIkw.pt"/>
+ <methods xmi:id="_X0ajUvuUEd6-V5xjQsdIkw" name="init" patternFilePath="templates/pattern._X0ajUPuUEd6-V5xjQsdIkw/method._X0ajUvuUEd6-V5xjQsdIkw.pt"/>
+ <methods xmi:id="_X0ajU_uUEd6-V5xjQsdIkw" name="body" patternFilePath="templates/pattern._X0ajUPuUEd6-V5xjQsdIkw/method._X0ajU_uUEd6-V5xjQsdIkw.pt"/>
+ <methods xmi:id="_X0ajVPuUEd6-V5xjQsdIkw" name="footer" patternFilePath="templates/pattern._X0ajUPuUEd6-V5xjQsdIkw/method._X0ajVPuUEd6-V5xjQsdIkw.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_X0ajVfuUEd6-V5xjQsdIkw"
+ called="#_X0ajU_uUEd6-V5xjQsdIkw"/>
+ <orchestration xmi:type="pattern:BackCall" xmi:id="_s8MeAP64Ed6-wtqQkH9CMw"/>
+ <parameters xmi:id="_t-TyoPuUEd6-V5xjQsdIkw" name="parameter" type="http://www.eclipse.org/emf/2002/Ecore#//EAttribute"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_X0ajVvuUEd6-V5xjQsdIkw"
+ name="JET"/>
+ </elements>
+ <elements xmi:type="pattern:Pattern" xmi:id="_eKJWUPuUEd6-V5xjQsdIkw" name="packagePattern"
+ headerMethod="#_eKJWUfuUEd6-V5xjQsdIkw" footerMethod="#_eKJWVPuUEd6-V5xjQsdIkw"
+ initMethod="#_eKJWUvuUEd6-V5xjQsdIkw">
+ <methods xmi:id="_eKJWUfuUEd6-V5xjQsdIkw" name="header" patternFilePath="templates/pattern._eKJWUPuUEd6-V5xjQsdIkw/method._eKJWUfuUEd6-V5xjQsdIkw.pt"/>
+ <methods xmi:id="_eKJWUvuUEd6-V5xjQsdIkw" name="init" patternFilePath="templates/pattern._eKJWUPuUEd6-V5xjQsdIkw/method._eKJWUvuUEd6-V5xjQsdIkw.pt"/>
+ <methods xmi:id="_eKJWU_uUEd6-V5xjQsdIkw" name="body" patternFilePath="templates/pattern._eKJWUPuUEd6-V5xjQsdIkw/method._eKJWU_uUEd6-V5xjQsdIkw.pt"/>
+ <methods xmi:id="_eKJWVPuUEd6-V5xjQsdIkw" name="footer" patternFilePath="templates/pattern._eKJWUPuUEd6-V5xjQsdIkw/method._eKJWVPuUEd6-V5xjQsdIkw.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_eKJWVfuUEd6-V5xjQsdIkw"
+ called="#_eKJWU_uUEd6-V5xjQsdIkw"/>
+ <orchestration xmi:type="pattern:BackCall" xmi:id="_nxAykf64Ed6-wtqQkH9CMw"/>
+ <parameters xmi:id="_q3yGkPuUEd6-V5xjQsdIkw" name="parameter" type="http://www.eclipse.org/emf/2002/Ecore#//EPackage"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_eKJWVvuUEd6-V5xjQsdIkw"
+ name="JET"/>
+ </elements>
+ </libraries>
+ </viewpoints>
+ </viewpointContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_OSANYOWlEd60Qvosup1c6Q">
+ <invocations xmi:id="_e4U3MAHEEd-Y9ZZNa95dIg" invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_8FZ3aof6eEd64XYPo3s6sPg">
+ <invocationContractContainer xmi:id="_jj7qsAHEEd-Y9ZZNa95dIg">
+ <invocationContracts xmi:id="_j1FsIAHEEd-Y9ZZNa95dIg" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_DgB2IP6fEd64XaYPo3s6sPg">
+ <type xmi:type="domain:TypeDomainURI" xmi:id="_mwKWIAHEEd-Y9ZZNa95dIg" domain="#_YptT8OWYEd6IuMdAhwYvKg"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_n257wAHEEd-Y9ZZNa95dIg" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_nz1HkSCaEd-Sse0r9LJWbA">
+ <type xmi:type="pattern:TypePatternList" xmi:id="_WVH1sCHyEd-V4KH4GeEy-w"
+ elements="#_dHixMOWYEd6IuMdAhwYvKg"/>
+ </invocationContracts>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+</fcore:FactoryComponent>
diff --git a/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/generated/myLib/attributePattern.java b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/generated/myLib/attributePattern.java
new file mode 100644
index 0000000..815018a
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/generated/myLib/attributePattern.java
@@ -0,0 +1,100 @@
+package myLib;
+
+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 attributePattern
+{
+ protected static String nl;
+ public static synchronized attributePattern create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ attributePattern result = new attributePattern();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = NL;
+ protected final String TEXT_2 = NL;
+ protected final String TEXT_3 = NL;
+
+ public 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> parameterList = null;
+//this pattern can only be called by another (i.e. it's not an entry point in execution)
+
+
+for (Object parameterParameter : parameterList ) {
+
+this.parameter = (org.eclipse.emf.ecore.EAttribute)parameterParameter;
+
+
+ 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 index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_body(ictx.getBuffer(), ictx);
+ {
+final Map<String, Object> parameters = new HashMap<String, Object>();
+index = ictx.getBuffer().length();
+ictx.getExecutionBuffer().append(ictx.getBuffer());
+parameters.put("parameter", this.parameter);
+CallbackContext ctx_callback = new CallbackContext(ictx);
+CallHelper.callBack(ctx_callback, parameters);
+}
+
+
+String loop = ictx.getBuffer().toString();
+if (ictx.useReporter()){
+ ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));
+ Map<String, Object> parameterValues = new HashMap<String, Object>();
+ parameterValues.put("parameter", this.parameter);
+ ictx.getReporter().loopFinished(loop, ictx, parameterValues);
+ ictx.clearBuffer();}
+return loop;
+}
+
+protected org.eclipse.emf.ecore.EAttribute parameter = null;
+public void set_parameter(org.eclipse.emf.ecore.EAttribute object) {
+this.parameter = object;
+}
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append("attribute "+parameter.getName());
+ stringBuffer.append(TEXT_1);
+ }
+ }
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/generated/myLib/classPattern.java b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/generated/myLib/classPattern.java
new file mode 100644
index 0000000..fd7b4e7
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/generated/myLib/classPattern.java
@@ -0,0 +1,100 @@
+package myLib;
+
+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 classPattern
+{
+ protected static String nl;
+ public static synchronized classPattern create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ classPattern result = new classPattern();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = NL;
+ protected final String TEXT_2 = NL;
+ protected final String TEXT_3 = NL;
+
+ public 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> parameterList = null;
+//this pattern can only be called by another (i.e. it's not an entry point in execution)
+
+
+for (Object parameterParameter : parameterList ) {
+
+this.parameter = (org.eclipse.emf.ecore.EClass)parameterParameter;
+
+
+ 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 index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_body(ictx.getBuffer(), ictx);
+ {
+final Map<String, Object> parameters = new HashMap<String, Object>();
+index = ictx.getBuffer().length();
+ictx.getExecutionBuffer().append(ictx.getBuffer());
+parameters.put("parameter", this.parameter);
+CallbackContext ctx_callback = new CallbackContext(ictx);
+CallHelper.callBack(ctx_callback, parameters);
+}
+
+
+String loop = ictx.getBuffer().toString();
+if (ictx.useReporter()){
+ ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));
+ Map<String, Object> parameterValues = new HashMap<String, Object>();
+ parameterValues.put("parameter", this.parameter);
+ ictx.getReporter().loopFinished(loop, ictx, parameterValues);
+ ictx.clearBuffer();}
+return loop;
+}
+
+protected org.eclipse.emf.ecore.EClass parameter = null;
+public void set_parameter(org.eclipse.emf.ecore.EClass object) {
+this.parameter = object;
+}
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append("class "+parameter.getName());
+ stringBuffer.append(TEXT_1);
+ }
+ }
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/generated/myLib/packagePattern.java b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/generated/myLib/packagePattern.java
new file mode 100644
index 0000000..fe09820
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/generated/myLib/packagePattern.java
@@ -0,0 +1,100 @@
+package myLib;
+
+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 packagePattern
+{
+ protected static String nl;
+ public static synchronized packagePattern create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ packagePattern result = new packagePattern();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = NL;
+ protected final String TEXT_2 = NL;
+ protected final String TEXT_3 = NL;
+
+ public packagePattern()
+ {
+ //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> parameterList = null;
+//this pattern can only be called by another (i.e. it's not an entry point in execution)
+
+
+for (Object parameterParameter : parameterList ) {
+
+this.parameter = (org.eclipse.emf.ecore.EPackage)parameterParameter;
+
+
+ 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 index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_body(ictx.getBuffer(), ictx);
+ {
+final Map<String, Object> parameters = new HashMap<String, Object>();
+index = ictx.getBuffer().length();
+ictx.getExecutionBuffer().append(ictx.getBuffer());
+parameters.put("parameter", this.parameter);
+CallbackContext ctx_callback = new CallbackContext(ictx);
+CallHelper.callBack(ctx_callback, parameters);
+}
+
+
+String loop = ictx.getBuffer().toString();
+if (ictx.useReporter()){
+ ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));
+ Map<String, Object> parameterValues = new HashMap<String, Object>();
+ parameterValues.put("parameter", this.parameter);
+ ictx.getReporter().loopFinished(loop, ictx, parameterValues);
+ ictx.clearBuffer();}
+return loop;
+}
+
+protected org.eclipse.emf.ecore.EPackage parameter = null;
+public void set_parameter(org.eclipse.emf.ecore.EPackage object) {
+this.parameter = object;
+}
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append("package "+parameter.getName());
+ stringBuffer.append(TEXT_1);
+ }
+ }
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/model/mypackage.ecore b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/model/mypackage.ecore
new file mode 100644
index 0000000..6b94da3
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/model/mypackage.ecore
@@ -0,0 +1,15 @@
+<?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="mypackage"
+ nsURI="http://mypackage" nsPrefix="mypackage">
+ <eClassifiers xsi:type="ecore:EClass" name="Employee">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Company">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="employees" upperBound="-1"
+ eType="#//Employee" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Test"/>
+</ecore:EPackage>
diff --git a/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/model/mypackage.genmodel b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/model/mypackage.genmodel
new file mode 100644
index 0000000..e3f7479
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/model/mypackage.genmodel
@@ -0,0 +1,18 @@
+<?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="/pipo/src"
+ modelPluginID="pipo" modelName="Mypackage" importerID="org.eclipse.emf.importer.ecore"
+ complianceLevel="6.0" copyrightFields="false">
+ <foreignModel>mypackage.ecore</foreignModel>
+ <genPackages prefix="Mypackage" disposableProviderFactory="true" ecorePackage="mypackage.ecore#/">
+ <genClasses ecoreClass="mypackage.ecore#//Employee">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute mypackage.ecore#//Employee/name"/>
+ </genClasses>
+ <genClasses ecoreClass="mypackage.ecore#//Company">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute mypackage.ecore#//Company/name"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference mypackage.ecore#//Company/employees"/>
+ </genClasses>
+ <genClasses ecoreClass="mypackage.ecore#//Test"/>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/plugin.xml b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/plugin.xml
new file mode 100644
index 0000000..1774697
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/plugin.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+
+ <extension
+ point="org.eclipse.egf.core.fcore">
+ <fcore
+ id="default.fcore">
+ </fcore>
+ </extension>
+
+</plugin>
diff --git a/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/src/strategy/Activator.java b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/src/strategy/Activator.java
new file mode 100644
index 0000000..01f2ff0
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/src/strategy/Activator.java
@@ -0,0 +1,50 @@
+package strategy;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "Strategy";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._Pd58YPw5Ed6HzKUlOQ0ZSA/method._Pd58Y_w5Ed6HzKUlOQ0ZSA.pt b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._Pd58YPw5Ed6HzKUlOQ0ZSA/method._Pd58Y_w5Ed6HzKUlOQ0ZSA.pt
new file mode 100644
index 0000000..d9f5aae
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._Pd58YPw5Ed6HzKUlOQ0ZSA/method._Pd58Y_w5Ed6HzKUlOQ0ZSA.pt
@@ -0,0 +1 @@
+<%="overloaded class "+parameter.getName()%>
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._Pd58YPw5Ed6HzKUlOQ0ZSA/method._Pd58Yfw5Ed6HzKUlOQ0ZSA.pt b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._Pd58YPw5Ed6HzKUlOQ0ZSA/method._Pd58Yfw5Ed6HzKUlOQ0ZSA.pt
new file mode 100644
index 0000000..38a2d85
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._Pd58YPw5Ed6HzKUlOQ0ZSA/method._Pd58Yfw5Ed6HzKUlOQ0ZSA.pt
@@ -0,0 +1 @@
+<%@ jet package="myLib" class="parentClassPattern" imports="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/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._Pd58YPw5Ed6HzKUlOQ0ZSA/method._Pd58Yvw5Ed6HzKUlOQ0ZSA.pt b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._Pd58YPw5Ed6HzKUlOQ0ZSA/method._Pd58Yvw5Ed6HzKUlOQ0ZSA.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._Pd58YPw5Ed6HzKUlOQ0ZSA/method._Pd58Yvw5Ed6HzKUlOQ0ZSA.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._Pd58YPw5Ed6HzKUlOQ0ZSA/method._Pd58ZPw5Ed6HzKUlOQ0ZSA.pt b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._Pd58YPw5Ed6HzKUlOQ0ZSA/method._Pd58ZPw5Ed6HzKUlOQ0ZSA.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._Pd58YPw5Ed6HzKUlOQ0ZSA/method._Pd58ZPw5Ed6HzKUlOQ0ZSA.pt
diff --git a/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._RzMnwPuUEd6-V5xjQsdIkw/method._RzMnw_uUEd6-V5xjQsdIkw.pt b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._RzMnwPuUEd6-V5xjQsdIkw/method._RzMnw_uUEd6-V5xjQsdIkw.pt
new file mode 100644
index 0000000..6b3a106
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._RzMnwPuUEd6-V5xjQsdIkw/method._RzMnw_uUEd6-V5xjQsdIkw.pt
@@ -0,0 +1,3 @@
+<%="class "+parameter.getName()%>
+
+
diff --git a/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._RzMnwPuUEd6-V5xjQsdIkw/method._RzMnwfuUEd6-V5xjQsdIkw.pt b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._RzMnwPuUEd6-V5xjQsdIkw/method._RzMnwfuUEd6-V5xjQsdIkw.pt
new file mode 100644
index 0000000..de508d2
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._RzMnwPuUEd6-V5xjQsdIkw/method._RzMnwfuUEd6-V5xjQsdIkw.pt
@@ -0,0 +1 @@
+<%@ jet package="myLib" class="classPattern" imports="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/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._RzMnwPuUEd6-V5xjQsdIkw/method._RzMnwvuUEd6-V5xjQsdIkw.pt b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._RzMnwPuUEd6-V5xjQsdIkw/method._RzMnwvuUEd6-V5xjQsdIkw.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._RzMnwPuUEd6-V5xjQsdIkw/method._RzMnwvuUEd6-V5xjQsdIkw.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._RzMnwPuUEd6-V5xjQsdIkw/method._RzNO0PuUEd6-V5xjQsdIkw.pt b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._RzMnwPuUEd6-V5xjQsdIkw/method._RzNO0PuUEd6-V5xjQsdIkw.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._RzMnwPuUEd6-V5xjQsdIkw/method._RzNO0PuUEd6-V5xjQsdIkw.pt
diff --git a/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._X0ajUPuUEd6-V5xjQsdIkw/method._X0ajU_uUEd6-V5xjQsdIkw.pt b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._X0ajUPuUEd6-V5xjQsdIkw/method._X0ajU_uUEd6-V5xjQsdIkw.pt
new file mode 100644
index 0000000..ac2c2c5
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._X0ajUPuUEd6-V5xjQsdIkw/method._X0ajU_uUEd6-V5xjQsdIkw.pt
@@ -0,0 +1,3 @@
+<%="attribute "+parameter.getName()%>
+
+
diff --git a/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._X0ajUPuUEd6-V5xjQsdIkw/method._X0ajUfuUEd6-V5xjQsdIkw.pt b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._X0ajUPuUEd6-V5xjQsdIkw/method._X0ajUfuUEd6-V5xjQsdIkw.pt
new file mode 100644
index 0000000..45b1e4e
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._X0ajUPuUEd6-V5xjQsdIkw/method._X0ajUfuUEd6-V5xjQsdIkw.pt
@@ -0,0 +1 @@
+<%@ jet package="myLib" class="attributePattern" imports="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/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._X0ajUPuUEd6-V5xjQsdIkw/method._X0ajUvuUEd6-V5xjQsdIkw.pt b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._X0ajUPuUEd6-V5xjQsdIkw/method._X0ajUvuUEd6-V5xjQsdIkw.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._X0ajUPuUEd6-V5xjQsdIkw/method._X0ajUvuUEd6-V5xjQsdIkw.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._X0ajUPuUEd6-V5xjQsdIkw/method._X0ajVPuUEd6-V5xjQsdIkw.pt b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._X0ajUPuUEd6-V5xjQsdIkw/method._X0ajVPuUEd6-V5xjQsdIkw.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._X0ajUPuUEd6-V5xjQsdIkw/method._X0ajVPuUEd6-V5xjQsdIkw.pt
diff --git a/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._eKJWUPuUEd6-V5xjQsdIkw/method._eKJWU_uUEd6-V5xjQsdIkw.pt b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._eKJWUPuUEd6-V5xjQsdIkw/method._eKJWU_uUEd6-V5xjQsdIkw.pt
new file mode 100644
index 0000000..050c18c
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._eKJWUPuUEd6-V5xjQsdIkw/method._eKJWU_uUEd6-V5xjQsdIkw.pt
@@ -0,0 +1,3 @@
+<%="package "+parameter.getName()%>
+
+
diff --git a/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._eKJWUPuUEd6-V5xjQsdIkw/method._eKJWUfuUEd6-V5xjQsdIkw.pt b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._eKJWUPuUEd6-V5xjQsdIkw/method._eKJWUfuUEd6-V5xjQsdIkw.pt
new file mode 100644
index 0000000..279cfc7
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._eKJWUPuUEd6-V5xjQsdIkw/method._eKJWUfuUEd6-V5xjQsdIkw.pt
@@ -0,0 +1 @@
+<%@ jet package="myLib" class="packagePattern" imports="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/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._eKJWUPuUEd6-V5xjQsdIkw/method._eKJWUvuUEd6-V5xjQsdIkw.pt b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._eKJWUPuUEd6-V5xjQsdIkw/method._eKJWUvuUEd6-V5xjQsdIkw.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._eKJWUPuUEd6-V5xjQsdIkw/method._eKJWUvuUEd6-V5xjQsdIkw.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._eKJWUPuUEd6-V5xjQsdIkw/method._eKJWVPuUEd6-V5xjQsdIkw.pt b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._eKJWUPuUEd6-V5xjQsdIkw/method._eKJWVPuUEd6-V5xjQsdIkw.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.strategy.modeldriven/templates/pattern._eKJWUPuUEd6-V5xjQsdIkw/method._eKJWVPuUEd6-V5xjQsdIkw.pt
diff --git a/examples/runtime/org.eclipse.egf.example.task.h1/.classpath b/examples/runtime/org.eclipse.egf.example.task.h1/.classpath
new file mode 100644
index 0000000..2d1a430
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.task.h1/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/examples/runtime/org.eclipse.egf.example.task.h1/.project b/examples/runtime/org.eclipse.egf.example.task.h1/.project
new file mode 100644
index 0000000..0108785
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.task.h1/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.example.task.h1</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/examples/runtime/org.eclipse.egf.example.task.h1/.settings/org.eclipse.jdt.core.prefs b/examples/runtime/org.eclipse.egf.example.task.h1/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..60cc79a
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.task.h1/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Mon Sep 14 17:43:13 CEST 2009
+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.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+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/runtime/org.eclipse.egf.example.task.h1/META-INF/MANIFEST.MF b/examples/runtime/org.eclipse.egf.example.task.h1/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..5d81fed
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.task.h1/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.example.task.h1;singleton:=true
+Bundle-Activator: org.eclipse.egf.example.task.h1.Activator
+Bundle-Version: 0.2.2.qualifier
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-ClassPath: .
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle:
+ org.eclipse.egf.model.ftask
+Export-Package:
+ org.eclipse.egf.example.task.h1
+Bundle-ActivationPolicy: lazy
diff --git a/examples/runtime/org.eclipse.egf.example.task.h1/build.properties b/examples/runtime/org.eclipse.egf.example.task.h1/build.properties
new file mode 100644
index 0000000..ea315fe
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.task.h1/build.properties
@@ -0,0 +1,7 @@
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ task_h1.fcore,\
+ plugin.xml
+source.. = src/
+output.. = bin/
diff --git a/examples/runtime/org.eclipse.egf.example.task.h1/plugin.properties b/examples/runtime/org.eclipse.egf.example.task.h1/plugin.properties
new file mode 100644
index 0000000..0cbba56
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.task.h1/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 Test Task H1 (Incubation)
+providerName=Eclipse Modeling Project
diff --git a/examples/runtime/org.eclipse.egf.example.task.h1/plugin.xml b/examples/runtime/org.eclipse.egf.example.task.h1/plugin.xml
new file mode 100644
index 0000000..01942c2
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.task.h1/plugin.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+
+ <extension
+ point="org.eclipse.egf.core.fcore">
+ <fcore
+ id="task_h1.fcore">
+ </fcore>
+ </extension>
+
+
+</plugin>
diff --git a/examples/runtime/org.eclipse.egf.example.task.h1/src/org/eclipse/egf/example/task/h1/Activator.java b/examples/runtime/org.eclipse.egf.example.task.h1/src/org/eclipse/egf/example/task/h1/Activator.java
new file mode 100644
index 0000000..b5adb4a
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.task.h1/src/org/eclipse/egf/example/task/h1/Activator.java
@@ -0,0 +1,60 @@
+package org.eclipse.egf.example.task.h1;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.egf.common.activator.EGFAbstractPlugin;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends EGFAbstractPlugin {
+
+ // The shared instance
+ private static Activator plugin;
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ *
+ *
+ * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
+ * )
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ logInfo("org.eclipse.egf.example.task.h1 is starting"); //$NON-NLS-1$
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ *
+ *
+ * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
+ * )
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ Bundle bundle = Platform.getBundle("org.eclipse.swt"); //$NON-NLS-1$
+ if (bundle.getState() == Bundle.ACTIVE) {
+ logInfo("org.eclipse.egf.example.task.h1 is stopping"); //$NON-NLS-1$
+ }
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/examples/runtime/org.eclipse.egf.example.task.h1/src/org/eclipse/egf/example/task/h1/H1.java b/examples/runtime/org.eclipse.egf.example.task.h1/src/org/eclipse/egf/example/task/h1/H1.java
new file mode 100644
index 0000000..8ef1f86
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.task.h1/src/org/eclipse/egf/example/task/h1/H1.java
@@ -0,0 +1,39 @@
+package org.eclipse.egf.example.task.h1;
+
+import java.util.Collection;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+import org.eclipse.egf.ftask.producer.invocation.ITaskProduction;
+import org.eclipse.emf.codegen.ecore.generator.GeneratorAdapterFactory;
+import org.eclipse.emf.codegen.ecore.genmodel.generator.GenModelGeneratorAdapterFactory;
+
+public class H1 implements ITaskProduction {
+
+ private Integer quantity;
+
+ private Float price;
+
+ private Float amount;
+
+ private Collection<String> parameters;
+
+ @SuppressWarnings("unchecked")
+ public void preExecute(final ITaskProductionContext context, final IProgressMonitor monitor) throws InvocationException {
+ quantity = context.getInputValue("quantity", Integer.class); //$NON-NLS-1$
+ price = context.getInputValue("price", Float.class); //$NON-NLS-1$
+ parameters = context.getInputValue("parameters", Collection.class); //$NON-NLS-1$
+ context.getOutputValue("generatorAdapterFactory", GeneratorAdapterFactory.class); //$NON-NLS-1$
+ }
+
+ public void doExecute(final ITaskProductionContext context, final IProgressMonitor monitor) throws InvocationException {
+ amount = quantity * price;
+ }
+
+ public void postExecute(final ITaskProductionContext context, final IProgressMonitor monitor) throws InvocationException {
+ context.setOutputValue("amount", amount); //$NON-NLS-1$
+ context.setOutputValue("generatorAdapterFactory", new GenModelGeneratorAdapterFactory()); //$NON-NLS-1$
+ }
+
+}
diff --git a/examples/runtime/org.eclipse.egf.example.task.h1/task_h1.fcore b/examples/runtime/org.eclipse.egf.example.task.h1/task_h1.fcore
new file mode 100644
index 0000000..5392aeb
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.task.h1/task_h1.fcore
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ftask:Task xmi:version="2.1"
+ xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:ftask="http://www.eclipse.org/egf/1.0.0/ftask"
+ xmlns:types="http://www.eclipse.org/egf/1.0.0/types" xmi:id="1Zvd4LdCEd6AWpPtW_wFiQ"
+ description="" name="H1" kind="java" implementation="org.eclipse.egf.example.task.h1.H1">
+ <contractContainer xmi:id="_sAEVUbpOEd6O-6ob3O13Lw">
+ <contracts xmi:id="_sZPqULpOEd6O-6ob3O13Lw" name="quantity">
+ <type xmi:type="types:TypeInteger" xmi:id="_wO9-sLpOEd6O-6ob3O13Lw" value="100"/>
+ </contracts>
+ <contracts xmi:id="_5TrVYMBtEd60u-W6Ywx4cQ" name="rebate">
+ <type xmi:type="types:TypeFloat" xmi:id="_7dzqoMBtEd60u-W6Ywx4cQ" value="5.0"/>
+ </contracts>
+ <contracts xmi:id="_xfSXELpOEd6O-6ob3O13Lw" name="price" mode="In_Out">
+ <type xmi:type="types:TypeFloat" xmi:id="_y0EYsLpOEd6O-6ob3O13Lw" value="10.5"/>
+ </contracts>
+ <contracts xmi:id="_2vwLILpOEd6O-6ob3O13Lw" name="amount" mode="Out">
+ <type xmi:type="types:TypeFloat" xmi:id="_5M9NYLpOEd6O-6ob3O13Lw"/>
+ </contracts>
+ <contracts xmi:id="_PFOYwbshEd6hlL3ru-eQtQ" name="generatorAdapterFactory" mode="Out">
+ <type xmi:type="types:TypeGeneratorAdapterFactory" xmi:id="_PsaUkLshEd6hlL3ru-eQtQ"
+ value="org.eclipse.emf.codegen.ecore.genmodel.generator.GenModelGeneratorAdapterFactory"/>
+ </contracts>
+ <contracts xmi:id="_l2A5kdT3Ed6Pk6ruhJpBtQ" name="parameters">
+ <type xmi:type="types:TypeCollection" xmi:id="_D-EkIdW6Ed6dzvinGX1cMA" value="java.util.ArrayList"/>
+ </contracts>
+ <contracts xmi:id="_cu1e0d5cEd6JPoD-K_4SPg" name="collection">
+ <type xmi:type="types:TypeCollection" xmi:id="_dHku8N5cEd6JPoD-K_4SPg" value="org.eclipse.emf.common.util.BasicEList"/>
+ </contracts>
+ </contractContainer>
+</ftask:Task>
diff --git a/examples/runtime/org.eclipse.egf.example.task.h2/.classpath b/examples/runtime/org.eclipse.egf.example.task.h2/.classpath
new file mode 100644
index 0000000..2d1a430
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.task.h2/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/examples/runtime/org.eclipse.egf.example.task.h2/.project b/examples/runtime/org.eclipse.egf.example.task.h2/.project
new file mode 100644
index 0000000..f2c7800
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.task.h2/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.example.task.h2</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/examples/runtime/org.eclipse.egf.example.task.h2/.settings/org.eclipse.jdt.core.prefs b/examples/runtime/org.eclipse.egf.example.task.h2/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..58372dd
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.task.h2/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Thu Sep 17 13:53:15 CEST 2009
+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/runtime/org.eclipse.egf.example.task.h2/META-INF/MANIFEST.MF b/examples/runtime/org.eclipse.egf.example.task.h2/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..f03ec19
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.task.h2/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.example.task.h2;singleton:=true
+Bundle-Activator: org.eclipse.egf.example.task.h2.Activator
+Bundle-Version: 0.2.2.qualifier
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-ClassPath: .
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle:
+ org.eclipse.egf.common.ui,
+ org.eclipse.egf.model.ftask
+Export-Package:
+ org.eclipse.egf.example.task.h2
+Bundle-ActivationPolicy: lazy
diff --git a/examples/runtime/org.eclipse.egf.example.task.h2/build.properties b/examples/runtime/org.eclipse.egf.example.task.h2/build.properties
new file mode 100644
index 0000000..c6a3c18
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.task.h2/build.properties
@@ -0,0 +1,7 @@
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ task_h2.fcore,\
+ plugin.xml
+source.. = src/
+output.. = bin/
diff --git a/examples/runtime/org.eclipse.egf.example.task.h2/plugin.properties b/examples/runtime/org.eclipse.egf.example.task.h2/plugin.properties
new file mode 100644
index 0000000..7a17bb3
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.task.h2/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 Test Task H2 (Incubation)
+providerName=Eclipse Modeling Project
diff --git a/examples/runtime/org.eclipse.egf.example.task.h2/plugin.xml b/examples/runtime/org.eclipse.egf.example.task.h2/plugin.xml
new file mode 100644
index 0000000..6895155
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.task.h2/plugin.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+
+ <extension
+ point="org.eclipse.egf.core.fcore">
+ <fcore
+ id="task_h2.fcore">
+ </fcore>
+ </extension>
+
+</plugin>
diff --git a/examples/runtime/org.eclipse.egf.example.task.h2/src/org/eclipse/egf/example/task/h2/Activator.java b/examples/runtime/org.eclipse.egf.example.task.h2/src/org/eclipse/egf/example/task/h2/Activator.java
new file mode 100644
index 0000000..cb0e509
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.task.h2/src/org/eclipse/egf/example/task/h2/Activator.java
@@ -0,0 +1,48 @@
+package org.eclipse.egf.example.task.h2;
+
+import org.eclipse.egf.common.ui.activator.EGFAbstractUIPlugin;
+import org.eclipse.ui.PlatformUI;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends EGFAbstractUIPlugin {
+
+ // The shared instance
+ private static Activator plugin;
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ logInfo("org.eclipse.egf.example.task.h2 is starting"); //$NON-NLS-1$
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ if (PlatformUI.isWorkbenchRunning()) {
+ logInfo("org.eclipse.egf.example.task.h2 is stopping"); //$NON-NLS-1$
+ }
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/examples/runtime/org.eclipse.egf.example.task.h2/src/org/eclipse/egf/example/task/h2/H2.java b/examples/runtime/org.eclipse.egf.example.task.h2/src/org/eclipse/egf/example/task/h2/H2.java
new file mode 100644
index 0000000..b247632
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.task.h2/src/org/eclipse/egf/example/task/h2/H2.java
@@ -0,0 +1,23 @@
+package org.eclipse.egf.example.task.h2;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+import org.eclipse.egf.ftask.producer.invocation.ITaskProduction;
+
+public class H2 implements ITaskProduction {
+
+ public void preExecute(final ITaskProductionContext productionContext, final IProgressMonitor monitor_p) throws InvocationException {
+ EGFCorePlugin.getDefault().logInfo("preExecute H2"); //$NON-NLS-1$
+ }
+
+ public void doExecute(final ITaskProductionContext productionContext, final IProgressMonitor monitor_p) throws InvocationException {
+ throw new InvocationException("I'm a task who raised an exception"); //$NON-NLS-1$
+ }
+
+ public void postExecute(final ITaskProductionContext productionContext, final IProgressMonitor monitor_p) throws InvocationException {
+ EGFCorePlugin.getDefault().logInfo("postExecute H2"); //$NON-NLS-1$
+ }
+
+}
diff --git a/examples/runtime/org.eclipse.egf.example.task.h2/task_h2.fcore b/examples/runtime/org.eclipse.egf.example.task.h2/task_h2.fcore
new file mode 100644
index 0000000..f1d4bde
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.example.task.h2/task_h2.fcore
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ftask:Task xmi:version="2.1"
+ xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:ftask="http://www.eclipse.org/egf/1.0.0/ftask" xmi:id="9hT-gKbGEd69ANF1SOWYYg"
+ name="H2" kind="java" implementation="org.eclipse.egf.example.task.h2.H2"/>
diff --git a/examples/runtime/org.eclipse.egf.usecase.fc.uc1/.classpath b/examples/runtime/org.eclipse.egf.usecase.fc.uc1/.classpath
new file mode 100644
index 0000000..45f024e
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.fc.uc1/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/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/runtime/org.eclipse.egf.usecase.fc.uc1/.project b/examples/runtime/org.eclipse.egf.usecase.fc.uc1/.project
new file mode 100644
index 0000000..6d9ad86
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.fc.uc1/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.usecase.fc.uc1</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.egf.pattern.ui.PatternBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.egf.core.EGFNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/examples/runtime/org.eclipse.egf.usecase.fc.uc1/.settings/org.eclipse.core.resources.prefs b/examples/runtime/org.eclipse.egf.usecase.fc.uc1/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..7d6c2bd
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.fc.uc1/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Thu Feb 25 11:51:02 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/examples/runtime/org.eclipse.egf.usecase.fc.uc1/.settings/org.eclipse.jdt.core.prefs b/examples/runtime/org.eclipse.egf.usecase.fc.uc1/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..99b905a
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.fc.uc1/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Wed Jun 24 09:15:48 CEST 2009
+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.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+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/runtime/org.eclipse.egf.usecase.fc.uc1/META-INF/MANIFEST.MF b/examples/runtime/org.eclipse.egf.usecase.fc.uc1/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..7a0f146
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.fc.uc1/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.usecase.fc.uc1;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: .
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle:
+ org.eclipse.egf.model.ftask;visibility:=reexport
+Export-Package:
+ org.eclipse.egf.usecase.fc.uc1
+Bundle-ActivationPolicy: lazy
diff --git a/examples/runtime/org.eclipse.egf.usecase.fc.uc1/about.html b/examples/runtime/org.eclipse.egf.usecase.fc.uc1/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.fc.uc1/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/runtime/org.eclipse.egf.usecase.fc.uc1/build.properties b/examples/runtime/org.eclipse.egf.usecase.fc.uc1/build.properties
new file mode 100644
index 0000000..82e6b05
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.fc.uc1/build.properties
@@ -0,0 +1,20 @@
+##
+# 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
+##
+
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ egf/,\
+ plugin.properties,\
+ about.html,\
+ plugin.xml
+src.includes = about.html
diff --git a/examples/runtime/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_0_AllTogether.fcore b/examples/runtime/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_0_AllTogether.fcore
new file mode 100644
index 0000000..020c8fe
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_0_AllTogether.fcore
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<fcore:FactoryComponent xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:fcore="http://www.eclipse.org/egf/1.0.0/fcore"
+ xmlns:fprod="http://www.eclipse.org/egf/1.0.0/fprod" xmi:id="_UaP9kBvVEd-W6L66jY5sHw"
+ name="UseCase - Factory Component - UC1 - All Together">
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_aMiFQBvVEd-W6L66jY5sHw">
+ <invocations xmi:id="_azHkIBvVEd-W6L66jY5sHw" invokedActivity="fcore:FactoryComponent platform:/plugin/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_1_FCAndTask.fcore#_NTILsRuaEd-ffO4YhZA0ZQ"/>
+ <invocations xmi:id="_e4LVABvVEd-W6L66jY5sHw" invokedActivity="fcore:FactoryComponent platform:/plugin/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_2_FCWithContracts.fcore#_NHi_EBugEd-ffO4YhZA0ZQ"/>
+ <invocations xmi:id="_nl_xABvmEd-W6L66jY5sHw" invokedActivity="fcore:FactoryComponent platform:/plugin/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_3_FCPricer.fcore#_rPuYIBvjEd-W6L66jY5sHw"/>
+ </orchestration>
+</fcore:FactoryComponent>
diff --git a/examples/runtime/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_1_FCAndTask.fcore b/examples/runtime/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_1_FCAndTask.fcore
new file mode 100644
index 0000000..7133866
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_1_FCAndTask.fcore
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" 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:types="http://www.eclipse.org/egf/1.0.0/types">
+ <fcore:FactoryComponent xmi:id="_NTILsRuaEd-ffO4YhZA0ZQ" name="FC - UC1.1 - FC">
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_PjN_ABuaEd-ffO4YhZA0ZQ">
+ <invocations xmi:id="_Uj7DUBubEd-ffO4YhZA0ZQ" invokedActivity="#_Q5pmcBuaEd-ffO4YhZA0ZQ"/>
+ <invocations xmi:id="_Zrmu0BubEd-ffO4YhZA0ZQ" invokedActivity="#_Q5pmcBuaEd-ffO4YhZA0ZQ">
+ <invocationContractContainer xmi:id="_btGFcBubEd-ffO4YhZA0ZQ">
+ <invocationContracts xmi:id="_cd0XwBubEd-ffO4YhZA0ZQ" invokedContract="#_KRvo4BubEd-ffO4YhZA0ZQ">
+ <type xmi:type="types:TypeString" xmi:id="_eT1eMBubEd-ffO4YhZA0ZQ" value="Folks"/>
+ </invocationContracts>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+ </fcore:FactoryComponent>
+ <ftask:Task xmi:id="_Q5pmcBuaEd-ffO4YhZA0ZQ" name="FC - UC1.1 - HelloWorldTask"
+ kind="java" implementation="org.eclipse.egf.usecase.fc.uc1.HelloWorld">
+ <contractContainer xmi:id="_Jyv_wBubEd-ffO4YhZA0ZQ">
+ <contracts xmi:id="_KRvo4BubEd-ffO4YhZA0ZQ" name="value">
+ <type xmi:type="types:TypeString" xmi:id="_OgDcYBubEd-ffO4YhZA0ZQ" value="World"/>
+ </contracts>
+ </contractContainer>
+ </ftask:Task>
+</xmi:XMI>
diff --git a/examples/runtime/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_2_FCWithContracts.fcore b/examples/runtime/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_2_FCWithContracts.fcore
new file mode 100644
index 0000000..e916e31
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_2_FCWithContracts.fcore
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" 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:types="http://www.eclipse.org/egf/1.0.0/types">
+ <fcore:FactoryComponent xmi:id="_NHi_EBugEd-ffO4YhZA0ZQ" name="FC - UC1.2 - FC with contracts">
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_C2OuABulEd-iZpx-nITNvw">
+ <invocations xmi:id="_G-IXgBulEd-iZpx-nITNvw" invokedActivity="#_NTILsRuaEd-ffO4YhZA0ZQ">
+ <invocationContractContainer xmi:id="_J7OawBulEd-iZpx-nITNvw">
+ <invocationContracts xmi:id="_KbkHsBulEd-iZpx-nITNvw" invokedContract="#_b0jmEBugEd-ffO4YhZA0ZQ">
+ <type xmi:type="types:TypeString" xmi:id="_L1RFkBulEd-iZpx-nITNvw" value="Romeo and Juliet"/>
+ </invocationContracts>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+ </fcore:FactoryComponent>
+ <fcore:FactoryComponent xmi:id="_NTILsRuaEd-ffO4YhZA0ZQ" name="FC - UC1.2 - FC parameterized">
+ <contractContainer xmi:id="_bSIOcBugEd-ffO4YhZA0ZQ">
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_b0jmEBugEd-ffO4YhZA0ZQ"
+ name="who" invocationContracts="#_6UjIMBuhEd-ffO4YhZA0ZQ">
+ <type xmi:type="types:TypeString" xmi:id="_8gwroRuiEd-iZpx-nITNvw" value="undefined"/>
+ </contracts>
+ </contractContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_PjN_ABuaEd-ffO4YhZA0ZQ">
+ <invocations xmi:id="_Uj7DUBubEd-ffO4YhZA0ZQ" name="Hello for Who Parameter"
+ invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_1_FCAndTask.fcore#_Q5pmcBuaEd-ffO4YhZA0ZQ">
+ <invocationContractContainer xmi:id="_5p7d4BuhEd-ffO4YhZA0ZQ">
+ <invocationContracts xmi:id="_6UjIMBuhEd-ffO4YhZA0ZQ" description="" factoryComponentContract="#_b0jmEBugEd-ffO4YhZA0ZQ"
+ invokedContract="platform:/plugin/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_1_FCAndTask.fcore#_KRvo4BubEd-ffO4YhZA0ZQ"/>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+ </fcore:FactoryComponent>
+</xmi:XMI>
diff --git a/examples/runtime/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_3_FCPricer.fcore b/examples/runtime/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_3_FCPricer.fcore
new file mode 100644
index 0000000..70af4ca
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.fc.uc1/egf/FC_UC1_3_FCPricer.fcore
@@ -0,0 +1,172 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" 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:types="http://www.eclipse.org/egf/1.0.0/types">
+ <fcore:FactoryComponent xmi:id="_rPuYIBvjEd-W6L66jY5sHw" name="FC - UC1.3 - FCPricer">
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_uAJRUBvjEd-W6L66jY5sHw">
+ <invocations xmi:id="_uzs1MBvjEd-W6L66jY5sHw" invokedActivity="#_ni7LsBviEd-W6L66jY5sHw"/>
+ <invocations xmi:id="_zIGpoBvjEd-W6L66jY5sHw" invokedActivity="#_P_2ckBvaEd-W6L66jY5sHw"/>
+ </orchestration>
+ </fcore:FactoryComponent>
+ <fcore:FactoryComponent xmi:id="_ni7LsBviEd-W6L66jY5sHw" name="FC - UC1.3 - FCPricer - Version with Task call">
+ <contractContainer xmi:id="_ECwpYBvjEd-W6L66jY5sHw">
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_ECwpYRvjEd-W6L66jY5sHw"
+ name="quantity" mandatory="true" invocationContracts="#_Rlhq0BvjEd-W6L66jY5sHw #_ZWwygBvjEd-W6L66jY5sHw">
+ <type xmi:type="types:TypeInteger" xmi:id="_ECwpYhvjEd-W6L66jY5sHw" value="2"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_ECwpYxvjEd-W6L66jY5sHw"
+ name="price" mandatory="true" invocationContracts="#_UJSBABvjEd-W6L66jY5sHw #_bCfUgBvjEd-W6L66jY5sHw">
+ <type xmi:type="types:TypeFloat" xmi:id="_ECwpZBvjEd-W6L66jY5sHw" value="4.0"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_ECwpZRvjEd-W6L66jY5sHw"
+ name="amount" mode="Out">
+ <type xmi:type="types:TypeFloat" xmi:id="_ECwpZhvjEd-W6L66jY5sHw" value="0.0"/>
+ </contracts>
+ </contractContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_ECwpZxvjEd-W6L66jY5sHw">
+ <invocations xmi:id="_ECwpaBvjEd-W6L66jY5sHw" invokedActivity="#_Si3L4BvaEd-W6L66jY5sHw">
+ <invocationContractContainer xmi:id="_RRQrABvjEd-W6L66jY5sHw">
+ <invocationContracts xmi:id="_Rlhq0BvjEd-W6L66jY5sHw" factoryComponentContract="#_ECwpYRvjEd-W6L66jY5sHw"
+ invokedContract="#_bvSfMBvaEd-W6L66jY5sHw"/>
+ <invocationContracts xmi:id="_UJSBABvjEd-W6L66jY5sHw" factoryComponentContract="#_ECwpYxvjEd-W6L66jY5sHw"
+ invokedContract="#_hllkMBvaEd-W6L66jY5sHw"/>
+ <invocationContracts xmi:id="_WSX0cBvjEd-W6L66jY5sHw" targetInvocationContract="#_dQfdIBvjEd-W6L66jY5sHw"
+ invokedContract="#_l5PxwBvaEd-W6L66jY5sHw"/>
+ </invocationContractContainer>
+ </invocations>
+ <invocations xmi:id="_ECwpbRvjEd-W6L66jY5sHw" invokedActivity="#_DZf4sBvdEd-W6L66jY5sHw">
+ <invocationContractContainer xmi:id="_Y_XmMBvjEd-W6L66jY5sHw">
+ <invocationContracts xmi:id="_ZWwygBvjEd-W6L66jY5sHw" factoryComponentContract="#_ECwpYRvjEd-W6L66jY5sHw"
+ invokedContract="#_PEwl8RvdEd-W6L66jY5sHw"/>
+ <invocationContracts xmi:id="_bCfUgBvjEd-W6L66jY5sHw" factoryComponentContract="#_ECwpYxvjEd-W6L66jY5sHw"
+ invokedContract="#_PEwl8xvdEd-W6L66jY5sHw"/>
+ <invocationContracts xmi:id="_dQfdIBvjEd-W6L66jY5sHw" sourceInvocationContract="#_WSX0cBvjEd-W6L66jY5sHw"
+ invokedContract="#_PEwl9RvdEd-W6L66jY5sHw"/>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+ </fcore:FactoryComponent>
+ <fcore:FactoryComponent xmi:id="_P_2ckBvaEd-W6L66jY5sHw" name="FC - UC1.3 - FCPricer - Version with FC call">
+ <contractContainer xmi:id="_sRw2MBveEd-W6L66jY5sHw">
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_sRw2MRveEd-W6L66jY5sHw"
+ name="quantity" mandatory="true" invocationContracts="#_IVHosBveEd-W6L66jY5sHw #_VjUvYBveEd-W6L66jY5sHw">
+ <type xmi:type="types:TypeInteger" xmi:id="_sRw2MhveEd-W6L66jY5sHw" value="3"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_sRw2MxveEd-W6L66jY5sHw"
+ name="price" mandatory="true" invocationContracts="#_LivbQBveEd-W6L66jY5sHw #_9gjdcBveEd-W6L66jY5sHw">
+ <type xmi:type="types:TypeFloat" xmi:id="_sRw2NBveEd-W6L66jY5sHw" value="5.0"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_sRw2NRveEd-W6L66jY5sHw"
+ name="amount" mode="Out">
+ <type xmi:type="types:TypeFloat" xmi:id="_sRw2NhveEd-W6L66jY5sHw" value="0.0"/>
+ </contracts>
+ </contractContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_4pQz0BvdEd-W6L66jY5sHw">
+ <invocations xmi:id="_EnJiIBveEd-W6L66jY5sHw" invokedActivity="#_5AJKIBvaEd-W6L66jY5sHw">
+ <invocationContractContainer xmi:id="_H77soBveEd-W6L66jY5sHw">
+ <invocationContracts xmi:id="_IVHosBveEd-W6L66jY5sHw" factoryComponentContract="#_sRw2MRveEd-W6L66jY5sHw"
+ invokedContract="#_SiuzkBvbEd-W6L66jY5sHw"/>
+ <invocationContracts xmi:id="_LivbQBveEd-W6L66jY5sHw" factoryComponentContract="#_sRw2MxveEd-W6L66jY5sHw"
+ invokedContract="#_WrOS8BvbEd-W6L66jY5sHw"/>
+ <invocationContracts xmi:id="_OsWQgBveEd-W6L66jY5sHw" targetInvocationContract="#_Dcq2kBvfEd-W6L66jY5sHw"
+ invokedContract="#_evOloBvbEd-W6L66jY5sHw"/>
+ </invocationContractContainer>
+ </invocations>
+ <invocations xmi:id="_ScjLsBveEd-W6L66jY5sHw" invokedActivity="#_11YzcBvcEd-W6L66jY5sHw">
+ <invocationContractContainer xmi:id="_VELVQBveEd-W6L66jY5sHw">
+ <invocationContracts xmi:id="_VjUvYBveEd-W6L66jY5sHw" factoryComponentContract="#_sRw2MRveEd-W6L66jY5sHw"
+ invokedContract="#_5360wBvcEd-W6L66jY5sHw"/>
+ <invocationContracts xmi:id="_9gjdcBveEd-W6L66jY5sHw" factoryComponentContract="#_sRw2MxveEd-W6L66jY5sHw"
+ invokedContract="#_5360whvcEd-W6L66jY5sHw"/>
+ <invocationContracts xmi:id="_Dcq2kBvfEd-W6L66jY5sHw" sourceInvocationContract="#_OsWQgBveEd-W6L66jY5sHw"
+ invokedContract="#_5360xBvcEd-W6L66jY5sHw"/>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+ </fcore:FactoryComponent>
+ <fcore:FactoryComponent xmi:id="_5AJKIBvaEd-W6L66jY5sHw" name="FC - UC1.3 - FCPricer - Computation">
+ <contractContainer xmi:id="_9oNhcBvaEd-W6L66jY5sHw">
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_SiuzkBvbEd-W6L66jY5sHw"
+ name="quantity" mandatory="true" invocationContracts="#_qqlkYBvbEd-W6L66jY5sHw">
+ <type xmi:type="types:TypeInteger" xmi:id="_WRvb8BvbEd-W6L66jY5sHw" value="0"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_WrOS8BvbEd-W6L66jY5sHw"
+ name="price" mandatory="true" invocationContracts="#_vWFqMBvbEd-W6L66jY5sHw">
+ <type xmi:type="types:TypeFloat" xmi:id="_eJh3kBvbEd-W6L66jY5sHw" value="0.0"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_evOloBvbEd-W6L66jY5sHw"
+ name="amount" mandatory="true" mode="Out" invocationContracts="#_x7x6EBvbEd-W6L66jY5sHw">
+ <type xmi:type="types:TypeFloat" xmi:id="_iNPkoBvbEd-W6L66jY5sHw" value="0.0"/>
+ </contracts>
+ </contractContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_m86_0BvbEd-W6L66jY5sHw">
+ <invocations xmi:id="_nmMmUBvbEd-W6L66jY5sHw" invokedActivity="#_Si3L4BvaEd-W6L66jY5sHw">
+ <invocationContractContainer xmi:id="_qWBpoBvbEd-W6L66jY5sHw">
+ <invocationContracts xmi:id="_qqlkYBvbEd-W6L66jY5sHw" factoryComponentContract="#_SiuzkBvbEd-W6L66jY5sHw"
+ invokedContract="#_bvSfMBvaEd-W6L66jY5sHw"/>
+ <invocationContracts xmi:id="_vWFqMBvbEd-W6L66jY5sHw" factoryComponentContract="#_WrOS8BvbEd-W6L66jY5sHw"
+ invokedContract="#_hllkMBvaEd-W6L66jY5sHw"/>
+ <invocationContracts xmi:id="_x7x6EBvbEd-W6L66jY5sHw" factoryComponentContract="#_evOloBvbEd-W6L66jY5sHw"
+ invokedContract="#_l5PxwBvaEd-W6L66jY5sHw"/>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+ </fcore:FactoryComponent>
+ <fcore:FactoryComponent xmi:id="_11YzcBvcEd-W6L66jY5sHw" name="FC - UC1.3 - FCPricer - Display">
+ <contractContainer xmi:id="_46-EUBvcEd-W6L66jY5sHw">
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_5360wBvcEd-W6L66jY5sHw"
+ name="quantity" mandatory="true" invocationContracts="#_UKfJoBvdEd-W6L66jY5sHw">
+ <type xmi:type="types:TypeInteger" xmi:id="_5360wRvcEd-W6L66jY5sHw" value="0"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_5360whvcEd-W6L66jY5sHw"
+ name="price" mandatory="true" invocationContracts="#_Wo4esBvdEd-W6L66jY5sHw">
+ <type xmi:type="types:TypeFloat" xmi:id="_5360wxvcEd-W6L66jY5sHw" value="0.0"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_5360xBvcEd-W6L66jY5sHw"
+ name="amount" mandatory="true" invocationContracts="#_YoSKoBvdEd-W6L66jY5sHw">
+ <type xmi:type="types:TypeFloat" xmi:id="_5360xRvcEd-W6L66jY5sHw" value="0.0"/>
+ </contracts>
+ </contractContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_8qbYoBvcEd-W6L66jY5sHw">
+ <invocations xmi:id="_9XR3kBvcEd-W6L66jY5sHw" invokedActivity="#_DZf4sBvdEd-W6L66jY5sHw">
+ <invocationContractContainer xmi:id="_Ti2h4BvdEd-W6L66jY5sHw">
+ <invocationContracts xmi:id="_UKfJoBvdEd-W6L66jY5sHw" factoryComponentContract="#_5360wBvcEd-W6L66jY5sHw"
+ invokedContract="#_PEwl8RvdEd-W6L66jY5sHw"/>
+ <invocationContracts xmi:id="_Wo4esBvdEd-W6L66jY5sHw" factoryComponentContract="#_5360whvcEd-W6L66jY5sHw"
+ invokedContract="#_PEwl8xvdEd-W6L66jY5sHw"/>
+ <invocationContracts xmi:id="_YoSKoBvdEd-W6L66jY5sHw" factoryComponentContract="#_5360xBvcEd-W6L66jY5sHw"
+ invokedContract="#_PEwl9RvdEd-W6L66jY5sHw"/>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+ </fcore:FactoryComponent>
+ <ftask:Task xmi:id="_Si3L4BvaEd-W6L66jY5sHw" name="FC - UC1.3 - PricerComputerTask"
+ kind="java" implementation="org.eclipse.egf.usecase.fc.uc1.PricerComputation">
+ <contractContainer xmi:id="_bRMN8BvaEd-W6L66jY5sHw">
+ <contracts xmi:id="_bvSfMBvaEd-W6L66jY5sHw" name="quantity" mandatory="true">
+ <type xmi:type="types:TypeInteger" xmi:id="_hGTAIBvaEd-W6L66jY5sHw"/>
+ </contracts>
+ <contracts xmi:id="_hllkMBvaEd-W6L66jY5sHw" name="price" mandatory="true">
+ <type xmi:type="types:TypeFloat" xmi:id="_kZ430BvaEd-W6L66jY5sHw"/>
+ </contracts>
+ <contracts xmi:id="_l5PxwBvaEd-W6L66jY5sHw" name="amount" mandatory="true" mode="Out">
+ <type xmi:type="types:TypeFloat" xmi:id="_rGkyQBvaEd-W6L66jY5sHw"/>
+ </contracts>
+ </contractContainer>
+ </ftask:Task>
+ <ftask:Task xmi:id="_DZf4sBvdEd-W6L66jY5sHw" name="FC - UC1.3 - PricerDisplayTask"
+ kind="java" implementation="org.eclipse.egf.usecase.fc.uc1.PricerDisplay">
+ <contractContainer xmi:id="_PEwl8BvdEd-W6L66jY5sHw">
+ <contracts xmi:id="_PEwl8RvdEd-W6L66jY5sHw" name="quantity" mandatory="true">
+ <type xmi:type="types:TypeInteger" xmi:id="_PEwl8hvdEd-W6L66jY5sHw" value="0"/>
+ </contracts>
+ <contracts xmi:id="_PEwl8xvdEd-W6L66jY5sHw" name="price" mandatory="true">
+ <type xmi:type="types:TypeFloat" xmi:id="_PEwl9BvdEd-W6L66jY5sHw" value="0.0"/>
+ </contracts>
+ <contracts xmi:id="_PEwl9RvdEd-W6L66jY5sHw" name="amount" mandatory="true">
+ <type xmi:type="types:TypeFloat" xmi:id="_PEwl9hvdEd-W6L66jY5sHw" value="0.0"/>
+ </contracts>
+ </contractContainer>
+ </ftask:Task>
+</xmi:XMI>
diff --git a/examples/runtime/org.eclipse.egf.usecase.fc.uc1/plugin.properties b/examples/runtime/org.eclipse.egf.usecase.fc.uc1/plugin.properties
new file mode 100644
index 0000000..17a8198
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.fc.uc1/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 Factory Component UC1 (Incubation)
+providerName=Eclipse Modeling Project
diff --git a/examples/runtime/org.eclipse.egf.usecase.fc.uc1/plugin.xml b/examples/runtime/org.eclipse.egf.usecase.fc.uc1/plugin.xml
new file mode 100644
index 0000000..9f18e40
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.fc.uc1/plugin.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<!--
+ Copyright (c) 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/FC_UC1_1_FCAndTask.fcore">
+ </fcore>
+ <fcore
+ id="egf/FC_UC1_2_FCWithContracts.fcore">
+ </fcore>
+ <fcore
+ id="egf/FC_UC1_0_AllTogether.fcore">
+ </fcore>
+ <fcore
+ id="egf/FC_UC1_3_FCPricer.fcore">
+ </fcore>
+ </extension>
+
+
+</plugin>
diff --git a/examples/runtime/org.eclipse.egf.usecase.fc.uc1/src/org/eclipse/egf/usecase/fc/uc1/HelloWorld.java b/examples/runtime/org.eclipse.egf.usecase.fc.uc1/src/org/eclipse/egf/usecase/fc/uc1/HelloWorld.java
new file mode 100644
index 0000000..fc9d160
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.fc.uc1/src/org/eclipse/egf/usecase/fc/uc1/HelloWorld.java
@@ -0,0 +1,50 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.usecase.fc.uc1;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+import org.eclipse.egf.ftask.producer.invocation.ITaskProduction;
+
+/**
+ * @author Benoit Langlois
+ *
+ */
+
+public class HelloWorld implements ITaskProduction {
+
+ private static final String VALUE_PARAMETER = "value"; //$NON-NLS-1$
+
+ public void preExecute(ITaskProductionContext taskProductionContext, IProgressMonitor monitor) throws InvocationException {
+ // TODO Auto-generated method stub
+ }
+
+ public void doExecute(ITaskProductionContext taskProductionContext, IProgressMonitor monitor) throws InvocationException {
+ String value = taskProductionContext.getInputValue(VALUE_PARAMETER, String.class);
+ String message = new String("Hello " + value + "!"); //$NON-NLS-1$ //$NON-NLS-2$
+ // Message on the default console
+ System.out.println(message);
+ // Message on the EGF console
+ EGFCorePlugin.getDefault().logInfo(message);
+ }
+
+ public void postExecute(ITaskProductionContext taskProductionContext, IProgressMonitor monitor) throws InvocationException {
+ // TODO Auto-generated method stub
+ }
+
+}
diff --git a/examples/runtime/org.eclipse.egf.usecase.fc.uc1/src/org/eclipse/egf/usecase/fc/uc1/PricerComputation.java b/examples/runtime/org.eclipse.egf.usecase.fc.uc1/src/org/eclipse/egf/usecase/fc/uc1/PricerComputation.java
new file mode 100644
index 0000000..1bb09ee
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.fc.uc1/src/org/eclipse/egf/usecase/fc/uc1/PricerComputation.java
@@ -0,0 +1,53 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.usecase.fc.uc1;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+import org.eclipse.egf.ftask.producer.invocation.ITaskProduction;
+
+/**
+ * @author Benoit Langlois
+ *
+ */
+
+public class PricerComputation implements ITaskProduction {
+
+ private static final String PRICE_PARAMETER = "price"; //$NON-NLS-1$
+
+ private static final String QUANTITY_PARAMETER = "quantity"; //$NON-NLS-1$
+
+ private static final String AMOUNT_PARAMETER = "amount"; //$NON-NLS-1$
+
+ private Integer quantity;
+ private Float price;
+ private Float amount;
+
+ public void preExecute(ITaskProductionContext taskProductionContext, IProgressMonitor monitor) throws InvocationException {
+ quantity = taskProductionContext.getInputValue(QUANTITY_PARAMETER, Integer.class);
+ price = taskProductionContext.getInputValue(PRICE_PARAMETER, Float.class);
+ }
+
+ public void doExecute(ITaskProductionContext taskProductionContext, IProgressMonitor monitor) throws InvocationException {
+ amount = quantity * price;
+ }
+
+ public void postExecute(ITaskProductionContext taskProductionContext, IProgressMonitor monitor) throws InvocationException {
+ taskProductionContext.setOutputValue(AMOUNT_PARAMETER, amount);
+ }
+
+}
diff --git a/examples/runtime/org.eclipse.egf.usecase.fc.uc1/src/org/eclipse/egf/usecase/fc/uc1/PricerDisplay.java b/examples/runtime/org.eclipse.egf.usecase.fc.uc1/src/org/eclipse/egf/usecase/fc/uc1/PricerDisplay.java
new file mode 100644
index 0000000..5b6e5c1
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.fc.uc1/src/org/eclipse/egf/usecase/fc/uc1/PricerDisplay.java
@@ -0,0 +1,63 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.usecase.fc.uc1;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+import org.eclipse.egf.ftask.producer.invocation.ITaskProduction;
+
+/**
+ * @author Benoit Langlois
+ *
+ */
+
+public class PricerDisplay implements ITaskProduction {
+
+ private static final String PRICE_PARAMETER = "price"; //$NON-NLS-1$
+
+ private static final String QUANTITY_PARAMETER = "quantity"; //$NON-NLS-1$
+
+ private static final String AMOUNT_PARAMETER = "amount"; //$NON-NLS-1$
+
+ private Integer quantity;
+ private Float price;
+ private Float amount;
+
+ public void preExecute(ITaskProductionContext taskProductionContext, IProgressMonitor monitor) throws InvocationException {
+ // TODO Auto-generated method stub
+ }
+
+ public void doExecute(ITaskProductionContext taskProductionContext, IProgressMonitor monitor) throws InvocationException {
+ quantity = taskProductionContext.getInputValue(QUANTITY_PARAMETER, Integer.class);
+ price = taskProductionContext.getInputValue(PRICE_PARAMETER, Float.class);
+ amount = taskProductionContext.getInputValue(AMOUNT_PARAMETER, Float.class);
+
+ String message = new String("Pricer: " + quantity + " * " + price + " = " + amount); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+ // Message on the default console
+ System.out.println(message);
+
+ // Message on the EGF console
+ EGFCorePlugin.getDefault().logInfo(message);
+ }
+
+ public void postExecute(ITaskProductionContext taskProductionContext, IProgressMonitor monitor) throws InvocationException {
+ // TODO Auto-generated method stub
+ }
+
+}
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/.classpath b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/.classpath
new file mode 100644
index 0000000..700f194
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/.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.pde.core.requiredPlugins"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/.project b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/.project
new file mode 100644
index 0000000..f47a79d
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.usecase.pattern.uc1</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.egf.pattern.ui.PatternBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.egf.core.EGFNature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/.settings/org.eclipse.core.resources.prefs b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..6a27f6f
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Thu Feb 25 11:54:56 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/.settings/org.eclipse.jdt.core.prefs b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..128d711
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Tue Dec 15 15:11:44 CET 2009
+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/runtime/org.eclipse.egf.usecase.pattern.uc1/META-INF/MANIFEST.MF b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..000b6c2
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/META-INF/MANIFEST.MF
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.usecase.pattern.uc1;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: .
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package:
+ egf.uc1_1.pattern,
+ org.eclipse.egf.usecase.pattern.uc1.callback,
+ org.eclipse.egf.usecase.pattern.uc1.helper,
+ org.eclipse.egf.usecase.pattern.uc1.query,
+ org.eclipse.egf.usecase.pattern.uc1.reporter
+Require-Bundle:
+ org.eclipse.egf.model.ftask;visibility:=reexport,
+ org.eclipse.egf.pattern;visibility:=reexport,
+ org.eclipse.egf.pattern.ftask;visibility:=reexport,
+ org.eclipse.emf.query
+Bundle-ActivationPolicy: lazy
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/about.html b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/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/runtime/org.eclipse.egf.usecase.pattern.uc1/build.properties b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/build.properties
new file mode 100644
index 0000000..8b2f29c
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/build.properties
@@ -0,0 +1,24 @@
+
+##
+# 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
+##
+
+source.. = generated/,\
+ src/
+output.. = bin/
+bin.includes = .,\
+ egf/,\
+ test/,\
+ META-INF/,\
+ about.html,\
+ plugin.xml,\
+ plugin.properties
+src.includes = templates/,\
+ about.html
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/egf/Pattern_UC1_0_AllTogether.fcore b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/egf/Pattern_UC1_0_AllTogether.fcore
new file mode 100644
index 0000000..1c5a651
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/egf/Pattern_UC1_0_AllTogether.fcore
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<fcore:FactoryComponent xmi:version="2.1"
+ xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:fcore="http://www.eclipse.org/egf/1.0.0/fcore"
+ xmlns:fprod="http://www.eclipse.org/egf/1.0.0/fprod" xmi:id="_BoElQejCEd6kmtdYyydDtQ"
+ description=" " name="UseCase - Pattern - UC1 - Hello - All Together">
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_EomXAOjCEd6kmtdYyydDtQ">
+ <invocations xmi:id="_FYuMYOjCEd6kmtdYyydDtQ" invokedActivity="fcore:FactoryComponent platform:/plugin/org.eclipse.egf.usecase.pattern.uc1/egf/Pattern_UC1_1_ClassPattern.fcore#_0BNZAOTGEd6iCM6xyOQ7FA"/>
+ <invocations xmi:id="_Rf4ygOjCEd6kmtdYyydDtQ" invokedActivity="fcore:FactoryComponent platform:/plugin/org.eclipse.egf.usecase.pattern.uc1/egf/Pattern_UC1_2_Inheritance.fcore#_94fB8RVfEd-JoY-b5_Vpcw"/>
+ <invocations xmi:id="_ZIPH8Bb5Ed-yIvdzb4Km2Q" invokedActivity="fcore:FactoryComponent platform:/plugin/org.eclipse.egf.usecase.pattern.uc1/egf/Pattern_UC1_3_InheritanceAndCall.fcore#_Onwn4AzqEd-pgpX7a7GeEA"/>
+ <invocations xmi:id="_bTkXEBb5Ed-yIvdzb4Km2Q" invokedActivity="fcore:FactoryComponent platform:/plugin/org.eclipse.egf.usecase.pattern.uc1/egf/Pattern_UC1_4_Callback_StrategyBased.fcore#_oWQD0Be1Ed-DaY2uHNBaQg"/>
+ <invocations xmi:id="_RURJYBfKEd-JToveUSgqRw" invokedActivity="fcore:FactoryComponent platform:/plugin/org.eclipse.egf.usecase.pattern.uc1/egf/Pattern_UC1_5_Callback_WithJavaClass.fcore#_1di_UBe3Ed-DaY2uHNBaQg"/>
+ <invocations xmi:id="_T_eycBfKEd-JToveUSgqRw" invokedActivity="fcore:FactoryComponent platform:/plugin/org.eclipse.egf.usecase.pattern.uc1/egf/Pattern_UC1_6_JetPatternCallsJavaPattern.fcore#_a-kDcBfVEd-JToveUSgqRw"/>
+ <invocations xmi:id="_Uo2k4BsSEd-12t5rED-J2A" invokedActivity="fcore:FactoryComponent platform:/plugin/org.eclipse.egf.usecase.pattern.uc1/egf/Pattern_UC1_7_Injection.fcore#_zOU6cBVhEd-JoY-b5_Vpcw"/>
+ </orchestration>
+</fcore:FactoryComponent>
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/egf/Pattern_UC1_1_ClassPattern.fcore b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/egf/Pattern_UC1_1_ClassPattern.fcore
new file mode 100644
index 0000000..a115e1b
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/egf/Pattern_UC1_1_ClassPattern.fcore
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<fcore:FactoryComponent xmi:version="2.1"
+ xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" 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="_0BNZAOTGEd6iCM6xyOQ7FA"
+ description=" " name="Pattern - UC1.1 - EClasses">
+ <viewpointContainer xmi:id="_EtB9MBsZEd-Cmei4SZ1Naw">
+ <viewpoints xmi:type="domain:DomainViewpoint" xmi:id="_YLSssBsZEd-Cmei4SZ1Naw">
+ <domains xmi:type="domain:DomainURI" xmi:id="_aMkn8BsZEd-Cmei4SZ1Naw" uri="platform:/plugin/org.eclipse.egf.model/model/Fcore.ecore"/>
+ </viewpoints>
+ <viewpoints xmi:type="pattern:PatternViewpoint" xmi:id="_FuGYoBsZEd-Cmei4SZ1Naw">
+ <libraries xmi:id="_GMQUQBsZEd-Cmei4SZ1Naw" name="egf.uc1_1.pattern">
+ <elements xmi:type="pattern:Pattern" xmi:id="_QmXisBsZEd-Cmei4SZ1Naw" name="classPattern"
+ headerMethod="#_QmXisRsZEd-Cmei4SZ1Naw" footerMethod="#_QmXitBsZEd-Cmei4SZ1Naw"
+ initMethod="#_QmXishsZEd-Cmei4SZ1Naw">
+ <methods xmi:id="_QmXisRsZEd-Cmei4SZ1Naw" name="header" patternFilePath="templates/pattern._QmXisBsZEd-Cmei4SZ1Naw/method._QmXisRsZEd-Cmei4SZ1Naw.pt"/>
+ <methods xmi:id="_QmXishsZEd-Cmei4SZ1Naw" name="init" patternFilePath="templates/pattern._QmXisBsZEd-Cmei4SZ1Naw/method._QmXishsZEd-Cmei4SZ1Naw.pt"/>
+ <methods xmi:id="_QmXisxsZEd-Cmei4SZ1Naw" name="body" patternFilePath="templates/pattern._QmXisBsZEd-Cmei4SZ1Naw/method._QmXisxsZEd-Cmei4SZ1Naw.pt"/>
+ <methods xmi:id="_QmXitBsZEd-Cmei4SZ1Naw" name="footer" patternFilePath="templates/pattern._QmXisBsZEd-Cmei4SZ1Naw/method._QmXitBsZEd-Cmei4SZ1Naw.pt"/>
+ <orchestration xmi:type="pattern:SuperCall" xmi:id="_QmXitRsZEd-Cmei4SZ1Naw"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_xAcoYBsZEd-Cmei4SZ1Naw"
+ called="#_QmXisxsZEd-Cmei4SZ1Naw"/>
+ <parameters xmi:id="_SnK80BsZEd-Cmei4SZ1Naw" name="aClass" type="http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_QmXithsZEd-Cmei4SZ1Naw"
+ name="JET"/>
+ </elements>
+ <elements xmi:type="pattern:Pattern" xmi:id="_e1Lf4BsbEd-Cmei4SZ1Naw" name="attributePattern"
+ headerMethod="#_e1Lf4RsbEd-Cmei4SZ1Naw" footerMethod="#_e1Lf5BsbEd-Cmei4SZ1Naw"
+ initMethod="#_e1Lf4hsbEd-Cmei4SZ1Naw">
+ <methods xmi:id="_e1Lf4RsbEd-Cmei4SZ1Naw" name="header" patternFilePath="templates/pattern._e1Lf4BsbEd-Cmei4SZ1Naw/method._e1Lf4RsbEd-Cmei4SZ1Naw.pt"/>
+ <methods xmi:id="_e1Lf4hsbEd-Cmei4SZ1Naw" name="init" patternFilePath="templates/pattern._e1Lf4BsbEd-Cmei4SZ1Naw/method._e1Lf4hsbEd-Cmei4SZ1Naw.pt"/>
+ <methods xmi:id="_e1Lf4xsbEd-Cmei4SZ1Naw" name="body" patternFilePath="templates/pattern._e1Lf4BsbEd-Cmei4SZ1Naw/method._e1Lf4xsbEd-Cmei4SZ1Naw.pt"/>
+ <methods xmi:id="_e1Lf5BsbEd-Cmei4SZ1Naw" name="footer" patternFilePath="templates/pattern._e1Lf4BsbEd-Cmei4SZ1Naw/method._e1Lf5BsbEd-Cmei4SZ1Naw.pt"/>
+ <orchestration xmi:type="pattern:SuperCall" xmi:id="_e1Lf5RsbEd-Cmei4SZ1Naw"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_3FdM4BsbEd-Cmei4SZ1Naw"
+ called="#_e1Lf4xsbEd-Cmei4SZ1Naw"/>
+ <parameters xmi:id="_ir_ZYBsbEd-Cmei4SZ1Naw" name="anAttribute" type="http://www.eclipse.org/emf/2002/Ecore#//EAttribute"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_e1Lf5hsbEd-Cmei4SZ1Naw"
+ name="JET"/>
+ </elements>
+ </libraries>
+ </viewpoints>
+ </viewpointContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_oFcGYOTNEd6jrNbWQfMNfQ">
+ <invocations xmi:id="_p21ykOTNEd6jrNbWQfMNfQ" invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_8FZ3aof6eEd64XYPo3s6sPg">
+ <invocationContractContainer xmi:id="_is7fcBsZEd-Cmei4SZ1Naw">
+ <invocationContracts xmi:id="_jcLyIBsZEd-Cmei4SZ1Naw" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_DgB2IP6fEd64XaYPo3s6sPg">
+ <type xmi:type="domain:TypeDomainURI" xmi:id="_kyVswBsZEd-Cmei4SZ1Naw" domain="#_aMkn8BsZEd-Cmei4SZ1Naw"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_mTq8oBsZEd-Cmei4SZ1Naw" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_nz1HkSCaEd-Sse0r9LJWbA">
+ <type xmi:type="pattern:TypePatternList" xmi:id="_-H8OECHzEd-V4KH4GeEy-w"
+ elements="#_GMQUQBsZEd-Cmei4SZ1Naw"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_ratH4BsZEd-Cmei4SZ1Naw" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_L6JSwAHAEd-4faJMEplCjxw">
+ <type xmi:type="pattern:TypePatternExecutionReporter" xmi:id="_swHboBsZEd-Cmei4SZ1Naw"
+ value="org.eclipse.egf.usecase.pattern.uc1.reporter.MyReporter"/>
+ </invocationContracts>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+</fcore:FactoryComponent>
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/egf/Pattern_UC1_2_Inheritance.fcore b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/egf/Pattern_UC1_2_Inheritance.fcore
new file mode 100644
index 0000000..5905ed6
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/egf/Pattern_UC1_2_Inheritance.fcore
@@ -0,0 +1,67 @@
+<?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="_94fB8RVfEd-JoY-b5_Vpcw"
+ description=" " name="Pattern - UC1.2 - Inheritance">
+ <viewpointContainer xmi:id="_CnXy8BVgEd-JoY-b5_Vpcw">
+ <viewpoints xmi:type="pattern:PatternViewpoint" xmi:id="_DBjNgBVgEd-JoY-b5_Vpcw">
+ <libraries xmi:id="_QAa3sBVgEd-JoY-b5_Vpcw" name="egf.uc1_2.pattern.parent">
+ <elements xmi:type="pattern:Pattern" xmi:id="_RfrD8BVgEd-JoY-b5_Vpcw" name="ParentPattern"
+ headerMethod="#_RfrD8RVgEd-JoY-b5_Vpcw" footerMethod="#_RfrD9BVgEd-JoY-b5_Vpcw"
+ initMethod="#_RfrD8hVgEd-JoY-b5_Vpcw">
+ <methods xmi:id="_RfrD8RVgEd-JoY-b5_Vpcw" name="header" patternFilePath="templates/pattern._RfrD8BVgEd-JoY-b5_Vpcw/method._RfrD8RVgEd-JoY-b5_Vpcw.pt"/>
+ <methods xmi:id="_RfrD8hVgEd-JoY-b5_Vpcw" name="init" patternFilePath="templates/pattern._RfrD8BVgEd-JoY-b5_Vpcw/method._RfrD8hVgEd-JoY-b5_Vpcw.pt"/>
+ <methods xmi:id="_RfrD8xVgEd-JoY-b5_Vpcw" name="body" patternFilePath="templates/pattern._RfrD8BVgEd-JoY-b5_Vpcw/method._RfrD8xVgEd-JoY-b5_Vpcw.pt"/>
+ <methods xmi:id="_RfrD9BVgEd-JoY-b5_Vpcw" name="footer" patternFilePath="templates/pattern._RfrD8BVgEd-JoY-b5_Vpcw/method._RfrD9BVgEd-JoY-b5_Vpcw.pt"/>
+ <methods xmi:id="_X63lwBVgEd-JoY-b5_Vpcw" name="sayHello" patternFilePath="templates/pattern._RfrD8BVgEd-JoY-b5_Vpcw/method._X63lwBVgEd-JoY-b5_Vpcw.pt"/>
+ <methods xmi:id="_PbStEBbvEd-thalzjBN9kg" name="sayFromParent" patternFilePath="templates/pattern._RfrD8BVgEd-JoY-b5_Vpcw/method._PbStEBbvEd-thalzjBN9kg.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_aj4PYBVgEd-JoY-b5_Vpcw"
+ called="#_X63lwBVgEd-JoY-b5_Vpcw"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_VJtocBbvEd-thalzjBN9kg"
+ called="#_PbStEBbvEd-thalzjBN9kg"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_RfrD9hVgEd-JoY-b5_Vpcw"
+ name="JET"/>
+ </elements>
+ </libraries>
+ <libraries xmi:id="_FRIDcBVgEd-JoY-b5_Vpcw" name="egf.uc1_2.pattern">
+ <elements xmi:type="pattern:Pattern" xmi:id="_NIgPYBVgEd-JoY-b5_Vpcw" name="ClassPattern"
+ headerMethod="#_NIg2cBVgEd-JoY-b5_Vpcw" footerMethod="#_NIg2cxVgEd-JoY-b5_Vpcw"
+ superPattern="#_RfrD8BVgEd-JoY-b5_Vpcw" initMethod="#_NIg2cRVgEd-JoY-b5_Vpcw">
+ <methods xmi:id="_NIg2cBVgEd-JoY-b5_Vpcw" name="header" patternFilePath="templates/pattern._NIgPYBVgEd-JoY-b5_Vpcw/method._NIg2cBVgEd-JoY-b5_Vpcw.pt"/>
+ <methods xmi:id="_NIg2cRVgEd-JoY-b5_Vpcw" name="init" patternFilePath="templates/pattern._NIgPYBVgEd-JoY-b5_Vpcw/method._NIg2cRVgEd-JoY-b5_Vpcw.pt"/>
+ <methods xmi:id="_NIg2chVgEd-JoY-b5_Vpcw" name="body" patternFilePath="templates/pattern._NIgPYBVgEd-JoY-b5_Vpcw/method._NIg2chVgEd-JoY-b5_Vpcw.pt"/>
+ <methods xmi:id="_NIg2cxVgEd-JoY-b5_Vpcw" name="footer" patternFilePath="templates/pattern._NIgPYBVgEd-JoY-b5_Vpcw/method._NIg2cxVgEd-JoY-b5_Vpcw.pt"/>
+ <orchestration xmi:type="pattern:SuperCall" xmi:id="_NIg2dBVgEd-JoY-b5_Vpcw"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_caS-cBVgEd-JoY-b5_Vpcw"
+ called="#_NIg2chVgEd-JoY-b5_Vpcw"/>
+ <parameters xmi:id="_O-IUQBVgEd-JoY-b5_Vpcw" name="parameter" type="http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_NIg2dRVgEd-JoY-b5_Vpcw"
+ name="JET"/>
+ </elements>
+ </libraries>
+ </viewpoints>
+ <viewpoints xmi:type="domain:DomainViewpoint" xmi:id="_GkXM8BVgEd-JoY-b5_Vpcw">
+ <domains xmi:type="domain:DomainURI" xmi:id="_HZMjMBVgEd-JoY-b5_Vpcw" uri="platform:/plugin/org.eclipse.egf.model/model/Fcore.ecore"/>
+ </viewpoints>
+ </viewpointContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_hXtToBVgEd-JoY-b5_Vpcw">
+ <invocations xmi:id="_h65gQBVgEd-JoY-b5_Vpcw" invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_8FZ3aof6eEd64XYPo3s6sPg">
+ <invocationContractContainer xmi:id="_kb6EcBVgEd-JoY-b5_Vpcw">
+ <invocationContracts xmi:id="_lC1hkBVgEd-JoY-b5_Vpcw" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_DgB2IP6fEd64XaYPo3s6sPg">
+ <type xmi:type="domain:TypeDomainURI" xmi:id="_m8hnEBVgEd-JoY-b5_Vpcw" description=""
+ domain="#_HZMjMBVgEd-JoY-b5_Vpcw"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_sV44cBVgEd-JoY-b5_Vpcw" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_nz1HkSCaEd-Sse0r9LJWbA">
+ <type xmi:type="pattern:TypePatternList" xmi:id="_ImZJ8CH0Ed-V4KH4GeEy-w"
+ elements="#_FRIDcBVgEd-JoY-b5_Vpcw"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_VsLbUBb6Ed-yIvdzb4Km2Q" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_L6JSwAHAEd-4faJMEplCjxw">
+ <type xmi:type="pattern:TypePatternExecutionReporter" xmi:id="_XFvPQBb6Ed-yIvdzb4Km2Q"
+ value="org.eclipse.egf.usecase.pattern.uc1.reporter.MyReporter"/>
+ </invocationContracts>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+</fcore:FactoryComponent>
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/egf/Pattern_UC1_3_InheritanceAndCall.fcore b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/egf/Pattern_UC1_3_InheritanceAndCall.fcore
new file mode 100644
index 0000000..ffd7eab
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/egf/Pattern_UC1_3_InheritanceAndCall.fcore
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<fcore:FactoryComponent xmi:version="2.1"
+ xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" 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="_Onwn4AzqEd-pgpX7a7GeEA"
+ description=" " name="Pattern - UC1.3 - Pattern Inheritance + Pattern Call">
+ <viewpointContainer xmi:id="_QhWmwAzqEd-pgpX7a7GeEA">
+ <viewpoints xmi:type="domain:DomainViewpoint" xmi:id="_RBiisAzqEd-pgpX7a7GeEA">
+ <domains xmi:type="domain:DomainURI" xmi:id="_d6UL8AzqEd-pgpX7a7GeEA" uri="platform:/plugin/org.eclipse.egf.model/model/Fcore.ecore"/>
+ </viewpoints>
+ <viewpoints xmi:type="pattern:PatternViewpoint" xmi:id="_uVI_oAzqEd-pgpX7a7GeEA">
+ <libraries xmi:id="_43VhIAzsEd-pgpX7a7GeEA" name="egf.uc1_3.pattern.parent">
+ <elements xmi:type="pattern:Pattern" xmi:id="_7nKkcAzsEd-pgpX7a7GeEA" name="Hello"
+ headerMethod="#_7nKkcQzsEd-pgpX7a7GeEA" footerMethod="#_7nKkdAzsEd-pgpX7a7GeEA"
+ initMethod="#_7nKkcgzsEd-pgpX7a7GeEA">
+ <methods xmi:id="_7nKkcQzsEd-pgpX7a7GeEA" name="header" patternFilePath="templates/pattern._7nKkcAzsEd-pgpX7a7GeEA/method._7nKkcQzsEd-pgpX7a7GeEA.pt"/>
+ <methods xmi:id="_7nKkcgzsEd-pgpX7a7GeEA" name="init" patternFilePath="templates/pattern._7nKkcAzsEd-pgpX7a7GeEA/method._7nKkcgzsEd-pgpX7a7GeEA.pt"/>
+ <methods xmi:id="_7nKkcwzsEd-pgpX7a7GeEA" name="body" patternFilePath="templates/pattern._7nKkcAzsEd-pgpX7a7GeEA/method._7nKkcwzsEd-pgpX7a7GeEA.pt"/>
+ <methods xmi:id="_7nKkdAzsEd-pgpX7a7GeEA" name="footer" patternFilePath="templates/pattern._7nKkcAzsEd-pgpX7a7GeEA/method._7nKkdAzsEd-pgpX7a7GeEA.pt"/>
+ <methods xmi:id="_Z8MpMAztEd-pgpX7a7GeEA" name="SayHello" patternFilePath="templates/pattern._7nKkcAzsEd-pgpX7a7GeEA/method._Z8MpMAztEd-pgpX7a7GeEA.pt"/>
+ <methods xmi:id="_pn8JUAztEd-pgpX7a7GeEA" name="finish" patternFilePath="templates/pattern._7nKkcAzsEd-pgpX7a7GeEA/method._pn8JUAztEd-pgpX7a7GeEA.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_AZoGgAzwEd-sdvrVfWaxAw"
+ called="#_7nKkcwzsEd-pgpX7a7GeEA"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_7nKkdgzsEd-pgpX7a7GeEA"
+ name="JET"/>
+ </elements>
+ </libraries>
+ <libraries xmi:id="_u7JPsAzqEd-pgpX7a7GeEA" name="egf.uc1_3.pattern">
+ <elements xmi:type="pattern:Pattern" xmi:id="_AVTZcAzrEd-pgpX7a7GeEA" name="HelloWorld"
+ headerMethod="#_AVTZcQzrEd-pgpX7a7GeEA" footerMethod="#_AVTZdAzrEd-pgpX7a7GeEA"
+ superPattern="#_7nKkcAzsEd-pgpX7a7GeEA" initMethod="#_AVTZcgzrEd-pgpX7a7GeEA">
+ <methods xmi:id="_AVTZcQzrEd-pgpX7a7GeEA" name="header" patternFilePath="templates/pattern._AVTZcAzrEd-pgpX7a7GeEA/method._AVTZcQzrEd-pgpX7a7GeEA.pt"/>
+ <methods xmi:id="_AVTZcgzrEd-pgpX7a7GeEA" name="init" patternFilePath="templates/pattern._AVTZcAzrEd-pgpX7a7GeEA/method._AVTZcgzrEd-pgpX7a7GeEA.pt"/>
+ <methods xmi:id="_AVTZcwzrEd-pgpX7a7GeEA" name="body" patternFilePath="templates/pattern._AVTZcAzrEd-pgpX7a7GeEA/method._AVTZcwzrEd-pgpX7a7GeEA.pt"/>
+ <methods xmi:id="_AVTZdAzrEd-pgpX7a7GeEA" name="footer" patternFilePath="templates/pattern._AVTZcAzrEd-pgpX7a7GeEA/method._AVTZdAzrEd-pgpX7a7GeEA.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_mntSgAztEd-pgpX7a7GeEA"
+ called="#_Z8MpMAztEd-pgpX7a7GeEA"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_AVTZdQzrEd-pgpX7a7GeEA"
+ called="#_AVTZcwzrEd-pgpX7a7GeEA"/>
+ <orchestration xmi:type="pattern:PatternCall" xmi:id="_GsijsBS_Ed-vC8_4jSahBQ"
+ called="#_7-a0kAzxEd-sdvrVfWaxAw"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_RE74IAzuEd-pgpX7a7GeEA"
+ called="#_pn8JUAztEd-pgpX7a7GeEA"/>
+ <parameters xmi:id="_kqoMsAzrEd-pgpX7a7GeEA" name="aClass" type="http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_AVTZdgzrEd-pgpX7a7GeEA"
+ name="JET"/>
+ </elements>
+ </libraries>
+ <libraries xmi:id="_6Yy6kAzxEd-sdvrVfWaxAw" name="egf.uc1_3.pattern.friends">
+ <elements xmi:type="pattern:Pattern" xmi:id="_7-a0kAzxEd-sdvrVfWaxAw" name="HelloFriends"
+ headerMethod="#_7-a0kQzxEd-sdvrVfWaxAw" footerMethod="#_7-a0lAzxEd-sdvrVfWaxAw"
+ initMethod="#_7-a0kgzxEd-sdvrVfWaxAw">
+ <methods xmi:id="_7-a0kQzxEd-sdvrVfWaxAw" name="header" patternFilePath="templates/pattern._7-a0kAzxEd-sdvrVfWaxAw/method._7-a0kQzxEd-sdvrVfWaxAw.pt"/>
+ <methods xmi:id="_7-a0kgzxEd-sdvrVfWaxAw" name="init" patternFilePath="templates/pattern._7-a0kAzxEd-sdvrVfWaxAw/method._7-a0kgzxEd-sdvrVfWaxAw.pt"/>
+ <methods xmi:id="_7-a0kwzxEd-sdvrVfWaxAw" name="body" patternFilePath="templates/pattern._7-a0kAzxEd-sdvrVfWaxAw/method._7-a0kwzxEd-sdvrVfWaxAw.pt"/>
+ <methods xmi:id="_7-a0lAzxEd-sdvrVfWaxAw" name="footer" patternFilePath="templates/pattern._7-a0kAzxEd-sdvrVfWaxAw/method._7-a0lAzxEd-sdvrVfWaxAw.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_7-a0lQzxEd-sdvrVfWaxAw"
+ called="#_7-a0kwzxEd-sdvrVfWaxAw"/>
+ <parameters xmi:id="_AfpkEAzyEd-sdvrVfWaxAw" name="element" type="http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_7-a0lgzxEd-sdvrVfWaxAw"
+ name="JET"/>
+ </elements>
+ </libraries>
+ </viewpoints>
+ </viewpointContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_PhmkgAzrEd-pgpX7a7GeEA">
+ <invocations xmi:id="_QOdDcAzrEd-pgpX7a7GeEA" invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_8FZ3aof6eEd64XYPo3s6sPg">
+ <invocationContractContainer xmi:id="_rySNcBSiEd-7l5bHeOignA">
+ <invocationContracts xmi:id="_sHvgEBSiEd-7l5bHeOignA" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_DgB2IP6fEd64XaYPo3s6sPg">
+ <type xmi:type="domain:TypeDomainURI" xmi:id="_vdbCcBSiEd-7l5bHeOignA" domain="#_d6UL8AzqEd-pgpX7a7GeEA"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_y0S3oBSiEd-7l5bHeOignA" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_nz1HkSCaEd-Sse0r9LJWbA">
+ <type xmi:type="pattern:TypePatternList" xmi:id="_P2mBICH0Ed-V4KH4GeEy-w"
+ elements="#_u7JPsAzqEd-pgpX7a7GeEA"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_DOMzcBZSEd-MevBezRJS_g" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_L6JSwAHAEd-4faJMEplCjxw">
+ <type xmi:type="pattern:TypePatternExecutionReporter" xmi:id="_FHMVYBZSEd-MevBezRJS_g"
+ value="org.eclipse.egf.usecase.pattern.uc1.reporter.MyReporter"/>
+ </invocationContracts>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+</fcore:FactoryComponent>
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/egf/Pattern_UC1_4_Callback_StrategyBased.fcore b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/egf/Pattern_UC1_4_Callback_StrategyBased.fcore
new file mode 100644
index 0000000..b6beb3a
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/egf/Pattern_UC1_4_Callback_StrategyBased.fcore
@@ -0,0 +1,66 @@
+<?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="_oWQD0Be1Ed-DaY2uHNBaQg"
+ description=" " name="Pattern - UC1.4 - Callback with model-driven pattern strategy">
+ <viewpointContainer xmi:id="_xPNBgBe1Ed-DaY2uHNBaQg">
+ <viewpoints xmi:type="domain:DomainViewpoint" xmi:id="_0cnYsBe1Ed-DaY2uHNBaQg">
+ <domains xmi:type="domain:DomainURI" xmi:id="_00Tf8Be1Ed-DaY2uHNBaQg" uri="platform:/plugin/org.eclipse.egf.model/model/Fcore.ecore"/>
+ </viewpoints>
+ <viewpoints xmi:type="pattern:PatternViewpoint" xmi:id="_xx9JQBe1Ed-DaY2uHNBaQg">
+ <libraries xmi:id="_3xVRwBe1Ed-DaY2uHNBaQg" name="egf.uc1_4.pattern">
+ <elements xmi:type="pattern:Pattern" xmi:id="_8lp8YBe1Ed-DaY2uHNBaQg" name="ClassPattern"
+ headerMethod="#_8lp8YRe1Ed-DaY2uHNBaQg" footerMethod="#_8lp8ZBe1Ed-DaY2uHNBaQg"
+ initMethod="#_8lp8Yhe1Ed-DaY2uHNBaQg">
+ <methods xmi:id="_8lp8YRe1Ed-DaY2uHNBaQg" name="header" patternFilePath="templates/pattern._8lp8YBe1Ed-DaY2uHNBaQg/method._8lp8YRe1Ed-DaY2uHNBaQg.pt"/>
+ <methods xmi:id="_8lp8Yhe1Ed-DaY2uHNBaQg" name="init" patternFilePath="templates/pattern._8lp8YBe1Ed-DaY2uHNBaQg/method._8lp8Yhe1Ed-DaY2uHNBaQg.pt"/>
+ <methods xmi:id="_8lp8Yxe1Ed-DaY2uHNBaQg" name="body" patternFilePath="templates/pattern._8lp8YBe1Ed-DaY2uHNBaQg/method._8lp8Yxe1Ed-DaY2uHNBaQg.pt"/>
+ <methods xmi:id="_8lp8ZBe1Ed-DaY2uHNBaQg" name="footer" patternFilePath="templates/pattern._8lp8YBe1Ed-DaY2uHNBaQg/method._8lp8ZBe1Ed-DaY2uHNBaQg.pt"/>
+ <methods xmi:id="_CFlv0Be2Ed-DaY2uHNBaQg" name="before" patternFilePath="templates/pattern._8lp8YBe1Ed-DaY2uHNBaQg/method._CFlv0Be2Ed-DaY2uHNBaQg.pt"/>
+ <methods xmi:id="_Co-JsBe2Ed-DaY2uHNBaQg" name="after" patternFilePath="templates/pattern._8lp8YBe1Ed-DaY2uHNBaQg/method._Co-JsBe2Ed-DaY2uHNBaQg.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_DDx2YBe2Ed-DaY2uHNBaQg"
+ called="#_CFlv0Be2Ed-DaY2uHNBaQg"/>
+ <orchestration xmi:type="pattern:BackCall" xmi:id="_Aab1kBe2Ed-DaY2uHNBaQg"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_D7L_gBe2Ed-DaY2uHNBaQg"
+ called="#_Co-JsBe2Ed-DaY2uHNBaQg"/>
+ <parameters xmi:id="__I1q0Be1Ed-DaY2uHNBaQg" name="parameter" type="http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_8lp8Zhe1Ed-DaY2uHNBaQg"
+ name="JET"/>
+ <variables xmi:id="_4_tm0BreEd-cXtp4jDfJVg" name="_separator" type="java.lang.String"/>
+ </elements>
+ <elements xmi:type="pattern:Pattern" xmi:id="_QdrPsBe2Ed-DaY2uHNBaQg" name="AttributePattern"
+ headerMethod="#_QdrPsRe2Ed-DaY2uHNBaQg" footerMethod="#_Qdr2wBe2Ed-DaY2uHNBaQg"
+ initMethod="#_QdrPshe2Ed-DaY2uHNBaQg">
+ <methods xmi:id="_QdrPsRe2Ed-DaY2uHNBaQg" name="header" patternFilePath="templates/pattern._QdrPsBe2Ed-DaY2uHNBaQg/method._QdrPsRe2Ed-DaY2uHNBaQg.pt"/>
+ <methods xmi:id="_QdrPshe2Ed-DaY2uHNBaQg" name="init" patternFilePath="templates/pattern._QdrPsBe2Ed-DaY2uHNBaQg/method._QdrPshe2Ed-DaY2uHNBaQg.pt"/>
+ <methods xmi:id="_QdrPsxe2Ed-DaY2uHNBaQg" name="body" patternFilePath="templates/pattern._QdrPsBe2Ed-DaY2uHNBaQg/method._QdrPsxe2Ed-DaY2uHNBaQg.pt"/>
+ <methods xmi:id="_Qdr2wBe2Ed-DaY2uHNBaQg" name="footer" patternFilePath="templates/pattern._QdrPsBe2Ed-DaY2uHNBaQg/method._Qdr2wBe2Ed-DaY2uHNBaQg.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_TQ3JABe2Ed-DaY2uHNBaQg"
+ called="#_QdrPsxe2Ed-DaY2uHNBaQg"/>
+ <parameters xmi:id="_RwgwkBe2Ed-DaY2uHNBaQg" name="parameter" type="http://www.eclipse.org/emf/2002/Ecore#//EAttribute"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_Qdr2whe2Ed-DaY2uHNBaQg"
+ name="JET"/>
+ </elements>
+ </libraries>
+ </viewpoints>
+ </viewpointContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_1NdKUBe2Ed-DaY2uHNBaQg">
+ <invocations xmi:id="_1rvBwBe2Ed-DaY2uHNBaQg" invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_8FZ3aof6eEd64XYPo3s6sPg">
+ <invocationContractContainer xmi:id="_6N8osBe2Ed-DaY2uHNBaQg">
+ <invocationContracts xmi:id="_6qRYUBe2Ed-DaY2uHNBaQg" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_DgB2IP6fEd64XaYPo3s6sPg">
+ <type xmi:type="domain:TypeDomainURI" xmi:id="_7mr9QBe2Ed-DaY2uHNBaQg" domain="#_00Tf8Be1Ed-DaY2uHNBaQg"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_84eVQBe2Ed-DaY2uHNBaQg" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_nz1HkSCaEd-Sse0r9LJWbA">
+ <type xmi:type="pattern:TypePatternList" xmi:id="_XYrSgCH0Ed-V4KH4GeEy-w"
+ elements="#_3xVRwBe1Ed-DaY2uHNBaQg"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_QA7g8BfEEd-JToveUSgqRw" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_L6JSwAHAEd-4faJMEplCjxw">
+ <type xmi:type="pattern:TypePatternExecutionReporter" xmi:id="_SuO0sBfEEd-JToveUSgqRw"
+ value="org.eclipse.egf.usecase.pattern.uc1.reporter.MyReporter"/>
+ </invocationContracts>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+</fcore:FactoryComponent>
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/egf/Pattern_UC1_5_Callback_WithJavaClass.fcore b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/egf/Pattern_UC1_5_Callback_WithJavaClass.fcore
new file mode 100644
index 0000000..ed6eb52
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/egf/Pattern_UC1_5_Callback_WithJavaClass.fcore
@@ -0,0 +1,51 @@
+<?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="_1di_UBe3Ed-DaY2uHNBaQg"
+ description=" " name="Pattern - UC1.5 - Callback With Java Class">
+ <viewpointContainer xmi:id="_9txwIBe3Ed-DaY2uHNBaQg">
+ <viewpoints xmi:type="domain:DomainViewpoint" xmi:id="_-IxqEBe3Ed-DaY2uHNBaQg">
+ <domains xmi:type="domain:DomainURI" xmi:id="_-qgeIBe3Ed-DaY2uHNBaQg" uri="platform:/plugin/org.eclipse.egf.model/model/Fcore.ecore"/>
+ </viewpoints>
+ <viewpoints xmi:type="pattern:PatternViewpoint" xmi:id="__hODsBe3Ed-DaY2uHNBaQg">
+ <libraries xmi:id="__6QOwBe3Ed-DaY2uHNBaQg" name="egf.uc1_5.pattern">
+ <elements xmi:type="pattern:Pattern" xmi:id="_MTvCABe6Ed-O0P2188kAmA" name="ClassPattern"
+ headerMethod="#_MTvCARe6Ed-O0P2188kAmA" footerMethod="#_MTvCBBe6Ed-O0P2188kAmA"
+ initMethod="#_MTvCAhe6Ed-O0P2188kAmA">
+ <methods xmi:id="_MTvCARe6Ed-O0P2188kAmA" name="header" patternFilePath="templates/pattern._MTvCABe6Ed-O0P2188kAmA/method._MTvCARe6Ed-O0P2188kAmA.pt"/>
+ <methods xmi:id="_MTvCAhe6Ed-O0P2188kAmA" name="init" patternFilePath="templates/pattern._MTvCABe6Ed-O0P2188kAmA/method._MTvCAhe6Ed-O0P2188kAmA.pt"/>
+ <methods xmi:id="_MTvCAxe6Ed-O0P2188kAmA" name="body" patternFilePath="templates/pattern._MTvCABe6Ed-O0P2188kAmA/method._MTvCAxe6Ed-O0P2188kAmA.pt"/>
+ <methods xmi:id="_MTvCBBe6Ed-O0P2188kAmA" name="footer" patternFilePath="templates/pattern._MTvCABe6Ed-O0P2188kAmA/method._MTvCBBe6Ed-O0P2188kAmA.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_PjAaYBe6Ed-O0P2188kAmA"
+ called="#_MTvCAxe6Ed-O0P2188kAmA"/>
+ <orchestration xmi:type="pattern:BackCall" xmi:id="_tdnQIRe-Ed-UBIek6Yqz4A"/>
+ <parameters xmi:id="_NzI_QBe6Ed-O0P2188kAmA" name="parameter" type="http://www.eclipse.org/emf/2002/Ecore#//EClass">
+ <query xmi:type="pattern:BasicQuery" xmi:id="_OdMo4Be6Ed-O0P2188kAmA"
+ extensionId="org.eclipse.egf.pattern.basic.query"/>
+ </parameters>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_MTvCBhe6Ed-O0P2188kAmA"
+ name="JET"/>
+ </elements>
+ </libraries>
+ </viewpoints>
+ </viewpointContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_DNfhIBe4Ed-DaY2uHNBaQg">
+ <invocations xmi:id="_DrZlIBe4Ed-DaY2uHNBaQg" invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.pattern.ftask/Pattern_task.fcore#_XVvo0Be4Ed-DaY2uHNBaQg">
+ <invocationContractContainer xmi:id="_GWMFgBe6Ed-O0P2188kAmA">
+ <invocationContracts xmi:id="_z4HVwBe7Ed-O0P2188kAmA" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Pattern_task.fcore#_4ngvABe5Ed-O0P2188kAmA">
+ <type xmi:type="domain:TypeDomainURI" xmi:id="_1B95wBe7Ed-O0P2188kAmA" domain="#_-qgeIBe3Ed-DaY2uHNBaQg"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_mT1mgBe9Ed-d2_ufnco5uw" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Pattern_task.fcore#_-wgGgBe5Ed-O0P2188kAmA">
+ <type xmi:type="pattern:TypePatternCallBackHandler" xmi:id="_nc6HYBe9Ed-d2_ufnco5uw"
+ value="org.eclipse.egf.usecase.pattern.uc1.callback.MyCallbackHandler"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_4ObAgCH0Ed-V4KH4GeEy-w" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Pattern_task.fcore#_tsP7UBe5Ed-O0P2188kAmA">
+ <type xmi:type="pattern:TypePatternList" xmi:id="_5M3lwCH0Ed-V4KH4GeEy-w"
+ elements="#__6QOwBe3Ed-DaY2uHNBaQg"/>
+ </invocationContracts>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+</fcore:FactoryComponent>
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/egf/Pattern_UC1_6_JetPatternCallsJavaPattern.fcore b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/egf/Pattern_UC1_6_JetPatternCallsJavaPattern.fcore
new file mode 100644
index 0000000..8141bec
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/egf/Pattern_UC1_6_JetPatternCallsJavaPattern.fcore
@@ -0,0 +1,66 @@
+<?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:javapattern="http://www.eclipse.org/egf/1.0.0/javapattern"
+ xmlns:jetpattern="http://www.eclipse.org/egf/1.0.0/jetpattern" xmlns:pattern="http://www.eclipse.org/egf/1.0.0/pattern" xmi:id="_a-kDcBfVEd-JToveUSgqRw"
+ description=" " name="Pattern - UC1.6 - Jet Pattern calls Java Pattern">
+ <viewpointContainer xmi:id="_cJEHsBfVEd-JToveUSgqRw">
+ <viewpoints xmi:type="domain:DomainViewpoint" xmi:id="_pEVR8BsPEd-zfYPlecBwGw">
+ <domains xmi:type="domain:DomainURI" xmi:id="_qZZAYBsPEd-zfYPlecBwGw" uri="platform:/plugin/org.eclipse.egf.model/model/Fcore.ecore"/>
+ </viewpoints>
+ <viewpoints xmi:type="pattern:PatternViewpoint" xmi:id="_cwG5kBfVEd-JToveUSgqRw">
+ <libraries xmi:id="_dH8x0BfVEd-JToveUSgqRw" name="egf.uc1_6.pattern">
+ <elements xmi:type="pattern:Pattern" xmi:id="_riKAEBrfEd-cXtp4jDfJVg" name="JetClassPattern"
+ headerMethod="#_riKAERrfEd-cXtp4jDfJVg" footerMethod="#_riKAFBrfEd-cXtp4jDfJVg"
+ initMethod="#_riKAEhrfEd-cXtp4jDfJVg">
+ <methods xmi:id="_riKAERrfEd-cXtp4jDfJVg" name="header" patternFilePath="templates/pattern._riKAEBrfEd-cXtp4jDfJVg/method._riKAERrfEd-cXtp4jDfJVg.pt"/>
+ <methods xmi:id="_riKAEhrfEd-cXtp4jDfJVg" name="init" patternFilePath="templates/pattern._riKAEBrfEd-cXtp4jDfJVg/method._riKAEhrfEd-cXtp4jDfJVg.pt"/>
+ <methods xmi:id="_riKAExrfEd-cXtp4jDfJVg" name="body" patternFilePath="templates/pattern._riKAEBrfEd-cXtp4jDfJVg/method._riKAExrfEd-cXtp4jDfJVg.pt"/>
+ <methods xmi:id="_riKAFBrfEd-cXtp4jDfJVg" name="footer" patternFilePath="templates/pattern._riKAEBrfEd-cXtp4jDfJVg/method._riKAFBrfEd-cXtp4jDfJVg.pt"/>
+ <orchestration xmi:type="pattern:SuperCall" xmi:id="_riKAFRrfEd-cXtp4jDfJVg"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_X5RfgBrgEd-cXtp4jDfJVg"
+ called="#_riKAExrfEd-cXtp4jDfJVg"/>
+ <orchestration xmi:type="pattern:PatternCall" xmi:id="_ACxHIRsREd-12t5rED-J2A"
+ called="#_iXOsIBrgEd-cXtp4jDfJVg"/>
+ <parameters xmi:id="_wKsRcBrfEd-cXtp4jDfJVg" name="aClass" type="http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_riKAFhrfEd-cXtp4jDfJVg"
+ name="JET"/>
+ </elements>
+ </libraries>
+ <libraries xmi:id="_N6RmURsNEd-zfYPlecBwGw" name="egf.uc1_6.pattern.java">
+ <elements xmi:type="pattern:Pattern" xmi:id="_iXOsIBrgEd-cXtp4jDfJVg" name="JavaPattern"
+ headerMethod="#_iXOsIRrgEd-cXtp4jDfJVg" footerMethod="#_iXOsJBrgEd-cXtp4jDfJVg"
+ initMethod="#_iXOsIhrgEd-cXtp4jDfJVg">
+ <methods xmi:id="_iXOsIRrgEd-cXtp4jDfJVg" name="header" patternFilePath="templates/pattern._iXOsIBrgEd-cXtp4jDfJVg/method._iXOsIRrgEd-cXtp4jDfJVg.pt"/>
+ <methods xmi:id="_iXOsIhrgEd-cXtp4jDfJVg" name="init" patternFilePath="templates/pattern._iXOsIBrgEd-cXtp4jDfJVg/method._iXOsIhrgEd-cXtp4jDfJVg.pt"/>
+ <methods xmi:id="_iXOsIxrgEd-cXtp4jDfJVg" name="body" patternFilePath="templates/pattern._iXOsIBrgEd-cXtp4jDfJVg/method._iXOsIxrgEd-cXtp4jDfJVg.pt"/>
+ <methods xmi:id="_iXOsJBrgEd-cXtp4jDfJVg" name="footer" patternFilePath="templates/pattern._iXOsIBrgEd-cXtp4jDfJVg/method._iXOsJBrgEd-cXtp4jDfJVg.pt"/>
+ <orchestration xmi:type="pattern:SuperCall" xmi:id="_iXOsJRrgEd-cXtp4jDfJVg"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_RyAJ0BrhEd-cXtp4jDfJVg"
+ called="#_iXOsIxrgEd-cXtp4jDfJVg"/>
+ <parameters xmi:id="_oHJcUBrgEd-cXtp4jDfJVg" name="aClass" type="http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+ <nature xmi:type="javapattern:JavaNature" xmi:id="_iXOsJhrgEd-cXtp4jDfJVg"
+ name="Java"/>
+ </elements>
+ </libraries>
+ </viewpoints>
+ </viewpointContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_kboBcBsPEd-zfYPlecBwGw">
+ <invocations xmi:id="_lCDvUBsPEd-zfYPlecBwGw" invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_8FZ3aof6eEd64XYPo3s6sPg">
+ <invocationContractContainer xmi:id="_mhh-ABsPEd-zfYPlecBwGw">
+ <invocationContracts xmi:id="_m5XPMBsPEd-zfYPlecBwGw" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_DgB2IP6fEd64XaYPo3s6sPg">
+ <type xmi:type="domain:TypeDomainURI" xmi:id="_u5AmUBsPEd-zfYPlecBwGw" domain="#_qZZAYBsPEd-zfYPlecBwGw"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_xglFgBsPEd-zfYPlecBwGw" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_L6JSwAHAEd-4faJMEplCjxw">
+ <type xmi:type="pattern:TypePatternExecutionReporter" xmi:id="_zniK8BsPEd-zfYPlecBwGw"
+ value="org.eclipse.egf.usecase.pattern.uc1.reporter.MyReporter"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_1e_b0BsPEd-zfYPlecBwGw" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_nz1HkSCaEd-Sse0r9LJWbA">
+ <type xmi:type="pattern:TypePatternList" xmi:id="_hwmdsCH2Ed-V4KH4GeEy-w"
+ elements="#_dH8x0BfVEd-JToveUSgqRw"/>
+ </invocationContracts>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+</fcore:FactoryComponent>
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/egf/Pattern_UC1_7_Injection.fcore b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/egf/Pattern_UC1_7_Injection.fcore
new file mode 100644
index 0000000..99cf467
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/egf/Pattern_UC1_7_Injection.fcore
@@ -0,0 +1,71 @@
+<?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="_zOU6cBVhEd-JoY-b5_Vpcw"
+ description=" " name="Pattern - UC1.7 - Pattern Injection">
+ <viewpointContainer xmi:id="_3WwIYBVhEd-JoY-b5_Vpcw">
+ <viewpoints xmi:type="domain:DomainViewpoint" xmi:id="_3wwj0BVhEd-JoY-b5_Vpcw">
+ <domains xmi:type="domain:DomainURI" xmi:id="_6_29EBVhEd-JoY-b5_Vpcw" uri="platform:/plugin/org.eclipse.egf.model/model/Fcore.ecore"/>
+ </viewpoints>
+ <viewpoints xmi:type="pattern:PatternViewpoint" xmi:id="_PfGBYBViEd-JoY-b5_Vpcw">
+ <libraries xmi:id="_USCzABViEd-JoY-b5_Vpcw" name="egf.uc1_7.pattern">
+ <elements xmi:type="pattern:Pattern" xmi:id="_YVbI4BViEd-JoY-b5_Vpcw" name="ClassPattern"
+ headerMethod="#_YVbI4RViEd-JoY-b5_Vpcw" footerMethod="#_YVbv8hViEd-JoY-b5_Vpcw"
+ initMethod="#_YVbv8BViEd-JoY-b5_Vpcw">
+ <methods xmi:id="_YVbI4RViEd-JoY-b5_Vpcw" name="header" patternFilePath="templates/pattern._YVbI4BViEd-JoY-b5_Vpcw/method._YVbI4RViEd-JoY-b5_Vpcw.pt"/>
+ <methods xmi:id="_YVbv8BViEd-JoY-b5_Vpcw" name="init" patternFilePath="templates/pattern._YVbI4BViEd-JoY-b5_Vpcw/method._YVbv8BViEd-JoY-b5_Vpcw.pt"/>
+ <methods xmi:id="_YVbv8RViEd-JoY-b5_Vpcw" name="body" patternFilePath="templates/pattern._YVbI4BViEd-JoY-b5_Vpcw/method._YVbv8RViEd-JoY-b5_Vpcw.pt"/>
+ <methods xmi:id="_YVbv8hViEd-JoY-b5_Vpcw" name="footer" patternFilePath="templates/pattern._YVbI4BViEd-JoY-b5_Vpcw/method._YVbv8hViEd-JoY-b5_Vpcw.pt"/>
+ <methods xmi:id="_AZL8wBVjEd-JoY-b5_Vpcw" name="setupVariable" patternFilePath="templates/pattern._YVbI4BViEd-JoY-b5_Vpcw/method._AZL8wBVjEd-JoY-b5_Vpcw.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_6PWhoBVrEd-RrYzGJdxTDA"
+ called="#_YVbv8RViEd-JoY-b5_Vpcw"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_Mal08BVqEd-Ay7SQYKAR7g"
+ called="#_AZL8wBVjEd-JoY-b5_Vpcw"/>
+ <orchestration xmi:type="pattern:PatternInjectedCall" xmi:id="_eGpgoBViEd-JoY-b5_Vpcw"
+ called="#_RdSMYBViEd-JoY-b5_Vpcw" context="#_cXiTcBViEd-JoY-b5_Vpcw"/>
+ <parameters xmi:id="_Z8X4kBViEd-JoY-b5_Vpcw" name="parameter" type="http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_YVbv9BViEd-JoY-b5_Vpcw"
+ name="JET"/>
+ <variables xmi:id="_cXiTcBViEd-JoY-b5_Vpcw" name="variable" type="http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+ </elements>
+ </libraries>
+ <libraries xmi:id="_P7tE4BViEd-JoY-b5_Vpcw" name="egf.uc1_7.pattern.forInjection">
+ <elements xmi:type="pattern:Pattern" xmi:id="_RdSMYBViEd-JoY-b5_Vpcw" description="display content of element"
+ name="ForInjectionPattern" headerMethod="#_RdSMYRViEd-JoY-b5_Vpcw" footerMethod="#_RdSzcRViEd-JoY-b5_Vpcw"
+ initMethod="#_RdSMYhViEd-JoY-b5_Vpcw">
+ <methods xmi:id="_RdSMYRViEd-JoY-b5_Vpcw" name="header" patternFilePath="templates/pattern._RdSMYBViEd-JoY-b5_Vpcw/method._RdSMYRViEd-JoY-b5_Vpcw.pt"/>
+ <methods xmi:id="_RdSMYhViEd-JoY-b5_Vpcw" name="init" patternFilePath="templates/pattern._RdSMYBViEd-JoY-b5_Vpcw/method._RdSMYhViEd-JoY-b5_Vpcw.pt"/>
+ <methods xmi:id="_RdSzcBViEd-JoY-b5_Vpcw" name="body" patternFilePath="templates/pattern._RdSMYBViEd-JoY-b5_Vpcw/method._RdSzcBViEd-JoY-b5_Vpcw.pt"/>
+ <methods xmi:id="_RdSzcRViEd-JoY-b5_Vpcw" name="footer" patternFilePath="templates/pattern._RdSMYBViEd-JoY-b5_Vpcw/method._RdSzcRViEd-JoY-b5_Vpcw.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_rD0LkBVrEd-RrYzGJdxTDA"
+ called="#_RdSzcBViEd-JoY-b5_Vpcw"/>
+ <parameters xmi:id="_34yzkBVjEd-JoY-b5_Vpcw" name="parameter" type="http://www.eclipse.org/emf/2002/Ecore#//ENamedElement">
+ <query xmi:type="pattern:BasicQuery" xmi:id="_u33MURVoEd-Ay7SQYKAR7g"
+ extensionId="org.eclipse.egf.pattern.query.EObjectInjectedContextQuery"/>
+ </parameters>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_RdSzcxViEd-JoY-b5_Vpcw"
+ name="JET"/>
+ </elements>
+ </libraries>
+ </viewpoints>
+ </viewpointContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_Y4t_ABVpEd-Ay7SQYKAR7g">
+ <invocations xmi:id="_ZMsD4BVpEd-Ay7SQYKAR7g" invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_8FZ3aof6eEd64XYPo3s6sPg">
+ <invocationContractContainer xmi:id="_a914cBVpEd-Ay7SQYKAR7g">
+ <invocationContracts xmi:id="_bOUkcBVpEd-Ay7SQYKAR7g" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_DgB2IP6fEd64XaYPo3s6sPg">
+ <type xmi:type="domain:TypeDomainURI" xmi:id="_dypiYBVpEd-Ay7SQYKAR7g" domain="#_6_29EBVhEd-JoY-b5_Vpcw"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_giDu8BVpEd-Ay7SQYKAR7g" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_nz1HkSCaEd-Sse0r9LJWbA">
+ <type xmi:type="pattern:TypePatternList" xmi:id="_ooBogCH2Ed-V4KH4GeEy-w"
+ elements="#_USCzABViEd-JoY-b5_Vpcw"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_tmYKoBb6Ed-yIvdzb4Km2Q" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_L6JSwAHAEd-4faJMEplCjxw">
+ <type xmi:type="pattern:TypePatternExecutionReporter" xmi:id="_viNlMBb6Ed-yIvdzb4Km2Q"
+ value="org.eclipse.egf.usecase.pattern.uc1.reporter.MyReporter"/>
+ </invocationContracts>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+</fcore:FactoryComponent>
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_1/pattern/classPattern.java b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_1/pattern/classPattern.java
new file mode 100644
index 0000000..043ca2a
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_1/pattern/classPattern.java
@@ -0,0 +1,94 @@
+package egf.uc1_1.pattern;
+
+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 classPattern
+{
+ protected static String nl;
+ public static synchronized classPattern create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ classPattern result = new classPattern();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = NL + "- Hello ";
+ protected final String TEXT_2 = " Class";
+ protected final String TEXT_3 = NL;
+ protected final String TEXT_4 = NL;
+
+ public 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 index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+
+method_body(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+if (ictx.useReporter()){
+ ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));
+ Map<String, Object> parameterValues = new HashMap<String, Object>();
+ parameterValues.put("aClass", this.aClass);
+ ictx.getReporter().loopFinished(loop, 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;
+}
+
+ 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/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_1/pattern/myPattern.java b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_1/pattern/myPattern.java
new file mode 100644
index 0000000..a021aa6
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_1/pattern/myPattern.java
@@ -0,0 +1,94 @@
+package egf.uc1_1.pattern;
+
+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 myPattern
+{
+ protected static String nl;
+ public static synchronized myPattern create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ myPattern result = new myPattern();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = NL + " - ";
+ protected final String TEXT_2 = " attribute";
+ protected final String TEXT_3 = NL;
+ protected final String TEXT_4 = NL;
+
+ public myPattern()
+ {
+ //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 index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+
+method_body(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+if (ictx.useReporter()){
+ ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));
+ Map<String, Object> parameterValues = new HashMap<String, Object>();
+ parameterValues.put("anAttribute", this.anAttribute);
+ ictx.getReporter().loopFinished(loop, 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;
+}
+
+ 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/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_2/pattern/ClassPattern.java b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_2/pattern/ClassPattern.java
new file mode 100644
index 0000000..54e1e42
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_2/pattern/ClassPattern.java
@@ -0,0 +1,92 @@
+package egf.uc1_2.pattern;
+
+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 ClassPattern extends egf.uc1_2.pattern.parent.ParentPattern {
+ protected static String nl;
+ public static synchronized ClassPattern create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ ClassPattern result = new ClassPattern();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = " and me: ";
+ protected final String TEXT_2 = NL;
+ protected final String TEXT_3 = NL;
+
+ public 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> parameterList = null;
+//this pattern can only be called by another (i.e. it's not an entry point in execution)
+
+
+for (Object parameterParameter : parameterList ) {
+
+this.parameter = (org.eclipse.emf.ecore.EClass)parameterParameter;
+
+
+ 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 index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+ super.orchestration(new SuperOrchestrationContext(ictx));
+
+
+method_body(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+if (ictx.useReporter()){
+ ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));
+ Map<String, Object> parameterValues = new HashMap<String, Object>();
+ parameterValues.put("parameter", this.parameter);
+ ictx.getReporter().loopFinished(loop, ictx, parameterValues);
+ ictx.clearBuffer();}
+return loop;
+}
+
+protected org.eclipse.emf.ecore.EClass parameter = null;
+public void set_parameter(org.eclipse.emf.ecore.EClass object) {
+this.parameter = object;
+}
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append(parameter.getName());
+ }
+ }
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_2/pattern/parent/ParentPattern.java b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_2/pattern/parent/ParentPattern.java
new file mode 100644
index 0000000..4590247
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_2/pattern/parent/ParentPattern.java
@@ -0,0 +1,79 @@
+package egf.uc1_2.pattern.parent;
+
+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 ParentPattern
+{
+ protected static String nl;
+ public static synchronized ParentPattern create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ ParentPattern result = new ParentPattern();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "//default content";
+ protected final String TEXT_2 = NL + "Hello ";
+ protected final String TEXT_3 = " from my parent";
+ protected final String TEXT_4 = NL;
+ protected final String TEXT_5 = NL;
+
+ public ParentPattern()
+ {
+ //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;
+
+ orchestration(ctx);
+ if (ctx.useReporter()){
+ ctx.getReporter().executionFinished(ctx.getExecutionBuffer().toString(), ctx);
+ ctx.clearBuffer();}
+
+ stringBuffer.append(TEXT_4);
+ stringBuffer.append(TEXT_5);
+ return stringBuffer.toString();
+ }
+public String orchestration(PatternContext ctx) throws Exception {
+InternalPatternContext ictx = (InternalPatternContext)ctx;
+int index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_sayHello(ictx.getBuffer(), ictx);
+
+method_sayFromParent(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+return loop;
+}
+
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ }
+ protected void method_sayHello(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_2);
+ }
+ protected void method_sayFromParent(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_3);
+ }
+ }
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_3/pattern/HelloWorld.java b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_3/pattern/HelloWorld.java
new file mode 100644
index 0000000..1957df6
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_3/pattern/HelloWorld.java
@@ -0,0 +1,101 @@
+package egf.uc1_3.pattern;
+
+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 HelloWorld extends egf.uc1_3.pattern.parent.Hello {
+ protected static String nl;
+ public static synchronized HelloWorld create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ HelloWorld result = new HelloWorld();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = " ";
+ protected final String TEXT_2 = NL;
+ protected final String TEXT_3 = NL;
+
+ public HelloWorld()
+ {
+ //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_2);
+ stringBuffer.append(TEXT_3);
+ return stringBuffer.toString();
+ }
+public String orchestration(PatternContext ctx) throws Exception {
+InternalPatternContext ictx = (InternalPatternContext)ctx;
+int index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_SayHello(ictx.getBuffer(), ictx);
+
+method_body(ictx.getBuffer(), ictx);
+ {
+final Map<String, Object> parameters = new HashMap<String, Object>();
+parameters.put("element", this.aClass);
+ExecutionContext ctx__0DfRACheEdIK9TtNUJzqw = new ExecutionContext(ictx);
+CallHelper.executeWithInjection("_7-a0kAzxEd-sdvrVfWaxAw", ctx__0DfRACheEdIK9TtNUJzqw, parameters);
+}
+
+
+method_finish(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+if (ictx.useReporter()){
+ ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));
+ Map<String, Object> parameterValues = new HashMap<String, Object>();
+ parameterValues.put("aClass", this.aClass);
+ ictx.getReporter().loopFinished(loop, 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;
+}
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append( aClass.getName() );
+ }
+ }
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_3/pattern/friends/HelloFriends.java b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_3/pattern/friends/HelloFriends.java
new file mode 100644
index 0000000..f57d3e9
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_3/pattern/friends/HelloFriends.java
@@ -0,0 +1,91 @@
+package egf.uc1_3.pattern.friends;
+
+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 HelloFriends
+{
+ protected static String nl;
+ public static synchronized HelloFriends create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ HelloFriends result = new HelloFriends();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = ", and all friends of ";
+ protected final String TEXT_2 = NL;
+ protected final String TEXT_3 = NL;
+
+ public HelloFriends()
+ {
+ //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> elementList = null;
+//this pattern can only be called by another (i.e. it's not an entry point in execution)
+
+
+for (Object elementParameter : elementList ) {
+
+this.element = (org.eclipse.emf.ecore.EClass)elementParameter;
+
+
+ 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 index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_body(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+if (ictx.useReporter()){
+ ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));
+ Map<String, Object> parameterValues = new HashMap<String, Object>();
+ parameterValues.put("element", this.element);
+ ictx.getReporter().loopFinished(loop, ictx, parameterValues);
+ ictx.clearBuffer();}
+return loop;
+}
+
+protected org.eclipse.emf.ecore.EClass element = null;
+public void set_element(org.eclipse.emf.ecore.EClass object) {
+this.element = object;
+}
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append( element.getName() );
+ }
+ }
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_3/pattern/parent/Hello.java b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_3/pattern/parent/Hello.java
new file mode 100644
index 0000000..6e764ba
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_3/pattern/parent/Hello.java
@@ -0,0 +1,77 @@
+package egf.uc1_3.pattern.parent;
+
+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 Hello
+{
+ protected static String nl;
+ public static synchronized Hello create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ Hello result = new Hello();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "//default content";
+ protected final String TEXT_2 = NL + "Hello";
+ protected final String TEXT_3 = "!";
+ protected final String TEXT_4 = NL;
+ protected final String TEXT_5 = NL;
+
+ public Hello()
+ {
+ //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;
+
+ orchestration(ctx);
+ if (ctx.useReporter()){
+ ctx.getReporter().executionFinished(ctx.getExecutionBuffer().toString(), ctx);
+ ctx.clearBuffer();}
+
+ stringBuffer.append(TEXT_4);
+ stringBuffer.append(TEXT_5);
+ return stringBuffer.toString();
+ }
+public String orchestration(PatternContext ctx) throws Exception {
+InternalPatternContext ictx = (InternalPatternContext)ctx;
+int index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_body(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+return loop;
+}
+
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ }
+ protected void method_SayHello(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_2);
+ }
+ protected void method_finish(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_3);
+ }
+ }
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_4/pattern/AttributePattern.java b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_4/pattern/AttributePattern.java
new file mode 100644
index 0000000..025f78b
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_4/pattern/AttributePattern.java
@@ -0,0 +1,98 @@
+package egf.uc1_4.pattern;
+
+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.*;
+import org.eclipse.egf.usecase.pattern.uc1.helper.*;
+
+public class AttributePattern
+{
+ protected static String nl;
+ public static synchronized AttributePattern create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ AttributePattern result = new AttributePattern();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "\t[Attribute '";
+ protected final String TEXT_2 = "'] ";
+ protected final String TEXT_3 = NL;
+ protected final String TEXT_4 = NL;
+ protected final String TEXT_5 = NL;
+
+ public 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> parameterList = null;
+//this pattern can only be called by another (i.e. it's not an entry point in execution)
+
+
+for (Object parameterParameter : parameterList ) {
+
+this.parameter = (org.eclipse.emf.ecore.EAttribute)parameterParameter;
+
+
+ orchestration(ctx);
+
+}
+if (ctx.useReporter()){
+ ctx.getReporter().executionFinished(ctx.getExecutionBuffer().toString(), ctx);
+ ctx.clearBuffer();
+}
+
+ stringBuffer.append(TEXT_4);
+ stringBuffer.append(TEXT_5);
+ return stringBuffer.toString();
+ }
+public String orchestration(PatternContext ctx) throws Exception {
+InternalPatternContext ictx = (InternalPatternContext)ctx;
+int index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_body(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+if (ictx.useReporter()){
+ ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));
+ Map<String, Object> parameterValues = new HashMap<String, Object>();
+ parameterValues.put("parameter", this.parameter);
+ ictx.getReporter().loopFinished(loop, ictx, parameterValues);
+ ictx.clearBuffer();}
+return loop;
+}
+
+protected org.eclipse.emf.ecore.EAttribute parameter = null;
+public void set_parameter(org.eclipse.emf.ecore.EAttribute object) {
+this.parameter = object;
+}
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append(parameter.getName());
+ stringBuffer.append(TEXT_2);
+ MyHelper.incCounter (ctx);
+ stringBuffer.append(TEXT_3);
+ }
+ }
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_4/pattern/ClassPattern.java b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_4/pattern/ClassPattern.java
new file mode 100644
index 0000000..0429c74
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_4/pattern/ClassPattern.java
@@ -0,0 +1,132 @@
+package egf.uc1_4.pattern;
+
+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.*;
+import org.eclipse.egf.usecase.pattern.uc1.helper.*;
+
+public class ClassPattern
+{
+ protected static String nl;
+ public static synchronized ClassPattern create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ ClassPattern result = new ClassPattern();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "//default content";
+ protected final String TEXT_2 = NL;
+ protected final String TEXT_3 = NL + "[Begin. ";
+ protected final String TEXT_4 = "]" + NL;
+ protected final String TEXT_5 = "\t=> ";
+ protected final String TEXT_6 = " attribute(s)" + NL + "[End. ";
+ protected final String TEXT_7 = "]" + NL;
+ protected final String TEXT_8 = NL;
+ protected final String TEXT_9 = NL;
+
+ public ClassPattern()
+ {
+ //Here is the constructor
+StringBuffer stringBuffer = new StringBuffer();
+
+
+ _separator = "'";
+
+
+ }
+
+ 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> parameterList = null;
+//this pattern can only be called by another (i.e. it's not an entry point in execution)
+
+
+for (Object parameterParameter : parameterList ) {
+
+this.parameter = (org.eclipse.emf.ecore.EClass)parameterParameter;
+
+
+ orchestration(ctx);
+
+}
+if (ctx.useReporter()){
+ ctx.getReporter().executionFinished(ctx.getExecutionBuffer().toString(), ctx);
+ ctx.clearBuffer();
+}
+
+ stringBuffer.append(TEXT_8);
+ stringBuffer.append(TEXT_9);
+ return stringBuffer.toString();
+ }
+public String orchestration(PatternContext ctx) throws Exception {
+InternalPatternContext ictx = (InternalPatternContext)ctx;
+int index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_before(ictx.getBuffer(), ictx);
+ {
+final Map<String, Object> parameters = new HashMap<String, Object>();
+index = ictx.getBuffer().length();
+ictx.getExecutionBuffer().append(ictx.getBuffer());
+parameters.put("parameter", this.parameter);
+CallbackContext ctx_callback = new CallbackContext(ictx);
+CallHelper.callBack(ctx_callback, parameters);
+}
+
+
+method_after(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+if (ictx.useReporter()){
+ ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));
+ Map<String, Object> parameterValues = new HashMap<String, Object>();
+ parameterValues.put("parameter", this.parameter);
+ ictx.getReporter().loopFinished(loop, ictx, parameterValues);
+ ictx.clearBuffer();}
+return loop;
+}
+
+protected java.lang.String _separator = null;
+protected org.eclipse.emf.ecore.EClass parameter = null;
+public void set_parameter(org.eclipse.emf.ecore.EClass object) {
+this.parameter = object;
+}
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ }
+ protected void method_before(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_2);
+ MyHelper.resetCounter (ctx);
+ stringBuffer.append(TEXT_3);
+ stringBuffer.append( _separator );
+ stringBuffer.append(parameter.getName());
+ stringBuffer.append( _separator );
+ stringBuffer.append(TEXT_4);
+ }
+ protected void method_after(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_5);
+ stringBuffer.append( MyHelper.getCounter (ctx) );
+ stringBuffer.append(TEXT_6);
+ stringBuffer.append( _separator );
+ stringBuffer.append(parameter.getName());
+ stringBuffer.append( _separator );
+ stringBuffer.append(TEXT_7);
+ }
+ }
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_5/pattern/ClassPattern.java b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_5/pattern/ClassPattern.java
new file mode 100644
index 0000000..5d2d7d4
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_5/pattern/ClassPattern.java
@@ -0,0 +1,101 @@
+package egf.uc1_5.pattern;
+
+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 ClassPattern
+{
+ protected static String nl;
+ public static synchronized ClassPattern create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ ClassPattern result = new ClassPattern();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "";
+ protected final String TEXT_2 = NL;
+ protected final String TEXT_3 = NL;
+
+ public 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;
+
+
+paramDesc = new IQuery.ParameterDescription("parameter", "http://www.eclipse.org/emf/2002/Ecore#//EClass");
+queryCtx = new HashMap<String, String>();
+List<Object> parameterList = QueryHelper.load(ctx, "org.eclipse.egf.pattern.basic.query").execute(paramDesc, queryCtx, ctx);
+
+
+for (Object parameterParameter : parameterList ) {
+
+this.parameter = (org.eclipse.emf.ecore.EClass)parameterParameter;
+
+
+ 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 index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_body(ictx.getBuffer(), ictx);
+ {
+final Map<String, Object> parameters = new HashMap<String, Object>();
+index = ictx.getBuffer().length();
+ictx.getExecutionBuffer().append(ictx.getBuffer());
+parameters.put("parameter", this.parameter);
+CallbackContext ctx_callback = new CallbackContext(ictx);
+CallHelper.callBack(ctx_callback, parameters);
+}
+
+
+String loop = ictx.getBuffer().toString();
+if (ictx.useReporter()){
+ ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));
+ Map<String, Object> parameterValues = new HashMap<String, Object>();
+ parameterValues.put("parameter", this.parameter);
+ ictx.getReporter().loopFinished(loop, ictx, parameterValues);
+ ictx.clearBuffer();}
+return loop;
+}
+
+protected org.eclipse.emf.ecore.EClass parameter = null;
+public void set_parameter(org.eclipse.emf.ecore.EClass object) {
+this.parameter = object;
+}
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append(parameter.getName());
+ }
+ }
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_6/pattern/JetClassPattern.java b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_6/pattern/JetClassPattern.java
new file mode 100644
index 0000000..ec0fe32
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_6/pattern/JetClassPattern.java
@@ -0,0 +1,99 @@
+package egf.uc1_6.pattern;
+
+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 JetClassPattern
+{
+ protected static String nl;
+ public static synchronized JetClassPattern create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ JetClassPattern result = new JetClassPattern();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "- Jet: ";
+ protected final String TEXT_2 = NL;
+ protected final String TEXT_3 = NL;
+
+ public JetClassPattern()
+ {
+ //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_2);
+ stringBuffer.append(TEXT_3);
+ return stringBuffer.toString();
+ }
+public String orchestration(PatternContext ctx) throws Exception {
+InternalPatternContext ictx = (InternalPatternContext)ctx;
+int index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+
+method_body(ictx.getBuffer(), ictx);
+ {
+final Map<String, Object> parameters = new HashMap<String, Object>();
+parameters.put("aClass", this.aClass);
+ExecutionContext ctx__0CHYACheEdIK9TtNUJzqw = new ExecutionContext(ictx);
+CallHelper.executeWithInjection("_iXOsIBrgEd-cXtp4jDfJVg", ctx__0CHYACheEdIK9TtNUJzqw, parameters);
+}
+
+
+String loop = ictx.getBuffer().toString();
+if (ictx.useReporter()){
+ ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));
+ Map<String, Object> parameterValues = new HashMap<String, Object>();
+ parameterValues.put("aClass", this.aClass);
+ ictx.getReporter().loopFinished(loop, 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;
+}
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append( aClass.getName () );
+ }
+ }
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_6/pattern/java/JavaPattern.java b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_6/pattern/java/JavaPattern.java
new file mode 100644
index 0000000..33da535
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_6/pattern/java/JavaPattern.java
@@ -0,0 +1,70 @@
+package egf.uc1_6.pattern.java;
+
+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.*;
+import org.eclipse.egf.core.EGFCorePlugin;
+
+public class JavaPattern {
+
+ public JavaPattern() {
+ //Here is the constructor
+// add initialisation of the pattern variables (declaration has been already done).
+ }
+
+
+
+public void generate (Object argument) throws Exception {
+InternalPatternContext ctx = (InternalPatternContext)argument;
+IQuery.ParameterDescription paramDesc = null;
+Map<String, String> queryCtx = 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((PatternContext)argument);
+}
+if (ctx.useReporter()){
+ ctx.getReporter().executionFinished(ctx.getExecutionBuffer().toString(), ctx);
+ ctx.clearBuffer();}
+}
+
+public String orchestration(PatternContext ctx) throws Exception {
+InternalPatternContext ictx = (InternalPatternContext)ctx;
+int index = 0, executionIndex = ictx.getExecutionBuffer().length();
+method_body(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+if (ictx.useReporter()){
+ ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));
+Map<String, Object> parameterValues = new HashMap<String, Object>();
+parameterValues.put("aClass", this.aClass);
+ ictx.getReporter().loopFinished(loop, ictx, parameterValues);
+ictx.clearBuffer();}
+return loop;
+}
+
+protected void method_body(final StringBuffer out, final PatternContext ctx)throws Exception
+{
+
+ // Message on the default console
+ System.out.println("Java: " + aClass.getName()); //$NON-NLS-1$
+
+ // Message on the EGF console
+ EGFCorePlugin.getDefault().logInfo("Java: " + aClass.getName());
+
+}
+
+private org.eclipse.emf.ecore.EClass aClass;
+
+public void set_aClass(org.eclipse.emf.ecore.EClass aClass) {
+ this.aClass = aClass;
+}
+
+}
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_7/pattern/ClassPattern.java b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_7/pattern/ClassPattern.java
new file mode 100644
index 0000000..50d5285
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_7/pattern/ClassPattern.java
@@ -0,0 +1,107 @@
+package egf.uc1_7.pattern;
+
+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 ClassPattern
+{
+ protected static String nl;
+ public static synchronized ClassPattern create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ ClassPattern result = new ClassPattern();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = NL;
+ protected final String TEXT_2 = NL;
+ protected final String TEXT_3 = " contains:";
+ protected final String TEXT_4 = NL;
+ protected final String TEXT_5 = NL;
+
+ public 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> parameterList = null;
+//this pattern can only be called by another (i.e. it's not an entry point in execution)
+
+
+for (Object parameterParameter : parameterList ) {
+
+this.parameter = (org.eclipse.emf.ecore.EClass)parameterParameter;
+
+
+ orchestration(ctx);
+
+}
+if (ctx.useReporter()){
+ ctx.getReporter().executionFinished(ctx.getExecutionBuffer().toString(), ctx);
+ ctx.clearBuffer();
+}
+
+ stringBuffer.append(TEXT_4);
+ stringBuffer.append(TEXT_5);
+ return stringBuffer.toString();
+ }
+public String orchestration(PatternContext ctx) throws Exception {
+InternalPatternContext ictx = (InternalPatternContext)ctx;
+int index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_body(ictx.getBuffer(), ictx);
+
+method_setupVariable(ictx.getBuffer(), ictx);
+ ExecutionContext ctx__0EWMoCheEdIK9TtNUJzqw = new ExecutionContext(ictx);
+ctx__0EWMoCheEdIK9TtNUJzqw.setValue(PatternContext.INJECTED_CONTEXT, variable);
+CallHelper.execute("_RdSMYBViEd-JoY-b5_Vpcw", ctx__0EWMoCheEdIK9TtNUJzqw);
+
+
+
+String loop = ictx.getBuffer().toString();
+if (ictx.useReporter()){
+ ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));
+ Map<String, Object> parameterValues = new HashMap<String, Object>();
+ parameterValues.put("parameter", this.parameter);
+ ictx.getReporter().loopFinished(loop, ictx, parameterValues);
+ ictx.clearBuffer();}
+return loop;
+}
+
+protected org.eclipse.emf.ecore.EClass variable = null;
+protected org.eclipse.emf.ecore.EClass parameter = null;
+public void set_parameter(org.eclipse.emf.ecore.EClass object) {
+this.parameter = object;
+}
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append(TEXT_2);
+ stringBuffer.append(parameter.getName());
+ stringBuffer.append(TEXT_3);
+ }
+ protected void method_setupVariable(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ variable = parameter;
+ }
+ }
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_7/pattern/forInjection/ForInjectionPattern.java b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_7/pattern/forInjection/ForInjectionPattern.java
new file mode 100644
index 0000000..03f382d
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/generated/egf/uc1_7/pattern/forInjection/ForInjectionPattern.java
@@ -0,0 +1,95 @@
+package egf.uc1_7.pattern.forInjection;
+
+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 ForInjectionPattern
+{
+ protected static String nl;
+ public static synchronized ForInjectionPattern create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ ForInjectionPattern result = new ForInjectionPattern();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = NL + " - \"";
+ protected final String TEXT_2 = "\" ";
+ protected final String TEXT_3 = NL;
+ protected final String TEXT_4 = NL;
+
+ public ForInjectionPattern()
+ {
+ //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;
+
+
+paramDesc = new IQuery.ParameterDescription("parameter", "http://www.eclipse.org/emf/2002/Ecore#//ENamedElement");
+queryCtx = new HashMap<String, String>();
+List<Object> parameterList = QueryHelper.load(ctx, "org.eclipse.egf.pattern.query.EObjectInjectedContextQuery").execute(paramDesc, queryCtx, ctx);
+
+
+for (Object parameterParameter : parameterList ) {
+
+this.parameter = (org.eclipse.emf.ecore.ENamedElement)parameterParameter;
+
+
+ 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 index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_body(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+if (ictx.useReporter()){
+ ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));
+ Map<String, Object> parameterValues = new HashMap<String, Object>();
+ parameterValues.put("parameter", this.parameter);
+ ictx.getReporter().loopFinished(loop, ictx, parameterValues);
+ ictx.clearBuffer();}
+return loop;
+}
+
+protected org.eclipse.emf.ecore.ENamedElement parameter = null;
+public void set_parameter(org.eclipse.emf.ecore.ENamedElement object) {
+this.parameter = object;
+}
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append(parameter.getName());
+ stringBuffer.append(TEXT_2);
+ stringBuffer.append(parameter.getClass().getSimpleName());
+ }
+ }
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/plugin.properties b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/plugin.properties
new file mode 100644
index 0000000..41f2671
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/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 UC1 (Incubation)
+providerName=Eclipse Modeling Project
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/plugin.xml b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/plugin.xml
new file mode 100644
index 0000000..79add8f
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/plugin.xml
@@ -0,0 +1,55 @@
+<?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_UC1_0_AllTogether.fcore">
+ </fcore>
+ <fcore
+ id="egf/Pattern_UC1_1_ClassPattern.fcore">
+ </fcore>
+ <fcore
+ id="egf/Pattern_UC1_2_Inheritance.fcore">
+ </fcore>
+ <fcore
+ id="egf/Pattern_UC1_3_InheritanceAndCall.fcore">
+ </fcore>
+ <fcore
+ id="egf/Pattern_UC1_4_Callback_StrategyBased.fcore">
+ </fcore>
+ <fcore
+ id="egf/Pattern_UC1_5_Callback_WithJavaClass.fcore">
+ </fcore>
+ <fcore
+ id="egf/Pattern_UC1_6_JetPatternCallsJavaPattern.fcore">
+ </fcore>
+ <fcore
+ id="egf/Pattern_UC1_7_Injection.fcore">
+ </fcore>
+ </extension>
+ <extension
+ point="org.eclipse.egf.query">
+ <query
+ class="org.eclipse.egf.usecase.pattern.uc1.query.ContentQuery"
+ id="org.eclipse.egf.usecase.pattern.uc1.query1"
+ name="ContentQuery">
+ </query>
+ </extension>
+ <extension
+ point="org.eclipse.egf.core.test">
+ <EGFTestModel
+ modelPath="test/Pattern_UC1.test">
+ </EGFTestModel>
+ </extension>
+</plugin>
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/src/org/eclipse/egf/usecase/pattern/uc1/HelloWorld.java b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/src/org/eclipse/egf/usecase/pattern/uc1/HelloWorld.java
new file mode 100644
index 0000000..8b52925
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/src/org/eclipse/egf/usecase/pattern/uc1/HelloWorld.java
@@ -0,0 +1,51 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.usecase.pattern.uc1;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+import org.eclipse.egf.ftask.producer.invocation.ITaskProduction;
+
+/**
+ * @author Benoit Langlois
+ *
+ */
+
+public class HelloWorld implements ITaskProduction {
+
+ public void doExecute(ITaskProductionContext taskProductionContext, IProgressMonitor monitor) throws InvocationException {
+ String value = taskProductionContext.getInputValue("value", String.class); //$NON-NLS-1$
+ String outputMessage = new String("Hello " + value + "!"); //$NON-NLS-1$ //$NON-NLS-2$
+ // Message on the default console
+ System.out.println(outputMessage);
+ // Message on the EGF console
+ EGFCorePlugin.getDefault().logInfo(outputMessage);
+
+ }
+
+ public void postExecute(ITaskProductionContext taskProductionContext, IProgressMonitor monitor) throws InvocationException {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void preExecute(ITaskProductionContext taskProductionContext, IProgressMonitor monitor) throws InvocationException {
+ // TODO Auto-generated method stub
+
+ }
+
+}
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/src/org/eclipse/egf/usecase/pattern/uc1/callback/MyCallbackHandler.java b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/src/org/eclipse/egf/usecase/pattern/uc1/callback/MyCallbackHandler.java
new file mode 100644
index 0000000..9361014
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/src/org/eclipse/egf/usecase/pattern/uc1/callback/MyCallbackHandler.java
@@ -0,0 +1,44 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.usecase.pattern.uc1.callback;
+
+import java.util.Map;
+
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.model.pattern.CallBackHandler;
+import org.eclipse.egf.model.pattern.PatternContext;
+import org.eclipse.egf.model.pattern.PatternException;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class MyCallbackHandler implements CallBackHandler {
+
+ public void handleCall(PatternContext ctx, Map<String, Object> parameters) throws PatternException {
+ String message = "Callback on "; //$NON-NLS-1$
+ for (String name : parameters.keySet()) {
+ message += (name + " "); //$NON-NLS-1$
+ }
+
+ // Message on the default console
+ System.out.println(message);
+
+ // Message on the EGF console
+ EGFCorePlugin.getDefault().logInfo(message);
+ }
+
+}
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/src/org/eclipse/egf/usecase/pattern/uc1/helper/MyHelper.java b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/src/org/eclipse/egf/usecase/pattern/uc1/helper/MyHelper.java
new file mode 100644
index 0000000..71476b2
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/src/org/eclipse/egf/usecase/pattern/uc1/helper/MyHelper.java
@@ -0,0 +1,46 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.usecase.pattern.uc1.helper;
+
+import org.eclipse.egf.common.helper.ObjectHolder;
+import org.eclipse.egf.model.pattern.PatternContext;
+
+/**
+ * @author Benoit Langlois
+ */
+
+public class MyHelper {
+
+ private static final String KEY_COUNTER = "counter"; //$NON-NLS-1$
+
+ public static void resetCounter(PatternContext ctx) {
+ ObjectHolder<Integer> holder = new ObjectHolder<Integer>(new Integer(0));
+ ctx.setValue(KEY_COUNTER, holder);
+ }
+
+ @SuppressWarnings("unchecked")
+ public static void incCounter(PatternContext ctx) {
+ ObjectHolder<Integer> holder = (ObjectHolder<Integer>) ctx.getValue(KEY_COUNTER);
+ holder.object = new Integer(holder.object.intValue() + 1);
+ }
+
+ @SuppressWarnings("unchecked")
+ public static Integer getCounter(PatternContext ctx) {
+ ObjectHolder<Integer> holder = (ObjectHolder<Integer>) ctx.getValue(KEY_COUNTER);
+ return holder.object;
+ }
+
+}
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/src/org/eclipse/egf/usecase/pattern/uc1/query/ContentQuery.java b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/src/org/eclipse/egf/usecase/pattern/uc1/query/ContentQuery.java
new file mode 100644
index 0000000..c4bd0ec
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/src/org/eclipse/egf/usecase/pattern/uc1/query/ContentQuery.java
@@ -0,0 +1,60 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.usecase.pattern.uc1.query;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.egf.model.pattern.PatternContext;
+import org.eclipse.egf.pattern.Messages;
+import org.eclipse.egf.pattern.query.IQuery;
+import org.eclipse.egf.pattern.utils.ParameterTypeHelper;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.query.conditions.eobjects.EObjectTypeRelationCondition;
+import org.eclipse.emf.query.conditions.eobjects.TypeRelation;
+import org.eclipse.emf.query.statements.FROM;
+import org.eclipse.emf.query.statements.IQueryResult;
+import org.eclipse.emf.query.statements.SELECT;
+import org.eclipse.emf.query.statements.WHERE;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+
+public class ContentQuery implements IQuery {
+
+ public List<Object> execute(ParameterDescription parameter, Map<String, String> queryCtx, PatternContext context) {
+ String type = parameter.getType();
+ Object loadClass = ParameterTypeHelper.INSTANCE.loadClass(type);
+ if (!(loadClass instanceof EClass))
+ throw new IllegalStateException(Messages.query_error1);
+
+ Collection<EObject> domain = ((EObject) context.getValue(PatternContext.INJECTED_CONTEXT)).eContents();
+ if (domain == null)
+ throw new IllegalStateException(Messages.query_error8);
+
+ SELECT query = new SELECT(new FROM(domain), new WHERE(new EObjectTypeRelationCondition((EClass) loadClass, TypeRelation.SAMETYPE_OR_SUBTYPE_LITERAL)));
+ IQueryResult result = query.execute();
+ if (result.getException() != null)
+ throw new IllegalStateException(result.getException());
+ return new ArrayList<Object>(result.getEObjects());
+ }
+
+}
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/src/org/eclipse/egf/usecase/pattern/uc1/reporter/MyReporter.java b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/src/org/eclipse/egf/usecase/pattern/uc1/reporter/MyReporter.java
new file mode 100644
index 0000000..4b0ed25
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/src/org/eclipse/egf/usecase/pattern/uc1/reporter/MyReporter.java
@@ -0,0 +1,45 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.usecase.pattern.uc1.reporter;
+
+import java.util.Map;
+
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.model.pattern.PatternContext;
+import org.eclipse.egf.model.pattern.PatternExecutionReporter;
+
+/**
+ * @author Benoit Langlois
+ *
+ */
+
+public class MyReporter implements PatternExecutionReporter {
+
+ public void executionFinished(String output, PatternContext context) {
+ String message = new String("--------------\nResult of pattern:\n" + output); //$NON-NLS-1$
+
+ // Message on the default console
+ System.out.println(message);
+
+ // Message on the EGF console
+ EGFCorePlugin.getDefault().logInfo(message);
+ }
+
+ public void loopFinished(String output, PatternContext context, Map<String, Object> parameterValues) {
+ // TODO Auto-generated method stub
+ }
+
+}
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._7-a0kAzxEd-sdvrVfWaxAw/method._7-a0kQzxEd-sdvrVfWaxAw.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._7-a0kAzxEd-sdvrVfWaxAw/method._7-a0kQzxEd-sdvrVfWaxAw.pt
new file mode 100644
index 0000000..d315f10
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._7-a0kAzxEd-sdvrVfWaxAw/method._7-a0kQzxEd-sdvrVfWaxAw.pt
@@ -0,0 +1 @@
+<%@ jet package="egf.uc1_3.pattern.friends" class="HelloFriends" imports="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/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._7-a0kAzxEd-sdvrVfWaxAw/method._7-a0kgzxEd-sdvrVfWaxAw.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._7-a0kAzxEd-sdvrVfWaxAw/method._7-a0kgzxEd-sdvrVfWaxAw.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._7-a0kAzxEd-sdvrVfWaxAw/method._7-a0kgzxEd-sdvrVfWaxAw.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._7-a0kAzxEd-sdvrVfWaxAw/method._7-a0kwzxEd-sdvrVfWaxAw.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._7-a0kAzxEd-sdvrVfWaxAw/method._7-a0kwzxEd-sdvrVfWaxAw.pt
new file mode 100644
index 0000000..b38fc0b
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._7-a0kAzxEd-sdvrVfWaxAw/method._7-a0kwzxEd-sdvrVfWaxAw.pt
@@ -0,0 +1 @@
+, and all friends of <%= element.getName() %>
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._7-a0kAzxEd-sdvrVfWaxAw/method._7-a0lAzxEd-sdvrVfWaxAw.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._7-a0kAzxEd-sdvrVfWaxAw/method._7-a0lAzxEd-sdvrVfWaxAw.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._7-a0kAzxEd-sdvrVfWaxAw/method._7-a0lAzxEd-sdvrVfWaxAw.pt
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._7nKkcAzsEd-pgpX7a7GeEA/method._7nKkcQzsEd-pgpX7a7GeEA.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._7nKkcAzsEd-pgpX7a7GeEA/method._7nKkcQzsEd-pgpX7a7GeEA.pt
new file mode 100644
index 0000000..7265eba
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._7nKkcAzsEd-pgpX7a7GeEA/method._7nKkcQzsEd-pgpX7a7GeEA.pt
@@ -0,0 +1 @@
+<%@ jet package="egf.uc1_3.pattern.parent" class="Hello" imports="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/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._7nKkcAzsEd-pgpX7a7GeEA/method._7nKkcgzsEd-pgpX7a7GeEA.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._7nKkcAzsEd-pgpX7a7GeEA/method._7nKkcgzsEd-pgpX7a7GeEA.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._7nKkcAzsEd-pgpX7a7GeEA/method._7nKkcgzsEd-pgpX7a7GeEA.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._7nKkcAzsEd-pgpX7a7GeEA/method._7nKkcwzsEd-pgpX7a7GeEA.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._7nKkcAzsEd-pgpX7a7GeEA/method._7nKkcwzsEd-pgpX7a7GeEA.pt
new file mode 100644
index 0000000..8d16cca
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._7nKkcAzsEd-pgpX7a7GeEA/method._7nKkcwzsEd-pgpX7a7GeEA.pt
@@ -0,0 +1 @@
+//default content
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._7nKkcAzsEd-pgpX7a7GeEA/method._7nKkdAzsEd-pgpX7a7GeEA.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._7nKkcAzsEd-pgpX7a7GeEA/method._7nKkdAzsEd-pgpX7a7GeEA.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._7nKkcAzsEd-pgpX7a7GeEA/method._7nKkdAzsEd-pgpX7a7GeEA.pt
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._7nKkcAzsEd-pgpX7a7GeEA/method._Z8MpMAztEd-pgpX7a7GeEA.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._7nKkcAzsEd-pgpX7a7GeEA/method._Z8MpMAztEd-pgpX7a7GeEA.pt
new file mode 100644
index 0000000..5bbac73
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._7nKkcAzsEd-pgpX7a7GeEA/method._Z8MpMAztEd-pgpX7a7GeEA.pt
@@ -0,0 +1,2 @@
+
+Hello
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._7nKkcAzsEd-pgpX7a7GeEA/method._pn8JUAztEd-pgpX7a7GeEA.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._7nKkcAzsEd-pgpX7a7GeEA/method._pn8JUAztEd-pgpX7a7GeEA.pt
new file mode 100644
index 0000000..74e0f12
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._7nKkcAzsEd-pgpX7a7GeEA/method._pn8JUAztEd-pgpX7a7GeEA.pt
@@ -0,0 +1 @@
+!
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._8lp8YBe1Ed-DaY2uHNBaQg/method._8lp8YRe1Ed-DaY2uHNBaQg.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._8lp8YBe1Ed-DaY2uHNBaQg/method._8lp8YRe1Ed-DaY2uHNBaQg.pt
new file mode 100644
index 0000000..223daef
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._8lp8YBe1Ed-DaY2uHNBaQg/method._8lp8YRe1Ed-DaY2uHNBaQg.pt
@@ -0,0 +1 @@
+<%@ jet package="egf.uc1_4.pattern" class="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.* org.eclipse.egf.usecase.pattern.uc1.helper.*" %>
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._8lp8YBe1Ed-DaY2uHNBaQg/method._8lp8Yhe1Ed-DaY2uHNBaQg.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._8lp8YBe1Ed-DaY2uHNBaQg/method._8lp8Yhe1Ed-DaY2uHNBaQg.pt
new file mode 100644
index 0000000..e482171
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._8lp8YBe1Ed-DaY2uHNBaQg/method._8lp8Yhe1Ed-DaY2uHNBaQg.pt
@@ -0,0 +1,3 @@
+<%
+ _separator = "'";
+%>
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._8lp8YBe1Ed-DaY2uHNBaQg/method._8lp8Yxe1Ed-DaY2uHNBaQg.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._8lp8YBe1Ed-DaY2uHNBaQg/method._8lp8Yxe1Ed-DaY2uHNBaQg.pt
new file mode 100644
index 0000000..8d16cca
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._8lp8YBe1Ed-DaY2uHNBaQg/method._8lp8Yxe1Ed-DaY2uHNBaQg.pt
@@ -0,0 +1 @@
+//default content
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._8lp8YBe1Ed-DaY2uHNBaQg/method._8lp8ZBe1Ed-DaY2uHNBaQg.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._8lp8YBe1Ed-DaY2uHNBaQg/method._8lp8ZBe1Ed-DaY2uHNBaQg.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._8lp8YBe1Ed-DaY2uHNBaQg/method._8lp8ZBe1Ed-DaY2uHNBaQg.pt
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._8lp8YBe1Ed-DaY2uHNBaQg/method._CFlv0Be2Ed-DaY2uHNBaQg.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._8lp8YBe1Ed-DaY2uHNBaQg/method._CFlv0Be2Ed-DaY2uHNBaQg.pt
new file mode 100644
index 0000000..69027dc
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._8lp8YBe1Ed-DaY2uHNBaQg/method._CFlv0Be2Ed-DaY2uHNBaQg.pt
@@ -0,0 +1,5 @@
+
+
+<% MyHelper.resetCounter (ctx); %>
+[Begin. <%= _separator %><%=parameter.getName()%><%= _separator %>]
+
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._8lp8YBe1Ed-DaY2uHNBaQg/method._Co-JsBe2Ed-DaY2uHNBaQg.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._8lp8YBe1Ed-DaY2uHNBaQg/method._Co-JsBe2Ed-DaY2uHNBaQg.pt
new file mode 100644
index 0000000..2671bfd
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._8lp8YBe1Ed-DaY2uHNBaQg/method._Co-JsBe2Ed-DaY2uHNBaQg.pt
@@ -0,0 +1,3 @@
+ => <%= MyHelper.getCounter (ctx) %> attribute(s)
+[End. <%= _separator %><%=parameter.getName()%><%= _separator %>]
+
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._AVTZcAzrEd-pgpX7a7GeEA/method._AVTZcQzrEd-pgpX7a7GeEA.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._AVTZcAzrEd-pgpX7a7GeEA/method._AVTZcQzrEd-pgpX7a7GeEA.pt
new file mode 100644
index 0000000..3adbdc2
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._AVTZcAzrEd-pgpX7a7GeEA/method._AVTZcQzrEd-pgpX7a7GeEA.pt
@@ -0,0 +1 @@
+<%@ jet package="egf.uc1_3.pattern" class="HelloWorld" imports="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/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._AVTZcAzrEd-pgpX7a7GeEA/method._AVTZcgzrEd-pgpX7a7GeEA.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._AVTZcAzrEd-pgpX7a7GeEA/method._AVTZcgzrEd-pgpX7a7GeEA.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._AVTZcAzrEd-pgpX7a7GeEA/method._AVTZcgzrEd-pgpX7a7GeEA.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._AVTZcAzrEd-pgpX7a7GeEA/method._AVTZcwzrEd-pgpX7a7GeEA.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._AVTZcAzrEd-pgpX7a7GeEA/method._AVTZcwzrEd-pgpX7a7GeEA.pt
new file mode 100644
index 0000000..9dca8d6
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._AVTZcAzrEd-pgpX7a7GeEA/method._AVTZcwzrEd-pgpX7a7GeEA.pt
@@ -0,0 +1 @@
+ <%= aClass.getName() %>
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._AVTZcAzrEd-pgpX7a7GeEA/method._AVTZdAzrEd-pgpX7a7GeEA.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._AVTZcAzrEd-pgpX7a7GeEA/method._AVTZdAzrEd-pgpX7a7GeEA.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._AVTZcAzrEd-pgpX7a7GeEA/method._AVTZdAzrEd-pgpX7a7GeEA.pt
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._MTvCABe6Ed-O0P2188kAmA/method._MTvCARe6Ed-O0P2188kAmA.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._MTvCABe6Ed-O0P2188kAmA/method._MTvCARe6Ed-O0P2188kAmA.pt
new file mode 100644
index 0000000..1ec4b11
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._MTvCABe6Ed-O0P2188kAmA/method._MTvCARe6Ed-O0P2188kAmA.pt
@@ -0,0 +1 @@
+<%@ jet package="egf.uc1_5.pattern" class="ClassPattern" imports="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/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._MTvCABe6Ed-O0P2188kAmA/method._MTvCAhe6Ed-O0P2188kAmA.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._MTvCABe6Ed-O0P2188kAmA/method._MTvCAhe6Ed-O0P2188kAmA.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._MTvCABe6Ed-O0P2188kAmA/method._MTvCAhe6Ed-O0P2188kAmA.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._MTvCABe6Ed-O0P2188kAmA/method._MTvCAxe6Ed-O0P2188kAmA.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._MTvCABe6Ed-O0P2188kAmA/method._MTvCAxe6Ed-O0P2188kAmA.pt
new file mode 100644
index 0000000..a026402
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._MTvCABe6Ed-O0P2188kAmA/method._MTvCAxe6Ed-O0P2188kAmA.pt
@@ -0,0 +1,2 @@
+
+<%=parameter.getName()%>
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._MTvCABe6Ed-O0P2188kAmA/method._MTvCBBe6Ed-O0P2188kAmA.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._MTvCABe6Ed-O0P2188kAmA/method._MTvCBBe6Ed-O0P2188kAmA.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._MTvCABe6Ed-O0P2188kAmA/method._MTvCBBe6Ed-O0P2188kAmA.pt
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._NIgPYBVgEd-JoY-b5_Vpcw/method._NIg2cBVgEd-JoY-b5_Vpcw.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._NIgPYBVgEd-JoY-b5_Vpcw/method._NIg2cBVgEd-JoY-b5_Vpcw.pt
new file mode 100644
index 0000000..f081f62
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._NIgPYBVgEd-JoY-b5_Vpcw/method._NIg2cBVgEd-JoY-b5_Vpcw.pt
@@ -0,0 +1 @@
+<%@ jet package="egf.uc1_2.pattern" class="ClassPattern" imports="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/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._NIgPYBVgEd-JoY-b5_Vpcw/method._NIg2cRVgEd-JoY-b5_Vpcw.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._NIgPYBVgEd-JoY-b5_Vpcw/method._NIg2cRVgEd-JoY-b5_Vpcw.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._NIgPYBVgEd-JoY-b5_Vpcw/method._NIg2cRVgEd-JoY-b5_Vpcw.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._NIgPYBVgEd-JoY-b5_Vpcw/method._NIg2chVgEd-JoY-b5_Vpcw.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._NIgPYBVgEd-JoY-b5_Vpcw/method._NIg2chVgEd-JoY-b5_Vpcw.pt
new file mode 100644
index 0000000..274815d
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._NIgPYBVgEd-JoY-b5_Vpcw/method._NIg2chVgEd-JoY-b5_Vpcw.pt
@@ -0,0 +1 @@
+ and me: <%=parameter.getName()%>
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._NIgPYBVgEd-JoY-b5_Vpcw/method._NIg2cxVgEd-JoY-b5_Vpcw.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._NIgPYBVgEd-JoY-b5_Vpcw/method._NIg2cxVgEd-JoY-b5_Vpcw.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._NIgPYBVgEd-JoY-b5_Vpcw/method._NIg2cxVgEd-JoY-b5_Vpcw.pt
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._QdrPsBe2Ed-DaY2uHNBaQg/method._Qdr2wBe2Ed-DaY2uHNBaQg.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._QdrPsBe2Ed-DaY2uHNBaQg/method._Qdr2wBe2Ed-DaY2uHNBaQg.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._QdrPsBe2Ed-DaY2uHNBaQg/method._Qdr2wBe2Ed-DaY2uHNBaQg.pt
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._QdrPsBe2Ed-DaY2uHNBaQg/method._QdrPsRe2Ed-DaY2uHNBaQg.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._QdrPsBe2Ed-DaY2uHNBaQg/method._QdrPsRe2Ed-DaY2uHNBaQg.pt
new file mode 100644
index 0000000..63f6fc4
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._QdrPsBe2Ed-DaY2uHNBaQg/method._QdrPsRe2Ed-DaY2uHNBaQg.pt
@@ -0,0 +1 @@
+<%@ jet package="egf.uc1_4.pattern" class="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.* org.eclipse.egf.usecase.pattern.uc1.helper.*" %>
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._QdrPsBe2Ed-DaY2uHNBaQg/method._QdrPshe2Ed-DaY2uHNBaQg.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._QdrPsBe2Ed-DaY2uHNBaQg/method._QdrPshe2Ed-DaY2uHNBaQg.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._QdrPsBe2Ed-DaY2uHNBaQg/method._QdrPshe2Ed-DaY2uHNBaQg.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._QdrPsBe2Ed-DaY2uHNBaQg/method._QdrPsxe2Ed-DaY2uHNBaQg.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._QdrPsBe2Ed-DaY2uHNBaQg/method._QdrPsxe2Ed-DaY2uHNBaQg.pt
new file mode 100644
index 0000000..5d262b9
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._QdrPsBe2Ed-DaY2uHNBaQg/method._QdrPsxe2Ed-DaY2uHNBaQg.pt
@@ -0,0 +1,2 @@
+ [Attribute '<%=parameter.getName()%>'] <% MyHelper.incCounter (ctx); %>
+
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._QmXisBsZEd-Cmei4SZ1Naw/method._QmXisRsZEd-Cmei4SZ1Naw.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._QmXisBsZEd-Cmei4SZ1Naw/method._QmXisRsZEd-Cmei4SZ1Naw.pt
new file mode 100644
index 0000000..ea5410e
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._QmXisBsZEd-Cmei4SZ1Naw/method._QmXisRsZEd-Cmei4SZ1Naw.pt
@@ -0,0 +1 @@
+<%@ jet package="egf.uc1_1.pattern" class="classPattern" imports="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/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._QmXisBsZEd-Cmei4SZ1Naw/method._QmXishsZEd-Cmei4SZ1Naw.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._QmXisBsZEd-Cmei4SZ1Naw/method._QmXishsZEd-Cmei4SZ1Naw.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._QmXisBsZEd-Cmei4SZ1Naw/method._QmXishsZEd-Cmei4SZ1Naw.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._QmXisBsZEd-Cmei4SZ1Naw/method._QmXisxsZEd-Cmei4SZ1Naw.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._QmXisBsZEd-Cmei4SZ1Naw/method._QmXisxsZEd-Cmei4SZ1Naw.pt
new file mode 100644
index 0000000..47786fb
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._QmXisBsZEd-Cmei4SZ1Naw/method._QmXisxsZEd-Cmei4SZ1Naw.pt
@@ -0,0 +1,3 @@
+
+
+- Hello <%= aClass.getName() %> Class
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._QmXisBsZEd-Cmei4SZ1Naw/method._QmXitBsZEd-Cmei4SZ1Naw.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._QmXisBsZEd-Cmei4SZ1Naw/method._QmXitBsZEd-Cmei4SZ1Naw.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._QmXisBsZEd-Cmei4SZ1Naw/method._QmXitBsZEd-Cmei4SZ1Naw.pt
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._RdSMYBViEd-JoY-b5_Vpcw/method._RdSMYRViEd-JoY-b5_Vpcw.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._RdSMYBViEd-JoY-b5_Vpcw/method._RdSMYRViEd-JoY-b5_Vpcw.pt
new file mode 100644
index 0000000..2d6a9d0
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._RdSMYBViEd-JoY-b5_Vpcw/method._RdSMYRViEd-JoY-b5_Vpcw.pt
@@ -0,0 +1 @@
+<%@ jet package="egf.uc1_7.pattern.forInjection" class="ForInjectionPattern" imports="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/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._RdSMYBViEd-JoY-b5_Vpcw/method._RdSMYhViEd-JoY-b5_Vpcw.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._RdSMYBViEd-JoY-b5_Vpcw/method._RdSMYhViEd-JoY-b5_Vpcw.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._RdSMYBViEd-JoY-b5_Vpcw/method._RdSMYhViEd-JoY-b5_Vpcw.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._RdSMYBViEd-JoY-b5_Vpcw/method._RdSzcBViEd-JoY-b5_Vpcw.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._RdSMYBViEd-JoY-b5_Vpcw/method._RdSzcBViEd-JoY-b5_Vpcw.pt
new file mode 100644
index 0000000..5bad10c
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._RdSMYBViEd-JoY-b5_Vpcw/method._RdSzcBViEd-JoY-b5_Vpcw.pt
@@ -0,0 +1,3 @@
+
+
+ - "<%=parameter.getName()%>" <%=parameter.getClass().getSimpleName()%>
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._RdSMYBViEd-JoY-b5_Vpcw/method._RdSzcRViEd-JoY-b5_Vpcw.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._RdSMYBViEd-JoY-b5_Vpcw/method._RdSzcRViEd-JoY-b5_Vpcw.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._RdSMYBViEd-JoY-b5_Vpcw/method._RdSzcRViEd-JoY-b5_Vpcw.pt
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._RfrD8BVgEd-JoY-b5_Vpcw/method._PbStEBbvEd-thalzjBN9kg.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._RfrD8BVgEd-JoY-b5_Vpcw/method._PbStEBbvEd-thalzjBN9kg.pt
new file mode 100644
index 0000000..2844727
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._RfrD8BVgEd-JoY-b5_Vpcw/method._PbStEBbvEd-thalzjBN9kg.pt
@@ -0,0 +1 @@
+ from my parent
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._RfrD8BVgEd-JoY-b5_Vpcw/method._RfrD8RVgEd-JoY-b5_Vpcw.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._RfrD8BVgEd-JoY-b5_Vpcw/method._RfrD8RVgEd-JoY-b5_Vpcw.pt
new file mode 100644
index 0000000..9388a0a
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._RfrD8BVgEd-JoY-b5_Vpcw/method._RfrD8RVgEd-JoY-b5_Vpcw.pt
@@ -0,0 +1 @@
+<%@ jet package="egf.uc1_2.pattern.parent" class="ParentPattern" imports="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/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._RfrD8BVgEd-JoY-b5_Vpcw/method._RfrD8hVgEd-JoY-b5_Vpcw.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._RfrD8BVgEd-JoY-b5_Vpcw/method._RfrD8hVgEd-JoY-b5_Vpcw.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._RfrD8BVgEd-JoY-b5_Vpcw/method._RfrD8hVgEd-JoY-b5_Vpcw.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._RfrD8BVgEd-JoY-b5_Vpcw/method._RfrD8xVgEd-JoY-b5_Vpcw.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._RfrD8BVgEd-JoY-b5_Vpcw/method._RfrD8xVgEd-JoY-b5_Vpcw.pt
new file mode 100644
index 0000000..8d16cca
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._RfrD8BVgEd-JoY-b5_Vpcw/method._RfrD8xVgEd-JoY-b5_Vpcw.pt
@@ -0,0 +1 @@
+//default content
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._RfrD8BVgEd-JoY-b5_Vpcw/method._RfrD9BVgEd-JoY-b5_Vpcw.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._RfrD8BVgEd-JoY-b5_Vpcw/method._RfrD9BVgEd-JoY-b5_Vpcw.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._RfrD8BVgEd-JoY-b5_Vpcw/method._RfrD9BVgEd-JoY-b5_Vpcw.pt
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._RfrD8BVgEd-JoY-b5_Vpcw/method._X63lwBVgEd-JoY-b5_Vpcw.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._RfrD8BVgEd-JoY-b5_Vpcw/method._X63lwBVgEd-JoY-b5_Vpcw.pt
new file mode 100644
index 0000000..67d91db
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._RfrD8BVgEd-JoY-b5_Vpcw/method._X63lwBVgEd-JoY-b5_Vpcw.pt
@@ -0,0 +1,2 @@
+
+Hello
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._YVbI4BViEd-JoY-b5_Vpcw/method._AZL8wBVjEd-JoY-b5_Vpcw.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._YVbI4BViEd-JoY-b5_Vpcw/method._AZL8wBVjEd-JoY-b5_Vpcw.pt
new file mode 100644
index 0000000..810ff30
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._YVbI4BViEd-JoY-b5_Vpcw/method._AZL8wBVjEd-JoY-b5_Vpcw.pt
@@ -0,0 +1 @@
+<%variable = parameter;%>
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._YVbI4BViEd-JoY-b5_Vpcw/method._YVbI4RViEd-JoY-b5_Vpcw.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._YVbI4BViEd-JoY-b5_Vpcw/method._YVbI4RViEd-JoY-b5_Vpcw.pt
new file mode 100644
index 0000000..6ecd916
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._YVbI4BViEd-JoY-b5_Vpcw/method._YVbI4RViEd-JoY-b5_Vpcw.pt
@@ -0,0 +1 @@
+<%@ jet package="egf.uc1_7.pattern" class="ClassPattern" imports="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/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._YVbI4BViEd-JoY-b5_Vpcw/method._YVbv8BViEd-JoY-b5_Vpcw.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._YVbI4BViEd-JoY-b5_Vpcw/method._YVbv8BViEd-JoY-b5_Vpcw.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._YVbI4BViEd-JoY-b5_Vpcw/method._YVbv8BViEd-JoY-b5_Vpcw.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._YVbI4BViEd-JoY-b5_Vpcw/method._YVbv8RViEd-JoY-b5_Vpcw.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._YVbI4BViEd-JoY-b5_Vpcw/method._YVbv8RViEd-JoY-b5_Vpcw.pt
new file mode 100644
index 0000000..4ed6655
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._YVbI4BViEd-JoY-b5_Vpcw/method._YVbv8RViEd-JoY-b5_Vpcw.pt
@@ -0,0 +1,4 @@
+
+
+
+<%=parameter.getName()%> contains:
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._YVbI4BViEd-JoY-b5_Vpcw/method._YVbv8hViEd-JoY-b5_Vpcw.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._YVbI4BViEd-JoY-b5_Vpcw/method._YVbv8hViEd-JoY-b5_Vpcw.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._YVbI4BViEd-JoY-b5_Vpcw/method._YVbv8hViEd-JoY-b5_Vpcw.pt
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._e1Lf4BsbEd-Cmei4SZ1Naw/method._e1Lf4RsbEd-Cmei4SZ1Naw.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._e1Lf4BsbEd-Cmei4SZ1Naw/method._e1Lf4RsbEd-Cmei4SZ1Naw.pt
new file mode 100644
index 0000000..a9834fe
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._e1Lf4BsbEd-Cmei4SZ1Naw/method._e1Lf4RsbEd-Cmei4SZ1Naw.pt
@@ -0,0 +1 @@
+<%@ jet package="egf.uc1_1.pattern" class="myPattern" imports="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/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._e1Lf4BsbEd-Cmei4SZ1Naw/method._e1Lf4hsbEd-Cmei4SZ1Naw.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._e1Lf4BsbEd-Cmei4SZ1Naw/method._e1Lf4hsbEd-Cmei4SZ1Naw.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._e1Lf4BsbEd-Cmei4SZ1Naw/method._e1Lf4hsbEd-Cmei4SZ1Naw.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._e1Lf4BsbEd-Cmei4SZ1Naw/method._e1Lf4xsbEd-Cmei4SZ1Naw.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._e1Lf4BsbEd-Cmei4SZ1Naw/method._e1Lf4xsbEd-Cmei4SZ1Naw.pt
new file mode 100644
index 0000000..1181aa7
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._e1Lf4BsbEd-Cmei4SZ1Naw/method._e1Lf4xsbEd-Cmei4SZ1Naw.pt
@@ -0,0 +1,3 @@
+
+
+ - <%= anAttribute.getName() %> attribute
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._e1Lf4BsbEd-Cmei4SZ1Naw/method._e1Lf5BsbEd-Cmei4SZ1Naw.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._e1Lf4BsbEd-Cmei4SZ1Naw/method._e1Lf5BsbEd-Cmei4SZ1Naw.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._e1Lf4BsbEd-Cmei4SZ1Naw/method._e1Lf5BsbEd-Cmei4SZ1Naw.pt
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._iXOsIBrgEd-cXtp4jDfJVg/method._iXOsIRrgEd-cXtp4jDfJVg.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._iXOsIBrgEd-cXtp4jDfJVg/method._iXOsIRrgEd-cXtp4jDfJVg.pt
new file mode 100644
index 0000000..4443572
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._iXOsIBrgEd-cXtp4jDfJVg/method._iXOsIRrgEd-cXtp4jDfJVg.pt
@@ -0,0 +1,16 @@
+package egf.uc1_6.pattern.java;
+
+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.*;
+import org.eclipse.egf.core.EGFCorePlugin;
+
+public class JavaPattern {
+
+ public JavaPattern() {
+ //Here is the constructor
+ }
+
+
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._iXOsIBrgEd-cXtp4jDfJVg/method._iXOsIhrgEd-cXtp4jDfJVg.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._iXOsIBrgEd-cXtp4jDfJVg/method._iXOsIhrgEd-cXtp4jDfJVg.pt
new file mode 100644
index 0000000..24650d7
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._iXOsIBrgEd-cXtp4jDfJVg/method._iXOsIhrgEd-cXtp4jDfJVg.pt
@@ -0,0 +1 @@
+// add initialisation of the pattern variables (declaration has been already done).
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._iXOsIBrgEd-cXtp4jDfJVg/method._iXOsIxrgEd-cXtp4jDfJVg.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._iXOsIBrgEd-cXtp4jDfJVg/method._iXOsIxrgEd-cXtp4jDfJVg.pt
new file mode 100644
index 0000000..083ea80
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._iXOsIBrgEd-cXtp4jDfJVg/method._iXOsIxrgEd-cXtp4jDfJVg.pt
@@ -0,0 +1,6 @@
+
+ // Message on the default console
+ System.out.println("Java: " + aClass.getName()); //$NON-NLS-1$
+
+ // Message on the EGF console
+ EGFCorePlugin.getDefault().logInfo("Java: " + aClass.getName());
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._iXOsIBrgEd-cXtp4jDfJVg/method._iXOsJBrgEd-cXtp4jDfJVg.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._iXOsIBrgEd-cXtp4jDfJVg/method._iXOsJBrgEd-cXtp4jDfJVg.pt
new file mode 100644
index 0000000..ff30235
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._iXOsIBrgEd-cXtp4jDfJVg/method._iXOsJBrgEd-cXtp4jDfJVg.pt
@@ -0,0 +1 @@
+}
\ No newline at end of file
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._riKAEBrfEd-cXtp4jDfJVg/method._riKAERrfEd-cXtp4jDfJVg.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._riKAEBrfEd-cXtp4jDfJVg/method._riKAERrfEd-cXtp4jDfJVg.pt
new file mode 100644
index 0000000..8cc6fc7
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._riKAEBrfEd-cXtp4jDfJVg/method._riKAERrfEd-cXtp4jDfJVg.pt
@@ -0,0 +1 @@
+<%@ jet package="egf.uc1_6.pattern" class="JetClassPattern" imports="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/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._riKAEBrfEd-cXtp4jDfJVg/method._riKAEhrfEd-cXtp4jDfJVg.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._riKAEBrfEd-cXtp4jDfJVg/method._riKAEhrfEd-cXtp4jDfJVg.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._riKAEBrfEd-cXtp4jDfJVg/method._riKAEhrfEd-cXtp4jDfJVg.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._riKAEBrfEd-cXtp4jDfJVg/method._riKAExrfEd-cXtp4jDfJVg.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._riKAEBrfEd-cXtp4jDfJVg/method._riKAExrfEd-cXtp4jDfJVg.pt
new file mode 100644
index 0000000..f56155a
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._riKAEBrfEd-cXtp4jDfJVg/method._riKAExrfEd-cXtp4jDfJVg.pt
@@ -0,0 +1,2 @@
+
+- Jet: <%= aClass.getName () %>
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._riKAEBrfEd-cXtp4jDfJVg/method._riKAFBrfEd-cXtp4jDfJVg.pt b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._riKAEBrfEd-cXtp4jDfJVg/method._riKAFBrfEd-cXtp4jDfJVg.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/templates/pattern._riKAEBrfEd-cXtp4jDfJVg/method._riKAFBrfEd-cXtp4jDfJVg.pt
diff --git a/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/test/Pattern_UC1.test b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/test/Pattern_UC1.test
new file mode 100644
index 0000000..fb34db1
--- /dev/null
+++ b/examples/runtime/org.eclipse.egf.usecase.pattern.uc1/test/Pattern_UC1.test
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<test:TestSuite xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:fcore="http://www.eclipse.org/egf/1.0.0/fcore" xmlns:test="http://www.eclipse.org/egf/1.0.0/test" name="Pattern UC1 Test Suite">
+ <tests xsi:type="test:EGFTestCase" name="UC1.1 ClassPattern">
+ <result xsi:type="test:ConsoleOutputTestResult" text="--------------
Result of pattern:

- Hello ModelElement Class
 - iD attribute
 - description attribute
- Hello NamedModelElement Class
 - name attribute
- Hello Activity Class
- Hello Contract Class
 - mandatory attribute
 - mode attribute
- Hello FactoryComponent Class
- Hello ContractContainer Class
- Hello FactoryComponentContract Class
- Hello ViewpointContainer Class
- Hello Viewpoint Class
- Hello Orchestration Class
- Hello OrchestrationParameterContainer Class
- Hello OrchestrationParameter Class
- Hello Invocation Class
- Hello InvocationContractContainer Class
- Hello InvocationContract Class
"/>
+ <activity xsi:type="fcore:FactoryComponent" href="../egf/Pattern_UC1_1_ClassPattern.fcore#_0BNZAOTGEd6iCM6xyOQ7FA"/>
+ </tests>
+ <tests xsi:type="test:EGFTestCase" name="UC1.2 Inherance">
+ <result xsi:type="test:ConsoleOutputTestResult" text="--------------
Result of pattern:

Hello from my parent and me: ModelElement
Hello from my parent and me: NamedModelElement
Hello from my parent and me: Activity
Hello from my parent and me: Contract
Hello from my parent and me: FactoryComponent
Hello from my parent and me: ContractContainer
Hello from my parent and me: FactoryComponentContract
Hello from my parent and me: ViewpointContainer
Hello from my parent and me: Viewpoint
Hello from my parent and me: Orchestration
Hello from my parent and me: OrchestrationParameterContainer
Hello from my parent and me: OrchestrationParameter
Hello from my parent and me: Invocation
Hello from my parent and me: InvocationContractContainer
Hello from my parent and me: InvocationContract
"/>
+ <activity xsi:type="fcore:FactoryComponent" href="../egf/Pattern_UC1_2_Inheritance.fcore#_94fB8RVfEd-JoY-b5_Vpcw"/>
+ </tests>
+ <tests xsi:type="test:EGFTestCase" name="UC1.3 InheranceAndCall">
+ <result xsi:type="test:ConsoleOutputTestResult" text="--------------
Result of pattern:

Hello ModelElement, and all friends of ModelElement!
Hello NamedModelElement, and all friends of NamedModelElement!
Hello Activity, and all friends of Activity!
Hello Contract, and all friends of Contract!
Hello FactoryComponent, and all friends of FactoryComponent!
Hello ContractContainer, and all friends of ContractContainer!
Hello FactoryComponentContract, and all friends of FactoryComponentContract!
Hello ViewpointContainer, and all friends of ViewpointContainer!
Hello Viewpoint, and all friends of Viewpoint!
Hello Orchestration, and all friends of Orchestration!
Hello OrchestrationParameterContainer, and all friends of OrchestrationParameterContainer!
Hello OrchestrationParameter, and all friends of OrchestrationParameter!
Hello Invocation, and all friends of Invocation!
Hello InvocationContractContainer, and all friends of InvocationContractContainer!
Hello InvocationContract, and all friends of InvocationContract!
"/>
+ <activity xsi:type="fcore:FactoryComponent" href="../egf/Pattern_UC1_3_InheritanceAndCall.fcore#_Onwn4AzqEd-pgpX7a7GeEA"/>
+ </tests>
+ <tests xsi:type="test:EGFTestCase" name="UC1.4 Callback_StategyBased">
+ <result xsi:type="test:ConsoleOutputTestResult" text="--------------
Result of pattern:


[Begin. 'ModelElement']
	[Attribute 'iD'] 
	[Attribute 'description'] 
	=> 2 attribute(s)
[End. 'ModelElement']


[Begin. 'NamedModelElement']
	[Attribute 'name'] 
	=> 1 attribute(s)
[End. 'NamedModelElement']


[Begin. 'Activity']
	=> 0 attribute(s)
[End. 'Activity']


[Begin. 'Contract']
	[Attribute 'mandatory'] 
	[Attribute 'mode'] 
	=> 2 attribute(s)
[End. 'Contract']


[Begin. 'FactoryComponent']
	=> 0 attribute(s)
[End. 'FactoryComponent']


[Begin. 'ContractContainer']
	=> 0 attribute(s)
[End. 'ContractContainer']


[Begin. 'FactoryComponentContract']
	=> 0 attribute(s)
[End. 'FactoryComponentContract']


[Begin. 'ViewpointContainer']
	=> 0 attribute(s)
[End. 'ViewpointContainer']


[Begin. 'Viewpoint']
	=> 0 attribute(s)
[End. 'Viewpoint']


[Begin. 'Orchestration']
	=> 0 attribute(s)
[End. 'Orchestration']


[Begin. 'OrchestrationParameterContainer']
	=> 0 attribute(s)
[End. 'OrchestrationParameterContainer']


[Begin. 'OrchestrationParameter']
	=> 0 attribute(s)
[End. 'OrchestrationParameter']


[Begin. 'Invocation']
	=> 0 attribute(s)
[End. 'Invocation']


[Begin. 'InvocationContractContainer']
	=> 0 attribute(s)
[End. 'InvocationContractContainer']


[Begin. 'InvocationContract']
	=> 0 attribute(s)
[End. 'InvocationContract']

"/>
+ <activity xsi:type="fcore:FactoryComponent" href="../egf/Pattern_UC1_4_Callback_StrategyBased.fcore#_oWQD0Be1Ed-DaY2uHNBaQg"/>
+ </tests>
+ <tests xsi:type="test:EGFTestCase" name="UC1.5 Callback_WithJavaClass">
+ <result xsi:type="test:ConsoleOutputTestResult" text="Callback on parameter 
ModelElement
Callback on parameter 
NamedModelElement
Callback on parameter 
Activity
Callback on parameter 
Contract
Callback on parameter 
FactoryComponent
Callback on parameter 
ContractContainer
Callback on parameter 
FactoryComponentContract
Callback on parameter 
ViewpointContainer
Callback on parameter 
Viewpoint
Callback on parameter 
Orchestration
Callback on parameter 
OrchestrationParameterContainer
Callback on parameter 
OrchestrationParameter
Callback on parameter 
Invocation
Callback on parameter 
InvocationContractContainer
Callback on parameter 
InvocationContract
ModelElementNamedModelElementActivityContractFactoryComponentContractContainerFactoryComponentContractViewpointContainerViewpointOrchestrationOrchestrationParameterContainerOrchestrationParameterInvocationInvocationContractContainerInvocationContract
"/>
+ <activity xsi:type="fcore:FactoryComponent" href="../egf/Pattern_UC1_5_Callback_WithJavaClass.fcore#_1di_UBe3Ed-DaY2uHNBaQg"/>
+ </tests>
+ <tests xsi:type="test:EGFTestCase" name="UC1.6 JetPatternCallsJavaPattern">
+ <result xsi:type="test:ConsoleOutputTestResult" text="Java: ModelElement
Java: NamedModelElement
Java: Activity
Java: Contract
Java: FactoryComponent
Java: ContractContainer
Java: FactoryComponentContract
Java: ViewpointContainer
Java: Viewpoint
Java: Orchestration
Java: OrchestrationParameterContainer
Java: OrchestrationParameter
Java: Invocation
Java: InvocationContractContainer
Java: InvocationContract
--------------
Result of pattern:
- Jet: ModelElement- Jet: NamedModelElement- Jet: Activity- Jet: Contract- Jet: FactoryComponent- Jet: ContractContainer- Jet: FactoryComponentContract- Jet: ViewpointContainer- Jet: Viewpoint- Jet: Orchestration- Jet: OrchestrationParameterContainer- Jet: OrchestrationParameter- Jet: Invocation- Jet: InvocationContractContainer- Jet: InvocationContract
"/>
+ <activity xsi:type="fcore:FactoryComponent" href="../egf/Pattern_UC1_6_JetPatternCallsJavaPattern.fcore#_a-kDcBfVEd-JToveUSgqRw"/>
+ </tests>
+ <tests xsi:type="test:EGFTestCase" name="UC1.7 Injection">
+ <result xsi:type="test:ConsoleOutputTestResult" text="--------------
Result of pattern:


ModelElement contains:
 - "ModelElement" EClassImpl
 - "iD" EAttributeImpl
 - "description" EAttributeImpl

NamedModelElement contains:
 - "NamedModelElement" EClassImpl
 - "name" EAttributeImpl

Activity contains:
 - "Activity" EClassImpl
 - "getContracts" EOperationImpl
 - "getContracts" EOperationImpl
 - "type" EParameterImpl
 - "getContracts" EOperationImpl
 - "mode" EParameterImpl
 - "getContracts" EOperationImpl
 - "type" EParameterImpl
 - "mode" EParameterImpl
 - "contractContainer" EReferenceImpl

Contract contains:
 - "Contract" EClassImpl
 - "getActivity" EOperationImpl
 - "getContracts" EOperationImpl
 - "getContracts" EOperationImpl
 - "type" EParameterImpl
 - "getContracts" EOperationImpl
 - "mode" EParameterImpl
 - "getContracts" EOperationImpl
 - "type" EParameterImpl
 - "mode" EParameterImpl
 - "contractContainer" EReferenceImpl
 - "mandatory" EAttributeImpl
 - "mode" EAttributeImpl
 - "type" EReferenceImpl

FactoryComponent contains:
 - "FactoryComponent" EClassImpl
 - "getInvocationContracts" EOperationImpl
 - "getInvocationContracts" EOperationImpl
 - "type" EParameterImpl
 - "getInvocationContracts" EOperationImpl
 - "mode" EParameterImpl
 - "getInvocationContracts" EOperationImpl
 - "type" EParameterImpl
 - "mode" EParameterImpl
 - "viewpointContainer" EReferenceImpl
 - "orchestration" EReferenceImpl

ContractContainer contains:
 - "ContractContainer" EClassImpl
 - "getContracts" EOperationImpl
 - "type" EParameterImpl
 - "getContracts" EOperationImpl
 - "mode" EParameterImpl
 - "getContracts" EOperationImpl
 - "type" EParameterImpl
 - "mode" EParameterImpl
 - "activity" EReferenceImpl
 - "contracts" EReferenceImpl

FactoryComponentContract contains:
 - "FactoryComponentContract" EClassImpl
 - "invocationContracts" EReferenceImpl

ViewpointContainer contains:
 - "ViewpointContainer" EClassImpl
 - "getViewpoint" EOperationImpl
 - "clazz" EParameterImpl
 - "factoryComponent" EReferenceImpl
 - "viewpoints" EReferenceImpl

Viewpoint contains:
 - "Viewpoint" EClassImpl
 - "viewpointContainer" EReferenceImpl

Orchestration contains:
 - "Orchestration" EClassImpl
 - "getInvocations" EOperationImpl
 - "T" ETypeParameterImpl
 - "getOrchestrationParameters" EOperationImpl
 - "getOrchestrationParameters" EOperationImpl
 - "type" EParameterImpl
 - "getInvocationContracts" EOperationImpl
 - "getInvocationContracts" EOperationImpl
 - "type" EParameterImpl
 - "getInvocationContracts" EOperationImpl
 - "mode" EParameterImpl
 - "getInvocationContracts" EOperationImpl
 - "type" EParameterImpl
 - "mode" EParameterImpl
 - "factoryComponent" EReferenceImpl
 - "orchestrationParameterContainer" EReferenceImpl

OrchestrationParameterContainer contains:
 - "OrchestrationParameterContainer" EClassImpl
 - "getFactoryComponent" EOperationImpl
 - "getOrchestrationParameters" EOperationImpl
 - "type" EParameterImpl
 - "orchestration" EReferenceImpl
 - "orchestrationParameters" EReferenceImpl

OrchestrationParameter contains:
 - "OrchestrationParameter" EClassImpl
 - "getFactoryComponent" EOperationImpl
 - "getOrchestration" EOperationImpl
 - "orchestrationParameterContainer" EReferenceImpl
 - "invocationContracts" EReferenceImpl
 - "type" EReferenceImpl

Invocation contains:
 - "Invocation" EClassImpl
 - "getFactoryComponent" EOperationImpl
 - "getInvocationContracts" EOperationImpl
 - "getInvocationContracts" EOperationImpl
 - "type" EParameterImpl
 - "getInvocationContracts" EOperationImpl
 - "mode" EParameterImpl
 - "getInvocationContracts" EOperationImpl
 - "type" EParameterImpl
 - "mode" EParameterImpl
 - "getInvokedContracts" EOperationImpl
 - "getInvokedContracts" EOperationImpl
 - "type" EParameterImpl
 - "getInvokedContracts" EOperationImpl
 - "mode" EParameterImpl
 - "getInvokedContracts" EOperationImpl
 - "type" EParameterImpl
 - "mode" EParameterImpl
 - "invocationContractContainer" EReferenceImpl
 - "invokedActivity" EReferenceImpl

InvocationContractContainer contains:
 - "InvocationContractContainer" EClassImpl
 - "getFactoryComponent" EOperationImpl
 - "invocation" EReferenceImpl
 - "invocationContracts" EReferenceImpl

InvocationContract contains:
 - "InvocationContract" EClassImpl
 - "getFactoryComponent" EOperationImpl
 - "getInvocation" EOperationImpl
 - "getInvokedMode" EOperationImpl
 - "invocationContractContainer" EReferenceImpl
 - "factoryComponentContract" EReferenceImpl
 - "orchestrationParameter" EReferenceImpl
 - "sourceInvocationContract" EReferenceImpl
 - "targetInvocationContract" EReferenceImpl
 - "invokedContract" EReferenceImpl
 - "type" EReferenceImpl
"/>
+ <activity xsi:type="fcore:FactoryComponent" href="../egf/Pattern_UC1_7_Injection.fcore#_zOU6cBVhEd-JoY-b5_Vpcw"/>
+ </tests>
+</test:TestSuite>
diff --git a/examples/workspace/org.eclipse.egf.example.fcs/.project b/examples/workspace/org.eclipse.egf.example.fcs/.project
new file mode 100644
index 0000000..2cab7f5
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.example.fcs/.project
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.example.fcs</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <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>
+ </natures>
+</projectDescription>
diff --git a/examples/workspace/org.eclipse.egf.example.fcs/META-INF/MANIFEST.MF b/examples/workspace/org.eclipse.egf.example.fcs/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..e8ae242
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.example.fcs/META-INF/MANIFEST.MF
@@ -0,0 +1,9 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.example.fcs;singleton:=true
+Bundle-Version: 0.2.2.qualifier
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-ClassPath: .
+Bundle-ActivationPolicy: lazy
diff --git a/examples/workspace/org.eclipse.egf.example.fcs/about.html b/examples/workspace/org.eclipse.egf.example.fcs/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.example.fcs/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.example.fcs/build.properties b/examples/workspace/org.eclipse.egf.example.fcs/build.properties
new file mode 100644
index 0000000..6d704a5
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.example.fcs/build.properties
@@ -0,0 +1,18 @@
+##
+# 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/,\
+ .,\
+ fc/,\
+ plugin.properties,\
+ about.html,\
+ plugin.xml
diff --git a/examples/workspace/org.eclipse.egf.example.fcs/fc/fc1.fcore b/examples/workspace/org.eclipse.egf.example.fcs/fc/fc1.fcore
new file mode 100644
index 0000000..ff420a5
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.example.fcs/fc/fc1.fcore
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<fcore:FactoryComponent xmi:version="2.1"
+ xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" 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:types="http://www.eclipse.org/egf/1.0.0/types" xmi:id="Ko39UWVuEd64TpQQ4RciWw"
+ name="FC1">
+ <contractContainer xmi:id="_SmBtAL-2Ed6E7J0w9U7NFQ">
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_S7e_oL-2Ed6E7J0w9U7NFQ"
+ name="amount" mode="Out" invocationContracts="#_IDAaML-2Ed6E7J0w9U7NFQ">
+ <type xmi:type="types:TypeFloat" xmi:id="_o0esoNBTEd67h-iKUQB4KA"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_1SUNMcLoEd6YQfrk65kDFw"
+ name="price" invocationContracts="#_GpyuQb_nEd6gHIEE-OJ_Mw">
+ <type xmi:type="types:TypeFloat" xmi:id="_BV5T0MLpEd6YQfrk65kDFw" value="11.0"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_5siVYMnxEd62uJjVIIL53A"
+ name="generatorAdapterFactory" mode="Out" invocationContracts="#_HzSEYciDEd6oON34eIZwow">
+ <type xmi:type="types:TypeGeneratorAdapterFactory" xmi:id="_7EKPoMnxEd62uJjVIIL53A"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_ih5EENXAEd6mBObdoXlr9g"
+ name="parameters" mode="In_Out" invocationContracts="#_aC43cNXAEd6mBObdoXlr9g"
+ invocationContexts="#_aC43cNXAEd6mBObdoXlr9g">
+ <type xmi:type="types:TypeCollection" xmi:id="_i0XSYRciEd-OuMrFXG3KCA"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_LCgnUNgXEd6eJbYEYJAYWw"
+ name="fcore" invocationContracts="#_Pnj8UNqHEd6xR_hM8cx7GA">
+ <type xmi:type="domain:TypeDomainEPackage" xmi:id="_U3jScdqLEd6V9pdModnIUQ"
+ domain="#_IlmgAdgXEd6eJbYEYJAYWw" name="fcore"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_zb0TwNgfEd6na6OAqTVobQ"
+ name="fc1" invocationContracts="#_WXZRYNqHEd6xR_hM8cx7GA">
+ <type xmi:type="domain:TypeDomainURI" xmi:id="_HB5igdggEd6uy82Dcq20PA" domain="#_J1bPgdgfEd6na6OAqTVobQ"
+ name="fc1"/>
+ </contracts>
+ </contractContainer>
+ <viewpointContainer xmi:id="_iBhWMdgWEd6Q4-VfEsR1iA">
+ <viewpoints xmi:type="domain:DomainViewpoint" xmi:id="_iiANENgWEd6Q4-VfEsR1iA">
+ <domains xmi:type="domain:DomainEPackage" xmi:id="_IlmgAdgXEd6eJbYEYJAYWw" ePackage="http://www.eclipse.org/egf/1.0.0/fcore#/"
+ name="fcore"/>
+ <domains xmi:type="domain:DomainURI" xmi:id="_J1bPgdgfEd6na6OAqTVobQ" uri="platform:/resource/org.eclipse.egf.examples.fcs/fc/fc1.fcore"
+ name="fc1"/>
+ </viewpoints>
+ </viewpointContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="4w2VoabFEd692t-PG4ogiQ">
+ <orchestrationParameterContainer xmi:id="_I6TxYcVjEd6ngr_25dSdnQ">
+ <orchestrationParameters xmi:id="_uNn24MVjEd6ngr_25dSdnQ" name="stock" invocationContracts="#_bu7G8MVjEd6ngr_25dSdnQ #_4qwyMdA6Ed6FD_8N74-4WA">
+ <type xmi:type="types:TypeInteger" xmi:id="_wKWpUMVjEd6ngr_25dSdnQ" value="10"/>
+ </orchestrationParameters>
+ </orchestrationParameterContainer>
+ <invocations xmi:id="tKWXIabGEd69ANF1SOWYYg" invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.example.task.h1/task_h1.fcore#1Zvd4LdCEd6AWpPtW_wFiQ">
+ <invocationContractContainer xmi:id="_GuhTgb-2Ed6E7J0w9U7NFQ">
+ <invocationContracts xmi:id="_bu7G8MVjEd6ngr_25dSdnQ" orchestrationParameter="#_uNn24MVjEd6ngr_25dSdnQ"
+ invokedContract="platform:/plugin/org.eclipse.egf.example.task.h1/task_h1.fcore#_sZPqULpOEd6O-6ob3O13Lw"/>
+ <invocationContracts xmi:id="_4qwyMdA6Ed6FD_8N74-4WA" orchestrationParameter="#_uNn24MVjEd6ngr_25dSdnQ"
+ invokedContract="platform:/plugin/org.eclipse.egf.example.task.h1/task_h1.fcore#_Z65BAdA5Ed6LbMEN-DBMtQ"/>
+ <invocationContracts xmi:id="_GpyuQb_nEd6gHIEE-OJ_Mw" factoryComponentContract="#_1SUNMcLoEd6YQfrk65kDFw"
+ invokedContract="platform:/plugin/org.eclipse.egf.example.task.h1/task_h1.fcore#_xfSXELpOEd6O-6ob3O13Lw"/>
+ <invocationContracts xmi:id="_IDAaML-2Ed6E7J0w9U7NFQ" factoryComponentContract="#_S7e_oL-2Ed6E7J0w9U7NFQ"
+ invokedContract="platform:/plugin/org.eclipse.egf.example.task.h1/task_h1.fcore#_2vwLILpOEd6O-6ob3O13Lw"/>
+ <invocationContracts xmi:id="_HzSEYciDEd6oON34eIZwow" factoryComponentContract="#_5siVYMnxEd62uJjVIIL53A"
+ invokedContract="platform:/plugin/org.eclipse.egf.example.task.h1/task_h1.fcore#_PFOYwbshEd6hlL3ru-eQtQ"/>
+ <invocationContracts xmi:id="_aC43cNXAEd6mBObdoXlr9g" factoryComponentContract="#_ih5EENXAEd6mBObdoXlr9g"
+ invokedContract="platform:/plugin/org.eclipse.egf.example.task.h1/task_h1.fcore#_l2A5kdT3Ed6Pk6ruhJpBtQ"/>
+ <invocationContracts xmi:id="_Pnj8UNqHEd6xR_hM8cx7GA" factoryComponentContract="#_LCgnUNgXEd6eJbYEYJAYWw"
+ invokedContract="platform:/plugin/org.eclipse.egf.example.task.h1/task_h1.fcore#_M2YOIdqHEd6xR_hM8cx7GA"/>
+ <invocationContracts xmi:id="_WXZRYNqHEd6xR_hM8cx7GA" factoryComponentContract="#_zb0TwNgfEd6na6OAqTVobQ"
+ invokedContract="platform:/plugin/org.eclipse.egf.example.task.h1/task_h1.fcore#_TwNMsNqHEd6xR_hM8cx7GA"/>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+</fcore:FactoryComponent>
diff --git a/examples/workspace/org.eclipse.egf.example.fcs/fc/fc2.fcore b/examples/workspace/org.eclipse.egf.example.fcs/fc/fc2.fcore
new file mode 100644
index 0000000..5d98a69
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.example.fcs/fc/fc2.fcore
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<fcore:FactoryComponent xmi:version="2.1"
+ xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:fcore="http://www.eclipse.org/egf/1.0.0/fcore"
+ xmlns:fprod="http://www.eclipse.org/egf/1.0.0/fprod" xmi:id="_jOwhodBQEd6dz4A7_XVBtQ"
+ name="FC2">
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_kzMI0NBQEd6dz4A7_XVBtQ">
+ <invocations xmi:type="fprod:ProductionPlanInvocation" xmi:id="_ldNWMNBQEd6dz4A7_XVBtQ"
+ invokedActivity="fcore:FactoryComponent platform:/plugin/org.eclipse.egf.example.fcs/fc/fc1.fcore#Ko39UWVuEd64TpQQ4RciWw"/>
+ </orchestration>
+</fcore:FactoryComponent>
diff --git a/examples/workspace/org.eclipse.egf.example.fcs/plugin.properties b/examples/workspace/org.eclipse.egf.example.fcs/plugin.properties
new file mode 100644
index 0000000..4fbfa82
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.example.fcs/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 Test FC (Incubation)
+providerName=Eclipse Modeling Project
diff --git a/examples/workspace/org.eclipse.egf.example.fcs/plugin.xml b/examples/workspace/org.eclipse.egf.example.fcs/plugin.xml
new file mode 100644
index 0000000..8284479
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.example.fcs/plugin.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin
+>
+ <extension
+ point="org.eclipse.egf.core.fcore">
+ <fcore
+ id="fc/fc1.fcore">
+ </fcore>
+ <fcore
+ id="fc/fc2.fcore">
+ </fcore>
+ </extension>
+
+</plugin>
diff --git a/examples/workspace/org.eclipse.egf.example.task.h1/.classpath b/examples/workspace/org.eclipse.egf.example.task.h1/.classpath
new file mode 100644
index 0000000..2d1a430
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.example.task.h1/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/examples/workspace/org.eclipse.egf.example.task.h1/.project b/examples/workspace/org.eclipse.egf.example.task.h1/.project
new file mode 100644
index 0000000..0108785
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.example.task.h1/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.example.task.h1</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/examples/workspace/org.eclipse.egf.example.task.h1/.settings/org.eclipse.core.resources.prefs b/examples/workspace/org.eclipse.egf.example.task.h1/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..6fd3cfd
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.example.task.h1/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Wed Feb 17 16:10:38 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/examples/workspace/org.eclipse.egf.example.task.h1/.settings/org.eclipse.jdt.core.prefs b/examples/workspace/org.eclipse.egf.example.task.h1/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..35ef8bf
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.example.task.h1/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Mon Feb 15 16:06:52 CET 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.example.task.h1/META-INF/MANIFEST.MF b/examples/workspace/org.eclipse.egf.example.task.h1/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..3115d5e
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.example.task.h1/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.example.task.h1;singleton:=true
+Bundle-Activator: org.eclipse.egf.example.task.h1.Activator
+Bundle-Version: 0.2.2.qualifier
+Bundle-ClassPath: .
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle:
+ org.eclipse.egf.model.ftask
+Export-Package:
+ org.eclipse.egf.example.task.h1
+Bundle-ActivationPolicy: lazy
diff --git a/examples/workspace/org.eclipse.egf.example.task.h1/about.html b/examples/workspace/org.eclipse.egf.example.task.h1/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.example.task.h1/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.example.task.h1/build.properties b/examples/workspace/org.eclipse.egf.example.task.h1/build.properties
new file mode 100644
index 0000000..9dbad05
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.example.task.h1/build.properties
@@ -0,0 +1,20 @@
+##
+# 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
+##
+
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.properties,\
+ task_h1.fcore,\
+ plugin.xml
+src.includes = about.html
diff --git a/examples/workspace/org.eclipse.egf.example.task.h1/plugin.properties b/examples/workspace/org.eclipse.egf.example.task.h1/plugin.properties
new file mode 100644
index 0000000..0cbba56
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.example.task.h1/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 Test Task H1 (Incubation)
+providerName=Eclipse Modeling Project
diff --git a/examples/workspace/org.eclipse.egf.example.task.h1/plugin.xml b/examples/workspace/org.eclipse.egf.example.task.h1/plugin.xml
new file mode 100644
index 0000000..01942c2
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.example.task.h1/plugin.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+
+ <extension
+ point="org.eclipse.egf.core.fcore">
+ <fcore
+ id="task_h1.fcore">
+ </fcore>
+ </extension>
+
+
+</plugin>
diff --git a/examples/workspace/org.eclipse.egf.example.task.h1/src/org/eclipse/egf/example/task/h1/Activator.java b/examples/workspace/org.eclipse.egf.example.task.h1/src/org/eclipse/egf/example/task/h1/Activator.java
new file mode 100644
index 0000000..b5adb4a
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.example.task.h1/src/org/eclipse/egf/example/task/h1/Activator.java
@@ -0,0 +1,60 @@
+package org.eclipse.egf.example.task.h1;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.egf.common.activator.EGFAbstractPlugin;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends EGFAbstractPlugin {
+
+ // The shared instance
+ private static Activator plugin;
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ *
+ *
+ * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
+ * )
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ logInfo("org.eclipse.egf.example.task.h1 is starting"); //$NON-NLS-1$
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ *
+ *
+ * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
+ * )
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ Bundle bundle = Platform.getBundle("org.eclipse.swt"); //$NON-NLS-1$
+ if (bundle.getState() == Bundle.ACTIVE) {
+ logInfo("org.eclipse.egf.example.task.h1 is stopping"); //$NON-NLS-1$
+ }
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/examples/workspace/org.eclipse.egf.example.task.h1/src/org/eclipse/egf/example/task/h1/H1.java b/examples/workspace/org.eclipse.egf.example.task.h1/src/org/eclipse/egf/example/task/h1/H1.java
new file mode 100644
index 0000000..3cee1db
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.example.task.h1/src/org/eclipse/egf/example/task/h1/H1.java
@@ -0,0 +1,44 @@
+package org.eclipse.egf.example.task.h1;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+import org.eclipse.egf.ftask.producer.invocation.ITaskProduction;
+import org.eclipse.emf.codegen.ecore.generator.GeneratorAdapterFactory;
+import org.eclipse.emf.codegen.ecore.genmodel.generator.GenModelGeneratorAdapterFactory;
+
+public class H1 implements ITaskProduction {
+
+ private Integer _quantity;
+
+ private Float _price;
+
+ private Float _amount;
+
+ private Collection<String> _parameters;
+
+ @SuppressWarnings("unchecked")
+ public void preExecute(final ITaskProductionContext context, final IProgressMonitor monitor) throws InvocationException {
+ _quantity = context.getInputValue("quantity", Integer.class); //$NON-NLS-1$
+ _price = context.getInputValue("price", Float.class); //$NON-NLS-1$
+ _parameters = context.getInputValue("parameters", Collection.class); //$NON-NLS-1$
+ context.getOutputValue("generatorAdapterFactory", GeneratorAdapterFactory.class); //$NON-NLS-1$
+ }
+
+ public void doExecute(final ITaskProductionContext context, final IProgressMonitor monitor) throws InvocationException {
+ _amount = _quantity * _price;
+ }
+
+ public void postExecute(final ITaskProductionContext context, final IProgressMonitor monitor) throws InvocationException {
+ context.setOutputValue("amount", _amount); //$NON-NLS-1$
+ context.setOutputValue("generatorAdapterFactory", new GenModelGeneratorAdapterFactory()); //$NON-NLS-1$
+ _parameters = new ArrayList<String>();
+ _parameters.add("param1"); //$NON-NLS-1$
+ _parameters.add("param2"); //$NON-NLS-1$
+ context.setOutputValue("parameters", _parameters); //$NON-NLS-1$
+ }
+
+}
diff --git a/examples/workspace/org.eclipse.egf.example.task.h1/task_h1.fcore b/examples/workspace/org.eclipse.egf.example.task.h1/task_h1.fcore
new file mode 100644
index 0000000..64fce19
--- /dev/null
+++ b/examples/workspace/org.eclipse.egf.example.task.h1/task_h1.fcore
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ftask:Task xmi:version="2.1"
+ xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:domain="http://www.eclipse.org/egf/1.0.0/domain"
+ xmlns:ftask="http://www.eclipse.org/egf/1.0.0/ftask" xmlns:types="http://www.eclipse.org/egf/1.0.0/types"
+ xmi:id="1Zvd4LdCEd6AWpPtW_wFiQ"
+ name="H1" description="" kind="java" implementation="org.eclipse.egf.example.task.h1.H1">
+ <contractContainer xmi:id="_sAEVUbpOEd6O-6ob3O13Lw">
+ <contracts xmi:id="_sZPqULpOEd6O-6ob3O13Lw" name="quantity">
+ <type xmi:type="types:TypeInteger" xmi:id="_wO9-sLpOEd6O-6ob3O13Lw" value="100"/>
+ </contracts>
+ <contracts xmi:id="_5TrVYMBtEd60u-W6Ywx4cQ" name="rebate" mode="In_Out">
+ <type xmi:type="types:TypeFloat" xmi:id="_GkZmENA8Ed6uEZYKLg-jOQ" value="5.0"/>
+ </contracts>
+ <contracts xmi:id="_xfSXELpOEd6O-6ob3O13Lw" name="price" description="">
+ <type xmi:type="types:TypeFloat" xmi:id="_y0EYsLpOEd6O-6ob3O13Lw" value="10.5"/>
+ </contracts>
+ <contracts xmi:id="_2vwLILpOEd6O-6ob3O13Lw" name="amount" mode="Out">
+ <type xmi:type="types:TypeFloat" xmi:id="_5M9NYLpOEd6O-6ob3O13Lw" value="10.0"/>
+ </contracts>
+ <contracts xmi:id="_PFOYwbshEd6hlL3ru-eQtQ" name="generatorAdapterFactory"
+ mode="Out">
+ <type xmi:type="types:TypeGeneratorAdapterFactory" xmi:id="_PsaUkLshEd6hlL3ru-eQtQ"
+ value="org.eclipse.emf.codegen.ecore.genmodel.generator.GenModelGeneratorAdapterFactory"/>
+ </contracts>
+ <contracts xmi:id="_l2A5kdT3Ed6Pk6ruhJpBtQ" name="parameters" mode="In_Out">
+ <type xmi:type="types:TypeCollection" xmi:id="_UtguMNXAEd6mBObdoXlr9g" value="java.util.ArrayList"/>
+ </contracts>
+ <contracts xmi:id="_Z65BAdA5Ed6LbMEN-DBMtQ" name="stock">
+ <type xmi:type="types:TypeInteger" xmi:id="_a-1xUNA5Ed6LbMEN-DBMtQ" value="100"/>
+ </contracts>
+ <contracts xmi:id="_M2YOIdqHEd6xR_hM8cx7GA" name="model">
+ <type xmi:type="domain:TypeDomainEPackage" xmi:id="_sbQNUNqLEd6V9pdModnIUQ"/>
+ </contracts>
+ <contracts xmi:id="_TwNMsNqHEd6xR_hM8cx7GA" name="reference">
+ <type xmi:type="domain:TypeDomainURI" xmi:id="_rF3uwNqLEd6V9pdModnIUQ"/>
+ </contracts>
+ </contractContainer>
+</ftask:Task>
diff --git a/features/org.eclipse.egf.common.feature/.project b/features/org.eclipse.egf.common.feature/.project
new file mode 100644
index 0000000..e903ffa
--- /dev/null
+++ b/features/org.eclipse.egf.common.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.common.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.egf.common.feature/.settings/org.eclipse.core.resources.prefs b/features/org.eclipse.egf.common.feature/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..27da50b
--- /dev/null
+++ b/features/org.eclipse.egf.common.feature/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,11 @@
+#Mon Feb 15 16:34:59 CET 2010
+eclipse.preferences.version=1
+encoding//rootfiles/epl-v10.html=ISO-8859-1
+encoding//rootfiles/notice.html=ISO-8859-1
+encoding//sourceTemplateBundle/about.html=ISO-8859-1
+encoding//sourceTemplateFeature/epl-v10.html=ISO-8859-1
+encoding//sourceTemplateFeature/license.html=ISO-8859-1
+encoding//sourceTemplatePlugin/about.html=ISO-8859-1
+encoding//sourceTemplatePlugin/about.ini=ISO-8859-1
+encoding//sourceTemplatePlugin/about.mappings=ISO-8859-1
+encoding/license.html=ISO-8859-1
diff --git a/features/org.eclipse.egf.common.feature/build.properties b/features/org.eclipse.egf.common.feature/build.properties
new file mode 100644
index 0000000..13b949b
--- /dev/null
+++ b/features/org.eclipse.egf.common.feature/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = feature.*,\
+ epl-v10.html,\
+ license.html,\
+ eclipse_update_120.jpg
+src.includes = epl-v10.html,\
+ license.html
+root=rootfiles
+generate.feature@org.eclipse.egf.common.source=org.eclipse.egf.common
diff --git a/features/org.eclipse.egf.common.feature/eclipse_update_120.jpg b/features/org.eclipse.egf.common.feature/eclipse_update_120.jpg
new file mode 100644
index 0000000..bfdf708
--- /dev/null
+++ b/features/org.eclipse.egf.common.feature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.common.feature/epl-v10.html b/features/org.eclipse.egf.common.feature/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.common.feature/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.common.feature/feature.properties b/features/org.eclipse.egf.common.feature/feature.properties
new file mode 100644
index 0000000..75f9d76
--- /dev/null
+++ b/features/org.eclipse.egf.common.feature/feature.properties
@@ -0,0 +1,135 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# "featureName" property - name of the feature
+featureName=EGF Common (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories Common.
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.egf.common.feature/feature.xml b/features/org.eclipse.egf.common.feature/feature.xml
new file mode 100644
index 0000000..e88707f
--- /dev/null
+++ b/features/org.eclipse.egf.common.feature/feature.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.egf.common"
+ label="%featureName"
+ version="0.2.3.qualifier"
+ provider-name="%providerName"
+ plugin="org.eclipse.egf.common"
+ image="eclipse_update_120.jpg"
+>
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ 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
+ </copyright>
+
+ <license
+ url="%licenseURL"
+ >
+ %license
+ </license>
+
+ <url>
+ <update
+ label="%EMFTUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emft/updates/"
+ />
+ <discovery
+ label="%EMFUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emf/updates/"
+ />
+ <discovery
+ label="%EMFTUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emft/updates/"
+ />
+ </url>
+
+ <requires>
+ <import
+ feature="org.eclipse.platform"
+ version="3.5.1.R35x_v20090910-9gEeG1_FthkNDSP2odXdThaOu9GFDPn83DGB7"
+ match="compatible"
+ />
+ <import
+ feature="org.eclipse.jdt"
+ version="3.5.1.r351_v20090810-0600-7r88FEoFI0WTo6Az-1qFRHm37ChJ"
+ match="compatible"
+ />
+ <import
+ feature="org.eclipse.pde"
+ version="3.5.1.R35x_v20090811-7Z7_F9zFDX-aT6Ywvh8_S93"
+ match="compatible"
+ />
+ <import
+ feature="org.eclipse.emf.codegen"
+ version="2.5.0.v200906151043"
+ match="compatible"
+ />
+ <import
+ feature="org.eclipse.emf.edit"
+ version="2.5.0.v200906151043"
+ match="compatible"
+ />
+ </requires>
+
+ <includes
+ id="org.eclipse.egf.common.source"
+ version="0.0.0"
+ />
+
+ <plugin
+ id="org.eclipse.egf.common"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"
+ />
+
+</feature>
diff --git a/features/org.eclipse.egf.common.feature/license.html b/features/org.eclipse.egf.common.feature/license.html
new file mode 100644
index 0000000..a9b560f
--- /dev/null
+++ b/features/org.eclipse.egf.common.feature/license.html
@@ -0,0 +1,79 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also 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>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
+ modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body>
+</html>
diff --git a/features/org.eclipse.egf.common.feature/rootfiles/epl-v10.html b/features/org.eclipse.egf.common.feature/rootfiles/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.common.feature/rootfiles/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.common.feature/rootfiles/notice.html b/features/org.eclipse.egf.common.feature/rootfiles/notice.html
new file mode 100644
index 0000000..64d8c4c
--- /dev/null
+++ b/features/org.eclipse.egf.common.feature/rootfiles/notice.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.common.feature/sourceTemplateBundle/about.html b/features/org.eclipse.egf.common.feature/sourceTemplateBundle/about.html
new file mode 100644
index 0000000..caeb225
--- /dev/null
+++ b/features/org.eclipse.egf.common.feature/sourceTemplateBundle/about.html
@@ -0,0 +1,27 @@
+<!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>February 2, 2009</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/features/org.eclipse.egf.common.feature/sourceTemplateBundle/plugin.properties b/features/org.eclipse.egf.common.feature/sourceTemplateBundle/plugin.properties
new file mode 100644
index 0000000..592f2dc
--- /dev/null
+++ b/features/org.eclipse.egf.common.feature/sourceTemplateBundle/plugin.properties
@@ -0,0 +1,27 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+pluginName=EGF Common Source (Incubation)
+providerName=Eclipse Modeling Project
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.common.feature/sourceTemplateFeature/build.properties b/features/org.eclipse.egf.common.feature/sourceTemplateFeature/build.properties
new file mode 100644
index 0000000..d212e61
--- /dev/null
+++ b/features/org.eclipse.egf.common.feature/sourceTemplateFeature/build.properties
@@ -0,0 +1,16 @@
+##
+# 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
+##
+
+bin.includes =\
+epl-v10.html,\
+feature.*,\
+eclipse_update_120.jpg,\
+license.html
diff --git a/features/org.eclipse.egf.common.feature/sourceTemplateFeature/eclipse_update_120.jpg b/features/org.eclipse.egf.common.feature/sourceTemplateFeature/eclipse_update_120.jpg
new file mode 100644
index 0000000..68e3e02
--- /dev/null
+++ b/features/org.eclipse.egf.common.feature/sourceTemplateFeature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.common.feature/sourceTemplateFeature/epl-v10.html b/features/org.eclipse.egf.common.feature/sourceTemplateFeature/epl-v10.html
new file mode 100644
index 0000000..2761abd
--- /dev/null
+++ b/features/org.eclipse.egf.common.feature/sourceTemplateFeature/epl-v10.html
@@ -0,0 +1,320 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta name="ProgId" content="Word.Document">
+<meta name="Generator" content="Microsoft Word 9">
+<meta name="Originator" content="Microsoft Word 9">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.gmf/features/org.eclipse.gmf.sdk-feature/sourceTemplateFeature/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Revision>2</o:Revision>
+ <o:TotalTime>3</o:TotalTime>
+ <o:Created>2004-03-05T23:03:00Z</o:Created>
+ <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+ <o:Pages>4</o:Pages>
+ <o:Words>1626</o:Words>
+ <o:Characters>9270</o:Characters>
+ <o:Lines>77</o:Lines>
+ <o:Paragraphs>18</o:Paragraphs>
+ <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+ <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+ font-family:Tahoma;
+ mso-fareast-font-family:"Times New Roman";}
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.common.feature/sourceTemplateFeature/feature.properties b/features/org.eclipse.egf.common.feature/sourceTemplateFeature/feature.properties
new file mode 100644
index 0000000..26c48a7
--- /dev/null
+++ b/features/org.eclipse.egf.common.feature/sourceTemplateFeature/feature.properties
@@ -0,0 +1,142 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+# "featureName" property - name of the feature
+featureName=EGF Common Source (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories Common Source.
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Modeling Project CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.egf.common.feature/sourceTemplateFeature/license.html b/features/org.eclipse.egf.common.feature/sourceTemplateFeature/license.html
new file mode 100644
index 0000000..e819bbc
--- /dev/null
+++ b/features/org.eclipse.egf.common.feature/sourceTemplateFeature/license.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.common.feature/sourceTemplatePlugin/about.html b/features/org.eclipse.egf.common.feature/sourceTemplatePlugin/about.html
new file mode 100644
index 0000000..caeb225
--- /dev/null
+++ b/features/org.eclipse.egf.common.feature/sourceTemplatePlugin/about.html
@@ -0,0 +1,27 @@
+<!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>February 2, 2009</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/features/org.eclipse.egf.common.feature/sourceTemplatePlugin/about.ini b/features/org.eclipse.egf.common.feature/sourceTemplatePlugin/about.ini
new file mode 100644
index 0000000..385f92e
--- /dev/null
+++ b/features/org.eclipse.egf.common.feature/sourceTemplatePlugin/about.ini
@@ -0,0 +1,28 @@
+# about.ini
+# contains information about a feature
+# java.util.Properties file (ISO-8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%aboutText
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=fc32.gif
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (translated)
+# needed for primary features only
+appName=%featureName
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# optional
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
diff --git a/features/org.eclipse.egf.common.feature/sourceTemplatePlugin/about.mappings b/features/org.eclipse.egf.common.feature/sourceTemplatePlugin/about.mappings
new file mode 100644
index 0000000..a06fc50
--- /dev/null
+++ b/features/org.eclipse.egf.common.feature/sourceTemplatePlugin/about.mappings
@@ -0,0 +1,17 @@
+##
+# 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
+##
+
+# about.mappings
+# contains fill-ins for about.properties
+# java.util.Properties file (ISO-8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@
diff --git a/features/org.eclipse.egf.common.feature/sourceTemplatePlugin/about.properties b/features/org.eclipse.egf.common.feature/sourceTemplatePlugin/about.properties
new file mode 100644
index 0000000..b4f03d9
--- /dev/null
+++ b/features/org.eclipse.egf.common.feature/sourceTemplatePlugin/about.properties
@@ -0,0 +1,39 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+aboutText=EGF Common Source (Incubation)\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+Copyright (c) Thales Corporate Services S.A.S, 2009-2010 and others. All rights reserved.\n\
+\n\
+Visit http://www.eclipse.org/proposals/egf/
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.common.feature/sourceTemplatePlugin/build.properties b/features/org.eclipse.egf.common.feature/sourceTemplatePlugin/build.properties
new file mode 100644
index 0000000..0e50697
--- /dev/null
+++ b/features/org.eclipse.egf.common.feature/sourceTemplatePlugin/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = fc32.gif,\
+ about.*,\
+ plugin.*,\
+ src/,\
+ META-INF/
+sourcePlugin=true
+src.includes = about.html
diff --git a/features/org.eclipse.egf.common.feature/sourceTemplatePlugin/fc32.gif b/features/org.eclipse.egf.common.feature/sourceTemplatePlugin/fc32.gif
new file mode 100644
index 0000000..f9fe86c
--- /dev/null
+++ b/features/org.eclipse.egf.common.feature/sourceTemplatePlugin/fc32.gif
Binary files differ
diff --git a/features/org.eclipse.egf.common.feature/sourceTemplatePlugin/plugin.properties b/features/org.eclipse.egf.common.feature/sourceTemplatePlugin/plugin.properties
new file mode 100644
index 0000000..592f2dc
--- /dev/null
+++ b/features/org.eclipse.egf.common.feature/sourceTemplatePlugin/plugin.properties
@@ -0,0 +1,27 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+pluginName=EGF Common Source (Incubation)
+providerName=Eclipse Modeling Project
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.common.ui.feature/.project b/features/org.eclipse.egf.common.ui.feature/.project
new file mode 100644
index 0000000..983841a
--- /dev/null
+++ b/features/org.eclipse.egf.common.ui.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.common.ui.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.egf.common.ui.feature/.settings/org.eclipse.core.resources.prefs b/features/org.eclipse.egf.common.ui.feature/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..bf8c050
--- /dev/null
+++ b/features/org.eclipse.egf.common.ui.feature/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,12 @@
+#Mon Feb 15 16:39:20 CET 2010
+eclipse.preferences.version=1
+encoding//rootfiles/epl-v10.html=ISO-8859-1
+encoding//rootfiles/notice.html=ISO-8859-1
+encoding//sourceTemplateBundle/about.html=ISO-8859-1
+encoding//sourceTemplateFeature/epl-v10.html=ISO-8859-1
+encoding//sourceTemplateFeature/license.html=ISO-8859-1
+encoding//sourceTemplatePlugin/about.html=ISO-8859-1
+encoding//sourceTemplatePlugin/about.ini=ISO-8859-1
+encoding//sourceTemplatePlugin/about.mappings=ISO-8859-1
+encoding/epl-v10.html=ISO-8859-1
+encoding/license.html=ISO-8859-1
diff --git a/features/org.eclipse.egf.common.ui.feature/build.properties b/features/org.eclipse.egf.common.ui.feature/build.properties
new file mode 100644
index 0000000..811446e
--- /dev/null
+++ b/features/org.eclipse.egf.common.ui.feature/build.properties
@@ -0,0 +1,20 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = feature.*,\
+ epl-v10.html,\
+ license.html,\
+ eclipse_update_120.jpg
+src.includes = epl-v10.html,\
+ license.html
+root=rootfiles
+generate.feature@org.eclipse.egf.common.ui.source=org.eclipse.egf.common.ui
diff --git a/features/org.eclipse.egf.common.ui.feature/eclipse_update_120.jpg b/features/org.eclipse.egf.common.ui.feature/eclipse_update_120.jpg
new file mode 100644
index 0000000..bfdf708
--- /dev/null
+++ b/features/org.eclipse.egf.common.ui.feature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.common.ui.feature/epl-v10.html b/features/org.eclipse.egf.common.ui.feature/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.common.ui.feature/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.common.ui.feature/feature.properties b/features/org.eclipse.egf.common.ui.feature/feature.properties
new file mode 100644
index 0000000..ca40b9f
--- /dev/null
+++ b/features/org.eclipse.egf.common.ui.feature/feature.properties
@@ -0,0 +1,135 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# "featureName" property - name of the feature
+featureName=EGF Common UI (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories Common UI.
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.egf.common.ui.feature/feature.xml b/features/org.eclipse.egf.common.ui.feature/feature.xml
new file mode 100644
index 0000000..0280185
--- /dev/null
+++ b/features/org.eclipse.egf.common.ui.feature/feature.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.egf.common.ui"
+ label="%featureName"
+ version="0.2.3.qualifier"
+ provider-name="%providerName"
+ plugin="org.eclipse.egf.common.ui"
+ image="eclipse_update_120.jpg"
+>
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ 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
+ </copyright>
+
+ <license
+ url="%licenseURL"
+ >
+ %license
+ </license>
+
+ <url>
+ <update
+ label="%EMFTUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emft/updates/"
+ />
+ <discovery
+ label="%EMFUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emf/updates/"
+ />
+ <discovery
+ label="%EMFTUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emft/updates/"
+ />
+ </url>
+
+ <requires>
+ <import
+ feature="org.eclipse.emf.common.ui"
+ version="2.5.0.v200906151043"
+ match="compatible"
+ />
+ <import
+ feature="org.eclipse.emf.edit.ui"
+ version="2.5.0.v200906151043"
+ match="compatible"
+ />
+ </requires>
+
+ <includes
+ id="org.eclipse.egf.common.ui.source"
+ version="0.0.0"
+ />
+
+ <includes
+ id="org.eclipse.egf.common"
+ version="0.0.0"
+ />
+
+ <plugin
+ id="org.eclipse.egf.common.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"
+ />
+
+ <plugin
+ id="org.eclipse.egf.console"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"
+ />
+
+</feature>
diff --git a/features/org.eclipse.egf.common.ui.feature/license.html b/features/org.eclipse.egf.common.ui.feature/license.html
new file mode 100644
index 0000000..a9b560f
--- /dev/null
+++ b/features/org.eclipse.egf.common.ui.feature/license.html
@@ -0,0 +1,79 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also 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>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
+ modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body>
+</html>
diff --git a/features/org.eclipse.egf.common.ui.feature/rootfiles/epl-v10.html b/features/org.eclipse.egf.common.ui.feature/rootfiles/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.common.ui.feature/rootfiles/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.common.ui.feature/rootfiles/notice.html b/features/org.eclipse.egf.common.ui.feature/rootfiles/notice.html
new file mode 100644
index 0000000..64d8c4c
--- /dev/null
+++ b/features/org.eclipse.egf.common.ui.feature/rootfiles/notice.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.common.ui.feature/sourceTemplateBundle/about.html b/features/org.eclipse.egf.common.ui.feature/sourceTemplateBundle/about.html
new file mode 100644
index 0000000..caeb225
--- /dev/null
+++ b/features/org.eclipse.egf.common.ui.feature/sourceTemplateBundle/about.html
@@ -0,0 +1,27 @@
+<!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>February 2, 2009</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/features/org.eclipse.egf.common.ui.feature/sourceTemplateBundle/plugin.properties b/features/org.eclipse.egf.common.ui.feature/sourceTemplateBundle/plugin.properties
new file mode 100644
index 0000000..2d392e9
--- /dev/null
+++ b/features/org.eclipse.egf.common.ui.feature/sourceTemplateBundle/plugin.properties
@@ -0,0 +1,27 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+pluginName=EGF Common UI Source (Incubation)
+providerName=Eclipse Modeling Project
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.common.ui.feature/sourceTemplateFeature/build.properties b/features/org.eclipse.egf.common.ui.feature/sourceTemplateFeature/build.properties
new file mode 100644
index 0000000..ec40e29
--- /dev/null
+++ b/features/org.eclipse.egf.common.ui.feature/sourceTemplateFeature/build.properties
@@ -0,0 +1,17 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes =\
+epl-v10.html,\
+feature.*,\
+eclipse_update_120.jpg,\
+license.html
diff --git a/features/org.eclipse.egf.common.ui.feature/sourceTemplateFeature/eclipse_update_120.jpg b/features/org.eclipse.egf.common.ui.feature/sourceTemplateFeature/eclipse_update_120.jpg
new file mode 100644
index 0000000..68e3e02
--- /dev/null
+++ b/features/org.eclipse.egf.common.ui.feature/sourceTemplateFeature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.common.ui.feature/sourceTemplateFeature/epl-v10.html b/features/org.eclipse.egf.common.ui.feature/sourceTemplateFeature/epl-v10.html
new file mode 100644
index 0000000..2761abd
--- /dev/null
+++ b/features/org.eclipse.egf.common.ui.feature/sourceTemplateFeature/epl-v10.html
@@ -0,0 +1,320 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta name="ProgId" content="Word.Document">
+<meta name="Generator" content="Microsoft Word 9">
+<meta name="Originator" content="Microsoft Word 9">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.gmf/features/org.eclipse.gmf.sdk-feature/sourceTemplateFeature/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Revision>2</o:Revision>
+ <o:TotalTime>3</o:TotalTime>
+ <o:Created>2004-03-05T23:03:00Z</o:Created>
+ <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+ <o:Pages>4</o:Pages>
+ <o:Words>1626</o:Words>
+ <o:Characters>9270</o:Characters>
+ <o:Lines>77</o:Lines>
+ <o:Paragraphs>18</o:Paragraphs>
+ <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+ <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+ font-family:Tahoma;
+ mso-fareast-font-family:"Times New Roman";}
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.common.ui.feature/sourceTemplateFeature/feature.properties b/features/org.eclipse.egf.common.ui.feature/sourceTemplateFeature/feature.properties
new file mode 100644
index 0000000..5e9855a
--- /dev/null
+++ b/features/org.eclipse.egf.common.ui.feature/sourceTemplateFeature/feature.properties
@@ -0,0 +1,147 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+# "featureName" property - name of the feature
+featureName=EGF Common UI Source (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories Common UI Source.
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Modeling Project CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.common.ui.feature/sourceTemplateFeature/license.html b/features/org.eclipse.egf.common.ui.feature/sourceTemplateFeature/license.html
new file mode 100644
index 0000000..e819bbc
--- /dev/null
+++ b/features/org.eclipse.egf.common.ui.feature/sourceTemplateFeature/license.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.common.ui.feature/sourceTemplatePlugin/about.html b/features/org.eclipse.egf.common.ui.feature/sourceTemplatePlugin/about.html
new file mode 100644
index 0000000..caeb225
--- /dev/null
+++ b/features/org.eclipse.egf.common.ui.feature/sourceTemplatePlugin/about.html
@@ -0,0 +1,27 @@
+<!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>February 2, 2009</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/features/org.eclipse.egf.common.ui.feature/sourceTemplatePlugin/about.ini b/features/org.eclipse.egf.common.ui.feature/sourceTemplatePlugin/about.ini
new file mode 100644
index 0000000..546150b
--- /dev/null
+++ b/features/org.eclipse.egf.common.ui.feature/sourceTemplatePlugin/about.ini
@@ -0,0 +1,27 @@
+# about.ini
+# contains information about a feature
+# java.util.Properties file (ISO-8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%aboutText
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=fc32.gif
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (translated)
+# needed for primary features only
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# optional
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
diff --git a/features/org.eclipse.egf.common.ui.feature/sourceTemplatePlugin/about.mappings b/features/org.eclipse.egf.common.ui.feature/sourceTemplatePlugin/about.mappings
new file mode 100644
index 0000000..a06fc50
--- /dev/null
+++ b/features/org.eclipse.egf.common.ui.feature/sourceTemplatePlugin/about.mappings
@@ -0,0 +1,17 @@
+##
+# 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
+##
+
+# about.mappings
+# contains fill-ins for about.properties
+# java.util.Properties file (ISO-8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@
diff --git a/features/org.eclipse.egf.common.ui.feature/sourceTemplatePlugin/about.properties b/features/org.eclipse.egf.common.ui.feature/sourceTemplatePlugin/about.properties
new file mode 100644
index 0000000..6bf385f
--- /dev/null
+++ b/features/org.eclipse.egf.common.ui.feature/sourceTemplatePlugin/about.properties
@@ -0,0 +1,39 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+aboutText=EGF Common UI Source (Incubation)\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+Copyright (c) Thales Corporate Services S.A.S, 2009-2010 and others. All rights reserved.\n\
+\n\
+Visit http://www.eclipse.org/proposals/egf/
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.common.ui.feature/sourceTemplatePlugin/build.properties b/features/org.eclipse.egf.common.ui.feature/sourceTemplatePlugin/build.properties
new file mode 100644
index 0000000..0e50697
--- /dev/null
+++ b/features/org.eclipse.egf.common.ui.feature/sourceTemplatePlugin/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = fc32.gif,\
+ about.*,\
+ plugin.*,\
+ src/,\
+ META-INF/
+sourcePlugin=true
+src.includes = about.html
diff --git a/features/org.eclipse.egf.common.ui.feature/sourceTemplatePlugin/fc32.gif b/features/org.eclipse.egf.common.ui.feature/sourceTemplatePlugin/fc32.gif
new file mode 100644
index 0000000..f9fe86c
--- /dev/null
+++ b/features/org.eclipse.egf.common.ui.feature/sourceTemplatePlugin/fc32.gif
Binary files differ
diff --git a/features/org.eclipse.egf.common.ui.feature/sourceTemplatePlugin/plugin.properties b/features/org.eclipse.egf.common.ui.feature/sourceTemplatePlugin/plugin.properties
new file mode 100644
index 0000000..2d392e9
--- /dev/null
+++ b/features/org.eclipse.egf.common.ui.feature/sourceTemplatePlugin/plugin.properties
@@ -0,0 +1,27 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+pluginName=EGF Common UI Source (Incubation)
+providerName=Eclipse Modeling Project
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.core.feature/.project b/features/org.eclipse.egf.core.feature/.project
new file mode 100644
index 0000000..b1978f5
--- /dev/null
+++ b/features/org.eclipse.egf.core.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.core.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.egf.core.feature/.settings/org.eclipse.core.resources.prefs b/features/org.eclipse.egf.core.feature/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..65ece17
--- /dev/null
+++ b/features/org.eclipse.egf.core.feature/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,11 @@
+#Mon Feb 23 14:20:30 CET 2009
+encoding//rootfiles/epl-v10.html=ISO-8859-1
+encoding//rootfiles/notice.html=ISO-8859-1
+encoding//sourceTemplateBundle/about.html=ISO-8859-1
+encoding//sourceTemplateFeature/epl-v10.html=ISO-8859-1
+encoding//sourceTemplateFeature/license.html=ISO-8859-1
+encoding//sourceTemplatePlugin/about.html=ISO-8859-1
+encoding//sourceTemplatePlugin/about.ini=ISO-8859-1
+encoding//sourceTemplatePlugin/about.mappings=ISO-8859-1
+encoding/epl-v10.html=ISO-8859-1
+encoding/license.html=ISO-8859-1
diff --git a/features/org.eclipse.egf.core.feature/build.properties b/features/org.eclipse.egf.core.feature/build.properties
new file mode 100644
index 0000000..7cd4d77
--- /dev/null
+++ b/features/org.eclipse.egf.core.feature/build.properties
@@ -0,0 +1,20 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = feature.*,\
+ epl-v10.html,\
+ license.html,\
+ eclipse_update_120.jpg
+src.includes = epl-v10.html,\
+ license.html
+root=rootfiles
+generate.feature@org.eclipse.egf.core.source=org.eclipse.egf.core
diff --git a/features/org.eclipse.egf.core.feature/eclipse_update_120.jpg b/features/org.eclipse.egf.core.feature/eclipse_update_120.jpg
new file mode 100644
index 0000000..bfdf708
--- /dev/null
+++ b/features/org.eclipse.egf.core.feature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.core.feature/epl-v10.html b/features/org.eclipse.egf.core.feature/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.core.feature/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.core.feature/feature.properties b/features/org.eclipse.egf.core.feature/feature.properties
new file mode 100644
index 0000000..7134d65
--- /dev/null
+++ b/features/org.eclipse.egf.core.feature/feature.properties
@@ -0,0 +1,135 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# "featureName" property - name of the feature
+featureName=EGF Core (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories Core.
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.egf.core.feature/feature.xml b/features/org.eclipse.egf.core.feature/feature.xml
new file mode 100644
index 0000000..4383c84
--- /dev/null
+++ b/features/org.eclipse.egf.core.feature/feature.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.egf.core"
+ label="%featureName"
+ version="0.2.3.qualifier"
+ provider-name="%providerName"
+ plugin="org.eclipse.egf.core"
+ image="eclipse_update_120.jpg"
+>
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ 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
+ </copyright>
+
+ <license
+ url="%licenseURL"
+ >
+ %license
+ </license>
+
+ <url>
+ <update
+ label="%EMFTUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emft/updates/"
+ />
+ <discovery
+ label="%EMFUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emf/updates/"
+ />
+ <discovery
+ label="%EMFTUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emft/updates/"
+ />
+ </url>
+
+ <requires>
+ <import feature="org.eclipse.emf.workspace" version="1.3.0.v200901271819-35-8s733L366A4F6E" match="compatible"/>
+ </requires>
+
+ <includes
+ id="org.eclipse.egf.common"
+ version="0.0.0"
+ />
+
+ <includes
+ id="org.eclipse.egf.core.source"
+ version="0.0.0"
+ />
+
+ <plugin
+ id="org.eclipse.egf.core"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"
+ />
+
+ <plugin
+ id="org.eclipse.egf.core.pde"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"
+ />
+
+ <plugin
+ id="org.eclipse.egf.core.platform"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"
+ />
+
+ <plugin
+ id="org.eclipse.egf.core.producer"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"
+ />
+
+</feature>
diff --git a/features/org.eclipse.egf.core.feature/license.html b/features/org.eclipse.egf.core.feature/license.html
new file mode 100644
index 0000000..a9b560f
--- /dev/null
+++ b/features/org.eclipse.egf.core.feature/license.html
@@ -0,0 +1,79 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also 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>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
+ modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body>
+</html>
diff --git a/features/org.eclipse.egf.core.feature/rootfiles/epl-v10.html b/features/org.eclipse.egf.core.feature/rootfiles/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.core.feature/rootfiles/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.core.feature/rootfiles/notice.html b/features/org.eclipse.egf.core.feature/rootfiles/notice.html
new file mode 100644
index 0000000..64d8c4c
--- /dev/null
+++ b/features/org.eclipse.egf.core.feature/rootfiles/notice.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.core.feature/sourceTemplateBundle/about.html b/features/org.eclipse.egf.core.feature/sourceTemplateBundle/about.html
new file mode 100644
index 0000000..caeb225
--- /dev/null
+++ b/features/org.eclipse.egf.core.feature/sourceTemplateBundle/about.html
@@ -0,0 +1,27 @@
+<!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>February 2, 2009</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/features/org.eclipse.egf.core.feature/sourceTemplateBundle/plugin.properties b/features/org.eclipse.egf.core.feature/sourceTemplateBundle/plugin.properties
new file mode 100644
index 0000000..f1616bb
--- /dev/null
+++ b/features/org.eclipse.egf.core.feature/sourceTemplateBundle/plugin.properties
@@ -0,0 +1,27 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+pluginName=EGF Core Source (Incubation)
+providerName=Eclipse Modeling Project
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.core.feature/sourceTemplateFeature/build.properties b/features/org.eclipse.egf.core.feature/sourceTemplateFeature/build.properties
new file mode 100644
index 0000000..ec40e29
--- /dev/null
+++ b/features/org.eclipse.egf.core.feature/sourceTemplateFeature/build.properties
@@ -0,0 +1,17 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes =\
+epl-v10.html,\
+feature.*,\
+eclipse_update_120.jpg,\
+license.html
diff --git a/features/org.eclipse.egf.core.feature/sourceTemplateFeature/eclipse_update_120.jpg b/features/org.eclipse.egf.core.feature/sourceTemplateFeature/eclipse_update_120.jpg
new file mode 100644
index 0000000..68e3e02
--- /dev/null
+++ b/features/org.eclipse.egf.core.feature/sourceTemplateFeature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.core.feature/sourceTemplateFeature/epl-v10.html b/features/org.eclipse.egf.core.feature/sourceTemplateFeature/epl-v10.html
new file mode 100644
index 0000000..2761abd
--- /dev/null
+++ b/features/org.eclipse.egf.core.feature/sourceTemplateFeature/epl-v10.html
@@ -0,0 +1,320 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta name="ProgId" content="Word.Document">
+<meta name="Generator" content="Microsoft Word 9">
+<meta name="Originator" content="Microsoft Word 9">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.gmf/features/org.eclipse.gmf.sdk-feature/sourceTemplateFeature/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Revision>2</o:Revision>
+ <o:TotalTime>3</o:TotalTime>
+ <o:Created>2004-03-05T23:03:00Z</o:Created>
+ <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+ <o:Pages>4</o:Pages>
+ <o:Words>1626</o:Words>
+ <o:Characters>9270</o:Characters>
+ <o:Lines>77</o:Lines>
+ <o:Paragraphs>18</o:Paragraphs>
+ <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+ <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+ font-family:Tahoma;
+ mso-fareast-font-family:"Times New Roman";}
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.core.feature/sourceTemplateFeature/feature.properties b/features/org.eclipse.egf.core.feature/sourceTemplateFeature/feature.properties
new file mode 100644
index 0000000..a0640f0
--- /dev/null
+++ b/features/org.eclipse.egf.core.feature/sourceTemplateFeature/feature.properties
@@ -0,0 +1,147 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+# "featureName" property - name of the feature
+featureName=EGF Core Source (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories Core Source.
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Modeling Project CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.core.feature/sourceTemplateFeature/license.html b/features/org.eclipse.egf.core.feature/sourceTemplateFeature/license.html
new file mode 100644
index 0000000..e819bbc
--- /dev/null
+++ b/features/org.eclipse.egf.core.feature/sourceTemplateFeature/license.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.core.feature/sourceTemplatePlugin/about.html b/features/org.eclipse.egf.core.feature/sourceTemplatePlugin/about.html
new file mode 100644
index 0000000..caeb225
--- /dev/null
+++ b/features/org.eclipse.egf.core.feature/sourceTemplatePlugin/about.html
@@ -0,0 +1,27 @@
+<!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>February 2, 2009</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/features/org.eclipse.egf.core.feature/sourceTemplatePlugin/about.ini b/features/org.eclipse.egf.core.feature/sourceTemplatePlugin/about.ini
new file mode 100644
index 0000000..546150b
--- /dev/null
+++ b/features/org.eclipse.egf.core.feature/sourceTemplatePlugin/about.ini
@@ -0,0 +1,27 @@
+# about.ini
+# contains information about a feature
+# java.util.Properties file (ISO-8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%aboutText
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=fc32.gif
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (translated)
+# needed for primary features only
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# optional
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
diff --git a/features/org.eclipse.egf.core.feature/sourceTemplatePlugin/about.mappings b/features/org.eclipse.egf.core.feature/sourceTemplatePlugin/about.mappings
new file mode 100644
index 0000000..a06fc50
--- /dev/null
+++ b/features/org.eclipse.egf.core.feature/sourceTemplatePlugin/about.mappings
@@ -0,0 +1,17 @@
+##
+# 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
+##
+
+# about.mappings
+# contains fill-ins for about.properties
+# java.util.Properties file (ISO-8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@
diff --git a/features/org.eclipse.egf.core.feature/sourceTemplatePlugin/about.properties b/features/org.eclipse.egf.core.feature/sourceTemplatePlugin/about.properties
new file mode 100644
index 0000000..9cd813f
--- /dev/null
+++ b/features/org.eclipse.egf.core.feature/sourceTemplatePlugin/about.properties
@@ -0,0 +1,39 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+aboutText=EGF Core Source (Incubation)\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+Copyright (c) Thales Corporate Services S.A.S, 2009-2010 and others. All rights reserved.\n\
+\n\
+Visit http://www.eclipse.org/proposals/egf/
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.core.feature/sourceTemplatePlugin/build.properties b/features/org.eclipse.egf.core.feature/sourceTemplatePlugin/build.properties
new file mode 100644
index 0000000..0e50697
--- /dev/null
+++ b/features/org.eclipse.egf.core.feature/sourceTemplatePlugin/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = fc32.gif,\
+ about.*,\
+ plugin.*,\
+ src/,\
+ META-INF/
+sourcePlugin=true
+src.includes = about.html
diff --git a/features/org.eclipse.egf.core.feature/sourceTemplatePlugin/fc32.gif b/features/org.eclipse.egf.core.feature/sourceTemplatePlugin/fc32.gif
new file mode 100644
index 0000000..f9fe86c
--- /dev/null
+++ b/features/org.eclipse.egf.core.feature/sourceTemplatePlugin/fc32.gif
Binary files differ
diff --git a/features/org.eclipse.egf.core.feature/sourceTemplatePlugin/plugin.properties b/features/org.eclipse.egf.core.feature/sourceTemplatePlugin/plugin.properties
new file mode 100644
index 0000000..f1616bb
--- /dev/null
+++ b/features/org.eclipse.egf.core.feature/sourceTemplatePlugin/plugin.properties
@@ -0,0 +1,27 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+pluginName=EGF Core Source (Incubation)
+providerName=Eclipse Modeling Project
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.core.ui.feature/.project b/features/org.eclipse.egf.core.ui.feature/.project
new file mode 100644
index 0000000..dac5a33
--- /dev/null
+++ b/features/org.eclipse.egf.core.ui.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.core.ui.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.egf.core.ui.feature/.settings/org.eclipse.core.resources.prefs b/features/org.eclipse.egf.core.ui.feature/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..65ece17
--- /dev/null
+++ b/features/org.eclipse.egf.core.ui.feature/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,11 @@
+#Mon Feb 23 14:20:30 CET 2009
+encoding//rootfiles/epl-v10.html=ISO-8859-1
+encoding//rootfiles/notice.html=ISO-8859-1
+encoding//sourceTemplateBundle/about.html=ISO-8859-1
+encoding//sourceTemplateFeature/epl-v10.html=ISO-8859-1
+encoding//sourceTemplateFeature/license.html=ISO-8859-1
+encoding//sourceTemplatePlugin/about.html=ISO-8859-1
+encoding//sourceTemplatePlugin/about.ini=ISO-8859-1
+encoding//sourceTemplatePlugin/about.mappings=ISO-8859-1
+encoding/epl-v10.html=ISO-8859-1
+encoding/license.html=ISO-8859-1
diff --git a/features/org.eclipse.egf.core.ui.feature/build.properties b/features/org.eclipse.egf.core.ui.feature/build.properties
new file mode 100644
index 0000000..74c6c96
--- /dev/null
+++ b/features/org.eclipse.egf.core.ui.feature/build.properties
@@ -0,0 +1,20 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = feature.*,\
+ epl-v10.html,\
+ license.html,\
+ eclipse_update_120.jpg
+src.includes = epl-v10.html,\
+ license.html
+root=rootfiles
+generate.feature@org.eclipse.egf.core.ui.source=org.eclipse.egf.core.ui
diff --git a/features/org.eclipse.egf.core.ui.feature/eclipse_update_120.jpg b/features/org.eclipse.egf.core.ui.feature/eclipse_update_120.jpg
new file mode 100644
index 0000000..bfdf708
--- /dev/null
+++ b/features/org.eclipse.egf.core.ui.feature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.core.ui.feature/epl-v10.html b/features/org.eclipse.egf.core.ui.feature/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.core.ui.feature/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.core.ui.feature/feature.properties b/features/org.eclipse.egf.core.ui.feature/feature.properties
new file mode 100644
index 0000000..b90a8b5
--- /dev/null
+++ b/features/org.eclipse.egf.core.ui.feature/feature.properties
@@ -0,0 +1,135 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# "featureName" property - name of the feature
+featureName=EGF Core UI (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories Core UI.
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.egf.core.ui.feature/feature.xml b/features/org.eclipse.egf.core.ui.feature/feature.xml
new file mode 100644
index 0000000..290b136
--- /dev/null
+++ b/features/org.eclipse.egf.core.ui.feature/feature.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.egf.core.ui"
+ label="%featureName"
+ version="0.2.3.qualifier"
+ provider-name="%providerName"
+ plugin="org.eclipse.egf.core.ui"
+ image="eclipse_update_120.jpg"
+>
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ 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
+ </copyright>
+
+ <license
+ url="%licenseURL"
+ >
+ %license
+ </license>
+
+ <url>
+ <update
+ label="%EMFTUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emft/updates/"
+ />
+ <discovery
+ label="%EMFUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emf/updates/"
+ />
+ <discovery
+ label="%EMFTUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emft/updates/"
+ />
+ </url>
+
+ <includes
+ id="org.eclipse.egf.common.ui"
+ version="0.0.0"
+ />
+
+ <includes
+ id="org.eclipse.egf.core"
+ version="0.0.0"
+ />
+
+ <includes
+ id="org.eclipse.egf.core.ui.source"
+ version="0.0.0"
+ />
+
+ <plugin
+ id="org.eclipse.egf.core.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"
+ />
+
+</feature>
diff --git a/features/org.eclipse.egf.core.ui.feature/license.html b/features/org.eclipse.egf.core.ui.feature/license.html
new file mode 100644
index 0000000..a9b560f
--- /dev/null
+++ b/features/org.eclipse.egf.core.ui.feature/license.html
@@ -0,0 +1,79 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also 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>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
+ modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body>
+</html>
diff --git a/features/org.eclipse.egf.core.ui.feature/rootfiles/epl-v10.html b/features/org.eclipse.egf.core.ui.feature/rootfiles/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.core.ui.feature/rootfiles/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.core.ui.feature/rootfiles/notice.html b/features/org.eclipse.egf.core.ui.feature/rootfiles/notice.html
new file mode 100644
index 0000000..64d8c4c
--- /dev/null
+++ b/features/org.eclipse.egf.core.ui.feature/rootfiles/notice.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.core.ui.feature/sourceTemplateBundle/about.html b/features/org.eclipse.egf.core.ui.feature/sourceTemplateBundle/about.html
new file mode 100644
index 0000000..caeb225
--- /dev/null
+++ b/features/org.eclipse.egf.core.ui.feature/sourceTemplateBundle/about.html
@@ -0,0 +1,27 @@
+<!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>February 2, 2009</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/features/org.eclipse.egf.core.ui.feature/sourceTemplateBundle/plugin.properties b/features/org.eclipse.egf.core.ui.feature/sourceTemplateBundle/plugin.properties
new file mode 100644
index 0000000..a00a5c2
--- /dev/null
+++ b/features/org.eclipse.egf.core.ui.feature/sourceTemplateBundle/plugin.properties
@@ -0,0 +1,27 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+pluginName=EGF Core UI Source (Incubation)
+providerName=Eclipse Modeling Project
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.core.ui.feature/sourceTemplateFeature/build.properties b/features/org.eclipse.egf.core.ui.feature/sourceTemplateFeature/build.properties
new file mode 100644
index 0000000..ec40e29
--- /dev/null
+++ b/features/org.eclipse.egf.core.ui.feature/sourceTemplateFeature/build.properties
@@ -0,0 +1,17 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes =\
+epl-v10.html,\
+feature.*,\
+eclipse_update_120.jpg,\
+license.html
diff --git a/features/org.eclipse.egf.core.ui.feature/sourceTemplateFeature/eclipse_update_120.jpg b/features/org.eclipse.egf.core.ui.feature/sourceTemplateFeature/eclipse_update_120.jpg
new file mode 100644
index 0000000..68e3e02
--- /dev/null
+++ b/features/org.eclipse.egf.core.ui.feature/sourceTemplateFeature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.core.ui.feature/sourceTemplateFeature/epl-v10.html b/features/org.eclipse.egf.core.ui.feature/sourceTemplateFeature/epl-v10.html
new file mode 100644
index 0000000..2761abd
--- /dev/null
+++ b/features/org.eclipse.egf.core.ui.feature/sourceTemplateFeature/epl-v10.html
@@ -0,0 +1,320 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta name="ProgId" content="Word.Document">
+<meta name="Generator" content="Microsoft Word 9">
+<meta name="Originator" content="Microsoft Word 9">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.gmf/features/org.eclipse.gmf.sdk-feature/sourceTemplateFeature/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Revision>2</o:Revision>
+ <o:TotalTime>3</o:TotalTime>
+ <o:Created>2004-03-05T23:03:00Z</o:Created>
+ <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+ <o:Pages>4</o:Pages>
+ <o:Words>1626</o:Words>
+ <o:Characters>9270</o:Characters>
+ <o:Lines>77</o:Lines>
+ <o:Paragraphs>18</o:Paragraphs>
+ <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+ <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+ font-family:Tahoma;
+ mso-fareast-font-family:"Times New Roman";}
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.core.ui.feature/sourceTemplateFeature/feature.properties b/features/org.eclipse.egf.core.ui.feature/sourceTemplateFeature/feature.properties
new file mode 100644
index 0000000..56b93d2
--- /dev/null
+++ b/features/org.eclipse.egf.core.ui.feature/sourceTemplateFeature/feature.properties
@@ -0,0 +1,147 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+# "featureName" property - name of the feature
+featureName=EGF Core UI Developer Source (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories Core UI Source.
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Modeling Project CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.core.ui.feature/sourceTemplateFeature/license.html b/features/org.eclipse.egf.core.ui.feature/sourceTemplateFeature/license.html
new file mode 100644
index 0000000..e819bbc
--- /dev/null
+++ b/features/org.eclipse.egf.core.ui.feature/sourceTemplateFeature/license.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.core.ui.feature/sourceTemplatePlugin/about.html b/features/org.eclipse.egf.core.ui.feature/sourceTemplatePlugin/about.html
new file mode 100644
index 0000000..caeb225
--- /dev/null
+++ b/features/org.eclipse.egf.core.ui.feature/sourceTemplatePlugin/about.html
@@ -0,0 +1,27 @@
+<!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>February 2, 2009</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/features/org.eclipse.egf.core.ui.feature/sourceTemplatePlugin/about.ini b/features/org.eclipse.egf.core.ui.feature/sourceTemplatePlugin/about.ini
new file mode 100644
index 0000000..546150b
--- /dev/null
+++ b/features/org.eclipse.egf.core.ui.feature/sourceTemplatePlugin/about.ini
@@ -0,0 +1,27 @@
+# about.ini
+# contains information about a feature
+# java.util.Properties file (ISO-8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%aboutText
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=fc32.gif
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (translated)
+# needed for primary features only
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# optional
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
diff --git a/features/org.eclipse.egf.core.ui.feature/sourceTemplatePlugin/about.mappings b/features/org.eclipse.egf.core.ui.feature/sourceTemplatePlugin/about.mappings
new file mode 100644
index 0000000..a06fc50
--- /dev/null
+++ b/features/org.eclipse.egf.core.ui.feature/sourceTemplatePlugin/about.mappings
@@ -0,0 +1,17 @@
+##
+# 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
+##
+
+# about.mappings
+# contains fill-ins for about.properties
+# java.util.Properties file (ISO-8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@
diff --git a/features/org.eclipse.egf.core.ui.feature/sourceTemplatePlugin/about.properties b/features/org.eclipse.egf.core.ui.feature/sourceTemplatePlugin/about.properties
new file mode 100644
index 0000000..fd978f0
--- /dev/null
+++ b/features/org.eclipse.egf.core.ui.feature/sourceTemplatePlugin/about.properties
@@ -0,0 +1,39 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+aboutText=EGF Core UI Source (Incubation)\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+Copyright (c) Thales Corporate Services S.A.S, 2009-2010 and others. All rights reserved.\n\
+\n\
+Visit http://www.eclipse.org/proposals/egf/
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.core.ui.feature/sourceTemplatePlugin/build.properties b/features/org.eclipse.egf.core.ui.feature/sourceTemplatePlugin/build.properties
new file mode 100644
index 0000000..0e50697
--- /dev/null
+++ b/features/org.eclipse.egf.core.ui.feature/sourceTemplatePlugin/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = fc32.gif,\
+ about.*,\
+ plugin.*,\
+ src/,\
+ META-INF/
+sourcePlugin=true
+src.includes = about.html
diff --git a/features/org.eclipse.egf.core.ui.feature/sourceTemplatePlugin/fc32.gif b/features/org.eclipse.egf.core.ui.feature/sourceTemplatePlugin/fc32.gif
new file mode 100644
index 0000000..f9fe86c
--- /dev/null
+++ b/features/org.eclipse.egf.core.ui.feature/sourceTemplatePlugin/fc32.gif
Binary files differ
diff --git a/features/org.eclipse.egf.core.ui.feature/sourceTemplatePlugin/plugin.properties b/features/org.eclipse.egf.core.ui.feature/sourceTemplatePlugin/plugin.properties
new file mode 100644
index 0000000..a00a5c2
--- /dev/null
+++ b/features/org.eclipse.egf.core.ui.feature/sourceTemplatePlugin/plugin.properties
@@ -0,0 +1,27 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+pluginName=EGF Core UI Source (Incubation)
+providerName=Eclipse Modeling Project
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.doc.feature/.project b/features/org.eclipse.egf.doc.feature/.project
new file mode 100644
index 0000000..36d6be6
--- /dev/null
+++ b/features/org.eclipse.egf.doc.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.doc.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.egf.doc.feature/.settings/org.eclipse.core.resources.prefs b/features/org.eclipse.egf.doc.feature/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..50db192
--- /dev/null
+++ b/features/org.eclipse.egf.doc.feature/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,4 @@
+#Mon Feb 15 16:41:20 CET 2010
+eclipse.preferences.version=1
+encoding/epl-v10.html=ISO-8859-1
+encoding/license.html=ISO-8859-1
diff --git a/features/org.eclipse.egf.doc.feature/build.properties b/features/org.eclipse.egf.doc.feature/build.properties
new file mode 100644
index 0000000..fcf9460
--- /dev/null
+++ b/features/org.eclipse.egf.doc.feature/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = feature.*,\
+ epl-v10.html,\
+ license.html,\
+ eclipse_update_120.jpg
+src.includes = epl-v10.html,\
+ license.html
+root=rootfiles
diff --git a/features/org.eclipse.egf.doc.feature/eclipse_update_120.jpg b/features/org.eclipse.egf.doc.feature/eclipse_update_120.jpg
new file mode 100644
index 0000000..bfdf708
--- /dev/null
+++ b/features/org.eclipse.egf.doc.feature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.doc.feature/epl-v10.html b/features/org.eclipse.egf.doc.feature/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.doc.feature/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.doc.feature/feature.properties b/features/org.eclipse.egf.doc.feature/feature.properties
new file mode 100644
index 0000000..8c0ae78
--- /dev/null
+++ b/features/org.eclipse.egf.doc.feature/feature.properties
@@ -0,0 +1,135 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# "featureName" property - name of the feature
+featureName=EGF Documentation (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories Documentation.
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.egf.doc.feature/feature.xml b/features/org.eclipse.egf.doc.feature/feature.xml
new file mode 100644
index 0000000..6c1fd78
--- /dev/null
+++ b/features/org.eclipse.egf.doc.feature/feature.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.egf.doc"
+ label="%featureName"
+ version="0.2.3.qualifier"
+ provider-name="%providerName"
+ plugin="org.eclipse.egf.doc.user"
+ image="eclipse_update_120.jpg"
+>
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ 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
+ </copyright>
+
+ <license
+ url="%licenseURL"
+ >
+ %license
+ </license>
+
+ <url>
+ <update
+ label="%EMFTUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emft/updates/"
+ />
+ <discovery
+ label="%EMFUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emf/updates/"
+ />
+ <discovery
+ label="%EMFTUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emft/updates/"
+ />
+ </url>
+
+ <requires>
+ <import
+ feature="org.eclipse.platform"
+ version="3.5.1.R35x_v20090910-9gEeG1_FthkNDSP2odXdThaOu9GFDPn83DGB7"
+ match="compatible"
+ />
+ <import
+ feature="org.eclipse.pde"
+ version="3.5.1.R35x_v20090811-7Z7_F9zFDX-aT6Ywvh8_S93"
+ match="compatible"
+ />
+ </requires>
+
+ <plugin
+ id="org.eclipse.egf.doc.user"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"
+ />
+
+ <plugin
+ id="org.eclipse.egf.engine.doc"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"
+ />
+
+ <plugin
+ id="org.eclipse.egf.engine.doc.pattern"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"
+ />
+
+</feature>
diff --git a/features/org.eclipse.egf.doc.feature/license.html b/features/org.eclipse.egf.doc.feature/license.html
new file mode 100644
index 0000000..a9b560f
--- /dev/null
+++ b/features/org.eclipse.egf.doc.feature/license.html
@@ -0,0 +1,79 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also 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>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
+ modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body>
+</html>
diff --git a/features/org.eclipse.egf.doc.feature/rootfiles/epl-v10.html b/features/org.eclipse.egf.doc.feature/rootfiles/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.doc.feature/rootfiles/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.doc.feature/rootfiles/notice.html b/features/org.eclipse.egf.doc.feature/rootfiles/notice.html
new file mode 100644
index 0000000..64d8c4c
--- /dev/null
+++ b/features/org.eclipse.egf.doc.feature/rootfiles/notice.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.examples.feature/.project b/features/org.eclipse.egf.examples.feature/.project
new file mode 100644
index 0000000..267e300
--- /dev/null
+++ b/features/org.eclipse.egf.examples.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.examples.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.egf.examples.feature/build.properties b/features/org.eclipse.egf.examples.feature/build.properties
new file mode 100644
index 0000000..8f4c253
--- /dev/null
+++ b/features/org.eclipse.egf.examples.feature/build.properties
@@ -0,0 +1,20 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = feature.*,\
+ epl-v10.html,\
+ license.html,\
+ eclipse_update_120.jpg
+src.includes = epl-v10.html,\
+ license.html
+root=rootfiles
+generate.feature@org.eclipse.egf.examples.source=org.eclipse.egf.examples
diff --git a/features/org.eclipse.egf.examples.feature/eclipse_update_120.jpg b/features/org.eclipse.egf.examples.feature/eclipse_update_120.jpg
new file mode 100644
index 0000000..bfdf708
--- /dev/null
+++ b/features/org.eclipse.egf.examples.feature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.examples.feature/epl-v10.html b/features/org.eclipse.egf.examples.feature/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.examples.feature/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.examples.feature/feature.properties b/features/org.eclipse.egf.examples.feature/feature.properties
new file mode 100644
index 0000000..0bb344c
--- /dev/null
+++ b/features/org.eclipse.egf.examples.feature/feature.properties
@@ -0,0 +1,135 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# "featureName" property - name of the feature
+featureName=EGF Examples (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories Examples.
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.egf.examples.feature/feature.xml b/features/org.eclipse.egf.examples.feature/feature.xml
new file mode 100644
index 0000000..5726097
--- /dev/null
+++ b/features/org.eclipse.egf.examples.feature/feature.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.egf.examples"
+ label="%featureName"
+ version="0.2.3.qualifier"
+ provider-name="%providerName"
+ plugin="org.eclipse.egf.examples.uc1"
+ image="eclipse_update_120.jpg"
+>
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ 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
+ </copyright>
+
+ <license
+ url="%licenseURL"
+ >
+ %license
+ </license>
+
+ <url>
+ <update
+ label="%EMFTUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emft/updates/"
+ />
+ <discovery
+ label="%EMFUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emf/updates/"
+ />
+ <discovery
+ label="%EMFTUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emft/updates/"
+ />
+ </url>
+
+ <includes
+ id="org.eclipse.egf"
+ version="0.0.0"
+ />
+
+ <includes
+ id="org.eclipse.egf.examples.source"
+ version="0.0.0"
+ />
+
+ <plugin
+ id="org.eclipse.egf.examples.uc1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"
+ />
+
+</feature>
diff --git a/features/org.eclipse.egf.examples.feature/license.html b/features/org.eclipse.egf.examples.feature/license.html
new file mode 100644
index 0000000..a9b560f
--- /dev/null
+++ b/features/org.eclipse.egf.examples.feature/license.html
@@ -0,0 +1,79 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also 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>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
+ modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body>
+</html>
diff --git a/features/org.eclipse.egf.examples.feature/rootfiles/epl-v10.html b/features/org.eclipse.egf.examples.feature/rootfiles/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.examples.feature/rootfiles/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.examples.feature/rootfiles/notice.html b/features/org.eclipse.egf.examples.feature/rootfiles/notice.html
new file mode 100644
index 0000000..64d8c4c
--- /dev/null
+++ b/features/org.eclipse.egf.examples.feature/rootfiles/notice.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.examples.feature/sourceTemplateBundle/about.html b/features/org.eclipse.egf.examples.feature/sourceTemplateBundle/about.html
new file mode 100644
index 0000000..caeb225
--- /dev/null
+++ b/features/org.eclipse.egf.examples.feature/sourceTemplateBundle/about.html
@@ -0,0 +1,27 @@
+<!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>February 2, 2009</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/features/org.eclipse.egf.examples.feature/sourceTemplateBundle/plugin.properties b/features/org.eclipse.egf.examples.feature/sourceTemplateBundle/plugin.properties
new file mode 100644
index 0000000..49e76d3
--- /dev/null
+++ b/features/org.eclipse.egf.examples.feature/sourceTemplateBundle/plugin.properties
@@ -0,0 +1,27 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+pluginName=EGF Examples Source (Incubation)
+providerName=Eclipse Modeling Project
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.examples.feature/sourceTemplateFeature/build.properties b/features/org.eclipse.egf.examples.feature/sourceTemplateFeature/build.properties
new file mode 100644
index 0000000..d212e61
--- /dev/null
+++ b/features/org.eclipse.egf.examples.feature/sourceTemplateFeature/build.properties
@@ -0,0 +1,16 @@
+##
+# 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
+##
+
+bin.includes =\
+epl-v10.html,\
+feature.*,\
+eclipse_update_120.jpg,\
+license.html
diff --git a/features/org.eclipse.egf.examples.feature/sourceTemplateFeature/eclipse_update_120.jpg b/features/org.eclipse.egf.examples.feature/sourceTemplateFeature/eclipse_update_120.jpg
new file mode 100644
index 0000000..68e3e02
--- /dev/null
+++ b/features/org.eclipse.egf.examples.feature/sourceTemplateFeature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.examples.feature/sourceTemplateFeature/epl-v10.html b/features/org.eclipse.egf.examples.feature/sourceTemplateFeature/epl-v10.html
new file mode 100644
index 0000000..2761abd
--- /dev/null
+++ b/features/org.eclipse.egf.examples.feature/sourceTemplateFeature/epl-v10.html
@@ -0,0 +1,320 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta name="ProgId" content="Word.Document">
+<meta name="Generator" content="Microsoft Word 9">
+<meta name="Originator" content="Microsoft Word 9">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.gmf/features/org.eclipse.gmf.sdk-feature/sourceTemplateFeature/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Revision>2</o:Revision>
+ <o:TotalTime>3</o:TotalTime>
+ <o:Created>2004-03-05T23:03:00Z</o:Created>
+ <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+ <o:Pages>4</o:Pages>
+ <o:Words>1626</o:Words>
+ <o:Characters>9270</o:Characters>
+ <o:Lines>77</o:Lines>
+ <o:Paragraphs>18</o:Paragraphs>
+ <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+ <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+ font-family:Tahoma;
+ mso-fareast-font-family:"Times New Roman";}
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.examples.feature/sourceTemplateFeature/feature.properties b/features/org.eclipse.egf.examples.feature/sourceTemplateFeature/feature.properties
new file mode 100644
index 0000000..015b65b
--- /dev/null
+++ b/features/org.eclipse.egf.examples.feature/sourceTemplateFeature/feature.properties
@@ -0,0 +1,142 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+# "featureName" property - name of the feature
+featureName=EGF Examples Source (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories Examples Source.
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Modeling Project CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.egf.examples.feature/sourceTemplateFeature/license.html b/features/org.eclipse.egf.examples.feature/sourceTemplateFeature/license.html
new file mode 100644
index 0000000..e819bbc
--- /dev/null
+++ b/features/org.eclipse.egf.examples.feature/sourceTemplateFeature/license.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.examples.feature/sourceTemplatePlugin/about.html b/features/org.eclipse.egf.examples.feature/sourceTemplatePlugin/about.html
new file mode 100644
index 0000000..caeb225
--- /dev/null
+++ b/features/org.eclipse.egf.examples.feature/sourceTemplatePlugin/about.html
@@ -0,0 +1,27 @@
+<!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>February 2, 2009</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/features/org.eclipse.egf.examples.feature/sourceTemplatePlugin/about.ini b/features/org.eclipse.egf.examples.feature/sourceTemplatePlugin/about.ini
new file mode 100644
index 0000000..385f92e
--- /dev/null
+++ b/features/org.eclipse.egf.examples.feature/sourceTemplatePlugin/about.ini
@@ -0,0 +1,28 @@
+# about.ini
+# contains information about a feature
+# java.util.Properties file (ISO-8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%aboutText
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=fc32.gif
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (translated)
+# needed for primary features only
+appName=%featureName
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# optional
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
diff --git a/features/org.eclipse.egf.examples.feature/sourceTemplatePlugin/about.mappings b/features/org.eclipse.egf.examples.feature/sourceTemplatePlugin/about.mappings
new file mode 100644
index 0000000..4a21060
--- /dev/null
+++ b/features/org.eclipse.egf.examples.feature/sourceTemplatePlugin/about.mappings
@@ -0,0 +1,17 @@
+##
+# 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
+##
+
+# about.mappings
+# contains fill-ins for about.properties
+# java.util.Properties file (ISO-8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@buildId@
diff --git a/features/org.eclipse.egf.examples.feature/sourceTemplatePlugin/about.properties b/features/org.eclipse.egf.examples.feature/sourceTemplatePlugin/about.properties
new file mode 100644
index 0000000..dd07303
--- /dev/null
+++ b/features/org.eclipse.egf.examples.feature/sourceTemplatePlugin/about.properties
@@ -0,0 +1,39 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+aboutText=EGF Examples Source (Incubation)\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+Copyright (c) Thales Corporate Services S.A.S, 2009-2010 and others. All rights reserved.\n\
+\n\
+Visit http://www.eclipse.org/proposals/egf/
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.examples.feature/sourceTemplatePlugin/build.properties b/features/org.eclipse.egf.examples.feature/sourceTemplatePlugin/build.properties
new file mode 100644
index 0000000..0e50697
--- /dev/null
+++ b/features/org.eclipse.egf.examples.feature/sourceTemplatePlugin/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = fc32.gif,\
+ about.*,\
+ plugin.*,\
+ src/,\
+ META-INF/
+sourcePlugin=true
+src.includes = about.html
diff --git a/features/org.eclipse.egf.examples.feature/sourceTemplatePlugin/fc32.gif b/features/org.eclipse.egf.examples.feature/sourceTemplatePlugin/fc32.gif
new file mode 100644
index 0000000..f9fe86c
--- /dev/null
+++ b/features/org.eclipse.egf.examples.feature/sourceTemplatePlugin/fc32.gif
Binary files differ
diff --git a/features/org.eclipse.egf.examples.feature/sourceTemplatePlugin/plugin.properties b/features/org.eclipse.egf.examples.feature/sourceTemplatePlugin/plugin.properties
new file mode 100644
index 0000000..49e76d3
--- /dev/null
+++ b/features/org.eclipse.egf.examples.feature/sourceTemplatePlugin/plugin.properties
@@ -0,0 +1,27 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+pluginName=EGF Examples Source (Incubation)
+providerName=Eclipse Modeling Project
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.feature/.project b/features/org.eclipse.egf.feature/.project
new file mode 100644
index 0000000..460afb7
--- /dev/null
+++ b/features/org.eclipse.egf.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.egf.feature/.settings/org.eclipse.core.resources.prefs b/features/org.eclipse.egf.feature/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..50491da
--- /dev/null
+++ b/features/org.eclipse.egf.feature/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,4 @@
+#Mon Feb 15 16:41:51 CET 2010
+eclipse.preferences.version=1
+encoding/epl-v10.html=ISO-8859-1
+encoding/license.html=ISO-8859-1
diff --git a/features/org.eclipse.egf.feature/build.properties b/features/org.eclipse.egf.feature/build.properties
new file mode 100644
index 0000000..ece6d4f
--- /dev/null
+++ b/features/org.eclipse.egf.feature/build.properties
@@ -0,0 +1,21 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = feature.*,\
+ epl-v10.html,\
+ license.html,\
+ eclipse_update_120.jpg
+src.includes = epl-v10.html,\
+ license.html
+root=rootfiles
+
+
diff --git a/features/org.eclipse.egf.feature/eclipse_update_120.jpg b/features/org.eclipse.egf.feature/eclipse_update_120.jpg
new file mode 100644
index 0000000..bfdf708
--- /dev/null
+++ b/features/org.eclipse.egf.feature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.feature/epl-v10.html b/features/org.eclipse.egf.feature/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.feature/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.feature/feature.properties b/features/org.eclipse.egf.feature/feature.properties
new file mode 100644
index 0000000..b4718ee
--- /dev/null
+++ b/features/org.eclipse.egf.feature/feature.properties
@@ -0,0 +1,135 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# "featureName" property - name of the feature
+featureName=EGF (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories.
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.egf.feature/feature.xml b/features/org.eclipse.egf.feature/feature.xml
new file mode 100644
index 0000000..30d7495
--- /dev/null
+++ b/features/org.eclipse.egf.feature/feature.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.egf"
+ label="%featureName"
+ version="0.2.3.qualifier"
+ provider-name="%providerName"
+ image="eclipse_update_120.jpg"
+>
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ 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
+ </copyright>
+
+ <license
+ url="%licenseURL"
+ >
+ %license
+ </license>
+
+ <url>
+ <update
+ label="%EMFTUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emft/updates/"
+ />
+ <discovery
+ label="%EMFUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emf/updates/"
+ />
+ <discovery
+ label="%EMFTUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emft/updates/"
+ />
+ </url>
+
+ <includes
+ id="org.eclipse.egf.common"
+ version="0.0.0"
+ />
+
+ <includes
+ id="org.eclipse.egf.common.ui"
+ version="0.0.0"
+ />
+
+ <includes
+ id="org.eclipse.egf.core"
+ version="0.0.0"
+ />
+
+ <includes
+ id="org.eclipse.egf.core.ui"
+ version="0.0.0"
+ />
+
+ <includes
+ id="org.eclipse.egf.model"
+ version="0.0.0"
+ />
+
+ <includes
+ id="org.eclipse.egf.model.edit"
+ version="0.0.0"
+ />
+
+ <includes
+ id="org.eclipse.egf.producer"
+ version="0.0.0"
+ />
+
+ <includes
+ id="org.eclipse.egf.producer.ui"
+ version="0.0.0"
+ />
+
+ <includes
+ id="org.eclipse.egf.model.fprod"
+ version="0.0.0"
+ />
+
+ <includes
+ id="org.eclipse.egf.model.fprod.edit"
+ version="0.0.0"
+ />
+
+ <includes
+ id="org.eclipse.egf.model.ftask"
+ version="0.0.0"
+ />
+
+ <includes
+ id="org.eclipse.egf.model.ftask.edit"
+ version="0.0.0"
+ />
+
+ <includes
+ id="org.eclipse.egf.model.ui"
+ version="0.0.0"
+ />
+
+</feature>
diff --git a/features/org.eclipse.egf.feature/license.html b/features/org.eclipse.egf.feature/license.html
new file mode 100644
index 0000000..a9b560f
--- /dev/null
+++ b/features/org.eclipse.egf.feature/license.html
@@ -0,0 +1,79 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also 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>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
+ modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body>
+</html>
diff --git a/features/org.eclipse.egf.feature/rootfiles/epl-v10.html b/features/org.eclipse.egf.feature/rootfiles/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.feature/rootfiles/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.feature/rootfiles/notice.html b/features/org.eclipse.egf.feature/rootfiles/notice.html
new file mode 100644
index 0000000..64d8c4c
--- /dev/null
+++ b/features/org.eclipse.egf.feature/rootfiles/notice.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.edit.feature/.project b/features/org.eclipse.egf.model.edit.feature/.project
new file mode 100644
index 0000000..1e939bc
--- /dev/null
+++ b/features/org.eclipse.egf.model.edit.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.model.edit.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.egf.model.edit.feature/.settings/org.eclipse.core.resources.prefs b/features/org.eclipse.egf.model.edit.feature/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..65ece17
--- /dev/null
+++ b/features/org.eclipse.egf.model.edit.feature/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,11 @@
+#Mon Feb 23 14:20:30 CET 2009
+encoding//rootfiles/epl-v10.html=ISO-8859-1
+encoding//rootfiles/notice.html=ISO-8859-1
+encoding//sourceTemplateBundle/about.html=ISO-8859-1
+encoding//sourceTemplateFeature/epl-v10.html=ISO-8859-1
+encoding//sourceTemplateFeature/license.html=ISO-8859-1
+encoding//sourceTemplatePlugin/about.html=ISO-8859-1
+encoding//sourceTemplatePlugin/about.ini=ISO-8859-1
+encoding//sourceTemplatePlugin/about.mappings=ISO-8859-1
+encoding/epl-v10.html=ISO-8859-1
+encoding/license.html=ISO-8859-1
diff --git a/features/org.eclipse.egf.model.edit.feature/build.properties b/features/org.eclipse.egf.model.edit.feature/build.properties
new file mode 100644
index 0000000..2997e3f
--- /dev/null
+++ b/features/org.eclipse.egf.model.edit.feature/build.properties
@@ -0,0 +1,20 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = feature.*,\
+ epl-v10.html,\
+ license.html,\
+ eclipse_update_120.jpg
+src.includes = epl-v10.html,\
+ license.html
+root=rootfiles
+generate.feature@org.eclipse.egf.model.edit.source=org.eclipse.egf.model.edit
diff --git a/features/org.eclipse.egf.model.edit.feature/eclipse_update_120.jpg b/features/org.eclipse.egf.model.edit.feature/eclipse_update_120.jpg
new file mode 100644
index 0000000..bfdf708
--- /dev/null
+++ b/features/org.eclipse.egf.model.edit.feature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.model.edit.feature/epl-v10.html b/features/org.eclipse.egf.model.edit.feature/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.model.edit.feature/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.edit.feature/feature.properties b/features/org.eclipse.egf.model.edit.feature/feature.properties
new file mode 100644
index 0000000..70720cc
--- /dev/null
+++ b/features/org.eclipse.egf.model.edit.feature/feature.properties
@@ -0,0 +1,135 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# "featureName" property - name of the feature
+featureName=EGF Model Edit (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories Model Edit.
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.egf.model.edit.feature/feature.xml b/features/org.eclipse.egf.model.edit.feature/feature.xml
new file mode 100644
index 0000000..24e2186
--- /dev/null
+++ b/features/org.eclipse.egf.model.edit.feature/feature.xml
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.egf.model.edit"
+ label="%featureName"
+ version="0.2.3.qualifier"
+ provider-name="%providerName"
+ plugin="org.eclipse.egf.model.edit"
+ image="eclipse_update_120.jpg"
+>
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ 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
+ </copyright>
+
+ <license
+ url="%licenseURL"
+ >
+ %license
+ </license>
+
+ <url>
+ <update
+ label="%EMFTUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emft/updates/"
+ />
+ <discovery
+ label="%EMFUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emf/updates/"
+ />
+ <discovery
+ label="%EMFTUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emft/updates/"
+ />
+ </url>
+
+ <includes
+ id="org.eclipse.egf.model"
+ version="0.0.0"
+ />
+
+ <includes
+ id="org.eclipse.egf.model.edit.source"
+ version="0.0.0"
+ />
+
+ <requires>
+ <import
+ feature="org.eclipse.emf.ecore.edit"
+ version="2.5.0.v200906151043"
+ match="compatible"
+ />
+ </requires>
+
+ <plugin
+ id="org.eclipse.egf.model.edit"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"
+ />
+
+ <plugin
+ id="org.eclipse.egf.model.javapattern.edit"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"
+ />
+
+ <plugin
+ id="org.eclipse.egf.model.jetpattern.edit"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"
+ />
+
+</feature>
diff --git a/features/org.eclipse.egf.model.edit.feature/license.html b/features/org.eclipse.egf.model.edit.feature/license.html
new file mode 100644
index 0000000..a9b560f
--- /dev/null
+++ b/features/org.eclipse.egf.model.edit.feature/license.html
@@ -0,0 +1,79 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also 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>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
+ modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body>
+</html>
diff --git a/features/org.eclipse.egf.model.edit.feature/rootfiles/epl-v10.html b/features/org.eclipse.egf.model.edit.feature/rootfiles/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.model.edit.feature/rootfiles/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.edit.feature/rootfiles/notice.html b/features/org.eclipse.egf.model.edit.feature/rootfiles/notice.html
new file mode 100644
index 0000000..64d8c4c
--- /dev/null
+++ b/features/org.eclipse.egf.model.edit.feature/rootfiles/notice.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.edit.feature/sourceTemplateBundle/about.html b/features/org.eclipse.egf.model.edit.feature/sourceTemplateBundle/about.html
new file mode 100644
index 0000000..caeb225
--- /dev/null
+++ b/features/org.eclipse.egf.model.edit.feature/sourceTemplateBundle/about.html
@@ -0,0 +1,27 @@
+<!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>February 2, 2009</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/features/org.eclipse.egf.model.edit.feature/sourceTemplateBundle/plugin.properties b/features/org.eclipse.egf.model.edit.feature/sourceTemplateBundle/plugin.properties
new file mode 100644
index 0000000..b1f4619
--- /dev/null
+++ b/features/org.eclipse.egf.model.edit.feature/sourceTemplateBundle/plugin.properties
@@ -0,0 +1,27 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+pluginName=EGF Model Edit Source (Incubation)
+providerName=Eclipse Modeling Project
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.model.edit.feature/sourceTemplateFeature/build.properties b/features/org.eclipse.egf.model.edit.feature/sourceTemplateFeature/build.properties
new file mode 100644
index 0000000..ec40e29
--- /dev/null
+++ b/features/org.eclipse.egf.model.edit.feature/sourceTemplateFeature/build.properties
@@ -0,0 +1,17 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes =\
+epl-v10.html,\
+feature.*,\
+eclipse_update_120.jpg,\
+license.html
diff --git a/features/org.eclipse.egf.model.edit.feature/sourceTemplateFeature/eclipse_update_120.jpg b/features/org.eclipse.egf.model.edit.feature/sourceTemplateFeature/eclipse_update_120.jpg
new file mode 100644
index 0000000..68e3e02
--- /dev/null
+++ b/features/org.eclipse.egf.model.edit.feature/sourceTemplateFeature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.model.edit.feature/sourceTemplateFeature/epl-v10.html b/features/org.eclipse.egf.model.edit.feature/sourceTemplateFeature/epl-v10.html
new file mode 100644
index 0000000..2761abd
--- /dev/null
+++ b/features/org.eclipse.egf.model.edit.feature/sourceTemplateFeature/epl-v10.html
@@ -0,0 +1,320 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta name="ProgId" content="Word.Document">
+<meta name="Generator" content="Microsoft Word 9">
+<meta name="Originator" content="Microsoft Word 9">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.gmf/features/org.eclipse.gmf.sdk-feature/sourceTemplateFeature/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Revision>2</o:Revision>
+ <o:TotalTime>3</o:TotalTime>
+ <o:Created>2004-03-05T23:03:00Z</o:Created>
+ <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+ <o:Pages>4</o:Pages>
+ <o:Words>1626</o:Words>
+ <o:Characters>9270</o:Characters>
+ <o:Lines>77</o:Lines>
+ <o:Paragraphs>18</o:Paragraphs>
+ <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+ <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+ font-family:Tahoma;
+ mso-fareast-font-family:"Times New Roman";}
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.edit.feature/sourceTemplateFeature/feature.properties b/features/org.eclipse.egf.model.edit.feature/sourceTemplateFeature/feature.properties
new file mode 100644
index 0000000..78d380a
--- /dev/null
+++ b/features/org.eclipse.egf.model.edit.feature/sourceTemplateFeature/feature.properties
@@ -0,0 +1,147 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+# "featureName" property - name of the feature
+featureName=EGF Model Edit Source (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories Model Edit Source.
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Modeling Project CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.model.edit.feature/sourceTemplateFeature/license.html b/features/org.eclipse.egf.model.edit.feature/sourceTemplateFeature/license.html
new file mode 100644
index 0000000..e819bbc
--- /dev/null
+++ b/features/org.eclipse.egf.model.edit.feature/sourceTemplateFeature/license.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.edit.feature/sourceTemplatePlugin/about.html b/features/org.eclipse.egf.model.edit.feature/sourceTemplatePlugin/about.html
new file mode 100644
index 0000000..caeb225
--- /dev/null
+++ b/features/org.eclipse.egf.model.edit.feature/sourceTemplatePlugin/about.html
@@ -0,0 +1,27 @@
+<!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>February 2, 2009</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/features/org.eclipse.egf.model.edit.feature/sourceTemplatePlugin/about.ini b/features/org.eclipse.egf.model.edit.feature/sourceTemplatePlugin/about.ini
new file mode 100644
index 0000000..546150b
--- /dev/null
+++ b/features/org.eclipse.egf.model.edit.feature/sourceTemplatePlugin/about.ini
@@ -0,0 +1,27 @@
+# about.ini
+# contains information about a feature
+# java.util.Properties file (ISO-8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%aboutText
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=fc32.gif
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (translated)
+# needed for primary features only
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# optional
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
diff --git a/features/org.eclipse.egf.model.edit.feature/sourceTemplatePlugin/about.mappings b/features/org.eclipse.egf.model.edit.feature/sourceTemplatePlugin/about.mappings
new file mode 100644
index 0000000..a06fc50
--- /dev/null
+++ b/features/org.eclipse.egf.model.edit.feature/sourceTemplatePlugin/about.mappings
@@ -0,0 +1,17 @@
+##
+# 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
+##
+
+# about.mappings
+# contains fill-ins for about.properties
+# java.util.Properties file (ISO-8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@
diff --git a/features/org.eclipse.egf.model.edit.feature/sourceTemplatePlugin/about.properties b/features/org.eclipse.egf.model.edit.feature/sourceTemplatePlugin/about.properties
new file mode 100644
index 0000000..e81ba15
--- /dev/null
+++ b/features/org.eclipse.egf.model.edit.feature/sourceTemplatePlugin/about.properties
@@ -0,0 +1,39 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+aboutText=EGF Model Edit Source (Incubation)\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+Copyright (c) Thales Corporate Services S.A.S, 2009-2010 and others. All rights reserved.\n\
+\n\
+Visit http://www.eclipse.org/proposals/egf/
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.model.edit.feature/sourceTemplatePlugin/build.properties b/features/org.eclipse.egf.model.edit.feature/sourceTemplatePlugin/build.properties
new file mode 100644
index 0000000..0e50697
--- /dev/null
+++ b/features/org.eclipse.egf.model.edit.feature/sourceTemplatePlugin/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = fc32.gif,\
+ about.*,\
+ plugin.*,\
+ src/,\
+ META-INF/
+sourcePlugin=true
+src.includes = about.html
diff --git a/features/org.eclipse.egf.model.edit.feature/sourceTemplatePlugin/fc32.gif b/features/org.eclipse.egf.model.edit.feature/sourceTemplatePlugin/fc32.gif
new file mode 100644
index 0000000..f9fe86c
--- /dev/null
+++ b/features/org.eclipse.egf.model.edit.feature/sourceTemplatePlugin/fc32.gif
Binary files differ
diff --git a/features/org.eclipse.egf.model.edit.feature/sourceTemplatePlugin/plugin.properties b/features/org.eclipse.egf.model.edit.feature/sourceTemplatePlugin/plugin.properties
new file mode 100644
index 0000000..b1f4619
--- /dev/null
+++ b/features/org.eclipse.egf.model.edit.feature/sourceTemplatePlugin/plugin.properties
@@ -0,0 +1,27 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+pluginName=EGF Model Edit Source (Incubation)
+providerName=Eclipse Modeling Project
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.model.feature/.project b/features/org.eclipse.egf.model.feature/.project
new file mode 100644
index 0000000..f63aeb1
--- /dev/null
+++ b/features/org.eclipse.egf.model.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.model.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.egf.model.feature/.settings/org.eclipse.core.resources.prefs b/features/org.eclipse.egf.model.feature/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..65ece17
--- /dev/null
+++ b/features/org.eclipse.egf.model.feature/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,11 @@
+#Mon Feb 23 14:20:30 CET 2009
+encoding//rootfiles/epl-v10.html=ISO-8859-1
+encoding//rootfiles/notice.html=ISO-8859-1
+encoding//sourceTemplateBundle/about.html=ISO-8859-1
+encoding//sourceTemplateFeature/epl-v10.html=ISO-8859-1
+encoding//sourceTemplateFeature/license.html=ISO-8859-1
+encoding//sourceTemplatePlugin/about.html=ISO-8859-1
+encoding//sourceTemplatePlugin/about.ini=ISO-8859-1
+encoding//sourceTemplatePlugin/about.mappings=ISO-8859-1
+encoding/epl-v10.html=ISO-8859-1
+encoding/license.html=ISO-8859-1
diff --git a/features/org.eclipse.egf.model.feature/build.properties b/features/org.eclipse.egf.model.feature/build.properties
new file mode 100644
index 0000000..5d95363
--- /dev/null
+++ b/features/org.eclipse.egf.model.feature/build.properties
@@ -0,0 +1,20 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = feature.*,\
+ epl-v10.html,\
+ license.html,\
+ eclipse_update_120.jpg
+src.includes = epl-v10.html,\
+ license.html
+root=rootfiles
+generate.feature@org.eclipse.egf.model.source=org.eclipse.egf.model
diff --git a/features/org.eclipse.egf.model.feature/eclipse_update_120.jpg b/features/org.eclipse.egf.model.feature/eclipse_update_120.jpg
new file mode 100644
index 0000000..bfdf708
--- /dev/null
+++ b/features/org.eclipse.egf.model.feature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.model.feature/epl-v10.html b/features/org.eclipse.egf.model.feature/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.model.feature/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.feature/feature.properties b/features/org.eclipse.egf.model.feature/feature.properties
new file mode 100644
index 0000000..a0f27aa
--- /dev/null
+++ b/features/org.eclipse.egf.model.feature/feature.properties
@@ -0,0 +1,135 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# "featureName" property - name of the feature
+featureName=EGF Model (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories Model.
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.egf.model.feature/feature.xml b/features/org.eclipse.egf.model.feature/feature.xml
new file mode 100644
index 0000000..e88ef50
--- /dev/null
+++ b/features/org.eclipse.egf.model.feature/feature.xml
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.egf.model"
+ label="%featureName"
+ version="0.2.3.qualifier"
+ provider-name="%providerName"
+ plugin="org.eclipse.egf.model"
+ image="eclipse_update_120.jpg"
+>
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ 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
+ </copyright>
+
+ <license
+ url="%licenseURL"
+ >
+ %license
+ </license>
+
+ <url>
+ <update
+ label="%EMFTUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emft/updates/"
+ />
+ <discovery
+ label="%EMFUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emf/updates/"
+ />
+ <discovery
+ label="%EMFTUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emft/updates/"
+ />
+ </url>
+
+ <includes
+ id="org.eclipse.egf.core"
+ version="0.0.0"
+ />
+
+ <includes
+ id="org.eclipse.egf.model.source"
+ version="0.0.0"
+ />
+
+ <requires>
+ <import
+ feature="org.eclipse.emf.ecore"
+ version="2.5.0.v200906151043"
+ match="compatible"
+ />
+ <import
+ feature="org.eclipse.emf.validation"
+ version="1.3.0.v200902052232-478-9oB55W58BQ8QBB"
+ match="compatible"
+ />
+ <import
+ plugin="org.eclipse.emf.transaction"
+ version="1.3.0.v200902010221"
+ match="compatible"
+ />
+ </requires>
+
+ <plugin
+ id="org.eclipse.egf.model"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"
+ />
+
+ <plugin
+ id="org.eclipse.egf.model.javapattern"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"
+ />
+
+ <plugin
+ id="org.eclipse.egf.model.jetpattern"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"
+ />
+
+ <plugin
+ id="org.eclipse.egf.pattern"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"
+ />
+
+ <plugin
+ id="org.eclipse.egf.pattern.java"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"
+ />
+
+ <plugin
+ id="org.eclipse.egf.pattern.jet"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"
+ />
+
+</feature>
diff --git a/features/org.eclipse.egf.model.feature/license.html b/features/org.eclipse.egf.model.feature/license.html
new file mode 100644
index 0000000..a9b560f
--- /dev/null
+++ b/features/org.eclipse.egf.model.feature/license.html
@@ -0,0 +1,79 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also 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>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
+ modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body>
+</html>
diff --git a/features/org.eclipse.egf.model.feature/rootfiles/epl-v10.html b/features/org.eclipse.egf.model.feature/rootfiles/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.model.feature/rootfiles/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.feature/rootfiles/notice.html b/features/org.eclipse.egf.model.feature/rootfiles/notice.html
new file mode 100644
index 0000000..64d8c4c
--- /dev/null
+++ b/features/org.eclipse.egf.model.feature/rootfiles/notice.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.feature/sourceTemplateBundle/about.html b/features/org.eclipse.egf.model.feature/sourceTemplateBundle/about.html
new file mode 100644
index 0000000..caeb225
--- /dev/null
+++ b/features/org.eclipse.egf.model.feature/sourceTemplateBundle/about.html
@@ -0,0 +1,27 @@
+<!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>February 2, 2009</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/features/org.eclipse.egf.model.feature/sourceTemplateBundle/plugin.properties b/features/org.eclipse.egf.model.feature/sourceTemplateBundle/plugin.properties
new file mode 100644
index 0000000..66c0a2f
--- /dev/null
+++ b/features/org.eclipse.egf.model.feature/sourceTemplateBundle/plugin.properties
@@ -0,0 +1,27 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+pluginName=EGF Model Source (Incubation)
+providerName=Eclipse Modeling Project
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.model.feature/sourceTemplateFeature/build.properties b/features/org.eclipse.egf.model.feature/sourceTemplateFeature/build.properties
new file mode 100644
index 0000000..ec40e29
--- /dev/null
+++ b/features/org.eclipse.egf.model.feature/sourceTemplateFeature/build.properties
@@ -0,0 +1,17 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes =\
+epl-v10.html,\
+feature.*,\
+eclipse_update_120.jpg,\
+license.html
diff --git a/features/org.eclipse.egf.model.feature/sourceTemplateFeature/eclipse_update_120.jpg b/features/org.eclipse.egf.model.feature/sourceTemplateFeature/eclipse_update_120.jpg
new file mode 100644
index 0000000..68e3e02
--- /dev/null
+++ b/features/org.eclipse.egf.model.feature/sourceTemplateFeature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.model.feature/sourceTemplateFeature/epl-v10.html b/features/org.eclipse.egf.model.feature/sourceTemplateFeature/epl-v10.html
new file mode 100644
index 0000000..2761abd
--- /dev/null
+++ b/features/org.eclipse.egf.model.feature/sourceTemplateFeature/epl-v10.html
@@ -0,0 +1,320 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta name="ProgId" content="Word.Document">
+<meta name="Generator" content="Microsoft Word 9">
+<meta name="Originator" content="Microsoft Word 9">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.gmf/features/org.eclipse.gmf.sdk-feature/sourceTemplateFeature/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Revision>2</o:Revision>
+ <o:TotalTime>3</o:TotalTime>
+ <o:Created>2004-03-05T23:03:00Z</o:Created>
+ <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+ <o:Pages>4</o:Pages>
+ <o:Words>1626</o:Words>
+ <o:Characters>9270</o:Characters>
+ <o:Lines>77</o:Lines>
+ <o:Paragraphs>18</o:Paragraphs>
+ <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+ <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+ font-family:Tahoma;
+ mso-fareast-font-family:"Times New Roman";}
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.feature/sourceTemplateFeature/feature.properties b/features/org.eclipse.egf.model.feature/sourceTemplateFeature/feature.properties
new file mode 100644
index 0000000..7d0bb93
--- /dev/null
+++ b/features/org.eclipse.egf.model.feature/sourceTemplateFeature/feature.properties
@@ -0,0 +1,147 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+# "featureName" property - name of the feature
+featureName=EGF Model Source (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories Model Source.
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Modeling Project CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.model.feature/sourceTemplateFeature/license.html b/features/org.eclipse.egf.model.feature/sourceTemplateFeature/license.html
new file mode 100644
index 0000000..e819bbc
--- /dev/null
+++ b/features/org.eclipse.egf.model.feature/sourceTemplateFeature/license.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.feature/sourceTemplatePlugin/about.html b/features/org.eclipse.egf.model.feature/sourceTemplatePlugin/about.html
new file mode 100644
index 0000000..caeb225
--- /dev/null
+++ b/features/org.eclipse.egf.model.feature/sourceTemplatePlugin/about.html
@@ -0,0 +1,27 @@
+<!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>February 2, 2009</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/features/org.eclipse.egf.model.feature/sourceTemplatePlugin/about.ini b/features/org.eclipse.egf.model.feature/sourceTemplatePlugin/about.ini
new file mode 100644
index 0000000..546150b
--- /dev/null
+++ b/features/org.eclipse.egf.model.feature/sourceTemplatePlugin/about.ini
@@ -0,0 +1,27 @@
+# about.ini
+# contains information about a feature
+# java.util.Properties file (ISO-8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%aboutText
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=fc32.gif
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (translated)
+# needed for primary features only
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# optional
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
diff --git a/features/org.eclipse.egf.model.feature/sourceTemplatePlugin/about.mappings b/features/org.eclipse.egf.model.feature/sourceTemplatePlugin/about.mappings
new file mode 100644
index 0000000..a06fc50
--- /dev/null
+++ b/features/org.eclipse.egf.model.feature/sourceTemplatePlugin/about.mappings
@@ -0,0 +1,17 @@
+##
+# 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
+##
+
+# about.mappings
+# contains fill-ins for about.properties
+# java.util.Properties file (ISO-8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@
diff --git a/features/org.eclipse.egf.model.feature/sourceTemplatePlugin/about.properties b/features/org.eclipse.egf.model.feature/sourceTemplatePlugin/about.properties
new file mode 100644
index 0000000..d9c063e
--- /dev/null
+++ b/features/org.eclipse.egf.model.feature/sourceTemplatePlugin/about.properties
@@ -0,0 +1,39 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+aboutText=EGF Model Source (Incubation)\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+Copyright (c) Thales Corporate Services S.A.S, 2009-2010 and others. All rights reserved.\n\
+\n\
+Visit http://www.eclipse.org/proposals/egf/
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.model.feature/sourceTemplatePlugin/build.properties b/features/org.eclipse.egf.model.feature/sourceTemplatePlugin/build.properties
new file mode 100644
index 0000000..0e50697
--- /dev/null
+++ b/features/org.eclipse.egf.model.feature/sourceTemplatePlugin/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = fc32.gif,\
+ about.*,\
+ plugin.*,\
+ src/,\
+ META-INF/
+sourcePlugin=true
+src.includes = about.html
diff --git a/features/org.eclipse.egf.model.feature/sourceTemplatePlugin/fc32.gif b/features/org.eclipse.egf.model.feature/sourceTemplatePlugin/fc32.gif
new file mode 100644
index 0000000..f9fe86c
--- /dev/null
+++ b/features/org.eclipse.egf.model.feature/sourceTemplatePlugin/fc32.gif
Binary files differ
diff --git a/features/org.eclipse.egf.model.feature/sourceTemplatePlugin/plugin.properties b/features/org.eclipse.egf.model.feature/sourceTemplatePlugin/plugin.properties
new file mode 100644
index 0000000..66c0a2f
--- /dev/null
+++ b/features/org.eclipse.egf.model.feature/sourceTemplatePlugin/plugin.properties
@@ -0,0 +1,27 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+pluginName=EGF Model Source (Incubation)
+providerName=Eclipse Modeling Project
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.model.fprod.edit.feature/.project b/features/org.eclipse.egf.model.fprod.edit.feature/.project
new file mode 100644
index 0000000..1279a2d
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.edit.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.model.fprod.edit.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.egf.model.fprod.edit.feature/.settings/org.eclipse.core.resources.prefs b/features/org.eclipse.egf.model.fprod.edit.feature/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..65ece17
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.edit.feature/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,11 @@
+#Mon Feb 23 14:20:30 CET 2009
+encoding//rootfiles/epl-v10.html=ISO-8859-1
+encoding//rootfiles/notice.html=ISO-8859-1
+encoding//sourceTemplateBundle/about.html=ISO-8859-1
+encoding//sourceTemplateFeature/epl-v10.html=ISO-8859-1
+encoding//sourceTemplateFeature/license.html=ISO-8859-1
+encoding//sourceTemplatePlugin/about.html=ISO-8859-1
+encoding//sourceTemplatePlugin/about.ini=ISO-8859-1
+encoding//sourceTemplatePlugin/about.mappings=ISO-8859-1
+encoding/epl-v10.html=ISO-8859-1
+encoding/license.html=ISO-8859-1
diff --git a/features/org.eclipse.egf.model.fprod.edit.feature/build.properties b/features/org.eclipse.egf.model.fprod.edit.feature/build.properties
new file mode 100644
index 0000000..6819fcc
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.edit.feature/build.properties
@@ -0,0 +1,20 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = feature.*,\
+ epl-v10.html,\
+ license.html,\
+ eclipse_update_120.jpg
+src.includes = epl-v10.html,\
+ license.html
+root=rootfiles
+generate.feature@org.eclipse.egf.model.fprod.edit.source=org.eclipse.egf.model.fprod.edit
diff --git a/features/org.eclipse.egf.model.fprod.edit.feature/eclipse_update_120.jpg b/features/org.eclipse.egf.model.fprod.edit.feature/eclipse_update_120.jpg
new file mode 100644
index 0000000..bfdf708
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.edit.feature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.model.fprod.edit.feature/epl-v10.html b/features/org.eclipse.egf.model.fprod.edit.feature/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.edit.feature/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.fprod.edit.feature/feature.properties b/features/org.eclipse.egf.model.fprod.edit.feature/feature.properties
new file mode 100644
index 0000000..e915d90
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.edit.feature/feature.properties
@@ -0,0 +1,135 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# "featureName" property - name of the feature
+featureName=EGF Model Fprod Edit (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories Model Fprod Edit.
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.egf.model.fprod.edit.feature/feature.xml b/features/org.eclipse.egf.model.fprod.edit.feature/feature.xml
new file mode 100644
index 0000000..dcc1f14
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.edit.feature/feature.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.egf.model.fprod.edit"
+ label="%featureName"
+ version="0.2.3.qualifier"
+ provider-name="%providerName"
+ plugin="org.eclipse.egf.model.fprod.edit"
+ image="eclipse_update_120.jpg"
+>
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ 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
+ </copyright>
+
+ <license
+ url="%licenseURL"
+ >
+ %license
+ </license>
+
+ <url>
+ <update
+ label="%EMFTUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emft/updates/"
+ />
+ <discovery
+ label="%EMFUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emf/updates/"
+ />
+ <discovery
+ label="%EMFTUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emft/updates/"
+ />
+ </url>
+
+ <includes
+ id="org.eclipse.egf.model.fprod"
+ version="0.0.0"
+ />
+
+ <includes
+ id="org.eclipse.egf.model.edit"
+ version="0.0.0"
+ />
+
+ <includes
+ id="org.eclipse.egf.model.fprod.edit.source"
+ version="0.0.0"
+ />
+
+ <plugin
+ id="org.eclipse.egf.model.fprod.edit"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"
+ />
+
+</feature>
diff --git a/features/org.eclipse.egf.model.fprod.edit.feature/license.html b/features/org.eclipse.egf.model.fprod.edit.feature/license.html
new file mode 100644
index 0000000..a9b560f
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.edit.feature/license.html
@@ -0,0 +1,79 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also 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>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
+ modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body>
+</html>
diff --git a/features/org.eclipse.egf.model.fprod.edit.feature/rootfiles/epl-v10.html b/features/org.eclipse.egf.model.fprod.edit.feature/rootfiles/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.edit.feature/rootfiles/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.fprod.edit.feature/rootfiles/notice.html b/features/org.eclipse.egf.model.fprod.edit.feature/rootfiles/notice.html
new file mode 100644
index 0000000..64d8c4c
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.edit.feature/rootfiles/notice.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplateBundle/about.html b/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplateBundle/about.html
new file mode 100644
index 0000000..caeb225
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplateBundle/about.html
@@ -0,0 +1,27 @@
+<!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>February 2, 2009</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/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplateBundle/plugin.properties b/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplateBundle/plugin.properties
new file mode 100644
index 0000000..c3726d9
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplateBundle/plugin.properties
@@ -0,0 +1,27 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+pluginName=EGF Model Fprod Edit Source (Incubation)
+providerName=Eclipse Modeling Project
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplateFeature/build.properties b/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplateFeature/build.properties
new file mode 100644
index 0000000..ec40e29
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplateFeature/build.properties
@@ -0,0 +1,17 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes =\
+epl-v10.html,\
+feature.*,\
+eclipse_update_120.jpg,\
+license.html
diff --git a/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplateFeature/eclipse_update_120.jpg b/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplateFeature/eclipse_update_120.jpg
new file mode 100644
index 0000000..68e3e02
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplateFeature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplateFeature/epl-v10.html b/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplateFeature/epl-v10.html
new file mode 100644
index 0000000..2761abd
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplateFeature/epl-v10.html
@@ -0,0 +1,320 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta name="ProgId" content="Word.Document">
+<meta name="Generator" content="Microsoft Word 9">
+<meta name="Originator" content="Microsoft Word 9">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.gmf/features/org.eclipse.gmf.sdk-feature/sourceTemplateFeature/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Revision>2</o:Revision>
+ <o:TotalTime>3</o:TotalTime>
+ <o:Created>2004-03-05T23:03:00Z</o:Created>
+ <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+ <o:Pages>4</o:Pages>
+ <o:Words>1626</o:Words>
+ <o:Characters>9270</o:Characters>
+ <o:Lines>77</o:Lines>
+ <o:Paragraphs>18</o:Paragraphs>
+ <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+ <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+ font-family:Tahoma;
+ mso-fareast-font-family:"Times New Roman";}
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplateFeature/feature.properties b/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplateFeature/feature.properties
new file mode 100644
index 0000000..6cc429e
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplateFeature/feature.properties
@@ -0,0 +1,147 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+# "featureName" property - name of the feature
+featureName=EGF Fprod Edit Source (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories Fprod Edit Source.
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Modeling Project CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplateFeature/license.html b/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplateFeature/license.html
new file mode 100644
index 0000000..e819bbc
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplateFeature/license.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplatePlugin/about.html b/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplatePlugin/about.html
new file mode 100644
index 0000000..caeb225
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplatePlugin/about.html
@@ -0,0 +1,27 @@
+<!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>February 2, 2009</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/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplatePlugin/about.ini b/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplatePlugin/about.ini
new file mode 100644
index 0000000..546150b
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplatePlugin/about.ini
@@ -0,0 +1,27 @@
+# about.ini
+# contains information about a feature
+# java.util.Properties file (ISO-8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%aboutText
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=fc32.gif
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (translated)
+# needed for primary features only
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# optional
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
diff --git a/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplatePlugin/about.mappings b/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplatePlugin/about.mappings
new file mode 100644
index 0000000..a06fc50
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplatePlugin/about.mappings
@@ -0,0 +1,17 @@
+##
+# 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
+##
+
+# about.mappings
+# contains fill-ins for about.properties
+# java.util.Properties file (ISO-8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@
diff --git a/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplatePlugin/about.properties b/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplatePlugin/about.properties
new file mode 100644
index 0000000..0b1ca99
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplatePlugin/about.properties
@@ -0,0 +1,39 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+aboutText=EGF Model Fprod Edit Source (Incubation)\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+Copyright (c) Thales Corporate Services S.A.S, 2009-2010 and others. All rights reserved.\n\
+\n\
+Visit http://www.eclipse.org/proposals/egf/
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplatePlugin/build.properties b/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplatePlugin/build.properties
new file mode 100644
index 0000000..0e50697
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplatePlugin/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = fc32.gif,\
+ about.*,\
+ plugin.*,\
+ src/,\
+ META-INF/
+sourcePlugin=true
+src.includes = about.html
diff --git a/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplatePlugin/fc32.gif b/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplatePlugin/fc32.gif
new file mode 100644
index 0000000..f9fe86c
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplatePlugin/fc32.gif
Binary files differ
diff --git a/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplatePlugin/plugin.properties b/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplatePlugin/plugin.properties
new file mode 100644
index 0000000..c3726d9
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.edit.feature/sourceTemplatePlugin/plugin.properties
@@ -0,0 +1,27 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+pluginName=EGF Model Fprod Edit Source (Incubation)
+providerName=Eclipse Modeling Project
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.model.fprod.feature/.project b/features/org.eclipse.egf.model.fprod.feature/.project
new file mode 100644
index 0000000..be3c3b1
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.model.fprod.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.egf.model.fprod.feature/.settings/org.eclipse.core.resources.prefs b/features/org.eclipse.egf.model.fprod.feature/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..65ece17
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.feature/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,11 @@
+#Mon Feb 23 14:20:30 CET 2009
+encoding//rootfiles/epl-v10.html=ISO-8859-1
+encoding//rootfiles/notice.html=ISO-8859-1
+encoding//sourceTemplateBundle/about.html=ISO-8859-1
+encoding//sourceTemplateFeature/epl-v10.html=ISO-8859-1
+encoding//sourceTemplateFeature/license.html=ISO-8859-1
+encoding//sourceTemplatePlugin/about.html=ISO-8859-1
+encoding//sourceTemplatePlugin/about.ini=ISO-8859-1
+encoding//sourceTemplatePlugin/about.mappings=ISO-8859-1
+encoding/epl-v10.html=ISO-8859-1
+encoding/license.html=ISO-8859-1
diff --git a/features/org.eclipse.egf.model.fprod.feature/build.properties b/features/org.eclipse.egf.model.fprod.feature/build.properties
new file mode 100644
index 0000000..b5f96ac
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.feature/build.properties
@@ -0,0 +1,20 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = feature.*,\
+ epl-v10.html,\
+ license.html,\
+ eclipse_update_120.jpg
+src.includes = epl-v10.html,\
+ license.html
+root=rootfiles
+generate.feature@org.eclipse.egf.model.fprod.source=org.eclipse.egf.model.fprod
diff --git a/features/org.eclipse.egf.model.fprod.feature/eclipse_update_120.jpg b/features/org.eclipse.egf.model.fprod.feature/eclipse_update_120.jpg
new file mode 100644
index 0000000..bfdf708
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.feature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.model.fprod.feature/epl-v10.html b/features/org.eclipse.egf.model.fprod.feature/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.feature/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.fprod.feature/feature.properties b/features/org.eclipse.egf.model.fprod.feature/feature.properties
new file mode 100644
index 0000000..6e1ca4a
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.feature/feature.properties
@@ -0,0 +1,135 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# "featureName" property - name of the feature
+featureName=EGF Model Fprod (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories Model Fprod.
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.egf.model.fprod.feature/feature.xml b/features/org.eclipse.egf.model.fprod.feature/feature.xml
new file mode 100644
index 0000000..00596e3
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.feature/feature.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.egf.model.fprod"
+ label="%featureName"
+ version="0.2.3.qualifier"
+ provider-name="%providerName"
+ plugin="org.eclipse.egf.model.fprod"
+ image="eclipse_update_120.jpg"
+>
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ 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
+ </copyright>
+
+ <license
+ url="%licenseURL"
+ >
+ %license
+ </license>
+
+ <url>
+ <update
+ label="%EMFTUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emft/updates/"
+ />
+ <discovery
+ label="%EMFUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emf/updates/"
+ />
+ <discovery
+ label="%EMFTUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emft/updates/"
+ />
+ </url>
+
+ <includes
+ id="org.eclipse.egf.model"
+ version="0.0.0"
+ />
+
+ <includes
+ id="org.eclipse.egf.producer"
+ version="0.0.0"
+ />
+
+ <includes
+ id="org.eclipse.egf.model.fprod.source"
+ version="0.0.0"
+ />
+
+ <plugin
+ id="org.eclipse.egf.model.fprod"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"
+ />
+
+ <plugin
+ id="org.eclipse.egf.fprod.producer"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"
+ />
+
+</feature>
diff --git a/features/org.eclipse.egf.model.fprod.feature/license.html b/features/org.eclipse.egf.model.fprod.feature/license.html
new file mode 100644
index 0000000..a9b560f
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.feature/license.html
@@ -0,0 +1,79 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also 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>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
+ modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body>
+</html>
diff --git a/features/org.eclipse.egf.model.fprod.feature/rootfiles/epl-v10.html b/features/org.eclipse.egf.model.fprod.feature/rootfiles/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.feature/rootfiles/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.fprod.feature/rootfiles/notice.html b/features/org.eclipse.egf.model.fprod.feature/rootfiles/notice.html
new file mode 100644
index 0000000..64d8c4c
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.feature/rootfiles/notice.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.fprod.feature/sourceTemplateBundle/about.html b/features/org.eclipse.egf.model.fprod.feature/sourceTemplateBundle/about.html
new file mode 100644
index 0000000..caeb225
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.feature/sourceTemplateBundle/about.html
@@ -0,0 +1,27 @@
+<!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>February 2, 2009</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/features/org.eclipse.egf.model.fprod.feature/sourceTemplateBundle/plugin.properties b/features/org.eclipse.egf.model.fprod.feature/sourceTemplateBundle/plugin.properties
new file mode 100644
index 0000000..071d440
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.feature/sourceTemplateBundle/plugin.properties
@@ -0,0 +1,27 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+pluginName=EGF Model Fprod Source (Incubation)
+providerName=Eclipse Modeling Project
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.model.fprod.feature/sourceTemplateFeature/build.properties b/features/org.eclipse.egf.model.fprod.feature/sourceTemplateFeature/build.properties
new file mode 100644
index 0000000..ec40e29
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.feature/sourceTemplateFeature/build.properties
@@ -0,0 +1,17 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes =\
+epl-v10.html,\
+feature.*,\
+eclipse_update_120.jpg,\
+license.html
diff --git a/features/org.eclipse.egf.model.fprod.feature/sourceTemplateFeature/eclipse_update_120.jpg b/features/org.eclipse.egf.model.fprod.feature/sourceTemplateFeature/eclipse_update_120.jpg
new file mode 100644
index 0000000..68e3e02
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.feature/sourceTemplateFeature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.model.fprod.feature/sourceTemplateFeature/epl-v10.html b/features/org.eclipse.egf.model.fprod.feature/sourceTemplateFeature/epl-v10.html
new file mode 100644
index 0000000..2761abd
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.feature/sourceTemplateFeature/epl-v10.html
@@ -0,0 +1,320 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta name="ProgId" content="Word.Document">
+<meta name="Generator" content="Microsoft Word 9">
+<meta name="Originator" content="Microsoft Word 9">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.gmf/features/org.eclipse.gmf.sdk-feature/sourceTemplateFeature/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Revision>2</o:Revision>
+ <o:TotalTime>3</o:TotalTime>
+ <o:Created>2004-03-05T23:03:00Z</o:Created>
+ <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+ <o:Pages>4</o:Pages>
+ <o:Words>1626</o:Words>
+ <o:Characters>9270</o:Characters>
+ <o:Lines>77</o:Lines>
+ <o:Paragraphs>18</o:Paragraphs>
+ <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+ <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+ font-family:Tahoma;
+ mso-fareast-font-family:"Times New Roman";}
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.fprod.feature/sourceTemplateFeature/feature.properties b/features/org.eclipse.egf.model.fprod.feature/sourceTemplateFeature/feature.properties
new file mode 100644
index 0000000..913aae4
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.feature/sourceTemplateFeature/feature.properties
@@ -0,0 +1,147 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+# "featureName" property - name of the feature
+featureName=EGF Fprod Source (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories Fprod Source.
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Modeling Project CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.model.fprod.feature/sourceTemplateFeature/license.html b/features/org.eclipse.egf.model.fprod.feature/sourceTemplateFeature/license.html
new file mode 100644
index 0000000..e819bbc
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.feature/sourceTemplateFeature/license.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.fprod.feature/sourceTemplatePlugin/about.html b/features/org.eclipse.egf.model.fprod.feature/sourceTemplatePlugin/about.html
new file mode 100644
index 0000000..caeb225
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.feature/sourceTemplatePlugin/about.html
@@ -0,0 +1,27 @@
+<!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>February 2, 2009</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/features/org.eclipse.egf.model.fprod.feature/sourceTemplatePlugin/about.ini b/features/org.eclipse.egf.model.fprod.feature/sourceTemplatePlugin/about.ini
new file mode 100644
index 0000000..546150b
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.feature/sourceTemplatePlugin/about.ini
@@ -0,0 +1,27 @@
+# about.ini
+# contains information about a feature
+# java.util.Properties file (ISO-8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%aboutText
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=fc32.gif
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (translated)
+# needed for primary features only
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# optional
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
diff --git a/features/org.eclipse.egf.model.fprod.feature/sourceTemplatePlugin/about.mappings b/features/org.eclipse.egf.model.fprod.feature/sourceTemplatePlugin/about.mappings
new file mode 100644
index 0000000..a06fc50
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.feature/sourceTemplatePlugin/about.mappings
@@ -0,0 +1,17 @@
+##
+# 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
+##
+
+# about.mappings
+# contains fill-ins for about.properties
+# java.util.Properties file (ISO-8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@
diff --git a/features/org.eclipse.egf.model.fprod.feature/sourceTemplatePlugin/about.properties b/features/org.eclipse.egf.model.fprod.feature/sourceTemplatePlugin/about.properties
new file mode 100644
index 0000000..9f886dc
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.feature/sourceTemplatePlugin/about.properties
@@ -0,0 +1,39 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+aboutText=EGF Model Fprod Source (Incubation)\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+Copyright (c) Thales Corporate Services S.A.S, 2009-2010 and others. All rights reserved.\n\
+\n\
+Visit http://www.eclipse.org/proposals/egf/
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.model.fprod.feature/sourceTemplatePlugin/build.properties b/features/org.eclipse.egf.model.fprod.feature/sourceTemplatePlugin/build.properties
new file mode 100644
index 0000000..0e50697
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.feature/sourceTemplatePlugin/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = fc32.gif,\
+ about.*,\
+ plugin.*,\
+ src/,\
+ META-INF/
+sourcePlugin=true
+src.includes = about.html
diff --git a/features/org.eclipse.egf.model.fprod.feature/sourceTemplatePlugin/fc32.gif b/features/org.eclipse.egf.model.fprod.feature/sourceTemplatePlugin/fc32.gif
new file mode 100644
index 0000000..f9fe86c
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.feature/sourceTemplatePlugin/fc32.gif
Binary files differ
diff --git a/features/org.eclipse.egf.model.fprod.feature/sourceTemplatePlugin/plugin.properties b/features/org.eclipse.egf.model.fprod.feature/sourceTemplatePlugin/plugin.properties
new file mode 100644
index 0000000..071d440
--- /dev/null
+++ b/features/org.eclipse.egf.model.fprod.feature/sourceTemplatePlugin/plugin.properties
@@ -0,0 +1,27 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+pluginName=EGF Model Fprod Source (Incubation)
+providerName=Eclipse Modeling Project
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.model.ftask.edit.feature/.project b/features/org.eclipse.egf.model.ftask.edit.feature/.project
new file mode 100644
index 0000000..a1f1089
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.edit.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.model.ftask.edit.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.egf.model.ftask.edit.feature/.settings/org.eclipse.core.resources.prefs b/features/org.eclipse.egf.model.ftask.edit.feature/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..65ece17
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.edit.feature/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,11 @@
+#Mon Feb 23 14:20:30 CET 2009
+encoding//rootfiles/epl-v10.html=ISO-8859-1
+encoding//rootfiles/notice.html=ISO-8859-1
+encoding//sourceTemplateBundle/about.html=ISO-8859-1
+encoding//sourceTemplateFeature/epl-v10.html=ISO-8859-1
+encoding//sourceTemplateFeature/license.html=ISO-8859-1
+encoding//sourceTemplatePlugin/about.html=ISO-8859-1
+encoding//sourceTemplatePlugin/about.ini=ISO-8859-1
+encoding//sourceTemplatePlugin/about.mappings=ISO-8859-1
+encoding/epl-v10.html=ISO-8859-1
+encoding/license.html=ISO-8859-1
diff --git a/features/org.eclipse.egf.model.ftask.edit.feature/build.properties b/features/org.eclipse.egf.model.ftask.edit.feature/build.properties
new file mode 100644
index 0000000..023c9ad
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.edit.feature/build.properties
@@ -0,0 +1,20 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = feature.*,\
+ epl-v10.html,\
+ license.html,\
+ eclipse_update_120.jpg
+src.includes = epl-v10.html,\
+ license.html
+root=rootfiles
+generate.feature@org.eclipse.egf.model.ftask.edit.source=org.eclipse.egf.model.ftask.edit
diff --git a/features/org.eclipse.egf.model.ftask.edit.feature/eclipse_update_120.jpg b/features/org.eclipse.egf.model.ftask.edit.feature/eclipse_update_120.jpg
new file mode 100644
index 0000000..bfdf708
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.edit.feature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.model.ftask.edit.feature/epl-v10.html b/features/org.eclipse.egf.model.ftask.edit.feature/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.edit.feature/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.ftask.edit.feature/feature.properties b/features/org.eclipse.egf.model.ftask.edit.feature/feature.properties
new file mode 100644
index 0000000..fc314e7
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.edit.feature/feature.properties
@@ -0,0 +1,135 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# "featureName" property - name of the feature
+featureName=EGF Model Ftask Edit (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories Model Ftask Edit.
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.egf.model.ftask.edit.feature/feature.xml b/features/org.eclipse.egf.model.ftask.edit.feature/feature.xml
new file mode 100644
index 0000000..7aca57c
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.edit.feature/feature.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.egf.model.ftask.edit"
+ label="%featureName"
+ version="0.2.3.qualifier"
+ provider-name="%providerName"
+ plugin="org.eclipse.egf.model.ftask.edit"
+ image="eclipse_update_120.jpg">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ 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
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <url>
+ <update label="%EMFTUpdateSiteName" url="http://download.eclipse.org/modeling/emft/updates/"/>
+ <discovery label="%EMFUpdateSiteName" url="http://download.eclipse.org/modeling/emf/updates/"/>
+ <discovery label="%EMFTUpdateSiteName" url="http://download.eclipse.org/modeling/emft/updates/"/>
+ </url>
+
+ <includes
+ id="org.eclipse.egf.model.ftask"
+ version="0.0.0"/>
+
+ <includes
+ id="org.eclipse.egf.model.edit"
+ version="0.0.0"/>
+
+ <includes
+ id="org.eclipse.egf.model.ftask.edit.source"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.eclipse.egf.model.ftask.edit"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/features/org.eclipse.egf.model.ftask.edit.feature/license.html b/features/org.eclipse.egf.model.ftask.edit.feature/license.html
new file mode 100644
index 0000000..a9b560f
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.edit.feature/license.html
@@ -0,0 +1,79 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also 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>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
+ modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body>
+</html>
diff --git a/features/org.eclipse.egf.model.ftask.edit.feature/rootfiles/epl-v10.html b/features/org.eclipse.egf.model.ftask.edit.feature/rootfiles/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.edit.feature/rootfiles/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.ftask.edit.feature/rootfiles/notice.html b/features/org.eclipse.egf.model.ftask.edit.feature/rootfiles/notice.html
new file mode 100644
index 0000000..64d8c4c
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.edit.feature/rootfiles/notice.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplateBundle/about.html b/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplateBundle/about.html
new file mode 100644
index 0000000..caeb225
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplateBundle/about.html
@@ -0,0 +1,27 @@
+<!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>February 2, 2009</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/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplateBundle/plugin.properties b/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplateBundle/plugin.properties
new file mode 100644
index 0000000..e6e5cba
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplateBundle/plugin.properties
@@ -0,0 +1,27 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+pluginName=EGF Model Ftask Edit Source (Incubation)
+providerName=Eclipse Modeling Project
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplateFeature/build.properties b/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplateFeature/build.properties
new file mode 100644
index 0000000..ec40e29
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplateFeature/build.properties
@@ -0,0 +1,17 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes =\
+epl-v10.html,\
+feature.*,\
+eclipse_update_120.jpg,\
+license.html
diff --git a/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplateFeature/eclipse_update_120.jpg b/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplateFeature/eclipse_update_120.jpg
new file mode 100644
index 0000000..68e3e02
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplateFeature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplateFeature/epl-v10.html b/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplateFeature/epl-v10.html
new file mode 100644
index 0000000..2761abd
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplateFeature/epl-v10.html
@@ -0,0 +1,320 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta name="ProgId" content="Word.Document">
+<meta name="Generator" content="Microsoft Word 9">
+<meta name="Originator" content="Microsoft Word 9">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.gmf/features/org.eclipse.gmf.sdk-feature/sourceTemplateFeature/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Revision>2</o:Revision>
+ <o:TotalTime>3</o:TotalTime>
+ <o:Created>2004-03-05T23:03:00Z</o:Created>
+ <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+ <o:Pages>4</o:Pages>
+ <o:Words>1626</o:Words>
+ <o:Characters>9270</o:Characters>
+ <o:Lines>77</o:Lines>
+ <o:Paragraphs>18</o:Paragraphs>
+ <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+ <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+ font-family:Tahoma;
+ mso-fareast-font-family:"Times New Roman";}
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplateFeature/feature.properties b/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplateFeature/feature.properties
new file mode 100644
index 0000000..89b3e3c
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplateFeature/feature.properties
@@ -0,0 +1,147 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+# "featureName" property - name of the feature
+featureName=EGF Model Ftask Edit Source (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories Model Ftask Edit Source.
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Modeling Project CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplateFeature/license.html b/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplateFeature/license.html
new file mode 100644
index 0000000..e819bbc
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplateFeature/license.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplatePlugin/about.html b/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplatePlugin/about.html
new file mode 100644
index 0000000..caeb225
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplatePlugin/about.html
@@ -0,0 +1,27 @@
+<!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>February 2, 2009</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/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplatePlugin/about.ini b/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplatePlugin/about.ini
new file mode 100644
index 0000000..546150b
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplatePlugin/about.ini
@@ -0,0 +1,27 @@
+# about.ini
+# contains information about a feature
+# java.util.Properties file (ISO-8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%aboutText
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=fc32.gif
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (translated)
+# needed for primary features only
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# optional
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
diff --git a/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplatePlugin/about.mappings b/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplatePlugin/about.mappings
new file mode 100644
index 0000000..a06fc50
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplatePlugin/about.mappings
@@ -0,0 +1,17 @@
+##
+# 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
+##
+
+# about.mappings
+# contains fill-ins for about.properties
+# java.util.Properties file (ISO-8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@
diff --git a/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplatePlugin/about.properties b/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplatePlugin/about.properties
new file mode 100644
index 0000000..a206900
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplatePlugin/about.properties
@@ -0,0 +1,39 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+aboutText=EGF Model Ftask Edit Source (Incubation)\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+Copyright (c) Thales Corporate Services S.A.S, 2009-2010 and others. All rights reserved.\n\
+\n\
+Visit http://www.eclipse.org/proposals/egf/
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplatePlugin/build.properties b/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplatePlugin/build.properties
new file mode 100644
index 0000000..0e50697
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplatePlugin/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = fc32.gif,\
+ about.*,\
+ plugin.*,\
+ src/,\
+ META-INF/
+sourcePlugin=true
+src.includes = about.html
diff --git a/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplatePlugin/fc32.gif b/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplatePlugin/fc32.gif
new file mode 100644
index 0000000..f9fe86c
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplatePlugin/fc32.gif
Binary files differ
diff --git a/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplatePlugin/plugin.properties b/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplatePlugin/plugin.properties
new file mode 100644
index 0000000..e6e5cba
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.edit.feature/sourceTemplatePlugin/plugin.properties
@@ -0,0 +1,27 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+pluginName=EGF Model Ftask Edit Source (Incubation)
+providerName=Eclipse Modeling Project
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.model.ftask.feature/.project b/features/org.eclipse.egf.model.ftask.feature/.project
new file mode 100644
index 0000000..fda730e
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.model.ftask.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.egf.model.ftask.feature/.settings/org.eclipse.core.resources.prefs b/features/org.eclipse.egf.model.ftask.feature/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..65ece17
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.feature/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,11 @@
+#Mon Feb 23 14:20:30 CET 2009
+encoding//rootfiles/epl-v10.html=ISO-8859-1
+encoding//rootfiles/notice.html=ISO-8859-1
+encoding//sourceTemplateBundle/about.html=ISO-8859-1
+encoding//sourceTemplateFeature/epl-v10.html=ISO-8859-1
+encoding//sourceTemplateFeature/license.html=ISO-8859-1
+encoding//sourceTemplatePlugin/about.html=ISO-8859-1
+encoding//sourceTemplatePlugin/about.ini=ISO-8859-1
+encoding//sourceTemplatePlugin/about.mappings=ISO-8859-1
+encoding/epl-v10.html=ISO-8859-1
+encoding/license.html=ISO-8859-1
diff --git a/features/org.eclipse.egf.model.ftask.feature/build.properties b/features/org.eclipse.egf.model.ftask.feature/build.properties
new file mode 100644
index 0000000..a987d4f
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.feature/build.properties
@@ -0,0 +1,20 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = feature.*,\
+ epl-v10.html,\
+ license.html,\
+ eclipse_update_120.jpg
+src.includes = epl-v10.html,\
+ license.html
+root=rootfiles
+generate.feature@org.eclipse.egf.model.ftask.source=org.eclipse.egf.model.ftask
diff --git a/features/org.eclipse.egf.model.ftask.feature/eclipse_update_120.jpg b/features/org.eclipse.egf.model.ftask.feature/eclipse_update_120.jpg
new file mode 100644
index 0000000..bfdf708
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.feature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.model.ftask.feature/epl-v10.html b/features/org.eclipse.egf.model.ftask.feature/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.feature/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.ftask.feature/feature.properties b/features/org.eclipse.egf.model.ftask.feature/feature.properties
new file mode 100644
index 0000000..4f1a58a
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.feature/feature.properties
@@ -0,0 +1,135 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# "featureName" property - name of the feature
+featureName=EGF Model Ftask (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories Model Ftask.
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.egf.model.ftask.feature/feature.xml b/features/org.eclipse.egf.model.ftask.feature/feature.xml
new file mode 100644
index 0000000..9df0b27
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.feature/feature.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.egf.model.ftask"
+ label="%featureName"
+ version="0.2.3.qualifier"
+ provider-name="%providerName"
+ plugin="org.eclipse.egf.model.ftask"
+ image="eclipse_update_120.jpg">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ 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
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <url>
+ <update label="%EMFTUpdateSiteName" url="http://download.eclipse.org/modeling/emft/updates/"/>
+ <discovery label="%EMFUpdateSiteName" url="http://download.eclipse.org/modeling/emf/updates/"/>
+ <discovery label="%EMFTUpdateSiteName" url="http://download.eclipse.org/modeling/emft/updates/"/>
+ </url>
+
+ <includes
+ id="org.eclipse.egf.model"
+ version="0.0.0"/>
+
+ <includes
+ id="org.eclipse.egf.producer"
+ version="0.0.0"/>
+
+ <includes
+ id="org.eclipse.egf.model.ftask.source"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.eclipse.egf.model.ftask"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.egf.task"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.egf.ftask.producer"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.egf.pattern.ftask"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/features/org.eclipse.egf.model.ftask.feature/license.html b/features/org.eclipse.egf.model.ftask.feature/license.html
new file mode 100644
index 0000000..a9b560f
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.feature/license.html
@@ -0,0 +1,79 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also 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>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
+ modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body>
+</html>
diff --git a/features/org.eclipse.egf.model.ftask.feature/rootfiles/epl-v10.html b/features/org.eclipse.egf.model.ftask.feature/rootfiles/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.feature/rootfiles/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.ftask.feature/rootfiles/notice.html b/features/org.eclipse.egf.model.ftask.feature/rootfiles/notice.html
new file mode 100644
index 0000000..64d8c4c
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.feature/rootfiles/notice.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.ftask.feature/sourceTemplateBundle/about.html b/features/org.eclipse.egf.model.ftask.feature/sourceTemplateBundle/about.html
new file mode 100644
index 0000000..caeb225
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.feature/sourceTemplateBundle/about.html
@@ -0,0 +1,27 @@
+<!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>February 2, 2009</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/features/org.eclipse.egf.model.ftask.feature/sourceTemplateBundle/plugin.properties b/features/org.eclipse.egf.model.ftask.feature/sourceTemplateBundle/plugin.properties
new file mode 100644
index 0000000..a90953a
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.feature/sourceTemplateBundle/plugin.properties
@@ -0,0 +1,27 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+pluginName=EGF Model Ftask Source (Incubation)
+providerName=Eclipse Modeling Project
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.model.ftask.feature/sourceTemplateFeature/build.properties b/features/org.eclipse.egf.model.ftask.feature/sourceTemplateFeature/build.properties
new file mode 100644
index 0000000..ec40e29
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.feature/sourceTemplateFeature/build.properties
@@ -0,0 +1,17 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes =\
+epl-v10.html,\
+feature.*,\
+eclipse_update_120.jpg,\
+license.html
diff --git a/features/org.eclipse.egf.model.ftask.feature/sourceTemplateFeature/eclipse_update_120.jpg b/features/org.eclipse.egf.model.ftask.feature/sourceTemplateFeature/eclipse_update_120.jpg
new file mode 100644
index 0000000..68e3e02
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.feature/sourceTemplateFeature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.model.ftask.feature/sourceTemplateFeature/epl-v10.html b/features/org.eclipse.egf.model.ftask.feature/sourceTemplateFeature/epl-v10.html
new file mode 100644
index 0000000..2761abd
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.feature/sourceTemplateFeature/epl-v10.html
@@ -0,0 +1,320 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta name="ProgId" content="Word.Document">
+<meta name="Generator" content="Microsoft Word 9">
+<meta name="Originator" content="Microsoft Word 9">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.gmf/features/org.eclipse.gmf.sdk-feature/sourceTemplateFeature/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Revision>2</o:Revision>
+ <o:TotalTime>3</o:TotalTime>
+ <o:Created>2004-03-05T23:03:00Z</o:Created>
+ <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+ <o:Pages>4</o:Pages>
+ <o:Words>1626</o:Words>
+ <o:Characters>9270</o:Characters>
+ <o:Lines>77</o:Lines>
+ <o:Paragraphs>18</o:Paragraphs>
+ <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+ <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+ font-family:Tahoma;
+ mso-fareast-font-family:"Times New Roman";}
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.ftask.feature/sourceTemplateFeature/feature.properties b/features/org.eclipse.egf.model.ftask.feature/sourceTemplateFeature/feature.properties
new file mode 100644
index 0000000..1488ab8
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.feature/sourceTemplateFeature/feature.properties
@@ -0,0 +1,147 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+# "featureName" property - name of the feature
+featureName=EGF Model Ftask Source (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories Model Ftask Source.
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Modeling Project CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.model.ftask.feature/sourceTemplateFeature/license.html b/features/org.eclipse.egf.model.ftask.feature/sourceTemplateFeature/license.html
new file mode 100644
index 0000000..e819bbc
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.feature/sourceTemplateFeature/license.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.ftask.feature/sourceTemplatePlugin/about.html b/features/org.eclipse.egf.model.ftask.feature/sourceTemplatePlugin/about.html
new file mode 100644
index 0000000..caeb225
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.feature/sourceTemplatePlugin/about.html
@@ -0,0 +1,27 @@
+<!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>February 2, 2009</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/features/org.eclipse.egf.model.ftask.feature/sourceTemplatePlugin/about.ini b/features/org.eclipse.egf.model.ftask.feature/sourceTemplatePlugin/about.ini
new file mode 100644
index 0000000..546150b
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.feature/sourceTemplatePlugin/about.ini
@@ -0,0 +1,27 @@
+# about.ini
+# contains information about a feature
+# java.util.Properties file (ISO-8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%aboutText
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=fc32.gif
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (translated)
+# needed for primary features only
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# optional
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
diff --git a/features/org.eclipse.egf.model.ftask.feature/sourceTemplatePlugin/about.mappings b/features/org.eclipse.egf.model.ftask.feature/sourceTemplatePlugin/about.mappings
new file mode 100644
index 0000000..a06fc50
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.feature/sourceTemplatePlugin/about.mappings
@@ -0,0 +1,17 @@
+##
+# 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
+##
+
+# about.mappings
+# contains fill-ins for about.properties
+# java.util.Properties file (ISO-8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@
diff --git a/features/org.eclipse.egf.model.ftask.feature/sourceTemplatePlugin/about.properties b/features/org.eclipse.egf.model.ftask.feature/sourceTemplatePlugin/about.properties
new file mode 100644
index 0000000..293a219
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.feature/sourceTemplatePlugin/about.properties
@@ -0,0 +1,39 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+aboutText=EGF Model Ftask Source (Incubation)\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+Copyright (c) Thales Corporate Services S.A.S, 2009-2010 and others. All rights reserved.\n\
+\n\
+Visit http://www.eclipse.org/proposals/egf/
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.model.ftask.feature/sourceTemplatePlugin/build.properties b/features/org.eclipse.egf.model.ftask.feature/sourceTemplatePlugin/build.properties
new file mode 100644
index 0000000..0e50697
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.feature/sourceTemplatePlugin/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = fc32.gif,\
+ about.*,\
+ plugin.*,\
+ src/,\
+ META-INF/
+sourcePlugin=true
+src.includes = about.html
diff --git a/features/org.eclipse.egf.model.ftask.feature/sourceTemplatePlugin/fc32.gif b/features/org.eclipse.egf.model.ftask.feature/sourceTemplatePlugin/fc32.gif
new file mode 100644
index 0000000..f9fe86c
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.feature/sourceTemplatePlugin/fc32.gif
Binary files differ
diff --git a/features/org.eclipse.egf.model.ftask.feature/sourceTemplatePlugin/plugin.properties b/features/org.eclipse.egf.model.ftask.feature/sourceTemplatePlugin/plugin.properties
new file mode 100644
index 0000000..a90953a
--- /dev/null
+++ b/features/org.eclipse.egf.model.ftask.feature/sourceTemplatePlugin/plugin.properties
@@ -0,0 +1,27 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+pluginName=EGF Model Ftask Source (Incubation)
+providerName=Eclipse Modeling Project
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.model.ui.feature/.project b/features/org.eclipse.egf.model.ui.feature/.project
new file mode 100644
index 0000000..f50ea3d
--- /dev/null
+++ b/features/org.eclipse.egf.model.ui.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.model.ui.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.egf.model.ui.feature/.settings/org.eclipse.core.resources.prefs b/features/org.eclipse.egf.model.ui.feature/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..65ece17
--- /dev/null
+++ b/features/org.eclipse.egf.model.ui.feature/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,11 @@
+#Mon Feb 23 14:20:30 CET 2009
+encoding//rootfiles/epl-v10.html=ISO-8859-1
+encoding//rootfiles/notice.html=ISO-8859-1
+encoding//sourceTemplateBundle/about.html=ISO-8859-1
+encoding//sourceTemplateFeature/epl-v10.html=ISO-8859-1
+encoding//sourceTemplateFeature/license.html=ISO-8859-1
+encoding//sourceTemplatePlugin/about.html=ISO-8859-1
+encoding//sourceTemplatePlugin/about.ini=ISO-8859-1
+encoding//sourceTemplatePlugin/about.mappings=ISO-8859-1
+encoding/epl-v10.html=ISO-8859-1
+encoding/license.html=ISO-8859-1
diff --git a/features/org.eclipse.egf.model.ui.feature/build.properties b/features/org.eclipse.egf.model.ui.feature/build.properties
new file mode 100644
index 0000000..4e6824d
--- /dev/null
+++ b/features/org.eclipse.egf.model.ui.feature/build.properties
@@ -0,0 +1,20 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = feature.*,\
+ epl-v10.html,\
+ license.html,\
+ eclipse_update_120.jpg
+src.includes = epl-v10.html,\
+ license.html
+root=rootfiles
+generate.feature@org.eclipse.egf.model.ui.source=org.eclipse.egf.model.ui
diff --git a/features/org.eclipse.egf.model.ui.feature/eclipse_update_120.jpg b/features/org.eclipse.egf.model.ui.feature/eclipse_update_120.jpg
new file mode 100644
index 0000000..bfdf708
--- /dev/null
+++ b/features/org.eclipse.egf.model.ui.feature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.model.ui.feature/epl-v10.html b/features/org.eclipse.egf.model.ui.feature/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.model.ui.feature/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.ui.feature/feature.properties b/features/org.eclipse.egf.model.ui.feature/feature.properties
new file mode 100644
index 0000000..383f1cd
--- /dev/null
+++ b/features/org.eclipse.egf.model.ui.feature/feature.properties
@@ -0,0 +1,135 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# "featureName" property - name of the feature
+featureName=EGF Model UI (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories Model UI.
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.egf.model.ui.feature/feature.xml b/features/org.eclipse.egf.model.ui.feature/feature.xml
new file mode 100644
index 0000000..ccf2af0
--- /dev/null
+++ b/features/org.eclipse.egf.model.ui.feature/feature.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.egf.model.ui"
+ label="%featureName"
+ version="0.2.3.qualifier"
+ provider-name="%providerName"
+ plugin="org.eclipse.egf.model.editor"
+ image="eclipse_update_120.jpg">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ 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
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <url>
+ <update label="%EMFTUpdateSiteName" url="http://download.eclipse.org/modeling/emft/updates/"/>
+ <discovery label="%EMFUpdateSiteName" url="http://download.eclipse.org/modeling/emf/updates/"/>
+ <discovery label="%EMFTUpdateSiteName" url="http://download.eclipse.org/modeling/emft/updates/"/>
+ </url>
+
+ <includes
+ id="org.eclipse.egf.model.edit"
+ version="0.0.0"/>
+
+ <includes
+ id="org.eclipse.egf.model.ui.source"
+ version="0.0.0"/>
+
+ <requires>
+ <import feature="org.eclipse.emf.databinding" version="1.1.0.v200906151043" match="compatible"/>
+ <import feature="org.eclipse.emf.databinding.edit" version="1.1.0.v200906151043" match="compatible"/>
+ </requires>
+
+ <plugin
+ id="org.eclipse.egf.model.editor"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"
+ />
+
+ <plugin
+ id="org.eclipse.egf.task.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"
+ />
+
+ <plugin
+ id="org.eclipse.egf.pattern.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"
+ />
+
+ <plugin
+ id="org.eclipse.egf.pattern.ui.java"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"
+ />
+
+ <plugin
+ id="org.eclipse.egf.pattern.ui.jet"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"
+ />
+
+ <plugin
+ id="org.eclipse.jet.editor"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"
+ />
+
+</feature>
diff --git a/features/org.eclipse.egf.model.ui.feature/license.html b/features/org.eclipse.egf.model.ui.feature/license.html
new file mode 100644
index 0000000..a9b560f
--- /dev/null
+++ b/features/org.eclipse.egf.model.ui.feature/license.html
@@ -0,0 +1,79 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also 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>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
+ modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body>
+</html>
diff --git a/features/org.eclipse.egf.model.ui.feature/rootfiles/epl-v10.html b/features/org.eclipse.egf.model.ui.feature/rootfiles/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.model.ui.feature/rootfiles/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.ui.feature/rootfiles/notice.html b/features/org.eclipse.egf.model.ui.feature/rootfiles/notice.html
new file mode 100644
index 0000000..64d8c4c
--- /dev/null
+++ b/features/org.eclipse.egf.model.ui.feature/rootfiles/notice.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.ui.feature/sourceTemplateBundle/about.html b/features/org.eclipse.egf.model.ui.feature/sourceTemplateBundle/about.html
new file mode 100644
index 0000000..caeb225
--- /dev/null
+++ b/features/org.eclipse.egf.model.ui.feature/sourceTemplateBundle/about.html
@@ -0,0 +1,27 @@
+<!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>February 2, 2009</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/features/org.eclipse.egf.model.ui.feature/sourceTemplateBundle/plugin.properties b/features/org.eclipse.egf.model.ui.feature/sourceTemplateBundle/plugin.properties
new file mode 100644
index 0000000..7a8b4bb
--- /dev/null
+++ b/features/org.eclipse.egf.model.ui.feature/sourceTemplateBundle/plugin.properties
@@ -0,0 +1,27 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+pluginName=EGF Model UI Source (Incubation)
+providerName=Eclipse Modeling Project
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.model.ui.feature/sourceTemplateFeature/build.properties b/features/org.eclipse.egf.model.ui.feature/sourceTemplateFeature/build.properties
new file mode 100644
index 0000000..ec40e29
--- /dev/null
+++ b/features/org.eclipse.egf.model.ui.feature/sourceTemplateFeature/build.properties
@@ -0,0 +1,17 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes =\
+epl-v10.html,\
+feature.*,\
+eclipse_update_120.jpg,\
+license.html
diff --git a/features/org.eclipse.egf.model.ui.feature/sourceTemplateFeature/eclipse_update_120.jpg b/features/org.eclipse.egf.model.ui.feature/sourceTemplateFeature/eclipse_update_120.jpg
new file mode 100644
index 0000000..68e3e02
--- /dev/null
+++ b/features/org.eclipse.egf.model.ui.feature/sourceTemplateFeature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.model.ui.feature/sourceTemplateFeature/epl-v10.html b/features/org.eclipse.egf.model.ui.feature/sourceTemplateFeature/epl-v10.html
new file mode 100644
index 0000000..2761abd
--- /dev/null
+++ b/features/org.eclipse.egf.model.ui.feature/sourceTemplateFeature/epl-v10.html
@@ -0,0 +1,320 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta name="ProgId" content="Word.Document">
+<meta name="Generator" content="Microsoft Word 9">
+<meta name="Originator" content="Microsoft Word 9">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.gmf/features/org.eclipse.gmf.sdk-feature/sourceTemplateFeature/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Revision>2</o:Revision>
+ <o:TotalTime>3</o:TotalTime>
+ <o:Created>2004-03-05T23:03:00Z</o:Created>
+ <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+ <o:Pages>4</o:Pages>
+ <o:Words>1626</o:Words>
+ <o:Characters>9270</o:Characters>
+ <o:Lines>77</o:Lines>
+ <o:Paragraphs>18</o:Paragraphs>
+ <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+ <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+ font-family:Tahoma;
+ mso-fareast-font-family:"Times New Roman";}
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.ui.feature/sourceTemplateFeature/feature.properties b/features/org.eclipse.egf.model.ui.feature/sourceTemplateFeature/feature.properties
new file mode 100644
index 0000000..d7f7b85
--- /dev/null
+++ b/features/org.eclipse.egf.model.ui.feature/sourceTemplateFeature/feature.properties
@@ -0,0 +1,147 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+# "featureName" property - name of the feature
+featureName=EGF Model UI Source (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories Model UI Source.
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Modeling Project CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.model.ui.feature/sourceTemplateFeature/license.html b/features/org.eclipse.egf.model.ui.feature/sourceTemplateFeature/license.html
new file mode 100644
index 0000000..e819bbc
--- /dev/null
+++ b/features/org.eclipse.egf.model.ui.feature/sourceTemplateFeature/license.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.model.ui.feature/sourceTemplatePlugin/about.html b/features/org.eclipse.egf.model.ui.feature/sourceTemplatePlugin/about.html
new file mode 100644
index 0000000..caeb225
--- /dev/null
+++ b/features/org.eclipse.egf.model.ui.feature/sourceTemplatePlugin/about.html
@@ -0,0 +1,27 @@
+<!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>February 2, 2009</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/features/org.eclipse.egf.model.ui.feature/sourceTemplatePlugin/about.ini b/features/org.eclipse.egf.model.ui.feature/sourceTemplatePlugin/about.ini
new file mode 100644
index 0000000..546150b
--- /dev/null
+++ b/features/org.eclipse.egf.model.ui.feature/sourceTemplatePlugin/about.ini
@@ -0,0 +1,27 @@
+# about.ini
+# contains information about a feature
+# java.util.Properties file (ISO-8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%aboutText
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=fc32.gif
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (translated)
+# needed for primary features only
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# optional
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
diff --git a/features/org.eclipse.egf.model.ui.feature/sourceTemplatePlugin/about.mappings b/features/org.eclipse.egf.model.ui.feature/sourceTemplatePlugin/about.mappings
new file mode 100644
index 0000000..a06fc50
--- /dev/null
+++ b/features/org.eclipse.egf.model.ui.feature/sourceTemplatePlugin/about.mappings
@@ -0,0 +1,17 @@
+##
+# 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
+##
+
+# about.mappings
+# contains fill-ins for about.properties
+# java.util.Properties file (ISO-8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@
diff --git a/features/org.eclipse.egf.model.ui.feature/sourceTemplatePlugin/about.properties b/features/org.eclipse.egf.model.ui.feature/sourceTemplatePlugin/about.properties
new file mode 100644
index 0000000..c6d263a
--- /dev/null
+++ b/features/org.eclipse.egf.model.ui.feature/sourceTemplatePlugin/about.properties
@@ -0,0 +1,39 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+aboutText=EGF Model UI Source (Incubation)\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+Copyright (c) Thales Corporate Services S.A.S, 2009-2010 and others. All rights reserved.\n\
+\n\
+Visit http://www.eclipse.org/proposals/egf/
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.model.ui.feature/sourceTemplatePlugin/build.properties b/features/org.eclipse.egf.model.ui.feature/sourceTemplatePlugin/build.properties
new file mode 100644
index 0000000..0e50697
--- /dev/null
+++ b/features/org.eclipse.egf.model.ui.feature/sourceTemplatePlugin/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = fc32.gif,\
+ about.*,\
+ plugin.*,\
+ src/,\
+ META-INF/
+sourcePlugin=true
+src.includes = about.html
diff --git a/features/org.eclipse.egf.model.ui.feature/sourceTemplatePlugin/fc32.gif b/features/org.eclipse.egf.model.ui.feature/sourceTemplatePlugin/fc32.gif
new file mode 100644
index 0000000..f9fe86c
--- /dev/null
+++ b/features/org.eclipse.egf.model.ui.feature/sourceTemplatePlugin/fc32.gif
Binary files differ
diff --git a/features/org.eclipse.egf.model.ui.feature/sourceTemplatePlugin/plugin.properties b/features/org.eclipse.egf.model.ui.feature/sourceTemplatePlugin/plugin.properties
new file mode 100644
index 0000000..7a8b4bb
--- /dev/null
+++ b/features/org.eclipse.egf.model.ui.feature/sourceTemplatePlugin/plugin.properties
@@ -0,0 +1,27 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+pluginName=EGF Model UI Source (Incubation)
+providerName=Eclipse Modeling Project
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.portfolio.feature/.project b/features/org.eclipse.egf.portfolio.feature/.project
new file mode 100644
index 0000000..9a2673e
--- /dev/null
+++ b/features/org.eclipse.egf.portfolio.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.portfolio.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.egf.portfolio.feature/.settings/org.eclipse.core.resources.prefs b/features/org.eclipse.egf.portfolio.feature/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..65ece17
--- /dev/null
+++ b/features/org.eclipse.egf.portfolio.feature/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,11 @@
+#Mon Feb 23 14:20:30 CET 2009
+encoding//rootfiles/epl-v10.html=ISO-8859-1
+encoding//rootfiles/notice.html=ISO-8859-1
+encoding//sourceTemplateBundle/about.html=ISO-8859-1
+encoding//sourceTemplateFeature/epl-v10.html=ISO-8859-1
+encoding//sourceTemplateFeature/license.html=ISO-8859-1
+encoding//sourceTemplatePlugin/about.html=ISO-8859-1
+encoding//sourceTemplatePlugin/about.ini=ISO-8859-1
+encoding//sourceTemplatePlugin/about.mappings=ISO-8859-1
+encoding/epl-v10.html=ISO-8859-1
+encoding/license.html=ISO-8859-1
diff --git a/features/org.eclipse.egf.portfolio.feature/build.properties b/features/org.eclipse.egf.portfolio.feature/build.properties
new file mode 100644
index 0000000..88e26ff
--- /dev/null
+++ b/features/org.eclipse.egf.portfolio.feature/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = feature.*,\
+ epl-v10.html,\
+ license.html,\
+ eclipse_update_120.jpg
+src.includes = epl-v10.html,\
+ license.html
+root=rootfiles
\ No newline at end of file
diff --git a/features/org.eclipse.egf.portfolio.feature/eclipse_update_120.jpg b/features/org.eclipse.egf.portfolio.feature/eclipse_update_120.jpg
new file mode 100644
index 0000000..bfdf708
--- /dev/null
+++ b/features/org.eclipse.egf.portfolio.feature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.portfolio.feature/epl-v10.html b/features/org.eclipse.egf.portfolio.feature/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.portfolio.feature/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.portfolio.feature/feature.properties b/features/org.eclipse.egf.portfolio.feature/feature.properties
new file mode 100644
index 0000000..c873d52
--- /dev/null
+++ b/features/org.eclipse.egf.portfolio.feature/feature.properties
@@ -0,0 +1,135 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# "featureName" property - name of the feature
+featureName=EGF Portfolio (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories Portfolio.
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.egf.portfolio.feature/feature.xml b/features/org.eclipse.egf.portfolio.feature/feature.xml
new file mode 100644
index 0000000..a3ec26e
--- /dev/null
+++ b/features/org.eclipse.egf.portfolio.feature/feature.xml
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.egf.portfolio"
+ label="%featureName"
+ version="0.2.3.qualifier"
+ provider-name="%providerName"
+ plugin="org.eclipse.egf.eclipse.resources.mgt"
+ image="eclipse_update_120.jpg">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ 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
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <url>
+ <update label="%EMFTUpdateSiteName" url="http://download.eclipse.org/modeling/emft/updates/"/>
+ <discovery label="%EMFUpdateSiteName" url="http://download.eclipse.org/modeling/emf/updates/"/>
+ <discovery label="%EMFTUpdateSiteName" url="http://download.eclipse.org/modeling/emft/updates/"/>
+ </url>
+
+ <includes id="org.eclipse.egf" version="0.0.0"/>
+
+ <includes
+ id="org.eclipse.egf.portfolio.source"
+ version="0.0.0"
+ />
+
+ <plugin
+ id="org.eclipse.egf.eclipse.resources.mgt"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.egf.emf.docgen.html"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.egf.emf.wrapper"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.egf.emf.wrapper.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.egf.portfolio.eclipse.util"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.egf.portfolio.file.resources"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.egf.portfolio.type"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/features/org.eclipse.egf.portfolio.feature/license.html b/features/org.eclipse.egf.portfolio.feature/license.html
new file mode 100644
index 0000000..a9b560f
--- /dev/null
+++ b/features/org.eclipse.egf.portfolio.feature/license.html
@@ -0,0 +1,79 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also 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>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
+ modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body>
+</html>
diff --git a/features/org.eclipse.egf.portfolio.feature/rootfiles/epl-v10.html b/features/org.eclipse.egf.portfolio.feature/rootfiles/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.portfolio.feature/rootfiles/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.portfolio.feature/rootfiles/notice.html b/features/org.eclipse.egf.portfolio.feature/rootfiles/notice.html
new file mode 100644
index 0000000..64d8c4c
--- /dev/null
+++ b/features/org.eclipse.egf.portfolio.feature/rootfiles/notice.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.portfolio.feature/sourceTemplateBundle/about.html b/features/org.eclipse.egf.portfolio.feature/sourceTemplateBundle/about.html
new file mode 100644
index 0000000..caeb225
--- /dev/null
+++ b/features/org.eclipse.egf.portfolio.feature/sourceTemplateBundle/about.html
@@ -0,0 +1,27 @@
+<!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>February 2, 2009</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/features/org.eclipse.egf.portfolio.feature/sourceTemplateBundle/plugin.properties b/features/org.eclipse.egf.portfolio.feature/sourceTemplateBundle/plugin.properties
new file mode 100644
index 0000000..349dc5a
--- /dev/null
+++ b/features/org.eclipse.egf.portfolio.feature/sourceTemplateBundle/plugin.properties
@@ -0,0 +1,27 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+pluginName=EGF Portfolio Source (Incubation)
+providerName=Eclipse Modeling Project
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.portfolio.feature/sourceTemplateFeature/build.properties b/features/org.eclipse.egf.portfolio.feature/sourceTemplateFeature/build.properties
new file mode 100644
index 0000000..ec40e29
--- /dev/null
+++ b/features/org.eclipse.egf.portfolio.feature/sourceTemplateFeature/build.properties
@@ -0,0 +1,17 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes =\
+epl-v10.html,\
+feature.*,\
+eclipse_update_120.jpg,\
+license.html
diff --git a/features/org.eclipse.egf.portfolio.feature/sourceTemplateFeature/eclipse_update_120.jpg b/features/org.eclipse.egf.portfolio.feature/sourceTemplateFeature/eclipse_update_120.jpg
new file mode 100644
index 0000000..68e3e02
--- /dev/null
+++ b/features/org.eclipse.egf.portfolio.feature/sourceTemplateFeature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.portfolio.feature/sourceTemplateFeature/epl-v10.html b/features/org.eclipse.egf.portfolio.feature/sourceTemplateFeature/epl-v10.html
new file mode 100644
index 0000000..2761abd
--- /dev/null
+++ b/features/org.eclipse.egf.portfolio.feature/sourceTemplateFeature/epl-v10.html
@@ -0,0 +1,320 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta name="ProgId" content="Word.Document">
+<meta name="Generator" content="Microsoft Word 9">
+<meta name="Originator" content="Microsoft Word 9">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.gmf/features/org.eclipse.gmf.sdk-feature/sourceTemplateFeature/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Revision>2</o:Revision>
+ <o:TotalTime>3</o:TotalTime>
+ <o:Created>2004-03-05T23:03:00Z</o:Created>
+ <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+ <o:Pages>4</o:Pages>
+ <o:Words>1626</o:Words>
+ <o:Characters>9270</o:Characters>
+ <o:Lines>77</o:Lines>
+ <o:Paragraphs>18</o:Paragraphs>
+ <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+ <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+ font-family:Tahoma;
+ mso-fareast-font-family:"Times New Roman";}
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.portfolio.feature/sourceTemplateFeature/feature.properties b/features/org.eclipse.egf.portfolio.feature/sourceTemplateFeature/feature.properties
new file mode 100644
index 0000000..2a7dea8
--- /dev/null
+++ b/features/org.eclipse.egf.portfolio.feature/sourceTemplateFeature/feature.properties
@@ -0,0 +1,147 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+# "featureName" property - name of the feature
+featureName=EGF Portfolio Source (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories Porfolio Source.
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Modeling Project CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.portfolio.feature/sourceTemplateFeature/license.html b/features/org.eclipse.egf.portfolio.feature/sourceTemplateFeature/license.html
new file mode 100644
index 0000000..e819bbc
--- /dev/null
+++ b/features/org.eclipse.egf.portfolio.feature/sourceTemplateFeature/license.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.portfolio.feature/sourceTemplatePlugin/about.html b/features/org.eclipse.egf.portfolio.feature/sourceTemplatePlugin/about.html
new file mode 100644
index 0000000..caeb225
--- /dev/null
+++ b/features/org.eclipse.egf.portfolio.feature/sourceTemplatePlugin/about.html
@@ -0,0 +1,27 @@
+<!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>February 2, 2009</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/features/org.eclipse.egf.portfolio.feature/sourceTemplatePlugin/about.ini b/features/org.eclipse.egf.portfolio.feature/sourceTemplatePlugin/about.ini
new file mode 100644
index 0000000..546150b
--- /dev/null
+++ b/features/org.eclipse.egf.portfolio.feature/sourceTemplatePlugin/about.ini
@@ -0,0 +1,27 @@
+# about.ini
+# contains information about a feature
+# java.util.Properties file (ISO-8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%aboutText
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=fc32.gif
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (translated)
+# needed for primary features only
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# optional
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
diff --git a/features/org.eclipse.egf.portfolio.feature/sourceTemplatePlugin/about.mappings b/features/org.eclipse.egf.portfolio.feature/sourceTemplatePlugin/about.mappings
new file mode 100644
index 0000000..a06fc50
--- /dev/null
+++ b/features/org.eclipse.egf.portfolio.feature/sourceTemplatePlugin/about.mappings
@@ -0,0 +1,17 @@
+##
+# 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
+##
+
+# about.mappings
+# contains fill-ins for about.properties
+# java.util.Properties file (ISO-8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@
diff --git a/features/org.eclipse.egf.portfolio.feature/sourceTemplatePlugin/about.properties b/features/org.eclipse.egf.portfolio.feature/sourceTemplatePlugin/about.properties
new file mode 100644
index 0000000..937953e
--- /dev/null
+++ b/features/org.eclipse.egf.portfolio.feature/sourceTemplatePlugin/about.properties
@@ -0,0 +1,39 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+aboutText=EGF Portfolio Source (Incubation)\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+Copyright (c) Thales Corporate Services S.A.S, 2009-2010 and others. All rights reserved.\n\
+\n\
+Visit http://www.eclipse.org/proposals/egf/
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.portfolio.feature/sourceTemplatePlugin/build.properties b/features/org.eclipse.egf.portfolio.feature/sourceTemplatePlugin/build.properties
new file mode 100644
index 0000000..0e50697
--- /dev/null
+++ b/features/org.eclipse.egf.portfolio.feature/sourceTemplatePlugin/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = fc32.gif,\
+ about.*,\
+ plugin.*,\
+ src/,\
+ META-INF/
+sourcePlugin=true
+src.includes = about.html
diff --git a/features/org.eclipse.egf.portfolio.feature/sourceTemplatePlugin/fc32.gif b/features/org.eclipse.egf.portfolio.feature/sourceTemplatePlugin/fc32.gif
new file mode 100644
index 0000000..f9fe86c
--- /dev/null
+++ b/features/org.eclipse.egf.portfolio.feature/sourceTemplatePlugin/fc32.gif
Binary files differ
diff --git a/features/org.eclipse.egf.portfolio.feature/sourceTemplatePlugin/plugin.properties b/features/org.eclipse.egf.portfolio.feature/sourceTemplatePlugin/plugin.properties
new file mode 100644
index 0000000..349dc5a
--- /dev/null
+++ b/features/org.eclipse.egf.portfolio.feature/sourceTemplatePlugin/plugin.properties
@@ -0,0 +1,27 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+pluginName=EGF Portfolio Source (Incubation)
+providerName=Eclipse Modeling Project
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.producer.feature/.project b/features/org.eclipse.egf.producer.feature/.project
new file mode 100644
index 0000000..753c49e
--- /dev/null
+++ b/features/org.eclipse.egf.producer.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.producer.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.egf.producer.feature/.settings/org.eclipse.core.resources.prefs b/features/org.eclipse.egf.producer.feature/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..65ece17
--- /dev/null
+++ b/features/org.eclipse.egf.producer.feature/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,11 @@
+#Mon Feb 23 14:20:30 CET 2009
+encoding//rootfiles/epl-v10.html=ISO-8859-1
+encoding//rootfiles/notice.html=ISO-8859-1
+encoding//sourceTemplateBundle/about.html=ISO-8859-1
+encoding//sourceTemplateFeature/epl-v10.html=ISO-8859-1
+encoding//sourceTemplateFeature/license.html=ISO-8859-1
+encoding//sourceTemplatePlugin/about.html=ISO-8859-1
+encoding//sourceTemplatePlugin/about.ini=ISO-8859-1
+encoding//sourceTemplatePlugin/about.mappings=ISO-8859-1
+encoding/epl-v10.html=ISO-8859-1
+encoding/license.html=ISO-8859-1
diff --git a/features/org.eclipse.egf.producer.feature/build.properties b/features/org.eclipse.egf.producer.feature/build.properties
new file mode 100644
index 0000000..f52fb2a
--- /dev/null
+++ b/features/org.eclipse.egf.producer.feature/build.properties
@@ -0,0 +1,20 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = feature.*,\
+ epl-v10.html,\
+ license.html,\
+ eclipse_update_120.jpg
+src.includes = epl-v10.html,\
+ license.html
+root=rootfiles
+generate.feature@org.eclipse.egf.producer.source=org.eclipse.egf.producer
diff --git a/features/org.eclipse.egf.producer.feature/eclipse_update_120.jpg b/features/org.eclipse.egf.producer.feature/eclipse_update_120.jpg
new file mode 100644
index 0000000..bfdf708
--- /dev/null
+++ b/features/org.eclipse.egf.producer.feature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.producer.feature/epl-v10.html b/features/org.eclipse.egf.producer.feature/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.producer.feature/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.producer.feature/feature.properties b/features/org.eclipse.egf.producer.feature/feature.properties
new file mode 100644
index 0000000..828cbbf
--- /dev/null
+++ b/features/org.eclipse.egf.producer.feature/feature.properties
@@ -0,0 +1,135 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# "featureName" property - name of the feature
+featureName=EGF Producer (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories Producer.
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.egf.producer.feature/feature.xml b/features/org.eclipse.egf.producer.feature/feature.xml
new file mode 100644
index 0000000..d37b04d
--- /dev/null
+++ b/features/org.eclipse.egf.producer.feature/feature.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.egf.producer"
+ label="%featureName"
+ version="0.2.3.qualifier"
+ provider-name="%providerName"
+ plugin="org.eclipse.egf.producer"
+ image="eclipse_update_120.jpg">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ 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
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <url>
+ <update label="%EMFTUpdateSiteName" url="http://download.eclipse.org/modeling/emft/updates/"/>
+ <discovery label="%EMFUpdateSiteName" url="http://download.eclipse.org/modeling/emf/updates/"/>
+ <discovery label="%EMFTUpdateSiteName" url="http://download.eclipse.org/modeling/emft/updates/"/>
+ </url>
+
+ <includes
+ id="org.eclipse.egf.model"
+ version="0.0.0"/>
+
+ <includes
+ id="org.eclipse.egf.producer.source"
+ version="0.0.0"/>
+
+ <requires>
+ <import feature="org.eclipse.emf.query" version="1.2.100.v200901271643-218Z7w311A142A1142" match="compatible"/>
+ <import feature="org.eclipse.emf.transaction" version="1.3.1.v20090819-1457-3508s733L3D4D26998" match="compatible"/>
+ </requires>
+
+ <plugin
+ id="org.eclipse.egf.pattern"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.egf.pattern.java"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.egf.pattern.jet"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.egf.producer"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.egf.application"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/features/org.eclipse.egf.producer.feature/license.html b/features/org.eclipse.egf.producer.feature/license.html
new file mode 100644
index 0000000..a9b560f
--- /dev/null
+++ b/features/org.eclipse.egf.producer.feature/license.html
@@ -0,0 +1,79 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also 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>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
+ modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body>
+</html>
diff --git a/features/org.eclipse.egf.producer.feature/rootfiles/epl-v10.html b/features/org.eclipse.egf.producer.feature/rootfiles/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.producer.feature/rootfiles/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.producer.feature/rootfiles/notice.html b/features/org.eclipse.egf.producer.feature/rootfiles/notice.html
new file mode 100644
index 0000000..64d8c4c
--- /dev/null
+++ b/features/org.eclipse.egf.producer.feature/rootfiles/notice.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.producer.feature/sourceTemplateBundle/about.html b/features/org.eclipse.egf.producer.feature/sourceTemplateBundle/about.html
new file mode 100644
index 0000000..caeb225
--- /dev/null
+++ b/features/org.eclipse.egf.producer.feature/sourceTemplateBundle/about.html
@@ -0,0 +1,27 @@
+<!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>February 2, 2009</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/features/org.eclipse.egf.producer.feature/sourceTemplateBundle/plugin.properties b/features/org.eclipse.egf.producer.feature/sourceTemplateBundle/plugin.properties
new file mode 100644
index 0000000..8b03223
--- /dev/null
+++ b/features/org.eclipse.egf.producer.feature/sourceTemplateBundle/plugin.properties
@@ -0,0 +1,27 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+pluginName=EGF Producer Source (Incubation)
+providerName=Eclipse Modeling Project
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.producer.feature/sourceTemplateFeature/build.properties b/features/org.eclipse.egf.producer.feature/sourceTemplateFeature/build.properties
new file mode 100644
index 0000000..ec40e29
--- /dev/null
+++ b/features/org.eclipse.egf.producer.feature/sourceTemplateFeature/build.properties
@@ -0,0 +1,17 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes =\
+epl-v10.html,\
+feature.*,\
+eclipse_update_120.jpg,\
+license.html
diff --git a/features/org.eclipse.egf.producer.feature/sourceTemplateFeature/eclipse_update_120.jpg b/features/org.eclipse.egf.producer.feature/sourceTemplateFeature/eclipse_update_120.jpg
new file mode 100644
index 0000000..68e3e02
--- /dev/null
+++ b/features/org.eclipse.egf.producer.feature/sourceTemplateFeature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.producer.feature/sourceTemplateFeature/epl-v10.html b/features/org.eclipse.egf.producer.feature/sourceTemplateFeature/epl-v10.html
new file mode 100644
index 0000000..2761abd
--- /dev/null
+++ b/features/org.eclipse.egf.producer.feature/sourceTemplateFeature/epl-v10.html
@@ -0,0 +1,320 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta name="ProgId" content="Word.Document">
+<meta name="Generator" content="Microsoft Word 9">
+<meta name="Originator" content="Microsoft Word 9">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.gmf/features/org.eclipse.gmf.sdk-feature/sourceTemplateFeature/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Revision>2</o:Revision>
+ <o:TotalTime>3</o:TotalTime>
+ <o:Created>2004-03-05T23:03:00Z</o:Created>
+ <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+ <o:Pages>4</o:Pages>
+ <o:Words>1626</o:Words>
+ <o:Characters>9270</o:Characters>
+ <o:Lines>77</o:Lines>
+ <o:Paragraphs>18</o:Paragraphs>
+ <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+ <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+ font-family:Tahoma;
+ mso-fareast-font-family:"Times New Roman";}
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.producer.feature/sourceTemplateFeature/feature.properties b/features/org.eclipse.egf.producer.feature/sourceTemplateFeature/feature.properties
new file mode 100644
index 0000000..cb86ae3
--- /dev/null
+++ b/features/org.eclipse.egf.producer.feature/sourceTemplateFeature/feature.properties
@@ -0,0 +1,147 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+# "featureName" property - name of the feature
+featureName=EGF Producer Source (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories Producer Source.
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Modeling Project CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.producer.feature/sourceTemplateFeature/license.html b/features/org.eclipse.egf.producer.feature/sourceTemplateFeature/license.html
new file mode 100644
index 0000000..e819bbc
--- /dev/null
+++ b/features/org.eclipse.egf.producer.feature/sourceTemplateFeature/license.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.producer.feature/sourceTemplatePlugin/about.html b/features/org.eclipse.egf.producer.feature/sourceTemplatePlugin/about.html
new file mode 100644
index 0000000..caeb225
--- /dev/null
+++ b/features/org.eclipse.egf.producer.feature/sourceTemplatePlugin/about.html
@@ -0,0 +1,27 @@
+<!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>February 2, 2009</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/features/org.eclipse.egf.producer.feature/sourceTemplatePlugin/about.ini b/features/org.eclipse.egf.producer.feature/sourceTemplatePlugin/about.ini
new file mode 100644
index 0000000..546150b
--- /dev/null
+++ b/features/org.eclipse.egf.producer.feature/sourceTemplatePlugin/about.ini
@@ -0,0 +1,27 @@
+# about.ini
+# contains information about a feature
+# java.util.Properties file (ISO-8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%aboutText
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=fc32.gif
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (translated)
+# needed for primary features only
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# optional
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
diff --git a/features/org.eclipse.egf.producer.feature/sourceTemplatePlugin/about.mappings b/features/org.eclipse.egf.producer.feature/sourceTemplatePlugin/about.mappings
new file mode 100644
index 0000000..a06fc50
--- /dev/null
+++ b/features/org.eclipse.egf.producer.feature/sourceTemplatePlugin/about.mappings
@@ -0,0 +1,17 @@
+##
+# 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
+##
+
+# about.mappings
+# contains fill-ins for about.properties
+# java.util.Properties file (ISO-8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@
diff --git a/features/org.eclipse.egf.producer.feature/sourceTemplatePlugin/about.properties b/features/org.eclipse.egf.producer.feature/sourceTemplatePlugin/about.properties
new file mode 100644
index 0000000..a21db5d
--- /dev/null
+++ b/features/org.eclipse.egf.producer.feature/sourceTemplatePlugin/about.properties
@@ -0,0 +1,39 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+aboutText=EGF Producer Source (Incubation)\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+Copyright (c) Thales Corporate Services S.A.S, 2009-2010 and others. All rights reserved.\n\
+\n\
+Visit http://www.eclipse.org/proposals/egf/
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.producer.feature/sourceTemplatePlugin/build.properties b/features/org.eclipse.egf.producer.feature/sourceTemplatePlugin/build.properties
new file mode 100644
index 0000000..0e50697
--- /dev/null
+++ b/features/org.eclipse.egf.producer.feature/sourceTemplatePlugin/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = fc32.gif,\
+ about.*,\
+ plugin.*,\
+ src/,\
+ META-INF/
+sourcePlugin=true
+src.includes = about.html
diff --git a/features/org.eclipse.egf.producer.feature/sourceTemplatePlugin/fc32.gif b/features/org.eclipse.egf.producer.feature/sourceTemplatePlugin/fc32.gif
new file mode 100644
index 0000000..f9fe86c
--- /dev/null
+++ b/features/org.eclipse.egf.producer.feature/sourceTemplatePlugin/fc32.gif
Binary files differ
diff --git a/features/org.eclipse.egf.producer.feature/sourceTemplatePlugin/plugin.properties b/features/org.eclipse.egf.producer.feature/sourceTemplatePlugin/plugin.properties
new file mode 100644
index 0000000..8b03223
--- /dev/null
+++ b/features/org.eclipse.egf.producer.feature/sourceTemplatePlugin/plugin.properties
@@ -0,0 +1,27 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+pluginName=EGF Producer Source (Incubation)
+providerName=Eclipse Modeling Project
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.producer.ui.feature/.project b/features/org.eclipse.egf.producer.ui.feature/.project
new file mode 100644
index 0000000..fd7f87a
--- /dev/null
+++ b/features/org.eclipse.egf.producer.ui.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.producer.ui.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.egf.producer.ui.feature/.settings/org.eclipse.core.resources.prefs b/features/org.eclipse.egf.producer.ui.feature/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..65ece17
--- /dev/null
+++ b/features/org.eclipse.egf.producer.ui.feature/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,11 @@
+#Mon Feb 23 14:20:30 CET 2009
+encoding//rootfiles/epl-v10.html=ISO-8859-1
+encoding//rootfiles/notice.html=ISO-8859-1
+encoding//sourceTemplateBundle/about.html=ISO-8859-1
+encoding//sourceTemplateFeature/epl-v10.html=ISO-8859-1
+encoding//sourceTemplateFeature/license.html=ISO-8859-1
+encoding//sourceTemplatePlugin/about.html=ISO-8859-1
+encoding//sourceTemplatePlugin/about.ini=ISO-8859-1
+encoding//sourceTemplatePlugin/about.mappings=ISO-8859-1
+encoding/epl-v10.html=ISO-8859-1
+encoding/license.html=ISO-8859-1
diff --git a/features/org.eclipse.egf.producer.ui.feature/build.properties b/features/org.eclipse.egf.producer.ui.feature/build.properties
new file mode 100644
index 0000000..603aa15
--- /dev/null
+++ b/features/org.eclipse.egf.producer.ui.feature/build.properties
@@ -0,0 +1,20 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = feature.*,\
+ epl-v10.html,\
+ license.html,\
+ eclipse_update_120.jpg
+src.includes = epl-v10.html,\
+ license.html
+root=rootfiles
+generate.feature@org.eclipse.egf.producer.ui.source=org.eclipse.egf.producer.ui
diff --git a/features/org.eclipse.egf.producer.ui.feature/eclipse_update_120.jpg b/features/org.eclipse.egf.producer.ui.feature/eclipse_update_120.jpg
new file mode 100644
index 0000000..bfdf708
--- /dev/null
+++ b/features/org.eclipse.egf.producer.ui.feature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.producer.ui.feature/epl-v10.html b/features/org.eclipse.egf.producer.ui.feature/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.producer.ui.feature/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.producer.ui.feature/feature.properties b/features/org.eclipse.egf.producer.ui.feature/feature.properties
new file mode 100644
index 0000000..7f5ef88
--- /dev/null
+++ b/features/org.eclipse.egf.producer.ui.feature/feature.properties
@@ -0,0 +1,135 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# "featureName" property - name of the feature
+featureName=EGF Producer UI (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories Producer UI.
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.egf.producer.ui.feature/feature.xml b/features/org.eclipse.egf.producer.ui.feature/feature.xml
new file mode 100644
index 0000000..44406bd
--- /dev/null
+++ b/features/org.eclipse.egf.producer.ui.feature/feature.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.egf.producer.ui"
+ label="%featureName"
+ version="0.2.3.qualifier"
+ provider-name="%providerName"
+ plugin="org.eclipse.egf.producer.ui"
+ image="eclipse_update_120.jpg"
+>
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ 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
+ </copyright>
+
+ <license
+ url="%licenseURL"
+ >
+ %license
+ </license>
+
+ <url>
+ <update
+ label="%EMFTUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emft/updates/"
+ />
+ <discovery
+ label="%EMFUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emf/updates/"
+ />
+ <discovery
+ label="%EMFTUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emft/updates/"
+ />
+ </url>
+
+ <includes
+ id="org.eclipse.egf.model.edit"
+ version="0.0.0"
+ />
+
+ <includes
+ id="org.eclipse.egf.producer"
+ version="0.0.0"
+ />
+
+ <includes
+ id="org.eclipse.egf.producer.ui.source"
+ version="0.0.0"
+ />
+
+ <plugin
+ id="org.eclipse.egf.producer.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"
+ />
+
+</feature>
diff --git a/features/org.eclipse.egf.producer.ui.feature/license.html b/features/org.eclipse.egf.producer.ui.feature/license.html
new file mode 100644
index 0000000..a9b560f
--- /dev/null
+++ b/features/org.eclipse.egf.producer.ui.feature/license.html
@@ -0,0 +1,79 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also 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>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
+ modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body>
+</html>
diff --git a/features/org.eclipse.egf.producer.ui.feature/rootfiles/epl-v10.html b/features/org.eclipse.egf.producer.ui.feature/rootfiles/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.producer.ui.feature/rootfiles/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.producer.ui.feature/rootfiles/notice.html b/features/org.eclipse.egf.producer.ui.feature/rootfiles/notice.html
new file mode 100644
index 0000000..64d8c4c
--- /dev/null
+++ b/features/org.eclipse.egf.producer.ui.feature/rootfiles/notice.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.producer.ui.feature/sourceTemplateBundle/about.html b/features/org.eclipse.egf.producer.ui.feature/sourceTemplateBundle/about.html
new file mode 100644
index 0000000..caeb225
--- /dev/null
+++ b/features/org.eclipse.egf.producer.ui.feature/sourceTemplateBundle/about.html
@@ -0,0 +1,27 @@
+<!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>February 2, 2009</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/features/org.eclipse.egf.producer.ui.feature/sourceTemplateBundle/plugin.properties b/features/org.eclipse.egf.producer.ui.feature/sourceTemplateBundle/plugin.properties
new file mode 100644
index 0000000..313a926
--- /dev/null
+++ b/features/org.eclipse.egf.producer.ui.feature/sourceTemplateBundle/plugin.properties
@@ -0,0 +1,27 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+pluginName=EGF Producer UI Source (Incubation)
+providerName=Eclipse Modeling Project
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.producer.ui.feature/sourceTemplateFeature/build.properties b/features/org.eclipse.egf.producer.ui.feature/sourceTemplateFeature/build.properties
new file mode 100644
index 0000000..ec40e29
--- /dev/null
+++ b/features/org.eclipse.egf.producer.ui.feature/sourceTemplateFeature/build.properties
@@ -0,0 +1,17 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes =\
+epl-v10.html,\
+feature.*,\
+eclipse_update_120.jpg,\
+license.html
diff --git a/features/org.eclipse.egf.producer.ui.feature/sourceTemplateFeature/eclipse_update_120.jpg b/features/org.eclipse.egf.producer.ui.feature/sourceTemplateFeature/eclipse_update_120.jpg
new file mode 100644
index 0000000..68e3e02
--- /dev/null
+++ b/features/org.eclipse.egf.producer.ui.feature/sourceTemplateFeature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.producer.ui.feature/sourceTemplateFeature/epl-v10.html b/features/org.eclipse.egf.producer.ui.feature/sourceTemplateFeature/epl-v10.html
new file mode 100644
index 0000000..2761abd
--- /dev/null
+++ b/features/org.eclipse.egf.producer.ui.feature/sourceTemplateFeature/epl-v10.html
@@ -0,0 +1,320 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta name="ProgId" content="Word.Document">
+<meta name="Generator" content="Microsoft Word 9">
+<meta name="Originator" content="Microsoft Word 9">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.gmf/features/org.eclipse.gmf.sdk-feature/sourceTemplateFeature/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Revision>2</o:Revision>
+ <o:TotalTime>3</o:TotalTime>
+ <o:Created>2004-03-05T23:03:00Z</o:Created>
+ <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+ <o:Pages>4</o:Pages>
+ <o:Words>1626</o:Words>
+ <o:Characters>9270</o:Characters>
+ <o:Lines>77</o:Lines>
+ <o:Paragraphs>18</o:Paragraphs>
+ <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+ <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+ font-family:Tahoma;
+ mso-fareast-font-family:"Times New Roman";}
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.producer.ui.feature/sourceTemplateFeature/feature.properties b/features/org.eclipse.egf.producer.ui.feature/sourceTemplateFeature/feature.properties
new file mode 100644
index 0000000..ced52f6
--- /dev/null
+++ b/features/org.eclipse.egf.producer.ui.feature/sourceTemplateFeature/feature.properties
@@ -0,0 +1,147 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+# "featureName" property - name of the feature
+featureName=EGF Producer UI Source (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories Producer UI Source.
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Modeling Project CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.producer.ui.feature/sourceTemplateFeature/license.html b/features/org.eclipse.egf.producer.ui.feature/sourceTemplateFeature/license.html
new file mode 100644
index 0000000..e819bbc
--- /dev/null
+++ b/features/org.eclipse.egf.producer.ui.feature/sourceTemplateFeature/license.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.producer.ui.feature/sourceTemplatePlugin/about.html b/features/org.eclipse.egf.producer.ui.feature/sourceTemplatePlugin/about.html
new file mode 100644
index 0000000..caeb225
--- /dev/null
+++ b/features/org.eclipse.egf.producer.ui.feature/sourceTemplatePlugin/about.html
@@ -0,0 +1,27 @@
+<!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>February 2, 2009</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/features/org.eclipse.egf.producer.ui.feature/sourceTemplatePlugin/about.ini b/features/org.eclipse.egf.producer.ui.feature/sourceTemplatePlugin/about.ini
new file mode 100644
index 0000000..546150b
--- /dev/null
+++ b/features/org.eclipse.egf.producer.ui.feature/sourceTemplatePlugin/about.ini
@@ -0,0 +1,27 @@
+# about.ini
+# contains information about a feature
+# java.util.Properties file (ISO-8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%aboutText
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=fc32.gif
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (translated)
+# needed for primary features only
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# optional
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
diff --git a/features/org.eclipse.egf.producer.ui.feature/sourceTemplatePlugin/about.mappings b/features/org.eclipse.egf.producer.ui.feature/sourceTemplatePlugin/about.mappings
new file mode 100644
index 0000000..a06fc50
--- /dev/null
+++ b/features/org.eclipse.egf.producer.ui.feature/sourceTemplatePlugin/about.mappings
@@ -0,0 +1,17 @@
+##
+# 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
+##
+
+# about.mappings
+# contains fill-ins for about.properties
+# java.util.Properties file (ISO-8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@
diff --git a/features/org.eclipse.egf.producer.ui.feature/sourceTemplatePlugin/about.properties b/features/org.eclipse.egf.producer.ui.feature/sourceTemplatePlugin/about.properties
new file mode 100644
index 0000000..6963aa6
--- /dev/null
+++ b/features/org.eclipse.egf.producer.ui.feature/sourceTemplatePlugin/about.properties
@@ -0,0 +1,39 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+aboutText=EGF Producer UI Source (Incubation)\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+Copyright (c) Thales Corporate Services S.A.S, 2009-2010 and others. All rights reserved.\n\
+\n\
+Visit http://www.eclipse.org/proposals/egf/
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.producer.ui.feature/sourceTemplatePlugin/build.properties b/features/org.eclipse.egf.producer.ui.feature/sourceTemplatePlugin/build.properties
new file mode 100644
index 0000000..0e50697
--- /dev/null
+++ b/features/org.eclipse.egf.producer.ui.feature/sourceTemplatePlugin/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = fc32.gif,\
+ about.*,\
+ plugin.*,\
+ src/,\
+ META-INF/
+sourcePlugin=true
+src.includes = about.html
diff --git a/features/org.eclipse.egf.producer.ui.feature/sourceTemplatePlugin/fc32.gif b/features/org.eclipse.egf.producer.ui.feature/sourceTemplatePlugin/fc32.gif
new file mode 100644
index 0000000..f9fe86c
--- /dev/null
+++ b/features/org.eclipse.egf.producer.ui.feature/sourceTemplatePlugin/fc32.gif
Binary files differ
diff --git a/features/org.eclipse.egf.producer.ui.feature/sourceTemplatePlugin/plugin.properties b/features/org.eclipse.egf.producer.ui.feature/sourceTemplatePlugin/plugin.properties
new file mode 100644
index 0000000..4f7c6e6
--- /dev/null
+++ b/features/org.eclipse.egf.producer.ui.feature/sourceTemplatePlugin/plugin.properties
@@ -0,0 +1,27 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+pluginName=EGF Producer UI Developer Source (Incubation)
+providerName=Eclipse Modeling Project
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.sdk.feature/.project b/features/org.eclipse.egf.sdk.feature/.project
new file mode 100644
index 0000000..df85855
--- /dev/null
+++ b/features/org.eclipse.egf.sdk.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.sdk.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.egf.sdk.feature/.settings/org.eclipse.core.resources.prefs b/features/org.eclipse.egf.sdk.feature/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..62ee616
--- /dev/null
+++ b/features/org.eclipse.egf.sdk.feature/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,4 @@
+#Mon Feb 15 16:45:18 CET 2010
+eclipse.preferences.version=1
+encoding/epl-v10.html=ISO-8859-1
+encoding/license.html=ISO-8859-1
diff --git a/features/org.eclipse.egf.sdk.feature/build.properties b/features/org.eclipse.egf.sdk.feature/build.properties
new file mode 100644
index 0000000..4760b84
--- /dev/null
+++ b/features/org.eclipse.egf.sdk.feature/build.properties
@@ -0,0 +1,20 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = feature.*,\
+ epl-v10.html,\
+ license.html,\
+ eclipse_update_120.jpg
+src.includes = epl-v10.html,\
+ license.html
+root=rootfiles
+
diff --git a/features/org.eclipse.egf.sdk.feature/eclipse_update_120.jpg b/features/org.eclipse.egf.sdk.feature/eclipse_update_120.jpg
new file mode 100644
index 0000000..bfdf708
--- /dev/null
+++ b/features/org.eclipse.egf.sdk.feature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.sdk.feature/epl-v10.html b/features/org.eclipse.egf.sdk.feature/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.sdk.feature/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.sdk.feature/feature.properties b/features/org.eclipse.egf.sdk.feature/feature.properties
new file mode 100644
index 0000000..4a282f8
--- /dev/null
+++ b/features/org.eclipse.egf.sdk.feature/feature.properties
@@ -0,0 +1,135 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# "featureName" property - name of the feature
+featureName=EGF SDK (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories SDK.
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.egf.sdk.feature/feature.xml b/features/org.eclipse.egf.sdk.feature/feature.xml
new file mode 100644
index 0000000..98ff684
--- /dev/null
+++ b/features/org.eclipse.egf.sdk.feature/feature.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.egf.sdk"
+ label="%featureName"
+ version="0.2.3.qualifier"
+ provider-name="%providerName"
+ image="eclipse_update_120.jpg"
+>
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ 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
+ </copyright>
+
+ <license
+ url="%licenseURL"
+ >
+ %license
+ </license>
+
+ <url>
+ <update
+ label="%EMFTUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emft/updates/"
+ />
+ <discovery
+ label="%EMFUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emf/updates/"
+ />
+ <discovery
+ label="%EMFTUpdateSiteName"
+ url="http://download.eclipse.org/modeling/emft/updates/"
+ />
+ </url>
+
+ <includes
+ id="org.eclipse.egf"
+ version="0.0.0"
+ />
+
+ <includes
+ id="org.eclipse.egf.doc"
+ version="0.0.0"
+ />
+
+ <includes
+ id="org.eclipse.egf.portfolio"
+ version="0.0.0"
+ />
+
+</feature>
diff --git a/features/org.eclipse.egf.sdk.feature/license.html b/features/org.eclipse.egf.sdk.feature/license.html
new file mode 100644
index 0000000..a9b560f
--- /dev/null
+++ b/features/org.eclipse.egf.sdk.feature/license.html
@@ -0,0 +1,79 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also 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>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
+ modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body>
+</html>
diff --git a/features/org.eclipse.egf.sdk.feature/rootfiles/epl-v10.html b/features/org.eclipse.egf.sdk.feature/rootfiles/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.sdk.feature/rootfiles/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.sdk.feature/rootfiles/notice.html b/features/org.eclipse.egf.sdk.feature/rootfiles/notice.html
new file mode 100644
index 0000000..64d8c4c
--- /dev/null
+++ b/features/org.eclipse.egf.sdk.feature/rootfiles/notice.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.test.feature/.project b/features/org.eclipse.egf.test.feature/.project
new file mode 100644
index 0000000..d256d42
--- /dev/null
+++ b/features/org.eclipse.egf.test.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.test.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.egf.test.feature/.settings/org.eclipse.core.resources.prefs b/features/org.eclipse.egf.test.feature/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..47adacb
--- /dev/null
+++ b/features/org.eclipse.egf.test.feature/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,4 @@
+#Mon Feb 23 14:20:30 CET 2009
+eclipse.preferences.version=1
+encoding//sourceTemplatePlugin/about.ini=ISO-8859-1
+encoding//sourceTemplatePlugin/about.mappings=ISO-8859-1
diff --git a/features/org.eclipse.egf.test.feature/build.properties b/features/org.eclipse.egf.test.feature/build.properties
new file mode 100644
index 0000000..88e26ff
--- /dev/null
+++ b/features/org.eclipse.egf.test.feature/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = feature.*,\
+ epl-v10.html,\
+ license.html,\
+ eclipse_update_120.jpg
+src.includes = epl-v10.html,\
+ license.html
+root=rootfiles
\ No newline at end of file
diff --git a/features/org.eclipse.egf.test.feature/eclipse_update_120.jpg b/features/org.eclipse.egf.test.feature/eclipse_update_120.jpg
new file mode 100644
index 0000000..bfdf708
--- /dev/null
+++ b/features/org.eclipse.egf.test.feature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.test.feature/epl-v10.html b/features/org.eclipse.egf.test.feature/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.test.feature/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.test.feature/feature.properties b/features/org.eclipse.egf.test.feature/feature.properties
new file mode 100644
index 0000000..65cb807
--- /dev/null
+++ b/features/org.eclipse.egf.test.feature/feature.properties
@@ -0,0 +1,135 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# "featureName" property - name of the feature
+featureName=EGF Test (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories Test.
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/org.eclipse.egf.test.feature/feature.xml b/features/org.eclipse.egf.test.feature/feature.xml
new file mode 100644
index 0000000..566d9ce
--- /dev/null
+++ b/features/org.eclipse.egf.test.feature/feature.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.egf.test"
+ label="%featureName"
+ version="0.2.3.qualifier"
+ provider-name="%providerName"
+ plugin="org.eclipse.egf.core.test"
+ image="eclipse_update_120.jpg">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ 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
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <url>
+ <update label="%EMFTUpdateSiteName" url="http://download.eclipse.org/modeling/emft/updates/"/>
+ <discovery label="%EMFUpdateSiteName" url="http://download.eclipse.org/modeling/emf/updates/"/>
+ <discovery label="%EMFTUpdateSiteName" url="http://download.eclipse.org/modeling/emft/updates/"/>
+ </url>
+
+ <includes id="org.eclipse.egf" version="0.0.0"/>
+
+ <requires>
+ <import plugin="org.junit" version="3.8.2.v20090203-1005" match="compatible"/>
+ </requires>
+
+ <includes
+ id="org.eclipse.egf.test.source"
+ version="0.0.0"
+ />
+
+ <plugin
+ id="org.eclipse.egf.core.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.egf.core.test.model"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.egf.core.test.model.edit"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.egf.core.test.model.editor"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.egf.core.test.pattern"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.egf.example.fcs"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.egf.example.task.h1"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/features/org.eclipse.egf.test.feature/license.html b/features/org.eclipse.egf.test.feature/license.html
new file mode 100644
index 0000000..a9b560f
--- /dev/null
+++ b/features/org.eclipse.egf.test.feature/license.html
@@ -0,0 +1,79 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also 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>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
+ modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body>
+</html>
diff --git a/features/org.eclipse.egf.test.feature/rootfiles/epl-v10.html b/features/org.eclipse.egf.test.feature/rootfiles/epl-v10.html
new file mode 100644
index 0000000..2a2421c
--- /dev/null
+++ b/features/org.eclipse.egf.test.feature/rootfiles/epl-v10.html
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office"><head>
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf/features/org.eclipse.emf.ecore-feature/rootfiles/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.test.feature/rootfiles/notice.html b/features/org.eclipse.egf.test.feature/rootfiles/notice.html
new file mode 100644
index 0000000..64d8c4c
--- /dev/null
+++ b/features/org.eclipse.egf.test.feature/rootfiles/notice.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.test.feature/sourceTemplateBundle/about.html b/features/org.eclipse.egf.test.feature/sourceTemplateBundle/about.html
new file mode 100644
index 0000000..caeb225
--- /dev/null
+++ b/features/org.eclipse.egf.test.feature/sourceTemplateBundle/about.html
@@ -0,0 +1,27 @@
+<!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>February 2, 2009</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/features/org.eclipse.egf.test.feature/sourceTemplateBundle/plugin.properties b/features/org.eclipse.egf.test.feature/sourceTemplateBundle/plugin.properties
new file mode 100644
index 0000000..66036cc
--- /dev/null
+++ b/features/org.eclipse.egf.test.feature/sourceTemplateBundle/plugin.properties
@@ -0,0 +1,27 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+pluginName=EGF Test Source (Incubation)
+providerName=Eclipse Modeling Project
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.test.feature/sourceTemplateFeature/build.properties b/features/org.eclipse.egf.test.feature/sourceTemplateFeature/build.properties
new file mode 100644
index 0000000..ec40e29
--- /dev/null
+++ b/features/org.eclipse.egf.test.feature/sourceTemplateFeature/build.properties
@@ -0,0 +1,17 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes =\
+epl-v10.html,\
+feature.*,\
+eclipse_update_120.jpg,\
+license.html
diff --git a/features/org.eclipse.egf.test.feature/sourceTemplateFeature/eclipse_update_120.jpg b/features/org.eclipse.egf.test.feature/sourceTemplateFeature/eclipse_update_120.jpg
new file mode 100644
index 0000000..68e3e02
--- /dev/null
+++ b/features/org.eclipse.egf.test.feature/sourceTemplateFeature/eclipse_update_120.jpg
Binary files differ
diff --git a/features/org.eclipse.egf.test.feature/sourceTemplateFeature/epl-v10.html b/features/org.eclipse.egf.test.feature/sourceTemplateFeature/epl-v10.html
new file mode 100644
index 0000000..2761abd
--- /dev/null
+++ b/features/org.eclipse.egf.test.feature/sourceTemplateFeature/epl-v10.html
@@ -0,0 +1,320 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta name="ProgId" content="Word.Document">
+<meta name="Generator" content="Microsoft Word 9">
+<meta name="Originator" content="Microsoft Word 9">
+<link rel="File-List" href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.gmf/features/org.eclipse.gmf.sdk-feature/sourceTemplateFeature/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+ <o:Revision>2</o:Revision>
+ <o:TotalTime>3</o:TotalTime>
+ <o:Created>2004-03-05T23:03:00Z</o:Created>
+ <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+ <o:Pages>4</o:Pages>
+ <o:Words>1626</o:Words>
+ <o:Characters>9270</o:Characters>
+ <o:Lines>77</o:Lines>
+ <o:Paragraphs>18</o:Paragraphs>
+ <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+ <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+ <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-generic-font-family:swiss;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+ font-family:Tahoma;
+ mso-fareast-font-family:"Times New Roman";}
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head><body style="" lang="EN-US">
+
+<div class="Section1">
+
+<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
+
+<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear="left">
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+changes to the Program, and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+additions to the Program;</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Contributor" means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style="font-size: 10pt;">"Program" means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style="font-size: 10pt;">"Recipient" means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
+
+<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
+its license agreement:</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
+
+<p><span style="font-size: 10pt;">When the Program is made available in source
+code form:</span> </p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
+it must be made available under this Agreement; and </span></p>
+
+<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style="font-size: 10pt;">Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor ("Commercial
+Contributor") hereby agrees to defend and indemnify every other
+Contributor ("Indemnified Contributor") against any losses, damages and
+costs (collectively "Losses") arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style="font-size: 10pt;">For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
+
+<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p>
+
+</div>
+
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.test.feature/sourceTemplateFeature/feature.properties b/features/org.eclipse.egf.test.feature/sourceTemplateFeature/feature.properties
new file mode 100644
index 0000000..abd2c93
--- /dev/null
+++ b/features/org.eclipse.egf.test.feature/sourceTemplateFeature/feature.properties
@@ -0,0 +1,147 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+# "featureName" property - name of the feature
+featureName=EGF Test Source (Incubation)
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "description" property - description of the feature
+description=Eclipse Generation Factories Test Source.
+
+# "EMFUpdateSiteName" property - label for the update site (on download1.eclipse.org)
+EMFUpdateSiteName=Eclipse Modeling Framework (EMF) Updates
+EMFTUpdateSiteName=Eclipse Modeling Framework Technologies (EMFT) Updates
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Modeling Project CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+ - Content may be structured and packaged into modules to facilitate delivering,\n\
+ extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+ plug-in fragments ("Fragments"), and features ("Features").\n\
+ - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+ in a directory named "plugins".\n\
+ - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+ Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+ Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+ numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+ - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+ named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+ - The top-level (root) directory\n\
+ - Plug-in and Fragment directories\n\
+ - Inside Plug-ins and Fragments packaged as JARs\n\
+ - Sub-directories of the directory named "src" of certain Plug-ins\n\
+ - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+ - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+ - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+ - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+ - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+ - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+ - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.test.feature/sourceTemplateFeature/license.html b/features/org.eclipse.egf.test.feature/sourceTemplateFeature/license.html
new file mode 100644
index 0000000..e819bbc
--- /dev/null
+++ b/features/org.eclipse.egf.test.feature/sourceTemplateFeature/license.html
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head><body vlink="purple" lang="EN-US" link="blue">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also 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>Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse.org CVS
+repository ("Repository") in CVS modules ("Modules") and made available
+as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to
+facilitate delivering, extending, and upgrading the Content. Typical
+modules may include plug-ins ("Plug-ins"), plug-in fragments
+("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A
+Feature is a bundle of one or more Plug-ins and/or Fragments and
+associated material. Each Feature may be packaged as a sub-directory in
+a directory named "features". Within a Feature, files named
+"feature.xml" may contain a list of the names and version numbers of
+the Plug-ins and/or Fragments associated with that Feature.</li>
+ <li>Features
+may also include other Features ("Included Features"). Within a
+Feature, files named "feature.xml" may contain a list of the names and
+version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and
+Included Features should be contained in files named "license.html"
+("Feature Licenses"). Abouts and Feature Licenses may be located in any
+directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is
+installed using the Eclipse Update Manager, you must agree to a license
+("Feature Update License") during the
+installation process. If the Feature contains Included Features, the
+Feature Update License should either provide you with the terms and
+conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be
+found in the "license" property of files named "feature.properties"
+found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you
+are currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body></html>
\ No newline at end of file
diff --git a/features/org.eclipse.egf.test.feature/sourceTemplatePlugin/about.html b/features/org.eclipse.egf.test.feature/sourceTemplatePlugin/about.html
new file mode 100644
index 0000000..caeb225
--- /dev/null
+++ b/features/org.eclipse.egf.test.feature/sourceTemplatePlugin/about.html
@@ -0,0 +1,27 @@
+<!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>February 2, 2009</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/features/org.eclipse.egf.test.feature/sourceTemplatePlugin/about.ini b/features/org.eclipse.egf.test.feature/sourceTemplatePlugin/about.ini
new file mode 100644
index 0000000..546150b
--- /dev/null
+++ b/features/org.eclipse.egf.test.feature/sourceTemplatePlugin/about.ini
@@ -0,0 +1,27 @@
+# about.ini
+# contains information about a feature
+# java.util.Properties file (ISO-8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%aboutText
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=fc32.gif
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (translated)
+# needed for primary features only
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# optional
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
diff --git a/features/org.eclipse.egf.test.feature/sourceTemplatePlugin/about.mappings b/features/org.eclipse.egf.test.feature/sourceTemplatePlugin/about.mappings
new file mode 100644
index 0000000..a06fc50
--- /dev/null
+++ b/features/org.eclipse.egf.test.feature/sourceTemplatePlugin/about.mappings
@@ -0,0 +1,17 @@
+##
+# 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
+##
+
+# about.mappings
+# contains fill-ins for about.properties
+# java.util.Properties file (ISO-8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@
diff --git a/features/org.eclipse.egf.test.feature/sourceTemplatePlugin/about.properties b/features/org.eclipse.egf.test.feature/sourceTemplatePlugin/about.properties
new file mode 100644
index 0000000..6f35c90
--- /dev/null
+++ b/features/org.eclipse.egf.test.feature/sourceTemplatePlugin/about.properties
@@ -0,0 +1,39 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+aboutText=EGF Test Source (Incubation)\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+Copyright (c) Thales Corporate Services S.A.S, 2009-2010 and others. All rights reserved.\n\
+\n\
+Visit http://www.eclipse.org/proposals/egf/
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/features/org.eclipse.egf.test.feature/sourceTemplatePlugin/build.properties b/features/org.eclipse.egf.test.feature/sourceTemplatePlugin/build.properties
new file mode 100644
index 0000000..0e50697
--- /dev/null
+++ b/features/org.eclipse.egf.test.feature/sourceTemplatePlugin/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+bin.includes = fc32.gif,\
+ about.*,\
+ plugin.*,\
+ src/,\
+ META-INF/
+sourcePlugin=true
+src.includes = about.html
diff --git a/features/org.eclipse.egf.test.feature/sourceTemplatePlugin/fc32.gif b/features/org.eclipse.egf.test.feature/sourceTemplatePlugin/fc32.gif
new file mode 100644
index 0000000..f9fe86c
--- /dev/null
+++ b/features/org.eclipse.egf.test.feature/sourceTemplatePlugin/fc32.gif
Binary files differ
diff --git a/features/org.eclipse.egf.test.feature/sourceTemplatePlugin/plugin.properties b/features/org.eclipse.egf.test.feature/sourceTemplatePlugin/plugin.properties
new file mode 100644
index 0000000..66036cc
--- /dev/null
+++ b/features/org.eclipse.egf.test.feature/sourceTemplatePlugin/plugin.properties
@@ -0,0 +1,27 @@
+##
+# 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
+##
+
+# NLS_MESSAGEFORMAT_VAR
+
+# ====================================================================
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+pluginName=EGF Test Source (Incubation)
+providerName=Eclipse Modeling Project
+
+# ==============================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# The above properties have been shipped for translation.
+# ==============================================================================
diff --git a/org.eclipse.egf.application/.classpath b/org.eclipse.egf.application/.classpath
new file mode 100644
index 0000000..2d1a430
--- /dev/null
+++ b/org.eclipse.egf.application/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.egf.application/.options b/org.eclipse.egf.application/.options
new file mode 100644
index 0000000..4738544
--- /dev/null
+++ b/org.eclipse.egf.application/.options
@@ -0,0 +1,2 @@
+# Prints debug information
+org.eclipse.egf.task.launch/debug=true
diff --git a/org.eclipse.egf.application/.project b/org.eclipse.egf.application/.project
new file mode 100644
index 0000000..89d3777
--- /dev/null
+++ b/org.eclipse.egf.application/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.application</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.application/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egf.application/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..35d051e
--- /dev/null
+++ b/org.eclipse.egf.application/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:46:19 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.egf.application/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egf.application/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..99b905a
--- /dev/null
+++ b/org.eclipse.egf.application/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Wed Jun 24 09:15:48 CEST 2009
+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.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+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/org.eclipse.egf.application/META-INF/MANIFEST.MF b/org.eclipse.egf.application/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..42d59ab
--- /dev/null
+++ b/org.eclipse.egf.application/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.application;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.egf.application.internal.activator.EGFApplicationPlugin
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle:
+ org.eclipse.debug.core,
+ org.eclipse.egf.producer
+Export-Package:
+ org.eclipse.egf.application.activity
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.egf.application/about.html b/org.eclipse.egf.application/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/org.eclipse.egf.application/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/org.eclipse.egf.application/build.properties b/org.eclipse.egf.application/build.properties
new file mode 100644
index 0000000..7cca449
--- /dev/null
+++ b/org.eclipse.egf.application/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ .options,\
+ plugin.properties,\
+ about.html,\
+ plugin.xml
+src.includes = about.html
diff --git a/org.eclipse.egf.application/plugin.properties b/org.eclipse.egf.application/plugin.properties
new file mode 100644
index 0000000..e7e597f
--- /dev/null
+++ b/org.eclipse.egf.application/plugin.properties
@@ -0,0 +1,18 @@
+##
+# 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 Task Launch (Incubation)
+providerName=Eclipse Modeling Project
+
+Launch.label= EGF Task Launch
+
+TaskLaunchDelegate.name=Eclipse EGF Task Launch
+TaskLaunchDelegate.description=The Eclipse EGF Task Launch supports running and debugging EGF Activities.
diff --git a/org.eclipse.egf.application/plugin.xml b/org.eclipse.egf.application/plugin.xml
new file mode 100644
index 0000000..c7ad2ec
--- /dev/null
+++ b/org.eclipse.egf.application/plugin.xml
Binary files differ
diff --git a/org.eclipse.egf.application/src/org/eclipse/egf/application/activity/ActivityApplication.java b/org.eclipse.egf.application/src/org/eclipse/egf/application/activity/ActivityApplication.java
new file mode 100644
index 0000000..315416b
--- /dev/null
+++ b/org.eclipse.egf.application/src/org/eclipse/egf/application/activity/ActivityApplication.java
@@ -0,0 +1,101 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.application.activity;
+
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.egf.application.internal.activator.EGFApplicationPlugin;
+import org.eclipse.egf.application.internal.activity.ActivityRunner;
+import org.eclipse.egf.application.internal.l10n.ApplicationMessages;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.emf.codegen.util.CodeGenUtil;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.equinox.app.IApplication;
+import org.eclipse.equinox.app.IApplicationContext;
+import org.eclipse.osgi.util.NLS;
+
+public class ActivityApplication implements IApplication {
+
+ /**
+ * This is called with the command line arguments of a headless workbench invocation.
+ */
+ public Object run(Object object) throws Exception {
+ // Usual tests
+ if (object == null || object instanceof String[] == false || ((String[]) object).length == 0 || ((String[]) object)[0] == null) {
+ System.err.println(ApplicationMessages.ActivityApplication_Arguments_Usage);
+ return IApplicationConfigurationConstants.EXIT_ERROR;
+ }
+ String activity = ((String[]) object)[0];
+ // Retrieve our Editing Domain
+ TransactionalEditingDomain editingDomain = TransactionalEditingDomain.Registry.INSTANCE.getEditingDomain(EGFCorePlugin.EDITING_DOMAIN_ID);
+ URI uri = null;
+ try {
+ // Build a uri
+ uri = URI.createURI(activity);
+ } catch (Throwable t) {
+ throw new CoreException(EGFApplicationPlugin.getDefault().newStatus(IStatus.ERROR, NLS.bind(ApplicationMessages.ActivityApplication_Invalid_URI_Argument, activity), t));
+ }
+ EObject eObject = null;
+ // Load it in our Editing Domain
+ try {
+ eObject = editingDomain.getResourceSet().getEObject(uri, true);
+ } catch (Throwable t) {
+ throw new CoreException(EGFApplicationPlugin.getDefault().newStatus(IStatus.ERROR, NLS.bind(ApplicationMessages.ActivityApplication_EObject_Loading_Error, uri.toString()), t));
+ }
+ // Verify if we face an Activity
+ if (eObject instanceof Activity == false) {
+ throw new CoreException(EGFApplicationPlugin.getDefault().newStatus(IStatus.ERROR, NLS.bind(ApplicationMessages.ActivityApplication_Invalid_Activity_Argument, uri.toString()), null));
+ }
+ return runHelper((Activity) eObject);
+ }
+
+ public Object start(IApplicationContext context) throws Exception {
+ String[] args = (String[]) context.getArguments().get(IApplicationContext.APPLICATION_ARGS);
+ // Usual tests
+ if (args == null || args.length == 0 || args[0] == null) {
+ System.err.println(ApplicationMessages.ActivityApplication_Arguments_Usage);
+ return IApplicationConfigurationConstants.EXIT_ERROR;
+ }
+ return run(args);
+ }
+
+ public void stop() {
+ // Subclasses may override
+ }
+
+ public static Object runHelper(final Activity activity) throws Exception {
+ try {
+ final IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
+ public void run(IProgressMonitor monitor) throws CoreException {
+ try {
+ ActivityRunner runner = new ActivityRunner(activity);
+ runner.run(monitor);
+ } finally {
+ monitor.done();
+ }
+ }
+ };
+ workspace.run(runnable, new CodeGenUtil.EclipseUtil.StreamProgressMonitor(System.out));
+ } catch (Exception e) {
+ throw e;
+ }
+ return IApplication.EXIT_OK;
+ }
+
+}
diff --git a/org.eclipse.egf.application/src/org/eclipse/egf/application/activity/IApplicationConfigurationConstants.java b/org.eclipse.egf.application/src/org/eclipse/egf/application/activity/IApplicationConfigurationConstants.java
new file mode 100644
index 0000000..78771c7
--- /dev/null
+++ b/org.eclipse.egf.application/src/org/eclipse/egf/application/activity/IApplicationConfigurationConstants.java
@@ -0,0 +1,32 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.application.activity;
+
+import org.eclipse.egf.application.internal.activator.EGFApplicationPlugin;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public interface IApplicationConfigurationConstants {
+
+ /**
+ * Exit object indicating normal termination
+ */
+ public static final Integer EXIT_ERROR = new Integer(-1);
+
+ /**
+ * Launch configuration attribute key. The value is a name of
+ * an EGF Activity associated with an EGF Task launch configuration.
+ */
+ public static final String ATTRIBUTE_ACTIVITY_NAME = EGFApplicationPlugin.getDefault().getPluginID() + ".ACTIVITY_ATTRIBUTE"; //$NON-NLS-1$
+
+}
diff --git a/org.eclipse.egf.application/src/org/eclipse/egf/application/internal/activator/EGFApplicationPlugin.java b/org.eclipse.egf.application/src/org/eclipse/egf/application/internal/activator/EGFApplicationPlugin.java
new file mode 100644
index 0000000..73b5d2e
--- /dev/null
+++ b/org.eclipse.egf.application/src/org/eclipse/egf/application/internal/activator/EGFApplicationPlugin.java
@@ -0,0 +1,45 @@
+package org.eclipse.egf.application.internal.activator;
+
+import org.eclipse.egf.common.activator.EGFAbstractPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class EGFApplicationPlugin extends EGFAbstractPlugin {
+
+ // The shared instance
+ private static EGFApplicationPlugin _plugin;
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ _plugin = this;
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ _plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static EGFApplicationPlugin getDefault() {
+ return _plugin;
+ }
+
+}
diff --git a/org.eclipse.egf.application/src/org/eclipse/egf/application/internal/activity/ActivityRunner.java b/org.eclipse.egf.application/src/org/eclipse/egf/application/internal/activity/ActivityRunner.java
new file mode 100644
index 0000000..f02b42d
--- /dev/null
+++ b/org.eclipse.egf.application/src/org/eclipse/egf/application/internal/activity/ActivityRunner.java
@@ -0,0 +1,93 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.application.internal.activity;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.egf.application.internal.activator.EGFApplicationPlugin;
+import org.eclipse.egf.application.internal.l10n.ApplicationMessages;
+import org.eclipse.egf.common.helper.EMFHelper;
+import org.eclipse.egf.core.l10n.EGFCoreMessages;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.producer.EGFProducerPlugin;
+import org.eclipse.egf.producer.l10n.ProducerMessages;
+import org.eclipse.egf.producer.manager.IActivityManager;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.DiagnosticException;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class ActivityRunner {
+
+ protected Activity _activity;
+
+ public ActivityRunner(Activity activity) throws CoreException {
+ if (activity == null) {
+ throw new CoreException(EGFApplicationPlugin.getDefault().newStatus(IStatus.ERROR, ApplicationMessages.ActivityRunner_NullActivity, null));
+ }
+ _activity = activity;
+ }
+
+ public void run(IProgressMonitor monitor) throws CoreException {
+ IActivityManager<Activity> manager = null;
+ try {
+ // Retrieve an ActivityManager
+ manager = EGFProducerPlugin.getActivityManagerProducer(_activity).createActivityManager(_activity);
+ // Initialize Context
+ manager.initializeContext();
+ } catch (Throwable t) {
+ throw new CoreException(EGFApplicationPlugin.getDefault().newStatus(IStatus.ERROR, NLS.bind(ApplicationMessages.ActivityRunner_ActivityRunner_Exception, EcoreUtil.getURI(_activity)), t));
+ }
+ try {
+ // Pre-Invoke validation
+ Diagnostic diagnostic = manager.canInvoke();
+ if (diagnostic.getSeverity() == Diagnostic.ERROR) {
+ throw DiagnosticException.toCoreException(new DiagnosticException(diagnostic));
+ }
+ } catch (CoreException ce) {
+ throw ce;
+ } catch (InvocationException ie) {
+ throw new CoreException(EGFApplicationPlugin.getDefault().newStatus(IStatus.ERROR, NLS.bind(ApplicationMessages.ActivityRunner_PreInvokeProblems_message, EcoreUtil.getURI(_activity)), ie));
+ }
+ Diagnostic diagnostic = null;
+ try {
+ // Invoke
+ int ticks = manager.getSteps();
+ SubMonitor subMonitor = SubMonitor.convert(monitor, NLS.bind(EGFCoreMessages.Production_Invoke, EMFHelper.getText(manager.getElement())), (1000 * ticks));
+ if (ticks == 1) {
+ EGFApplicationPlugin.getDefault().logInfo(NLS.bind(ProducerMessages.Activity_Invocation, EMFHelper.getText(_activity)));
+ } else {
+ EGFApplicationPlugin.getDefault().logInfo(NLS.bind(ProducerMessages.Activity_Invocations, EMFHelper.getText(_activity), ticks));
+ }
+ diagnostic = manager.invoke(subMonitor.newChild(1000 * ticks, SubMonitor.SUPPRESS_NONE));
+ } catch (Throwable t) {
+ throw new CoreException(EGFApplicationPlugin.getDefault().newStatus(IStatus.ERROR, NLS.bind(ApplicationMessages.ActivityRunner_ActivityRunner_Exception, EcoreUtil.getURI(_activity)), t));
+ }
+ // Post Invoke Validation
+ if (diagnostic.getSeverity() == Diagnostic.ERROR) {
+ throw DiagnosticException.toCoreException(new DiagnosticException(diagnostic));
+ }
+ try {
+ // Dispose
+ manager.dispose();
+ } catch (Throwable t) {
+ throw new CoreException(EGFApplicationPlugin.getDefault().newStatus(IStatus.ERROR, ApplicationMessages.ActivityRunner_ActivityRunner_Exception, t));
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.application/src/org/eclipse/egf/application/internal/l10n/ApplicationMessages.java b/org.eclipse.egf.application/src/org/eclipse/egf/application/internal/l10n/ApplicationMessages.java
new file mode 100644
index 0000000..2ac746d
--- /dev/null
+++ b/org.eclipse.egf.application/src/org/eclipse/egf/application/internal/l10n/ApplicationMessages.java
@@ -0,0 +1,42 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.application.internal.l10n;
+
+import org.eclipse.osgi.util.NLS;
+
+public class ApplicationMessages {
+
+ private static final String BUNDLE_NAME = "org.eclipse.egf.application.internal.l10n.messages"; //$NON-NLS-1$
+
+ private ApplicationMessages() {
+ // Do not instantiate
+ }
+
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, ApplicationMessages.class);
+ }
+
+ public static String ActivityApplication_Arguments_Usage;
+ public static String ActivityApplication_Invalid_URI_Argument;
+ public static String ActivityApplication_EObject_Loading_Error;
+ public static String ActivityApplication_Invalid_Activity_Argument;
+
+ public static String ActivityRunner_NullActivity;
+ public static String ActivityRunner_ActivityRunner_Exception;
+ public static String ActivityRunner_PreInvokeProblems_message;
+ public static String ActivityRunner_PostInvokeProblems_message;
+
+ public static String EGFTaskLaunchConfigurationDelegate_error_no_socket;
+
+}
diff --git a/org.eclipse.egf.application/src/org/eclipse/egf/application/internal/l10n/messages.properties b/org.eclipse.egf.application/src/org/eclipse/egf/application/internal/l10n/messages.properties
new file mode 100644
index 0000000..b3a96c3
--- /dev/null
+++ b/org.eclipse.egf.application/src/org/eclipse/egf/application/internal/l10n/messages.properties
@@ -0,0 +1,22 @@
+##
+# 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
+##
+
+EGFTaskLaunchConfigurationDelegate_error_no_socket= No socket available
+
+ActivityApplication_Arguments_Usage= Usage arguments: <encoded-egf-activity-uri>
+ActivityApplication_Invalid_URI_Argument= Argument <encoded-egf-activity-uri> is not a valid URI ''{0}''.
+ActivityApplication_EObject_Loading_Error= Unable to load <encoded-egf-activity-uri> as an EObject ''{0}''.
+ActivityApplication_Invalid_Activity_Argument= Argument <encoded-egf-activity-uri> should be an EGF Activity ''{0}''.
+
+ActivityRunner_NullActivity= Activity is null.
+ActivityRunner_ActivityRunner_Exception= Unexpected exception while retrieving an ActivityManager for ''{0}''.
+ActivityRunner_PreInvokeProblems_message= Problems encountered during Pre-Invocation validation ''{0}''.
+ActivityRunner_PostInvokeProblems_message= Problems encountered during Post-Invocation validation ''{0}''.
diff --git a/org.eclipse.egf.common.ui/.classpath b/org.eclipse.egf.common.ui/.classpath
new file mode 100644
index 0000000..5f5e222
--- /dev/null
+++ b/org.eclipse.egf.common.ui/.classpath
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
+ <accessrules>
+ <accessrule kind="accessible" pattern="org/eclipse/jdt/internal/**"/>
+ <accessrule kind="accessible" pattern="org/eclipse/core/internal/resources/**"/>
+ </accessrules>
+ </classpathentry>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.egf.common.ui/.options b/org.eclipse.egf.common.ui/.options
new file mode 100644
index 0000000..8e7fae6
--- /dev/null
+++ b/org.eclipse.egf.common.ui/.options
@@ -0,0 +1,2 @@
+# Prints debug information
+org.eclipse.egf.common.ui/debug=true
diff --git a/org.eclipse.egf.common.ui/.project b/org.eclipse.egf.common.ui/.project
new file mode 100644
index 0000000..55f0977
--- /dev/null
+++ b/org.eclipse.egf.common.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.common.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.common.ui/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egf.common.ui/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..fab6348
--- /dev/null
+++ b/org.eclipse.egf.common.ui/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:47:38 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.egf.common.ui/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egf.common.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..08dff53
--- /dev/null
+++ b/org.eclipse.egf.common.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Mon Mar 09 16:03:57 CET 2009
+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/org.eclipse.egf.common.ui/META-INF/MANIFEST.MF b/org.eclipse.egf.common.ui/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..b9d036c
--- /dev/null
+++ b/org.eclipse.egf.common.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,24 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.common.ui; singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.egf.common.ui.EGFCommonUIPlugin
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle:
+ org.eclipse.ui;visibility:=reexport,
+ org.eclipse.ui.ide;visibility:=reexport,
+ org.eclipse.ui.editors;visibility:=reexport,
+ org.eclipse.emf.common.ui;visibility:=reexport,
+ org.eclipse.emf.edit.ui;visibility:=reexport,
+ org.eclipse.egf.common;visibility:=reexport
+Export-Package:
+ org.eclipse.egf.common.ui.activator,
+ org.eclipse.egf.common.ui.constant,
+ org.eclipse.egf.common.ui.fields,
+ org.eclipse.egf.common.ui.helper,
+ org.eclipse.egf.common.ui.utils
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.egf.common.ui/about.html b/org.eclipse.egf.common.ui/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/org.eclipse.egf.common.ui/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/org.eclipse.egf.common.ui/build.properties b/org.eclipse.egf.common.ui/build.properties
new file mode 100644
index 0000000..18ebf84
--- /dev/null
+++ b/org.eclipse.egf.common.ui/build.properties
@@ -0,0 +1,20 @@
+##
+# 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
+##
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ icons/,\
+ about.html,\
+ .,\
+ .options,\
+ plugin.properties,\
+ plugin.xml
+src.includes = about.html
diff --git a/org.eclipse.egf.common.ui/icons/full/dlcl16/cpyqual_menu.gif b/org.eclipse.egf.common.ui/icons/full/dlcl16/cpyqual_menu.gif
new file mode 100644
index 0000000..bebdd4d
--- /dev/null
+++ b/org.eclipse.egf.common.ui/icons/full/dlcl16/cpyqual_menu.gif
Binary files differ
diff --git a/org.eclipse.egf.common.ui/icons/full/elcl16/AscendantHierarchy.gif b/org.eclipse.egf.common.ui/icons/full/elcl16/AscendantHierarchy.gif
new file mode 100644
index 0000000..59ac116
--- /dev/null
+++ b/org.eclipse.egf.common.ui/icons/full/elcl16/AscendantHierarchy.gif
Binary files differ
diff --git a/org.eclipse.egf.common.ui/icons/full/elcl16/DescendantHierarchy.gif b/org.eclipse.egf.common.ui/icons/full/elcl16/DescendantHierarchy.gif
new file mode 100644
index 0000000..54871df
--- /dev/null
+++ b/org.eclipse.egf.common.ui/icons/full/elcl16/DescendantHierarchy.gif
Binary files differ
diff --git a/org.eclipse.egf.common.ui/icons/full/elcl16/EClass.gif b/org.eclipse.egf.common.ui/icons/full/elcl16/EClass.gif
new file mode 100644
index 0000000..2b8da63
--- /dev/null
+++ b/org.eclipse.egf.common.ui/icons/full/elcl16/EClass.gif
Binary files differ
diff --git a/org.eclipse.egf.common.ui/icons/full/elcl16/EClassHierarchy.gif b/org.eclipse.egf.common.ui/icons/full/elcl16/EClassHierarchy.gif
new file mode 100644
index 0000000..215e838
--- /dev/null
+++ b/org.eclipse.egf.common.ui/icons/full/elcl16/EClassHierarchy.gif
Binary files differ
diff --git a/org.eclipse.egf.common.ui/icons/full/elcl16/EPackage.gif b/org.eclipse.egf.common.ui/icons/full/elcl16/EPackage.gif
new file mode 100644
index 0000000..30c5c10
--- /dev/null
+++ b/org.eclipse.egf.common.ui/icons/full/elcl16/EPackage.gif
Binary files differ
diff --git a/org.eclipse.egf.common.ui/icons/full/elcl16/EReference.gif b/org.eclipse.egf.common.ui/icons/full/elcl16/EReference.gif
new file mode 100644
index 0000000..88cdf2a
--- /dev/null
+++ b/org.eclipse.egf.common.ui/icons/full/elcl16/EReference.gif
Binary files differ
diff --git a/org.eclipse.egf.common.ui/icons/full/elcl16/Ecore.gif b/org.eclipse.egf.common.ui/icons/full/elcl16/Ecore.gif
new file mode 100644
index 0000000..0522f67
--- /dev/null
+++ b/org.eclipse.egf.common.ui/icons/full/elcl16/Ecore.gif
Binary files differ
diff --git a/org.eclipse.egf.common.ui/icons/full/elcl16/Esearch.gif b/org.eclipse.egf.common.ui/icons/full/elcl16/Esearch.gif
new file mode 100644
index 0000000..7a70f96
--- /dev/null
+++ b/org.eclipse.egf.common.ui/icons/full/elcl16/Esearch.gif
Binary files differ
diff --git a/org.eclipse.egf.common.ui/icons/full/elcl16/Refresh.gif b/org.eclipse.egf.common.ui/icons/full/elcl16/Refresh.gif
new file mode 100644
index 0000000..3ca04d0
--- /dev/null
+++ b/org.eclipse.egf.common.ui/icons/full/elcl16/Refresh.gif
Binary files differ
diff --git a/org.eclipse.egf.common.ui/icons/full/elcl16/Synchronize.gif b/org.eclipse.egf.common.ui/icons/full/elcl16/Synchronize.gif
new file mode 100644
index 0000000..870934b
--- /dev/null
+++ b/org.eclipse.egf.common.ui/icons/full/elcl16/Synchronize.gif
Binary files differ
diff --git a/org.eclipse.egf.common.ui/icons/full/elcl16/cpyqual_menu.gif b/org.eclipse.egf.common.ui/icons/full/elcl16/cpyqual_menu.gif
new file mode 100644
index 0000000..6d65b71
--- /dev/null
+++ b/org.eclipse.egf.common.ui/icons/full/elcl16/cpyqual_menu.gif
Binary files differ
diff --git a/org.eclipse.egf.common.ui/plugin.properties b/org.eclipse.egf.common.ui/plugin.properties
new file mode 100644
index 0000000..aa7e136
--- /dev/null
+++ b/org.eclipse.egf.common.ui/plugin.properties
@@ -0,0 +1,21 @@
+##
+# 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 Common UI (Incubation)
+providerName=Eclipse Modeling Project
+
+copyQualifiedName.label= Cop&y Qualified Name
+
+copyEObjectQualifiedName.name=EObject
+copyEObjectQualifiedName.Tooltip=Copy an EObject fully qualified name to the system clipboard
+
+copyEObjectMetaClassQualifiedName.name=EObject Meta-Class
+copyEObjectMetaClassQualifiedName.Tooltip=Copy an EObject Meta-Class fully qualified name to the system clipboard
diff --git a/org.eclipse.egf.common.ui/plugin.xml b/org.eclipse.egf.common.ui/plugin.xml
new file mode 100644
index 0000000..aa2c922
--- /dev/null
+++ b/org.eclipse.egf.common.ui/plugin.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<!--
+ 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>
+
+ <!-- ================================================================================= -->
+ <!-- Popup Menu -->
+ <!-- ================================================================================= -->
+
+ <extension
+ point="org.eclipse.ui.popupMenus"
+ >
+
+ <objectContribution
+ adaptable="true"
+ id="org.eclipse.egf.common.ui.ecore.contribution"
+ objectClass="org.eclipse.emf.ecore.EObject"
+ >
+
+ <menu
+ id="org.eclipse.egf.common.ui.ecore.contribution.copy"
+ label="%copyQualifiedName.label"
+ path="additions"
+ >
+ <separator
+ name="fdqn.group"
+ />
+ </menu>
+
+ <action
+ class="org.eclipse.egf.common.ui.actions.CopyEObjectQualifiedNameAction"
+ enablesFor="1"
+ icon="$nl$/icons/full/elcl16/cpyqual_menu.gif"
+ id="org.eclipse.egf.common.ui.ecore.contribution.copy.eobject.fdqn"
+ label="%copyEObjectQualifiedName.name"
+ menubarPath="org.eclipse.egf.common.ui.ecore.contribution.copy/fdqn.group"
+ tooltip="%copyEObjectQualifiedName.Tooltip"
+ />
+
+ <action
+ class="org.eclipse.egf.common.ui.actions.CopyEObjectMetaClassQualifiedNameAction"
+ enablesFor="1"
+ icon="$nl$/icons/full/elcl16/Ecore.gif"
+ id="org.eclipse.egf.common.ui.ecore.contribution.copy.eobject.meta.class.fdqn"
+ label="%copyEObjectMetaClassQualifiedName.name"
+ menubarPath="org.eclipse.egf.common.ui.ecore.contribution.copy/fdqn.group"
+ tooltip="%copyEObjectMetaClassQualifiedName.Tooltip"
+ />
+
+ </objectContribution>
+
+ </extension>
+
+</plugin>
diff --git a/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/EGFCommonUIPlugin.java b/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/EGFCommonUIPlugin.java
new file mode 100644
index 0000000..89b25d2
--- /dev/null
+++ b/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/EGFCommonUIPlugin.java
@@ -0,0 +1,87 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.common.ui;
+
+import org.eclipse.egf.common.ui.activator.EGFAbstractUIPlugin;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.osgi.framework.BundleContext;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class EGFCommonUIPlugin extends EGFAbstractUIPlugin {
+
+ /**
+ * The shared instance
+ */
+ private static EGFCommonUIPlugin __plugin;
+
+ /**
+ *
+ * Returns the currently active window for this workbench (if any). Returns
+ * <code>null</code> if there is no active workbench window. Returns
+ * <code>null</code> if called from a non-UI thread.
+ *
+ * @return the active workbench window, or <code>null</code> if there is
+ * no active workbench window or if called from a non-UI thread
+ */
+ public static IWorkbenchWindow getActiveWorkbenchWindow() {
+ return getDefault().getWorkbench().getActiveWorkbenchWindow();
+ }
+
+ /**
+ * Returns the currently active shell for this workbench (if any).
+ *
+ * @return the active workbench shell.
+ */
+ public static Shell getActiveWorkbenchShell() {
+ IWorkbenchWindow window = getActiveWorkbenchWindow();
+ if (window == null) {
+ IWorkbenchWindow[] windows = getDefault().getWorkbench().getWorkbenchWindows();
+ if (windows.length > 0) {
+ return windows[0].getShell();
+ }
+ } else {
+ return window.getShell();
+ }
+ return null;
+ }
+
+ /**
+ * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context_p) throws Exception {
+ super.start(context_p);
+ __plugin = this;
+ }
+
+ /**
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context_p) throws Exception {
+ __plugin = null;
+ super.stop(context_p);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static EGFCommonUIPlugin getDefault() {
+ return __plugin;
+ }
+
+}
diff --git a/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/actions/CopyEObjectMetaClassQualifiedNameAction.java b/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/actions/CopyEObjectMetaClassQualifiedNameAction.java
new file mode 100644
index 0000000..efe5182
--- /dev/null
+++ b/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/actions/CopyEObjectMetaClassQualifiedNameAction.java
@@ -0,0 +1,63 @@
+/**
+ * Copyright (c) 2007-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
+ */
+package org.eclipse.egf.common.ui.actions;
+
+import org.eclipse.egf.common.ui.l10n.EGFCommonUIMessages;
+import org.eclipse.egf.common.ui.utils.ModelSearchImages;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.URIConverter;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class CopyEObjectMetaClassQualifiedNameAction extends CopyQualifiedNameAction {
+
+ private EObject _eObject;
+
+ public CopyEObjectMetaClassQualifiedNameAction() {
+ super(EGFCommonUIMessages.CopyEObjectMetaClassQualifiedName_name, ModelSearchImages.getEcoreImage());
+ }
+
+ @Override
+ public void selectionChanged(IAction action_p, ISelection selection_p) {
+ _eObject = null;
+ if (selection_p instanceof IStructuredSelection) {
+ _eObject = getSelection((IStructuredSelection) selection_p);
+ }
+ }
+
+ @Override
+ public URI getURI() {
+ if (_eObject == null) {
+ return null;
+ }
+ Resource resource = _eObject.eResource();
+ if (resource == null) {
+ return null;
+ }
+ URI uri = EcoreUtil.getURI(_eObject.eClass());
+ if (uri != null && resource.getResourceSet() != null) {
+ URIConverter converter = resource.getResourceSet().getURIConverter();
+ if (converter != null) {
+ uri = converter.normalize(uri);
+ }
+ }
+ return uri;
+ }
+
+}
diff --git a/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/actions/CopyEObjectQualifiedNameAction.java b/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/actions/CopyEObjectQualifiedNameAction.java
new file mode 100644
index 0000000..7a11584
--- /dev/null
+++ b/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/actions/CopyEObjectQualifiedNameAction.java
@@ -0,0 +1,64 @@
+/**
+ * Copyright (c) 2007-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
+ */
+package org.eclipse.egf.common.ui.actions;
+
+import org.eclipse.egf.common.ui.l10n.EGFCommonUIMessages;
+import org.eclipse.egf.common.ui.utils.ModelSearchImages;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.URIConverter;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class CopyEObjectQualifiedNameAction extends CopyQualifiedNameAction {
+
+ private EObject _eObject;
+
+ public CopyEObjectQualifiedNameAction() {
+ super(EGFCommonUIMessages.CopyEObjectQualifiedName_name, ModelSearchImages.getEnabledCopyQualifiedImage());
+ setDisabledImageDescriptor(ModelSearchImages.getDisabledCopyQualifiedImage());
+ }
+
+ @Override
+ public void selectionChanged(IAction action_p, ISelection selection_p) {
+ _eObject = null;
+ if (selection_p instanceof IStructuredSelection) {
+ _eObject = getSelection((IStructuredSelection) selection_p);
+ }
+ }
+
+ @Override
+ public URI getURI() {
+ if (_eObject == null) {
+ return null;
+ }
+ Resource resource = _eObject.eResource();
+ if (resource == null) {
+ return null;
+ }
+ URI uri = EcoreUtil.getURI(_eObject);
+ if (uri != null && resource.getResourceSet() != null) {
+ URIConverter converter = resource.getResourceSet().getURIConverter();
+ if (converter != null) {
+ uri = converter.normalize(uri);
+ }
+ }
+ return uri;
+ }
+
+}
diff --git a/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/actions/CopyQualifiedNameAction.java b/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/actions/CopyQualifiedNameAction.java
new file mode 100644
index 0000000..3949f1d
--- /dev/null
+++ b/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/actions/CopyQualifiedNameAction.java
@@ -0,0 +1,134 @@
+/**
+ * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ */
+package org.eclipse.egf.common.ui.actions;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IAdapterManager;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.egf.common.ui.EGFCommonUIPlugin;
+import org.eclipse.egf.common.ui.l10n.EGFCommonUIMessages;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.SWTError;
+import org.eclipse.swt.dnd.Clipboard;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.FileTransfer;
+import org.eclipse.swt.dnd.TextTransfer;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.part.ResourceTransfer;
+
+public abstract class CopyQualifiedNameAction extends Action implements IObjectActionDelegate {
+
+ protected IWorkbenchPart _part;
+
+ public CopyQualifiedNameAction(String text, ImageDescriptor image) {
+ super(text, image);
+ }
+
+ public abstract void selectionChanged(IAction action, ISelection selection);
+
+ protected EObject getSelection(IStructuredSelection selection) {
+ Object selectedObject = selection.getFirstElement();
+ if (selectedObject != null) {
+ if (selectedObject instanceof EObject) {
+ return (EObject) selectedObject;
+ }
+ if (selectedObject instanceof IAdaptable) {
+ Object adaptedObj = ((IAdaptable) selectedObject).getAdapter(EObject.class);
+ if (adaptedObj != null && adaptedObj instanceof EObject) {
+ return (EObject) adaptedObj;
+ }
+ }
+ IAdapterManager adapterManager = Platform.getAdapterManager();
+ if (adapterManager.hasAdapter(selectedObject, EObject.class.getName())) {
+ Object adaptedObj = adapterManager.loadAdapter(selectedObject, EObject.class.getName());
+ if (adaptedObj instanceof EObject) {
+ return (EObject) adaptedObj;
+ }
+ }
+ }
+ return null;
+ }
+
+ public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+ _part = targetPart;
+ }
+
+ protected abstract URI getURI();
+
+ public void run(IAction action) {
+
+ URI uri = getURI();
+
+ if (uri == null || _part == null) {
+ return;
+ }
+
+ try {
+
+ Object[] data = null;
+ Transfer[] dataTypes = null;
+
+ // Build IResource if any
+ //
+ IResource resource = null;
+ if (uri.isPlatformResource()) {
+ String path = uri.toPlatformString(true);
+ resource = ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(path));
+ }
+
+ if (resource != null) {
+ IPath location = resource.getLocation();
+ if (location != null) {
+ data = new Object[] { uri.toString(), resource, new String[] { location.toOSString() } };
+ dataTypes = new Transfer[] { TextTransfer.getInstance(), ResourceTransfer.getInstance(), FileTransfer.getInstance() };
+ } else {
+ data = new Object[] { uri.toString(), resource };
+ dataTypes = new Transfer[] { TextTransfer.getInstance(), ResourceTransfer.getInstance() };
+ }
+ } else {
+ data = new Object[] { uri.toString() };
+ dataTypes = new Transfer[] { TextTransfer.getInstance() };
+ }
+
+ Clipboard clipboard = new Clipboard(_part.getSite().getShell().getDisplay());
+ try {
+ clipboard.setContents(data, dataTypes);
+ } catch (SWTError e) {
+ if (e.code != DND.ERROR_CANNOT_SET_CLIPBOARD) {
+ throw e;
+ }
+ if (MessageDialog.openQuestion(_part.getSite().getShell(), EGFCommonUIMessages.CopyQualifiedNameAction_ErrorTitle, EGFCommonUIMessages.CopyQualifiedNameAction_ErrorDescription)) {
+ clipboard.setContents(data, dataTypes);
+ }
+ } finally {
+ clipboard.dispose();
+ }
+
+ } catch (Exception e) {
+ EGFCommonUIPlugin.getDefault().logError(new String("CopyQualifiedNameAction.run(..) _"), e); //$NON-NLS-1$
+ }
+
+ }
+
+}
diff --git a/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/activator/EGFAbstractUIPlugin.java b/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/activator/EGFAbstractUIPlugin.java
new file mode 100644
index 0000000..eb8b08c
--- /dev/null
+++ b/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/activator/EGFAbstractUIPlugin.java
@@ -0,0 +1,322 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+package org.eclipse.egf.common.ui.activator;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.egf.common.EGFCommonPlugin;
+import org.eclipse.egf.common.log.IEGFLogger;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+/**
+ * Base class for plug-ins that integrate with the Eclipse platform UI.<br>
+ *
+ * @author Xavier Maysonnave
+ */
+public abstract class EGFAbstractUIPlugin extends AbstractUIPlugin {
+
+ private static final String ICONS_PATH = "$nl$/icons/full/"; //$NON-NLS-1$
+
+ /**
+ * Returns the workbench display to be used.
+ */
+ public static Display getWorkbenchDisplay() {
+ return PlatformUI.getWorkbench().getDisplay();
+ }
+
+ /**
+ * Log Status
+ */
+
+ public void log(IStatus status) {
+ log(status, 0, true);
+ }
+
+ public void log(IStatus status, boolean appendLogger) {
+ log(status, 0, appendLogger);
+ }
+
+ public void log(IStatus status, int nesting) {
+ log(status, nesting, true);
+ }
+
+ public void log(IStatus status, int nesting, boolean appendLogger) {
+ getLog().log(status);
+ if (appendLogger) {
+ for (IEGFLogger logger : EGFCommonPlugin.getEGFLoggers()) {
+ logger.logStatus(status, nesting);
+ }
+ }
+ }
+
+ /**
+ * Log Message Info
+ */
+
+ public void logInfo(String message) {
+ logInfo(message, 0, true);
+ }
+
+ public void logInfo(String message, boolean appendLogger) {
+ logInfo(message, 0, appendLogger);
+ }
+
+ public void logInfo(String message, int nesting) {
+ logInfo(message, nesting, true);
+ }
+
+ public void logInfo(String message, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.INFO, message, null), nesting, appendLogger);
+ }
+
+ /**
+ * Log Message and Throwable Info
+ */
+
+ public void logInfo(String message, Throwable t) {
+ logInfo(message, t, 0, true);
+ }
+
+ public void logInfo(String message, Throwable t, boolean appendLogger) {
+ logInfo(message, t, 0, appendLogger);
+ }
+
+ public void logInfo(String message, Throwable t, int nesting) {
+ logInfo(message, t, nesting, true);
+ }
+
+ public void logInfo(String message, Throwable t, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.INFO, message, t), nesting, appendLogger);
+ }
+
+ /**
+ * Log Throwable Info
+ */
+
+ public void logInfo(Throwable t) {
+ logInfo(t, 0, true);
+ }
+
+ public void logInfo(Throwable t, boolean appendLogger) {
+ logInfo(t, 0, appendLogger);
+ }
+
+ public void logInfo(Throwable t, int nesting) {
+ logInfo(t, nesting, true);
+ }
+
+ public void logInfo(Throwable t, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.INFO, t.getMessage(), t), nesting, appendLogger);
+ }
+
+ /**
+ * Log Message Error
+ */
+
+ public void logError(String message) {
+ logError(message, 0, true);
+ }
+
+ public void logError(String message, boolean appendLogger) {
+ logError(message, 0, appendLogger);
+ }
+
+ public void logError(String message, int nesting) {
+ logError(message, nesting, true);
+ }
+
+ public void logError(String message, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.ERROR, message, null), nesting, appendLogger);
+ }
+
+ /**
+ * Log Message and Throwable Error
+ */
+
+ public void logError(String message, Throwable t) {
+ logError(message, t, 0, true);
+ }
+
+ public void logError(String message, Throwable t, boolean appendLogger) {
+ logError(message, t, 0, appendLogger);
+ }
+
+ public void logError(String message, Throwable t, int nesting) {
+ logError(message, t, nesting, true);
+ }
+
+ public void logError(String message, Throwable t, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.ERROR, message, t), nesting, appendLogger);
+ }
+
+ /**
+ * Log Throwable Error
+ */
+
+ public void logError(Throwable t) {
+ logError(t, 0, true);
+ }
+
+ public void logError(Throwable t, boolean appendLogger) {
+ logError(t, 0, appendLogger);
+ }
+
+ public void logError(Throwable t, int nesting) {
+ logError(t, nesting, true);
+ }
+
+ public void logError(Throwable t, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.ERROR, t.getMessage(), t), nesting, appendLogger);
+ }
+
+ /**
+ * Log Message Warning
+ */
+
+ public void logWarning(String message) {
+ logWarning(message, 0, true);
+ }
+
+ public void logWarning(String message, boolean appendLogger) {
+ logWarning(message, 0, appendLogger);
+ }
+
+ public void logWarning(String message, int nesting) {
+ logWarning(message, nesting, true);
+ }
+
+ public void logWarning(String message, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.WARNING, message, null), nesting, appendLogger);
+ }
+
+ /**
+ * Log Message and Throwable Warning
+ */
+
+ public void logWarning(String message, Throwable t) {
+ logWarning(message, t, 0, true);
+ }
+
+ public void logWarning(String message, Throwable t, boolean appendLogger) {
+ logWarning(message, t, 0, appendLogger);
+ }
+
+ public void logWarning(String message, Throwable t, int nesting) {
+ logWarning(message, t, nesting, true);
+ }
+
+ public void logWarning(String message, Throwable t, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.WARNING, message, t), nesting, appendLogger);
+ }
+
+ /**
+ * Log Throwable Warning
+ */
+
+ public void logWarning(Throwable t) {
+ logWarning(t, 0, true);
+ }
+
+ public void logWarning(Throwable t, boolean appendLogger) {
+ logWarning(t, 0, appendLogger);
+ }
+
+ public void logWarning(Throwable t, int nesting) {
+ logWarning(t, nesting, true);
+ }
+
+ public void logWarning(Throwable t, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.WARNING, t.getMessage(), t), nesting, appendLogger);
+ }
+
+ /**
+ * Create an IStatus
+ *
+ * @return a new IStatus
+ */
+ public IStatus newStatus(int severity, String message, Throwable exception) {
+ return new Status(severity, getPluginID(), 0, message, exception);
+ }
+
+ /**
+ * Get an image descriptor for given key.<br>
+ * Images must be located in 'plug-in folder'/icons
+ *
+ * @param key_p
+ * the key must be the file name of the related image.
+ * @return an {@link ImageDescriptor} or null if not found
+ */
+ public ImageDescriptor getImageDescriptor(String key_p) {
+ ImageRegistry imageRegistry = getImageRegistry();
+ ImageDescriptor imageDescriptor = imageRegistry.getDescriptor(key_p);
+ if (imageDescriptor == null) {
+ imageDescriptor = createImageDescriptor(key_p);
+ imageRegistry.put(key_p, imageDescriptor);
+ }
+ return imageDescriptor;
+ }
+
+ /**
+ * Get an image for given key.<br>
+ * Images must be located in 'plug-in folder'/icons
+ *
+ * @param key_p
+ * the key must be the file name of the related image.
+ * @return an {@link Image} or null if not found
+ */
+ public Image getImage(String key_p) {
+ ImageRegistry imageRegistry = getImageRegistry();
+ Image image = imageRegistry.get(key_p);
+ if (image == null) {
+ // Create an image descriptor for given id.
+ ImageDescriptor imageDescriptor = createImageDescriptor(key_p);
+ // Store the (id, imageDescriptor) rather than (id,image)
+ // because with storing (id,image) the getDescriptor method will
+ // return null in later usage
+ // this way, everything is correctly initialized.
+ imageRegistry.put(key_p, imageDescriptor);
+ // Everything is all right at this step, let's get the real image
+ image = imageRegistry.get(key_p);
+ }
+ return image;
+ }
+
+ /**
+ * Create an image descriptor for given key.<br>
+ * Images must be located in 'plug-in folder'/icons
+ *
+ * @param key_p
+ * the key must be the file name of the related image.
+ * @return an {@link ImageDescriptor} or null if error occurred
+ */
+ protected ImageDescriptor createImageDescriptor(String key_p) {
+ return AbstractUIPlugin.imageDescriptorFromPlugin(getPluginID(), ICONS_PATH + key_p);
+ }
+
+ /**
+ * Get the plug-in ID according to MANIFEST.MF definition.
+ *
+ * @return a String containing the plug-in ID.
+ */
+ public String getPluginID() {
+ return getBundle().getSymbolicName();
+ }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/activator/EGFEclipseUIPlugin.java b/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/activator/EGFEclipseUIPlugin.java
new file mode 100644
index 0000000..d9d78a5
--- /dev/null
+++ b/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/activator/EGFEclipseUIPlugin.java
@@ -0,0 +1,282 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.common.ui.activator;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.egf.common.EGFCommonPlugin;
+import org.eclipse.egf.common.log.IEGFLogger;
+import org.eclipse.emf.common.ui.EclipseUIPlugin;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class EGFEclipseUIPlugin extends EclipseUIPlugin {
+
+ /**
+ * Returns the workbench display to be used.
+ */
+ public static Display getWorkbenchDisplay() {
+ return PlatformUI.getWorkbench().getDisplay();
+ }
+
+ /**
+ * Log Object
+ */
+
+ @Override
+ public void log(Object object) {
+ log(object, 0, true);
+ }
+
+ public void log(Object object, boolean appendLogger) {
+ log(object, 0, appendLogger);
+ }
+
+ public void log(Object object, int nesting) {
+ log(object, nesting, true);
+ }
+
+ public void log(Object logEntry, int nesting, boolean appendLogger) {
+ IStatus status;
+ Object innerLogEntry = logEntry;
+ if (innerLogEntry instanceof IStatus) {
+ status = (IStatus) innerLogEntry;
+ logStatus(status, nesting, appendLogger);
+ } else {
+ if (innerLogEntry == null) {
+ innerLogEntry = new RuntimeException(getString("_UI_NullLogEntry_exception", true)).fillInStackTrace(); //$NON-NLS-1$
+ }
+
+ if (innerLogEntry instanceof Throwable) {
+ Throwable throwable = (Throwable) innerLogEntry;
+
+ // System.err.println("Logged throwable: --------------------");
+ // throwable.printStackTrace();
+
+ String message = throwable.getLocalizedMessage();
+ if (message == null) {
+ message = ""; //$NON-NLS-1$
+ }
+
+ status = new Status(IStatus.WARNING, getBundle().getSymbolicName(), 0, message, throwable);
+ logStatus(status, nesting, appendLogger);
+ } else {
+ // System.err.println("Logged throwable: --------------------");
+ // throwable.printStackTrace();
+ status = new Status(IStatus.WARNING, getBundle().getSymbolicName(), 0, innerLogEntry.toString(), null);
+ logStatus(status, nesting, appendLogger);
+ }
+ }
+ }
+
+ private void logStatus(IStatus status, int nesting, boolean appendLogger) {
+ getLog().log(status);
+ if (appendLogger) {
+ for (IEGFLogger logger : EGFCommonPlugin.getEGFLoggers()) {
+ logger.logStatus(status, nesting);
+ }
+ }
+ }
+
+ /**
+ * Log Message Info
+ */
+
+ public void logInfo(String message) {
+ logInfo(message, 0, true);
+ }
+
+ public void logInfo(String message, boolean appendLogger) {
+ logInfo(message, 0, appendLogger);
+ }
+
+ public void logInfo(String message, int nesting) {
+ logInfo(message, nesting, true);
+ }
+
+ public void logInfo(String message, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.INFO, message, null), nesting, appendLogger);
+ }
+
+ /**
+ * Log Message and Throwable Info
+ */
+
+ public void logInfo(String message, Throwable t) {
+ logInfo(message, t, 0, true);
+ }
+
+ public void logInfo(String message, Throwable t, boolean appendLogger) {
+ logInfo(message, t, 0, appendLogger);
+ }
+
+ public void logInfo(String message, Throwable t, int nesting) {
+ logInfo(message, t, nesting, true);
+ }
+
+ public void logInfo(String message, Throwable t, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.INFO, message, t), nesting, appendLogger);
+ }
+
+ /**
+ * Log Throwable Info
+ */
+
+ public void logInfo(Throwable t) {
+ logInfo(t, 0, true);
+ }
+
+ public void logInfo(Throwable t, boolean appendLogger) {
+ logInfo(t, 0, appendLogger);
+ }
+
+ public void logInfo(Throwable t, int nesting) {
+ logInfo(t, nesting, true);
+ }
+
+ public void logInfo(Throwable t, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.INFO, t.getMessage(), t), nesting, appendLogger);
+ }
+
+ /**
+ * Log Message Error
+ */
+
+ public void logError(String message) {
+ logError(message, 0, true);
+ }
+
+ public void logError(String message, boolean appendLogger) {
+ logError(message, 0, appendLogger);
+ }
+
+ public void logError(String message, int nesting) {
+ logError(message, nesting, true);
+ }
+
+ public void logError(String message, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.ERROR, message, null), nesting, appendLogger);
+ }
+
+ /**
+ * Log Message and Throwable Error
+ */
+
+ public void logError(String message, Throwable t) {
+ logError(message, t, 0, true);
+ }
+
+ public void logError(String message, Throwable t, boolean appendLogger) {
+ logError(message, t, 0, appendLogger);
+ }
+
+ public void logError(String message, Throwable t, int nesting) {
+ logError(message, t, nesting, true);
+ }
+
+ public void logError(String message, Throwable t, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.ERROR, message, t), nesting, appendLogger);
+ }
+
+ /**
+ * Log Throwable Error
+ */
+
+ public void logError(Throwable t) {
+ logError(t, 0, true);
+ }
+
+ public void logError(Throwable t, boolean appendLogger) {
+ logError(t, 0, appendLogger);
+ }
+
+ public void logError(Throwable t, int nesting) {
+ logError(t, nesting, true);
+ }
+
+ public void logError(Throwable t, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.ERROR, t.getMessage(), t), nesting, appendLogger);
+ }
+
+ /**
+ * Log Message Warning
+ */
+
+ public void logWarning(String message) {
+ logWarning(message, 0, true);
+ }
+
+ public void logWarning(String message, boolean appendLogger) {
+ logWarning(message, 0, appendLogger);
+ }
+
+ public void logWarning(String message, int nesting) {
+ logWarning(message, nesting, true);
+ }
+
+ public void logWarning(String message, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.WARNING, message, null), nesting, appendLogger);
+ }
+
+ /**
+ * Log Message and Throwable Warning
+ */
+
+ public void logWarning(String message, Throwable t) {
+ logWarning(message, t, 0, true);
+ }
+
+ public void logWarning(String message, Throwable t, boolean appendLogger) {
+ logWarning(message, t, 0, appendLogger);
+ }
+
+ public void logWarning(String message, Throwable t, int nesting) {
+ logWarning(message, t, nesting, true);
+ }
+
+ public void logWarning(String message, Throwable t, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.WARNING, message, t), nesting, appendLogger);
+ }
+
+ /**
+ * Log Throwable Warning
+ */
+
+ public void logWarning(Throwable t) {
+ logWarning(t, 0, true);
+ }
+
+ public void logWarning(Throwable t, boolean appendLogger) {
+ logWarning(t, 0, appendLogger);
+ }
+
+ public void logWarning(Throwable t, int nesting) {
+ logWarning(t, nesting, true);
+ }
+
+ public void logWarning(Throwable t, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.WARNING, t.getMessage(), t), nesting, appendLogger);
+ }
+
+ /**
+ * Create an IStatus
+ *
+ * @return a new IStatus
+ */
+ public IStatus newStatus(int severity, String message, Throwable exception) {
+ return new Status(severity, getSymbolicName(), 0, message, exception);
+ }
+
+}
diff --git a/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/constant/EGFCommonUIConstants.java b/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/constant/EGFCommonUIConstants.java
new file mode 100644
index 0000000..cf5b20d
--- /dev/null
+++ b/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/constant/EGFCommonUIConstants.java
@@ -0,0 +1,28 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.common.ui.constant;
+
+/**
+ * Common UI constants.
+ *
+ * @author Xavier Maysonnave
+ */
+public interface EGFCommonUIConstants {
+
+ public static final String CREATE_CHILD = "create-child"; //$NON-NLS-1$
+
+ public static final String CREATE_SIBLING = "create-sibling"; //$NON-NLS-1$
+
+ public static final String EDIT_MENU_GROUP = "edit"; //$NON-NLS-1$
+
+ public static final String OPEN_MENU_GROUP = "open"; //$NON-NLS-1$
+
+}
diff --git a/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/fields/BooleanFieldEditor2.java b/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/fields/BooleanFieldEditor2.java
new file mode 100644
index 0000000..f51b182
--- /dev/null
+++ b/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/fields/BooleanFieldEditor2.java
@@ -0,0 +1,45 @@
+/**
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ * Thales Corporate Services S.A.S
+ */
+package org.eclipse.egf.common.ui.fields;
+
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * A boolean field editor that provides access to this editors boolean
+ * button.
+ */
+public class BooleanFieldEditor2 extends BooleanFieldEditor {
+
+ private Button _changeControl;
+
+ /**
+ * @see BooleanFieldEditor#BooleanFieldEditor(java.lang.String,
+ * java.lang.String, int, org.eclipse.swt.widgets.Composite)
+ */
+ public BooleanFieldEditor2(String name, String labelText, int style, Composite parent) {
+ super(name, labelText, style, parent);
+ }
+
+ /**
+ * @see org.eclipse.jface.preference.BooleanFieldEditor#getChangeControl(Composite)
+ */
+ @Override
+ public Button getChangeControl(Composite parent) {
+ if (_changeControl == null) {
+ _changeControl = super.getChangeControl(parent);
+ }
+ return _changeControl;
+ }
+
+}
diff --git a/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/helper/EditorHelper.java b/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/helper/EditorHelper.java
new file mode 100644
index 0000000..b92018d
--- /dev/null
+++ b/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/helper/EditorHelper.java
@@ -0,0 +1,304 @@
+/**
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ * Thales Corporate Services S.A.S
+ */
+package org.eclipse.egf.common.ui.helper;
+
+import java.lang.reflect.Method;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.egf.common.ui.EGFCommonUIPlugin;
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.ui.URIEditorInput;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.URIConverter;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
+import org.eclipse.ui.IEditorDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.IEditorRegistry;
+import org.eclipse.ui.IURIEditorInput;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.editors.text.EditorsUI;
+import org.eclipse.ui.part.FileEditorInput;
+import org.osgi.framework.Bundle;
+
+public class EditorHelper {
+
+ public static void setSelectionToViewer(IEditorPart part, List<EObject> eObjects) {
+ // Do we have something to process
+ if (eObjects == null || eObjects.size() == 0) {
+ return;
+ }
+ // Select
+ try {
+ Class<?>[] types = new Class[] { Class.forName("java.util.Collection") }; //$NON-NLS-1$
+ Method method = part.getClass().getMethod("setSelectionToViewer", types); //$NON-NLS-1$
+ if (method != null) {
+ Object[] params = new Object[] { eObjects };
+ method.invoke(part, params);
+ }
+ } catch (Throwable t) {
+ ThrowableHandler.handleThrowable(EGFCommonUIPlugin.getDefault().getPluginID(), t);
+ }
+ }
+
+ public static void setSelectionToViewer(IEditorPart part, URI uri) {
+ // Do we have something to process
+ if (uri == null || uri.hasFragment() == false) {
+ return;
+ }
+ // Whether or not could we have an EditingDomain
+ if (part == null || part instanceof IEditingDomainProvider == false) {
+ return;
+ }
+ EditingDomain editingDomain = ((IEditingDomainProvider) part).getEditingDomain();
+ // Process URI
+ EObject eObject = editingDomain.getResourceSet().getEObject(uri, true);
+ if (eObject == null) {
+ return;
+ }
+ // Select
+ try {
+ Class<?>[] types = new Class[] { Class.forName("java.util.Collection") }; //$NON-NLS-1$
+ Method method = part.getClass().getMethod("setSelectionToViewer", types); //$NON-NLS-1$
+ if (method != null) {
+ Object[] params = new Object[] { Collections.singletonList(eObject) };
+ method.invoke(part, params);
+ }
+ } catch (Throwable t) {
+ ThrowableHandler.handleThrowable(EGFCommonUIPlugin.getDefault().getPluginID(), t);
+ }
+ }
+
+ public static void openEditorsAndSelect(Map<Resource, List<EObject>> resources) {
+ // is there something to select
+ if (resources.isEmpty()) {
+ return;
+ }
+ for (Resource resource : resources.keySet()) {
+ try {
+ // Try to use a URIConverter to normalize such URI
+ // if we have a platform:/plugin/ we need a platform:/resource/ if any
+ // to have a chance to use a FileEditorInput rather than an URIEditorInput
+ URI uri = resource.getURI();
+ if (uri != null && resource.getResourceSet() != null) {
+ URIConverter converter = resource.getResourceSet().getURIConverter();
+ if (converter != null) {
+ uri = converter.normalize(uri);
+ }
+ }
+ IEditorPart editorPart = openEditor(uri);
+ if (editorPart != null) {
+ setSelectionToViewer(editorPart, resources.get(resource));
+ }
+ } catch (Throwable t) {
+ ThrowableHandler.handleThrowable(EGFCommonUIPlugin.getDefault().getPluginID(), t);
+ }
+ }
+ }
+
+ public static String computeEditorId(String fileName) {
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ IEditorRegistry editorRegistry = workbench.getEditorRegistry();
+ IEditorDescriptor descriptor = editorRegistry.getDefaultEditor(fileName);
+ if (descriptor != null) {
+ return descriptor.getId();
+ }
+ return EditorsUI.DEFAULT_TEXT_EDITOR_ID;
+ }
+
+ /**
+ * Opens the default editor for the resource that contains the specified
+ * EObject.
+ */
+ public static IEditorPart openEditor(URI uri) throws PartInitException {
+ if (uri == null) {
+ return null;
+ }
+ IEditorPart part = restoreAlreadyOpenedEditor(uri, true);
+ if (part != null) {
+ return part;
+ }
+ IEditorInput editorInput = null;
+ if (uri.isPlatformResource()) {
+ String path = uri.toPlatformString(true);
+ IResource resource = ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(path));
+ if (resource instanceof IFile) {
+ editorInput = EclipseUtil.createFileEditorInput((IFile) resource);
+ return openEditor(editorInput, URI.createPlatformPluginURI(resource.getFullPath().toString(), true));
+ }
+ }
+ return openEditor(new URIEditorInput(uri.trimFragment()), uri);
+ }
+
+ public static IEditorPart openEditor(IEditorInput input, URI uri) throws PartInitException {
+ if (input == null || uri == null) {
+ return null;
+ }
+ IEditorPart part = restoreAlreadyOpenedEditor(uri, true);
+ if (part != null) {
+ return part;
+ }
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ IWorkbenchPage page = workbench.getActiveWorkbenchWindow().getActivePage();
+ return page.openEditor(input, computeEditorId(uri.trimFragment().lastSegment()));
+ }
+
+ public static boolean isAlreadyOpenedEditor(URI uri) {
+ if (uri == null) {
+ return false;
+ }
+ return restoreAlreadyOpenedEditor(uri, false) != null ? true : false;
+ }
+
+ private static IEditorPart restoreAlreadyOpenedEditor(URI uri, boolean activate) {
+ if (uri == null) {
+ return null;
+ }
+ URI uriToCheck = uri.trimFragment();
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ if (workbench != null) {
+ for (IWorkbenchWindow workbenchWindow : workbench.getWorkbenchWindows()) {
+ for (IWorkbenchPage workbenchPage : workbenchWindow.getPages()) {
+ for (IEditorReference editorReference : workbenchPage.getEditorReferences()) {
+ try {
+ IEditorInput editorInput = editorReference.getEditorInput();
+ if (editorInput != null) {
+ URI editorInputURI = EditorHelper.getURI(editorInput);
+ if (editorInputURI != null && editorInputURI.equals(uriToCheck)) {
+ IEditorPart part = editorReference.getEditor(true);
+ if (activate) {
+ workbenchPage.activate(part);
+ }
+ return part;
+ }
+ }
+ } catch (PartInitException pie) {
+ // Just Ignore
+ }
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ public static URI getURI(IEditorInput editorInput) {
+ URI result = null;
+ if (EMFPlugin.IS_ECLIPSE_RUNNING) {
+ result = EclipseUtil.getURI(editorInput);
+ }
+ if (result == null) {
+ if (editorInput instanceof URIEditorInput) {
+ result = ((URIEditorInput) editorInput).getURI().trimFragment();
+ } else {
+ result = URI.createURI(editorInput.getName());
+ }
+ }
+ return result;
+ }
+
+ public static class EclipseUtil {
+
+ static final Class<?> FILE_CLASS;
+
+ static {
+ Class<?> fileClass = null;
+ try {
+ fileClass = IFile.class;
+ } catch (Throwable exception) {
+ // Ignore any exceptions and assume the class isn't available.
+ }
+ FILE_CLASS = fileClass;
+ }
+
+ static final Class<?> FILE_REVISION_CLASS;
+ static final Method FILE_REVISION_GET_URI_METHOD;
+ static {
+ Class<?> fileRevisionClass = null;
+ Method fileRevisionGetURIMethod = null;
+ Bundle bundle = Platform.getBundle("org.eclipse.team.core"); //$NON-NLS-1$
+ if (bundle != null && (bundle.getState() & (Bundle.ACTIVE | Bundle.STARTING | Bundle.RESOLVED)) != 0) {
+ try {
+ fileRevisionClass = bundle.loadClass("org.eclipse.team.core.history.IFileRevision"); //$NON-NLS-1$
+ fileRevisionGetURIMethod = fileRevisionClass.getMethod("getURI"); //$NON-NLS-1$
+ } catch (Throwable exeption) {
+ // Ignore any exceptions and assume the class isn't available.
+ }
+ }
+ FILE_REVISION_CLASS = fileRevisionClass;
+ FILE_REVISION_GET_URI_METHOD = fileRevisionGetURIMethod;
+ }
+
+ static final Class<?> URI_EDITOR_INPUT_CLASS;
+ static {
+ Class<?> uriEditorInputClass = null;
+ try {
+ uriEditorInputClass = IURIEditorInput.class;
+ } catch (Throwable exception) {
+ // The class is not available.
+ }
+ URI_EDITOR_INPUT_CLASS = uriEditorInputClass;
+ }
+
+ public static URI getURI(IEditorInput editorInput) {
+ if (FILE_CLASS != null) {
+ IFile file = getIFile(editorInput);
+ if (file != null) {
+ return URI.createPlatformPluginURI(file.getFullPath().toString(), true);
+ }
+ }
+ if (FILE_REVISION_CLASS != null) {
+ Object fileRevision = editorInput.getAdapter(FILE_REVISION_CLASS);
+ if (fileRevision != null) {
+ try {
+ return URI.createURI(((java.net.URI) FILE_REVISION_GET_URI_METHOD.invoke(fileRevision)).toString());
+ } catch (Throwable t) {
+ EGFCommonUIPlugin.getDefault().logError(t);
+ }
+ }
+ }
+ if (URI_EDITOR_INPUT_CLASS != null) {
+ if (editorInput instanceof IURIEditorInput) {
+ return URI.createURI(((IURIEditorInput) editorInput).getURI().toString()).trimFragment();
+ }
+ }
+ return null;
+ }
+
+ public static IFile getIFile(IEditorInput editorInput) {
+ if (FILE_CLASS != null) {
+ return (IFile) editorInput.getAdapter(FILE_CLASS);
+ }
+ return null;
+ }
+
+ public static IURIEditorInput createFileEditorInput(IFile file) {
+ return new FileEditorInput(file);
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/helper/ThrowableHandler.java b/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/helper/ThrowableHandler.java
new file mode 100644
index 0000000..adb6db5
--- /dev/null
+++ b/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/helper/ThrowableHandler.java
@@ -0,0 +1,48 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.common.ui.helper;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.egf.common.helper.StatusHelper;
+import org.eclipse.ui.statushandlers.StatusManager;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class ThrowableHandler {
+
+ private ThrowableHandler() {
+ // Prevent Instantiation
+ }
+
+ public static void handleThrowable(String pluginID, Throwable t) {
+ IStatus status = null;
+ if (t instanceof CoreException) {
+ CoreException ce = (CoreException) t;
+ status = ce.getStatus();
+ } else if (t instanceof InvocationTargetException) {
+ InvocationTargetException ite = (InvocationTargetException) t;
+ status = StatusHelper.newStatus(pluginID, IStatus.ERROR, ite.getClass().getSimpleName(), ite.getTargetException());
+ } else {
+ Throwable throwable = t;
+ if (throwable.getCause() != null) {
+ throwable = throwable.getCause();
+ }
+ status = StatusHelper.newStatus(pluginID, IStatus.ERROR, throwable.getClass().getSimpleName(), t);
+ }
+ StatusManager.getManager().handle(status, StatusManager.LOG | StatusManager.SHOW);
+ }
+
+}
diff --git a/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/l10n/EGFCommonUIMessages.java b/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/l10n/EGFCommonUIMessages.java
new file mode 100644
index 0000000..580fe59
--- /dev/null
+++ b/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/l10n/EGFCommonUIMessages.java
@@ -0,0 +1,38 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.common.ui.l10n;
+
+import org.eclipse.osgi.util.NLS;
+
+public class EGFCommonUIMessages {
+
+ private static final String BUNDLE_NAME = "org.eclipse.egf.common.ui.l10n.messages"; //$NON-NLS-1$
+
+ private EGFCommonUIMessages() {
+ // Do not instantiate
+ }
+
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, EGFCommonUIMessages.class);
+ }
+
+ public static String ThrowableHandler_Title;
+
+ public static String Unexpected_Error;
+
+ public static String CopyEObjectQualifiedName_name;
+ public static String CopyEObjectMetaClassQualifiedName_name;
+
+ public static String CopyQualifiedNameAction_ErrorDescription;
+ public static String CopyQualifiedNameAction_ErrorTitle;
+
+}
diff --git a/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/l10n/messages.properties b/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/l10n/messages.properties
new file mode 100644
index 0000000..fb25510
--- /dev/null
+++ b/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/l10n/messages.properties
@@ -0,0 +1,17 @@
+##
+# Copyright (c) 2000, 2009 IBM Corporation and others.
+# 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
+#
+##
+
+ThrowableHandler_Title= Exception
+Unexpected_Error= Unexpected Error :
+
+CopyEObjectQualifiedName_name=EObject
+CopyEObjectMetaClassQualifiedName_name=EObject Meta-Class
+
+CopyQualifiedNameAction_ErrorDescription=There was a problem when accessing the system clipboard. Retry?
+CopyQualifiedNameAction_ErrorTitle=Problem Copying to Clipboard
diff --git a/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/utils/ModelSearchImages.java b/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/utils/ModelSearchImages.java
new file mode 100644
index 0000000..36030f2
--- /dev/null
+++ b/org.eclipse.egf.common.ui/src/org/eclipse/egf/common/ui/utils/ModelSearchImages.java
@@ -0,0 +1,123 @@
+/**
+ * Copyright (c) 2007-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
+ */
+package org.eclipse.egf.common.ui.utils;
+
+import java.net.URL;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.egf.common.ui.EGFCommonUIPlugin;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class ModelSearchImages {
+
+ public final static String ICONS_PATH = "icons/full/"; //$NON-NLS-1$
+
+ public final static String ECORE_IMAGE_PATH = ICONS_PATH + "elcl16/Ecore.gif"; //$NON-NLS-1$
+
+ private static ImageDescriptor ECORE_IMAGE = null;
+
+ public final static String ECLASS_HIERARCHY_IMAGE_PATH = ICONS_PATH + "elcl16/EClassHierarchy.gif"; //$NON-NLS-1$
+
+ private static ImageDescriptor ECLASS_HIERARCHY_IMAGE = null;
+
+ public final static String ASCENDANT_HIERARCHY_IMAGE_PATH = ICONS_PATH + "elcl16/AscendantHierarchy.gif"; //$NON-NLS-1$
+
+ private static ImageDescriptor ASCENDANT_HIERARCHY_IMAGE = null;
+
+ public final static String DESCENDANT_HIERARCHY_IMAGE_PATH = ICONS_PATH + "elcl16/DescendantHierarchy.gif"; //$NON-NLS-1$
+
+ private static ImageDescriptor DESCENDANT_HIERARCHY_IMAGE = null;
+
+ public final static String EREFERENCE_IMAGE_PATH = ICONS_PATH + "elcl16/EReference.gif"; //$NON-NLS-1$
+
+ private static ImageDescriptor EREFERENCE_IMAGE = null;
+
+ public final static String SYNCHRONIZE_IMAGE_PATH = ICONS_PATH + "elcl16/Synchronize.gif"; //$NON-NLS-1$
+
+ private static ImageDescriptor SYNCHRONIZE_IMAGE = null;
+
+ public final static String REFRESH_IMAGE_PATH = ICONS_PATH + "elcl16/Refresh.gif"; //$NON-NLS-1$
+
+ private static ImageDescriptor REFRESH_IMAGE = null;
+
+ public final static String ENABLED_COPY_QUALIFIED_IMAGE_PATH = ICONS_PATH + "elcl16/cpyqual_menu.gif"; //$NON-NLS-1$
+
+ private static ImageDescriptor ENABLED_COPY_QUALIFIED_IMAGE = null;
+
+ public final static String DISABLED_COPY_QUALIFIED_IMAGE_PATH = ICONS_PATH + "dlcl16/cpyqual_menu.gif"; //$NON-NLS-1$
+
+ private static ImageDescriptor DISABLED_COPY_QUALIFIED_IMAGE = null;
+
+ public static ImageDescriptor getImageDescriptor(String imagePath) {
+ ImageDescriptor desc = ImageDescriptor.getMissingImageDescriptor();
+ Bundle bundle = Platform.getBundle(EGFCommonUIPlugin.getDefault().getBundle().getSymbolicName());
+ URL url = null;
+ if (bundle != null) {
+ url = FileLocator.find(bundle, new Path(imagePath), null);
+ desc = ImageDescriptor.createFromURL(url);
+ }
+ return desc;
+ }
+
+ public static ImageDescriptor getImageDescriptor(Bundle bundle, String imagePath) {
+ ImageDescriptor desc = ImageDescriptor.getMissingImageDescriptor();
+ URL url = null;
+ if (bundle != null) {
+ url = FileLocator.find(bundle, new Path(imagePath), null);
+ desc = ImageDescriptor.createFromURL(url);
+ }
+ return desc;
+ }
+
+ public static ImageDescriptor getEcoreImage() {
+ return ECORE_IMAGE == null ? ECORE_IMAGE = getImageDescriptor(ECORE_IMAGE_PATH) : ECORE_IMAGE;
+ }
+
+ public static ImageDescriptor getEClassHierarchyImage() {
+ return ECLASS_HIERARCHY_IMAGE == null ? ECLASS_HIERARCHY_IMAGE = getImageDescriptor(ECLASS_HIERARCHY_IMAGE_PATH) : ECLASS_HIERARCHY_IMAGE;
+ }
+
+ public static ImageDescriptor getAscendantHierarchyImage() {
+ return ASCENDANT_HIERARCHY_IMAGE == null ? ASCENDANT_HIERARCHY_IMAGE = getImageDescriptor(ASCENDANT_HIERARCHY_IMAGE_PATH) : ASCENDANT_HIERARCHY_IMAGE;
+ }
+
+ public static ImageDescriptor getDescendantHierarchyImage() {
+ return DESCENDANT_HIERARCHY_IMAGE == null ? DESCENDANT_HIERARCHY_IMAGE = getImageDescriptor(DESCENDANT_HIERARCHY_IMAGE_PATH) : DESCENDANT_HIERARCHY_IMAGE;
+ }
+
+ public static ImageDescriptor getEReferenceImage() {
+ return EREFERENCE_IMAGE == null ? EREFERENCE_IMAGE = getImageDescriptor(EREFERENCE_IMAGE_PATH) : EREFERENCE_IMAGE;
+ }
+
+ public static ImageDescriptor getSynchronizeImage() {
+ return SYNCHRONIZE_IMAGE == null ? SYNCHRONIZE_IMAGE = getImageDescriptor(SYNCHRONIZE_IMAGE_PATH) : SYNCHRONIZE_IMAGE;
+ }
+
+ public static ImageDescriptor getRefreshImage() {
+ return REFRESH_IMAGE == null ? REFRESH_IMAGE = getImageDescriptor(REFRESH_IMAGE_PATH) : REFRESH_IMAGE;
+ }
+
+ public static ImageDescriptor getEnabledCopyQualifiedImage() {
+ return ENABLED_COPY_QUALIFIED_IMAGE == null ? ENABLED_COPY_QUALIFIED_IMAGE = getImageDescriptor(ENABLED_COPY_QUALIFIED_IMAGE_PATH) : ENABLED_COPY_QUALIFIED_IMAGE;
+ }
+
+ public static ImageDescriptor getDisabledCopyQualifiedImage() {
+ return DISABLED_COPY_QUALIFIED_IMAGE == null ? DISABLED_COPY_QUALIFIED_IMAGE = getImageDescriptor(DISABLED_COPY_QUALIFIED_IMAGE_PATH) : DISABLED_COPY_QUALIFIED_IMAGE;
+ }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.egf.common/.classpath b/org.eclipse.egf.common/.classpath
new file mode 100644
index 0000000..20c123a
--- /dev/null
+++ b/org.eclipse.egf.common/.classpath
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
+ <accessrules>
+ <accessrule kind="accessible" pattern="org/eclipse/pde/internal/core/natures/*"/>
+ <accessrule kind="accessible" pattern="org/eclipse/pde/internal/core/*"/>
+ </accessrules>
+ </classpathentry>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.egf.common/.options b/org.eclipse.egf.common/.options
new file mode 100644
index 0000000..ff50550
--- /dev/null
+++ b/org.eclipse.egf.common/.options
@@ -0,0 +1,2 @@
+# Prints debug information
+org.eclipse.egf.common/debug=true
diff --git a/org.eclipse.egf.common/.project b/org.eclipse.egf.common/.project
new file mode 100644
index 0000000..6716f4b
--- /dev/null
+++ b/org.eclipse.egf.common/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.common</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.common/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egf.common/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..35d051e
--- /dev/null
+++ b/org.eclipse.egf.common/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:46:19 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.egf.common/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egf.common/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..99b905a
--- /dev/null
+++ b/org.eclipse.egf.common/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Wed Jun 24 09:15:48 CEST 2009
+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.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+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/org.eclipse.egf.common/META-INF/MANIFEST.MF b/org.eclipse.egf.common/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..ede261b
--- /dev/null
+++ b/org.eclipse.egf.common/META-INF/MANIFEST.MF
@@ -0,0 +1,28 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.common;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.egf.common.EGFCommonPlugin
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle:
+ org.eclipse.core.resources;visibility:=reexport,
+ org.eclipse.core.runtime;visibility:=reexport,
+ org.eclipse.jdt.core;visibility:=reexport,
+ org.eclipse.jdt.launching;visibility:=reexport,
+ org.eclipse.pde.core;visibility:=reexport,
+ org.eclipse.emf.edit;visibility:=reexport,
+ org.eclipse.emf.codegen.ecore;visibility:=reexport
+Export-Package:
+ org.eclipse.egf.common,
+ org.eclipse.egf.common.activator,
+ org.eclipse.egf.common.constant,
+ org.eclipse.egf.common.cycle,
+ org.eclipse.egf.common.generator,
+ org.eclipse.egf.common.helper,
+ org.eclipse.egf.common.l10n,
+ org.eclipse.egf.common.log
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.egf.common/about.html b/org.eclipse.egf.common/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/org.eclipse.egf.common/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/org.eclipse.egf.common/build.properties b/org.eclipse.egf.common/build.properties
new file mode 100644
index 0000000..2e35381
--- /dev/null
+++ b/org.eclipse.egf.common/build.properties
@@ -0,0 +1,20 @@
+##
+# 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
+##
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ schema/,\
+ .,\
+ .options,\
+ plugin.properties,\
+ about.html,\
+ plugin.xml
+src.includes = about.html
diff --git a/org.eclipse.egf.common/plugin.properties b/org.eclipse.egf.common/plugin.properties
new file mode 100644
index 0000000..2435c0f
--- /dev/null
+++ b/org.eclipse.egf.common/plugin.properties
@@ -0,0 +1,15 @@
+##
+# 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 Common (Incubation)
+providerName=Eclipse Modeling Project
+
+EGFLoggerExtensionPoint=EGF Logger
diff --git a/org.eclipse.egf.common/plugin.xml b/org.eclipse.egf.common/plugin.xml
new file mode 100644
index 0000000..4c000f2
--- /dev/null
+++ b/org.eclipse.egf.common/plugin.xml
Binary files differ
diff --git a/org.eclipse.egf.common/schema/logger.exsd b/org.eclipse.egf.common/schema/logger.exsd
new file mode 100644
index 0000000..b2fdf61
--- /dev/null
+++ b/org.eclipse.egf.common/schema/logger.exsd
@@ -0,0 +1,118 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.egf.common" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.eclipse.egf.common" id="logger" name="EGF Logger"/>
+ </appInfo>
+ <documentation>
+ Breaks the dependency towards UI for log purposes.
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appInfo>
+ <meta.element />
+ </appInfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="logger" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="identifier"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="logger">
+ <complexType>
+ <sequence minOccurs="1" maxOccurs="unbounded">
+ </sequence>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ The implementation of the expected services.
+Must implement IEGFLoggerFactory interface (either directly or not).
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.egf.common.log.IEGFLoggerFactory"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ 0.2.0
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiinfo"/>
+ </appInfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="copyright"/>
+ </appInfo>
+ <documentation>
+ Copyright (c) 2009-2010 Thales Corporate Services S.A.S.<br>
+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 <a
+href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/org.eclipse.egf.common/src/org/eclipse/egf/common/EGFCommonPlugin.java b/org.eclipse.egf.common/src/org/eclipse/egf/common/EGFCommonPlugin.java
new file mode 100644
index 0000000..5d45652
--- /dev/null
+++ b/org.eclipse.egf.common/src/org/eclipse/egf/common/EGFCommonPlugin.java
@@ -0,0 +1,101 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.common;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.egf.common.activator.EGFAbstractPlugin;
+import org.eclipse.egf.common.helper.ExtensionPointHelper;
+import org.eclipse.egf.common.log.IEGFLogger;
+import org.eclipse.egf.common.log.IEGFLoggerFactory;
+import org.eclipse.osgi.util.NLS;
+import org.osgi.framework.BundleContext;
+
+/**
+ * Common plug-in activator.
+ *
+ * @author Xavier Maysonnave
+ */
+public class EGFCommonPlugin extends EGFAbstractPlugin {
+
+ /**
+ * EGF Registered loggers.
+ */
+ private static List<IEGFLogger> __egfLoggers;
+
+ /**
+ * Shared instance.
+ */
+ protected static EGFCommonPlugin __plugin;
+
+ /**
+ * Get shared instance.
+ *
+ * @return
+ */
+ public static EGFCommonPlugin getDefault() {
+ return __plugin;
+ }
+
+ @Override
+ public void start(BundleContext context_p) throws Exception {
+ super.start(context_p);
+ __plugin = this;
+ }
+
+ @Override
+ public void stop(BundleContext context_p) throws Exception {
+ __egfLoggers = null;
+ __plugin = null;
+ super.stop(context_p);
+ }
+
+ /**
+ * Get egf loggers implementations.
+ *
+ * @return an empty list if none could be found.
+ */
+ public static List<IEGFLogger> getEGFLoggers() {
+ // Lazy loading. Search for the implementation.
+ if (__egfLoggers == null) {
+ __egfLoggers = new ArrayList<IEGFLogger>();
+ // Get EGF logger extension points.
+ for (IConfigurationElement configurationElement : ExtensionPointHelper.getConfigurationElements(EGFCommonPlugin.getDefault().getPluginID(), EXTENSION_POINT_SHORT_ID_LOGGER)) {
+ Object object = null;
+ try {
+ object = ExtensionPointHelper.createInstance(configurationElement);
+ } catch (CoreException ce) {
+ getDefault().logError(ce);
+ }
+ if (object == null) {
+ continue;
+ }
+ // Make sure this is the correct resulting type.
+ if (object instanceof IEGFLoggerFactory == false) {
+ getDefault().logError(NLS.bind("Wrong Class {0}", object.getClass().getName())); //$NON-NLS-1$
+ getDefault().logInfo(NLS.bind("This Class should be a sub-type of ''{0}''.", IEGFLoggerFactory.class.getName()), 1); //$NON-NLS-1$
+ getDefault().logInfo(NLS.bind("Bundle ''{0}''", ExtensionPointHelper.getNamespace(configurationElement)), 1); //$NON-NLS-1$
+ getDefault().logInfo(NLS.bind("Extension-point ''{0}''", configurationElement.getName()), 1); //$NON-NLS-1$
+ continue;
+ }
+ IEGFLogger logger = ((IEGFLoggerFactory) object).getLogger();
+ if (logger != null) {
+ __egfLoggers.add(logger);
+ }
+ }
+ }
+ return __egfLoggers;
+ }
+
+}
diff --git a/org.eclipse.egf.common/src/org/eclipse/egf/common/activator/EGFAbstractPlugin.java b/org.eclipse.egf.common/src/org/eclipse/egf/common/activator/EGFAbstractPlugin.java
new file mode 100644
index 0000000..39f34de
--- /dev/null
+++ b/org.eclipse.egf.common/src/org/eclipse/egf/common/activator/EGFAbstractPlugin.java
@@ -0,0 +1,257 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.common.activator;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.egf.common.EGFCommonPlugin;
+import org.eclipse.egf.common.log.IEGFLogger;
+
+/**
+ * Adds logging methods
+ *
+ * @author Guiu
+ *
+ */
+public abstract class EGFAbstractPlugin extends Plugin {
+
+ /**
+ * Extension point "egf_logger" short id.
+ */
+ protected static final String EXTENSION_POINT_SHORT_ID_LOGGER = "logger"; //$NON-NLS-1$
+
+ /**
+ * Log Status
+ */
+
+ public void log(IStatus status) {
+ log(status, 0, true);
+ }
+
+ public void log(IStatus status, boolean appendLogger) {
+ log(status, 0, appendLogger);
+ }
+
+ public void log(IStatus status, int nesting) {
+ log(status, nesting, true);
+ }
+
+ public void log(IStatus status, int nesting, boolean appendLogger) {
+ getLog().log(status);
+ if (appendLogger) {
+ for (IEGFLogger logger : EGFCommonPlugin.getEGFLoggers()) {
+ logger.logStatus(status, nesting);
+ }
+ }
+ }
+
+ /**
+ * Log Message Info
+ */
+
+ public void logInfo(String message) {
+ logInfo(message, 0, true);
+ }
+
+ public void logInfo(String message, boolean appendLogger) {
+ logInfo(message, 0, appendLogger);
+ }
+
+ public void logInfo(String message, int nesting) {
+ logInfo(message, nesting, true);
+ }
+
+ public void logInfo(String message, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.INFO, message, null), nesting, appendLogger);
+ }
+
+ /**
+ * Log Message and Throwable Info
+ */
+
+ public void logInfo(String message, Throwable t) {
+ logInfo(message, t, 0, true);
+ }
+
+ public void logInfo(String message, Throwable t, boolean appendLogger) {
+ logInfo(message, t, 0, appendLogger);
+ }
+
+ public void logInfo(String message, Throwable t, int nesting) {
+ logInfo(message, t, nesting, true);
+ }
+
+ public void logInfo(String message, Throwable t, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.INFO, message, t), nesting, appendLogger);
+ }
+
+ /**
+ * Log Throwable Info
+ */
+
+ public void logInfo(Throwable t) {
+ logInfo(t, 0, true);
+ }
+
+ public void logInfo(Throwable t, boolean appendLogger) {
+ logInfo(t, 0, appendLogger);
+ }
+
+ public void logInfo(Throwable t, int nesting) {
+ logInfo(t, nesting, true);
+ }
+
+ public void logInfo(Throwable t, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.INFO, t.getMessage(), t), nesting, appendLogger);
+ }
+
+ /**
+ * Log Message Error
+ */
+
+ public void logError(String message) {
+ logError(message, 0, true);
+ }
+
+ public void logError(String message, boolean appendLogger) {
+ logError(message, 0, appendLogger);
+ }
+
+ public void logError(String message, int nesting) {
+ logError(message, nesting, true);
+ }
+
+ public void logError(String message, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.ERROR, message, null), nesting, appendLogger);
+ }
+
+ /**
+ * Log Message and Throwable Error
+ */
+
+ public void logError(String message, Throwable t) {
+ logError(message, t, 0, true);
+ }
+
+ public void logError(String message, Throwable t, boolean appendLogger) {
+ logError(message, t, 0, appendLogger);
+ }
+
+ public void logError(String message, Throwable t, int nesting) {
+ logError(message, t, nesting, true);
+ }
+
+ public void logError(String message, Throwable t, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.ERROR, message, t), nesting, appendLogger);
+ }
+
+ /**
+ * Log Throwable Error
+ */
+
+ public void logError(Throwable t) {
+ logError(t, 0, true);
+ }
+
+ public void logError(Throwable t, boolean appendLogger) {
+ logError(t, 0, appendLogger);
+ }
+
+ public void logError(Throwable t, int nesting) {
+ logError(t, nesting, true);
+ }
+
+ public void logError(Throwable t, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.ERROR, t.getMessage(), t), nesting, appendLogger);
+ }
+
+ /**
+ * Log Message Warning
+ */
+
+ public void logWarning(String message) {
+ logWarning(message, 0, true);
+ }
+
+ public void logWarning(String message, boolean appendLogger) {
+ logWarning(message, 0, appendLogger);
+ }
+
+ public void logWarning(String message, int nesting) {
+ logWarning(message, nesting, true);
+ }
+
+ public void logWarning(String message, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.WARNING, message, null), nesting, appendLogger);
+ }
+
+ /**
+ * Log Message and Throwable Warning
+ */
+
+ public void logWarning(String message, Throwable t) {
+ logWarning(message, t, 0, true);
+ }
+
+ public void logWarning(String message, Throwable t, boolean appendLogger) {
+ logWarning(message, t, 0, appendLogger);
+ }
+
+ public void logWarning(String message, Throwable t, int nesting) {
+ logWarning(message, t, nesting, true);
+ }
+
+ public void logWarning(String message, Throwable t, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.WARNING, message, t), nesting, appendLogger);
+ }
+
+ /**
+ * Log Throwable Warning
+ */
+
+ public void logWarning(Throwable t) {
+ logWarning(t, 0, true);
+ }
+
+ public void logWarning(Throwable t, boolean appendLogger) {
+ logWarning(t, 0, appendLogger);
+ }
+
+ public void logWarning(Throwable t, int nesting) {
+ logWarning(t, nesting, true);
+ }
+
+ public void logWarning(Throwable t, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.WARNING, t.getMessage(), t), nesting, appendLogger);
+ }
+
+ /**
+ * Create an IStatus
+ *
+ * @return a new IStatus
+ */
+ public IStatus newStatus(int severity, String message, Throwable exception) {
+ return new Status(severity, getPluginID(), 0, message, exception);
+ }
+
+ /**
+ * Get the plug-in ID according to MANIFEST.MF definition.
+ *
+ * @return a String containing the plug-in ID.
+ */
+ public String getPluginID() {
+ return getBundle().getSymbolicName();
+ }
+
+}
diff --git a/org.eclipse.egf.common/src/org/eclipse/egf/common/activator/EGFEclipsePlugin.java b/org.eclipse.egf.common/src/org/eclipse/egf/common/activator/EGFEclipsePlugin.java
new file mode 100644
index 0000000..0400897
--- /dev/null
+++ b/org.eclipse.egf.common/src/org/eclipse/egf/common/activator/EGFEclipsePlugin.java
@@ -0,0 +1,273 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.common.activator;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.egf.common.EGFCommonPlugin;
+import org.eclipse.egf.common.log.IEGFLogger;
+import org.eclipse.emf.common.EMFPlugin.EclipsePlugin;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class EGFEclipsePlugin extends EclipsePlugin {
+
+ /**
+ * Log Object
+ */
+
+ @Override
+ public void log(Object object) {
+ log(object, 0, true);
+ }
+
+ public void log(Object object, boolean appendLogger) {
+ log(object, 0, appendLogger);
+ }
+
+ public void log(Object object, int nesting) {
+ log(object, nesting, true);
+ }
+
+ public void log(Object logEntry, int nesting, boolean appendLogger) {
+ IStatus status;
+ Object innerLogEntry = logEntry;
+ if (innerLogEntry instanceof IStatus) {
+ status = (IStatus) innerLogEntry;
+ logStatus(status, nesting, appendLogger);
+ } else {
+ if (innerLogEntry == null) {
+ innerLogEntry = new RuntimeException(getString("_UI_NullLogEntry_exception", true)).fillInStackTrace(); //$NON-NLS-1$
+ }
+
+ if (innerLogEntry instanceof Throwable) {
+ Throwable throwable = (Throwable) innerLogEntry;
+
+ // System.err.println("Logged throwable: --------------------");
+ // throwable.printStackTrace();
+
+ String message = throwable.getLocalizedMessage();
+ if (message == null) {
+ message = ""; //$NON-NLS-1$
+ }
+
+ status = new Status(IStatus.WARNING, getBundle().getSymbolicName(), 0, message, throwable);
+ logStatus(status, nesting, appendLogger);
+ } else {
+ // System.err.println("Logged throwable: --------------------");
+ // throwable.printStackTrace();
+ status = new Status(IStatus.WARNING, getBundle().getSymbolicName(), 0, innerLogEntry.toString(), null);
+ logStatus(status, nesting, appendLogger);
+ }
+ }
+ }
+
+ private void logStatus(IStatus status, int nesting, boolean appendLogger) {
+ getLog().log(status);
+ if (appendLogger) {
+ for (IEGFLogger logger : EGFCommonPlugin.getEGFLoggers()) {
+ logger.logStatus(status, nesting);
+ }
+ }
+ }
+
+ /**
+ * Log Message Info
+ */
+
+ public void logInfo(String message) {
+ logInfo(message, 0, true);
+ }
+
+ public void logInfo(String message, boolean appendLogger) {
+ logInfo(message, 0, appendLogger);
+ }
+
+ public void logInfo(String message, int nesting) {
+ logInfo(message, nesting, true);
+ }
+
+ public void logInfo(String message, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.INFO, message, null), nesting, appendLogger);
+ }
+
+ /**
+ * Log Message and Throwable Info
+ */
+
+ public void logInfo(String message, Throwable t) {
+ logInfo(message, t, 0, true);
+ }
+
+ public void logInfo(String message, Throwable t, boolean appendLogger) {
+ logInfo(message, t, 0, appendLogger);
+ }
+
+ public void logInfo(String message, Throwable t, int nesting) {
+ logInfo(message, t, nesting, true);
+ }
+
+ public void logInfo(String message, Throwable t, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.INFO, message, t), nesting, appendLogger);
+ }
+
+ /**
+ * Log Throwable Info
+ */
+
+ public void logInfo(Throwable t) {
+ logInfo(t, 0, true);
+ }
+
+ public void logInfo(Throwable t, boolean appendLogger) {
+ logInfo(t, 0, appendLogger);
+ }
+
+ public void logInfo(Throwable t, int nesting) {
+ logInfo(t, nesting, true);
+ }
+
+ public void logInfo(Throwable t, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.INFO, t.getMessage(), t), nesting, appendLogger);
+ }
+
+ /**
+ * Log Message Error
+ */
+
+ public void logError(String message) {
+ logError(message, 0, true);
+ }
+
+ public void logError(String message, boolean appendLogger) {
+ logError(message, 0, appendLogger);
+ }
+
+ public void logError(String message, int nesting) {
+ logError(message, nesting, true);
+ }
+
+ public void logError(String message, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.ERROR, message, null), nesting, appendLogger);
+ }
+
+ /**
+ * Log Message and Throwable Error
+ */
+
+ public void logError(String message, Throwable t) {
+ logError(message, t, 0, true);
+ }
+
+ public void logError(String message, Throwable t, boolean appendLogger) {
+ logError(message, t, 0, appendLogger);
+ }
+
+ public void logError(String message, Throwable t, int nesting) {
+ logError(message, t, nesting, true);
+ }
+
+ public void logError(String message, Throwable t, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.ERROR, message, t), nesting, appendLogger);
+ }
+
+ /**
+ * Log Throwable Error
+ */
+
+ public void logError(Throwable t) {
+ logError(t, 0, true);
+ }
+
+ public void logError(Throwable t, boolean appendLogger) {
+ logError(t, 0, appendLogger);
+ }
+
+ public void logError(Throwable t, int nesting) {
+ logError(t, nesting, true);
+ }
+
+ public void logError(Throwable t, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.ERROR, t.getMessage(), t), nesting, appendLogger);
+ }
+
+ /**
+ * Log Message Warning
+ */
+
+ public void logWarning(String message) {
+ logWarning(message, 0, true);
+ }
+
+ public void logWarning(String message, boolean appendLogger) {
+ logWarning(message, 0, appendLogger);
+ }
+
+ public void logWarning(String message, int nesting) {
+ logWarning(message, nesting, true);
+ }
+
+ public void logWarning(String message, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.WARNING, message, null), nesting, appendLogger);
+ }
+
+ /**
+ * Log Message and Throwable Warning
+ */
+
+ public void logWarning(String message, Throwable t) {
+ logWarning(message, t, 0, true);
+ }
+
+ public void logWarning(String message, Throwable t, boolean appendLogger) {
+ logWarning(message, t, 0, appendLogger);
+ }
+
+ public void logWarning(String message, Throwable t, int nesting) {
+ logWarning(message, t, nesting, true);
+ }
+
+ public void logWarning(String message, Throwable t, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.WARNING, message, t), nesting, appendLogger);
+ }
+
+ /**
+ * Log Throwable Warning
+ */
+
+ public void logWarning(Throwable t) {
+ logWarning(t, 0, true);
+ }
+
+ public void logWarning(Throwable t, boolean appendLogger) {
+ logWarning(t, 0, appendLogger);
+ }
+
+ public void logWarning(Throwable t, int nesting) {
+ logWarning(t, nesting, true);
+ }
+
+ public void logWarning(Throwable t, int nesting, boolean appendLogger) {
+ log(newStatus(IStatus.WARNING, t.getMessage(), t), nesting, appendLogger);
+ }
+
+ /**
+ * Create an IStatus
+ *
+ * @return a new IStatus
+ */
+ public IStatus newStatus(int severity, String message, Throwable exception) {
+ return new Status(severity, getSymbolicName(), 0, message, exception);
+ }
+
+}
diff --git a/org.eclipse.egf.common/src/org/eclipse/egf/common/constant/EGFCommonConstants.java b/org.eclipse.egf.common/src/org/eclipse/egf/common/constant/EGFCommonConstants.java
new file mode 100644
index 0000000..29d7b2d
--- /dev/null
+++ b/org.eclipse.egf.common/src/org/eclipse/egf/common/constant/EGFCommonConstants.java
@@ -0,0 +1,111 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.common.constant;
+
+/**
+ * @author fournier
+ */
+public interface EGFCommonConstants {
+
+ /**
+ * Internal Error constant.
+ */
+ public static final int INTERNAL_ERROR = 0;
+
+ /**
+ * Empty string constant.
+ */
+ public static final String EMPTY_STRING = ""; //$NON-NLS-1$
+
+ /**
+ * TAB character.
+ */
+ public static final char TAB_CHARACTER = '\t';
+
+ /**
+ * Slash character.
+ */
+ public static final char SLASH_CHARACTER = '/';
+
+ /**
+ * Dot character.
+ */
+ public static final char DOT_CHARACTER = '.';
+
+ /**
+ * Dot String.
+ */
+ public static final String DOT_STRING = "."; //$NON-NLS-1$
+
+ /**
+ * Comma character.
+ */
+ public static final char COMMA_CHARACTER = ',';
+
+ /**
+ * Semicolon character.
+ */
+ public static final char SEMICOLON_CHARACTER = ';';
+
+ /**
+ * Colon character.
+ */
+ public static final char COLON_CHARACTER = ':';
+
+ /**
+ * White space character.
+ */
+ public static final char WHITE_SPACE_CHARACTER = ' ';
+
+ /**
+ * End of line character.
+ */
+ public static final char EOL_CHARACTER = '\n';
+
+ /**
+ * Quote character.
+ */
+ public static final char QUOTE_CHARACTER = '"';
+
+ /**
+ * Call method prefix, that is go for the parameters (the real prefix being
+ * the method name).
+ */
+ public static final char PARENTHESIS_OPEN_CHARACTER = '(';
+
+ /**
+ * Call method suffix, that is, close parameters list, but do not end call.
+ */
+ public static final char PARENTHESIS_CLOSE_CHARACTER = ')';
+
+ /**
+ * Underscore character.
+ */
+ public static final char UNDERSCORE_CHARACTER = '_';
+
+ /**
+ * Line separator.
+ */
+ public static final String LINE_SEPARATOR = System.getProperty("line.separator"); //$NON-NLS-1$
+
+ /** Constant for the string <code>about.html</code> */
+ public final static String ABOUT_HTML_DESCRIPTOR = "about.html"; //$NON-NLS-1$
+
+ /** Constant for the string <code>plugin.properties</code> */
+ public final static String PLUGIN_PROPERTIES_DESCRIPTOR = "plugin.properties"; //$NON-NLS-1$
+
+ /** Constant for the string <code>META-INF/</code> */
+ public final static String BUNDLE_FILENAME_DIRECTORY_DESCRIPTOR = "META-INF/"; //$NON-NLS-1$
+
+ /** Constant for the string <code>META-INF/MANIFEST.MF</code> */
+ public final static String BUNDLE_FILENAME_DESCRIPTOR = BUNDLE_FILENAME_DIRECTORY_DESCRIPTOR + "MANIFEST.MF"; //$NON-NLS-1$
+
+}
diff --git a/org.eclipse.egf.common/src/org/eclipse/egf/common/cycle/AbstractBrentCycleDetection.java b/org.eclipse.egf.common/src/org/eclipse/egf/common/cycle/AbstractBrentCycleDetection.java
new file mode 100644
index 0000000..396c0b9
--- /dev/null
+++ b/org.eclipse.egf.common/src/org/eclipse/egf/common/cycle/AbstractBrentCycleDetection.java
@@ -0,0 +1,112 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.common.cycle;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ * Tortoise and hare
+ * Brent's cycle-finding algorithm
+ * http://en.wikipedia.org/wiki/Cycle_detection
+ *
+ */
+public abstract class AbstractBrentCycleDetection<T> extends AbstractCycleDetection<T> {
+
+ private double _power;
+
+ public AbstractBrentCycleDetection() {
+ this(null);
+ }
+
+ public AbstractBrentCycleDetection(T element_p) {
+ super(element_p);
+ }
+
+ @Override
+ public void setElement(T element_p) {
+ super.setElement(element_p);
+ _power = 1;
+ _tortoise = element_p;
+ _hare = move(element_p);
+ }
+
+ @Override
+ public T getFirstRepetition() {
+ // is there something to process
+ if (_solvedFirstRepetition) {
+ return _firstRepetition;
+ }
+ // Search successive powers of two
+ while (_hare != null) {
+ if (_hare.equals(_tortoise)) {
+ // The hare has caught up with the tortoise
+ _firstRepetition = _hare;
+ break;
+ }
+ if (_power == _lambda) {
+ // Time to start a new power of two
+ _tortoise = _hare;
+ _power *= 2;
+ _lambda = 0;
+ }
+ // Move
+ _hare = move(_hare);
+ _lambda += 1;
+ }
+ // The hare reached the end
+ _solvedFirstRepetition = true;
+ _solvedLambda = true;
+ return _firstRepetition;
+ }
+
+ @Override
+ public int getMu() {
+ // is there something to process
+ if (_solvedMu) {
+ return _mu;
+ }
+ // Solve Cycle if necessary
+ if (_solvedFirstRepetition == false) {
+ getFirstRepetition();
+ }
+ // Find the position of the first repetition of length lambda
+ _mu = 0;
+ _tortoise = _hare = _element;
+ for (int i = 0; i < _lambda; i++) {
+ _hare = move(_hare);
+ }
+ while (_hare != null) {
+ if (_hare.equals(_tortoise)) {
+ break;
+ }
+ _tortoise = move(_tortoise);
+ _hare = move(_hare);
+ _mu += 1;
+ }
+ // Done
+ _solvedMu = true;
+ return _mu;
+ }
+
+ @Override
+ public int getLambda() {
+ // is there something to process
+ if (_solvedLambda) {
+ return _lambda;
+ }
+ // Solve Cycle and lambda if necessary
+ if (_solvedFirstRepetition == false) {
+ getFirstRepetition();
+ }
+ return _lambda;
+ }
+
+}
diff --git a/org.eclipse.egf.common/src/org/eclipse/egf/common/cycle/AbstractCycleDetection.java b/org.eclipse.egf.common/src/org/eclipse/egf/common/cycle/AbstractCycleDetection.java
new file mode 100644
index 0000000..ae9ba10
--- /dev/null
+++ b/org.eclipse.egf.common/src/org/eclipse/egf/common/cycle/AbstractCycleDetection.java
@@ -0,0 +1,72 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.common.cycle;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public abstract class AbstractCycleDetection<T> {
+
+ protected T _element;
+
+ protected T _tortoise; // slower moving element
+
+ protected T _hare; // faster moving element
+
+ protected T _firstRepetition;
+
+ protected boolean _solvedFirstRepetition;
+
+ protected int _mu;
+
+ protected boolean _solvedMu;
+
+ protected int _lambda;
+
+ protected boolean _solvedLambda;
+
+ public AbstractCycleDetection(T element_p) {
+ setElement(element_p);
+ }
+
+ public T getElement() {
+ return _element;
+ }
+
+ public void setElement(T element_p) {
+ _firstRepetition = null;
+ _solvedFirstRepetition = false;
+ _lambda = 1;
+ _solvedLambda = false;
+ _mu = 0;
+ _solvedMu = false;
+ _element = element_p;
+ }
+
+ protected T move(T element_p) {
+ if (element_p == null) {
+ return null;
+ }
+ return next(element_p);
+ }
+
+ protected abstract T next(T element_p);
+
+ public abstract T getFirstRepetition();
+
+ public abstract int getMu();
+
+ public int getLambda() {
+ return _lambda;
+ }
+
+}
diff --git a/org.eclipse.egf.common/src/org/eclipse/egf/common/cycle/AbstractFloydCycleDetection.java b/org.eclipse.egf.common/src/org/eclipse/egf/common/cycle/AbstractFloydCycleDetection.java
new file mode 100644
index 0000000..1fdea13
--- /dev/null
+++ b/org.eclipse.egf.common/src/org/eclipse/egf/common/cycle/AbstractFloydCycleDetection.java
@@ -0,0 +1,118 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.common.cycle;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ * Tortoise and hare
+ * Floyd's cycle-finding algorithm
+ * http://en.wikipedia.org/wiki/Cycle_detection
+ * http://fr.wikipedia.org/wiki/Algorithme_du_li%C3%A8vre_et_de_la_tortue
+ *
+ */
+public abstract class AbstractFloydCycleDetection<T> extends AbstractCycleDetection<T> {
+
+ public AbstractFloydCycleDetection() {
+ this(null);
+ }
+
+ public AbstractFloydCycleDetection(T element_p) {
+ super(element_p);
+ }
+
+ @Override
+ public void setElement(T element_p) {
+ super.setElement(element_p);
+ _tortoise = move(element_p);
+ _hare = move(move(element_p));
+ }
+
+ @Override
+ public T getFirstRepetition() {
+ // is there something to process
+ if (_solvedFirstRepetition) {
+ return _firstRepetition;
+ }
+ // Search
+ while (_hare != null) {
+ if (_hare.equals(_tortoise)) {
+ // The hare has caught up with the tortoise
+ _firstRepetition = _hare;
+ break;
+ }
+ if (move(_hare) == null) {
+ // The hare reached the end
+ break;
+ }
+ // The hare moves twice as quickly as the tortoise
+ _tortoise = move(_tortoise);
+ _hare = move(move(_hare));
+ }
+ // The hare reached the end
+ _solvedFirstRepetition = true;
+ return _firstRepetition;
+ }
+
+ @Override
+ public int getMu() {
+ // is there something to process
+ if (_solvedMu) {
+ return _mu;
+ }
+ // Solve Cycle if necessary
+ if (_solvedFirstRepetition == false) {
+ getFirstRepetition();
+ }
+ // Find the position of the first repetition of length lambda
+ // The hare and tortoise move at the same speeds
+ _mu = 0;
+ _tortoise = _hare = _element;
+ while (_hare != null) {
+ if (_hare.equals(_tortoise)) {
+ break;
+ }
+ _tortoise = move(_tortoise);
+ _hare = move(_hare);
+ _mu += 1;
+ }
+ // Done
+ _solvedMu = true;
+ return _mu;
+ }
+
+ @Override
+ public int getLambda() {
+ // is there something to process
+ if (_solvedLambda) {
+ return _lambda;
+ }
+ // Solve mu if necessary
+ if (_solvedMu == false) {
+ getMu();
+ }
+ // Find the length of the shortest cycle starting from _firstRepetitionPosition
+ // The hare moves while the tortoise stays still
+ _lambda = 1;
+ _hare = move(_tortoise);
+ while (_hare != null) {
+ if (_hare.equals(_tortoise)) {
+ break;
+ }
+ _hare = move(_hare);
+ _lambda += 1;
+ }
+ // Done
+ _solvedLambda = true;
+ return _lambda;
+ }
+
+}
diff --git a/org.eclipse.egf.common/src/org/eclipse/egf/common/generator/IEgfGeneratorConstants.java b/org.eclipse.egf.common/src/org/eclipse/egf/common/generator/IEgfGeneratorConstants.java
new file mode 100644
index 0000000..d27f79a
--- /dev/null
+++ b/org.eclipse.egf.common/src/org/eclipse/egf/common/generator/IEgfGeneratorConstants.java
@@ -0,0 +1,38 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.common.generator;
+
+/**
+ * @author fournier
+ */
+public interface IEgfGeneratorConstants {
+
+ /**
+ * Define source folder where model API are produced.
+ */
+ public static final String SRC_FOLDER = "src"; //$NON-NLS-1$
+
+ /**
+ * A path to a file that should exist in every hosting project.
+ */
+ public static final String PROJECT_ROOT_FILE = "/META-INF/MANIFEST.MF"; //$NON-NLS-1$
+
+ /**
+ * Generated util Java packages prefix.
+ */
+ public static final String GENERATED_UTIL_JAVA_PACKAGE_SUFFIX = ".util"; //$NON-NLS-1$
+
+ /**
+ * Generated implementation Java packages prefix.
+ */
+ public static final String GENERATED_IMPL_JAVA_PACKAGE_SUFFIX = ".impl"; //$NON-NLS-1$
+
+}
diff --git a/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/BundleHelper.java b/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/BundleHelper.java
new file mode 100644
index 0000000..350bb1f
--- /dev/null
+++ b/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/BundleHelper.java
@@ -0,0 +1,178 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.common.helper;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.core.plugin.ModelEntry;
+import org.eclipse.pde.core.plugin.PluginRegistry;
+import org.osgi.framework.Bundle;
+
+/**
+ * This helper provides high-level services to deal with class loading.
+ *
+ * @author Xavier Maysonnave
+ */
+public class BundleHelper {
+
+ private BundleHelper() {
+ // Prevent Instantiation
+ }
+
+ /**
+ * Instantiate given fully qualified class name using given bundle.
+ *
+ * @param fqcn
+ * the fully qualified class name with its package name (dot separated syntax).
+ * @param bundle
+ * which can load given class name.
+ * @return an instance of given class name
+ */
+ public static Object instantiate(String fqcn, Bundle bundle) throws ClassNotFoundException, InstantiationException, IllegalAccessException {
+ // Precondition.
+ if (fqcn == null || fqcn.trim().length() == 0 || bundle == null) {
+ return null;
+ }
+ // Try loading a class according to the class name.
+ Class<?> clazz = loadClass(fqcn, bundle);
+ // Try instantiating an object of loaded class.
+ if (clazz != null) {
+ return clazz.newInstance();
+ }
+ return null;
+ }
+
+ /**
+ * Load given fully qualified class name using given bundle.
+ *
+ * @param fqcn
+ * the fully qualified class name with its package name (dot separated syntax).
+ * @param bundle
+ * bundle which can load given class name.
+ * @return loaded Class according to given class name
+ */
+ public static Class<?> loadClass(String fqcn, Bundle bundle) throws ClassNotFoundException {
+ Class<?> clazz = null;
+ // Precondition.
+ if (fqcn == null || fqcn.trim().length() == 0 || bundle == null) {
+ return clazz;
+ }
+ return bundle.loadClass(fqcn.trim());
+ }
+
+ /**
+ * Unique ID based on ModelEntry
+ */
+ public static String getBundleId(ModelEntry entry) {
+ if (entry == null) {
+ return null;
+ }
+ String id = entry.getId();
+ if (id == null || id.trim().length() == 0) {
+ return null;
+ }
+ return id.trim();
+ }
+
+ /**
+ * Unique ID based on bundle symbolic name
+ */
+ public static String getBundleId(IPluginModelBase model) {
+ if (model == null || model.getPluginBase() == null) {
+ return null;
+ }
+ if (model.getUnderlyingResource() != null && model.getUnderlyingResource().getProject() != null) {
+ return getBundleId(model.getUnderlyingResource().getProject());
+ }
+ String id = model.getPluginBase().getId();
+ if (id == null || id.trim().length() == 0) {
+ return null;
+ }
+ return id.trim();
+ }
+
+ /**
+ * Unique ID based on project
+ */
+ public static String getBundleId(IProject project) {
+ if (project == null) {
+ return null;
+ }
+ String id = null;
+ IPluginModelBase model = getPluginModelBase(project);
+ if (model != null) {
+ id = model.getPluginBase().getId();
+ }
+ if (id == null) {
+ id = project.getName();
+ }
+ if (id == null || id.trim().length() == 0) {
+ return null;
+ }
+ return id.trim();
+ }
+
+ /**
+ * Unique ID based on resource
+ */
+ public static String getBundleId(IResource resource) {
+ if (resource == null) {
+ return null;
+ }
+ return getBundleId(resource.getProject());
+ }
+
+ /**
+ * Get the plug-in model base for given path.
+ *
+ * @param path
+ * @return an {@link IPluginModelBase} instance or null if the project is not
+ * a plug-in.
+ */
+ public static IPluginModelBase getPluginModelBase(IPath path) {
+ if (path == null || path.segmentCount() < 2) {
+ return null;
+ }
+ return getPluginModelBase(ResourcesPlugin.getWorkspace().getRoot().getProject(path.segment(0)));
+ }
+
+ /**
+ * Get the plug-in model base for given resource.
+ *
+ * @param resource
+ * @return an {@link IPluginModelBase} instance or null if the project is not
+ * a plug-in.
+ */
+ public static IPluginModelBase getPluginModelBase(IResource resource) {
+ if (resource == null) {
+ return null;
+ }
+ return getPluginModelBase(resource.getProject());
+ }
+
+ /**
+ * Get the plug-in model base for given project.
+ *
+ * @param project
+ * @return an {@link IPluginModelBase} instance or null if the project is not
+ * a plug-in.
+ */
+ public static IPluginModelBase getPluginModelBase(IProject project) {
+ if (project == null) {
+ return null;
+ }
+ return PluginRegistry.findModel(project);
+ }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/ClassHelper.java b/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/ClassHelper.java
new file mode 100644
index 0000000..1fe06fc
--- /dev/null
+++ b/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/ClassHelper.java
@@ -0,0 +1,36 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.common.helper;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class ClassHelper {
+
+ private ClassHelper() {
+ // Prevent Instantiation
+ }
+
+ public static boolean asSubClass(Class<?> clazz, Class<?> type) {
+ if (clazz == null || type == null) {
+ return false;
+ }
+ // Type Checking
+ try {
+ clazz.asSubclass(type);
+ } catch (ClassCastException cce) {
+ return false;
+ }
+ return true;
+ }
+
+}
diff --git a/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/EMFHelper.java b/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/EMFHelper.java
new file mode 100644
index 0000000..a759188
--- /dev/null
+++ b/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/EMFHelper.java
@@ -0,0 +1,340 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.common.helper;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.egf.common.EGFCommonPlugin;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.EcoreUtil.CrossReferencer;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class EMFHelper {
+
+ // back-up for unregistered packages
+ private static AdapterFactory __defaultFactory = new ReflectiveItemProviderAdapterFactory();
+
+ private static AdapterFactory __factory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
+
+ private EMFHelper() {
+ // Prevent instantiation
+ }
+
+ public static IResource getWorkspaceResource(Resource resource) {
+ if (resource == null) {
+ return null;
+ }
+ URI uri = resource.getURI();
+ if (uri.isPlatformResource()) {
+ String platformString = uri.toPlatformString(true);
+ return ResourcesPlugin.getWorkspace().getRoot().findMember(platformString);
+ }
+ return null;
+ }
+
+ /**
+ * Get root package for given one.<br>
+ * Root package being the eldest parent package.
+ *
+ * @param ePackage
+ * @return
+ */
+ public static EPackage getRootPackage(EPackage ePackage) {
+ if (ePackage == null) {
+ EGFCommonPlugin.getDefault().logWarning("Unable to solve a Root EPackage for a null EPackage"); //$NON-NLS-1$
+ return null;
+ }
+ EPackage result = null;
+ EPackage rootPackage = ePackage;
+ while (rootPackage != null) {
+ result = rootPackage;
+ rootPackage = result.getESuperPackage();
+ }
+ if (result == null) {
+ EGFCommonPlugin.getDefault().logWarning(NLS.bind("Unable to solve a Root EPackage for {0}", ePackage)); //$NON-NLS-1$
+ }
+ return result;
+ }
+
+ /**
+ * Get static ecore package from serialized one.<br>
+ * That implies that the corresponding ecore model has been generated once.
+ *
+ * @param ePackage
+ * @return null if no generated package could be found.
+ */
+ public static EPackage getStaticPackage(EPackage ePackage) {
+ EPackage ePackageStatic = null;
+ // Get the equivalent from the Global EPackage registry.
+ Object staticPackage = null;
+ if (ePackage != null && ePackage.getNsURI() != null) {
+ staticPackage = EPackage.Registry.INSTANCE.get(ePackage.getNsURI());
+ }
+ if (staticPackage != null) {
+ if (staticPackage instanceof EPackage) {
+ ePackageStatic = (EPackage) staticPackage;
+ } else if (staticPackage instanceof EPackage.Descriptor) {
+ ePackageStatic = ((EPackage.Descriptor) staticPackage).getEPackage();
+ }
+ } else {
+ if (ePackage != null) {
+ EGFCommonPlugin.getDefault().logWarning(NLS.bind("Unable to get static EPackage for {0}", ePackage)); //$NON-NLS-1$
+ } else {
+ EGFCommonPlugin.getDefault().logWarning("Unable to get static EPackage"); //$NON-NLS-1$
+ }
+ ePackageStatic = ePackage;
+ }
+ return ePackageStatic;
+ }
+
+ public static EClassifier solveAgainstStaticPackage(EClassifier eClassifier) {
+ if (eClassifier == null) {
+ return null;
+ }
+ EPackage ePackage = getStaticPackage(getRootPackage(eClassifier.getEPackage()));
+ if (ePackage != null && ePackage.eResource() != null) {
+ URI uri = EcoreUtil.getURI(eClassifier);
+ if (uri == null) {
+ return eClassifier;
+ }
+ EObject eObject = ePackage.eResource().getEObject(uri.fragment());
+ EClassifier solvedEClassifier = eObject instanceof EClassifier ? (EClassifier) eObject : eObject.eClass();
+ if (solvedEClassifier != null) {
+ return solvedEClassifier;
+ }
+ } else {
+ EGFCommonPlugin.getDefault().logWarning(NLS.bind("Unable to solve EClassifier {0} against its static EPackage", eClassifier)); //$NON-NLS-1$
+ }
+ return eClassifier;
+ }
+
+ public static EObject solveAgainstStaticPackage(EPackage ePackage, EObject eObject) {
+ if (eObject == null) {
+ return null;
+ }
+ EPackage solvedEPackage = getStaticPackage(getRootPackage(ePackage));
+ if (solvedEPackage != null && solvedEPackage.eResource() != null) {
+ URI uri = EcoreUtil.getURI(eObject);
+ if (uri == null) {
+ return eObject;
+ }
+ EObject solvedEObject = solvedEPackage.eResource().getEObject(uri.fragment());
+ if (solvedEObject != null) {
+ return solvedEObject;
+ }
+ } else {
+ EGFCommonPlugin.getDefault().logWarning(NLS.bind("Unable to solve EObject {0} against its static EPackage", eObject)); //$NON-NLS-1$
+ }
+ return eObject;
+ }
+
+ /**
+ * Obtains a textual representation of the specified object, as for
+ * display in messages. If no suitable factory is registered for model element,
+ * then the EMF reflective item provider is used.
+ *
+ * @param object
+ * the model element for which to get text
+ * @return the corresponding text
+ */
+ public static String getText(Object object) {
+ if (object == null || object instanceof EObject == false) {
+ if (object == null) {
+ return null;
+ }
+ return object.toString();
+ }
+ EObject eObject = (EObject) object;
+ IItemLabelProvider provider = (IItemLabelProvider) __factory.adapt(eObject, IItemLabelProvider.class);
+ if (provider == null) {
+ // for backward compatibility, try looking in the resource set
+ provider = (IItemLabelProvider) getRegisteredAdapter(eObject, IItemLabelProvider.class);
+ }
+ if (provider == null) {
+ provider = (IItemLabelProvider) __defaultFactory.adapt(eObject, IItemLabelProvider.class);
+ }
+ String result = provider.getText(eObject);
+ if (result != null) {
+ // don't want leading or trailing blanks in messages
+ result = result.trim();
+ }
+ return result;
+ }
+
+ /**
+ * Obtains an IItemLabelProvider of the specified model element, as for
+ * display in messages. If no suitable factory is registered, then
+ * the EMF reflective item provider is used.
+ *
+ * @param eObject
+ * the model element for which to get text
+ * @return the corresponding text
+ */
+ public static IItemLabelProvider getItemLabelProvider(EObject eObject) {
+ if (eObject == null) {
+ return null;
+ }
+ IItemLabelProvider provider = (IItemLabelProvider) __factory.adapt(eObject, IItemLabelProvider.class);
+ if (provider == null) {
+ // for backward compatibility, try looking in the resource set
+ provider = (IItemLabelProvider) getRegisteredAdapter(eObject, IItemLabelProvider.class);
+ }
+ if (provider == null) {
+ provider = (IItemLabelProvider) __defaultFactory.adapt(eObject, IItemLabelProvider.class);
+ }
+ return provider;
+ }
+
+ /**
+ * Similar to the {@link EcoreUtil#getRegisteredAdapter(EObject, Object)} method, attempts to
+ * adapt the given <code>eObject</code> to the
+ * specified <code>type</code> using adapter factories registered on its
+ * resource set. The difference is, that this method anticipates that
+ * adapter factories from multiple disjoint metamodels may be registered,
+ * that adapt different kinds of objects to the same types. This method
+ * will try them all until it either gets a successful adaptation or runs
+ * out of factories.
+ *
+ * @param eObject
+ * the model element to adapt
+ * @param type
+ * indicates the type of adapter to obtain
+ * @return the available registered adapter, or <code>null</code> if no
+ * suitable adapter factory is found
+ */
+ private static Object getRegisteredAdapter(EObject eObject, Object type) {
+ Object result = EcoreUtil.getExistingAdapter(eObject, type);
+ if (result == null) {
+ Resource resource = eObject.eResource();
+ if (resource != null) {
+ ResourceSet resourceSet = resource.getResourceSet();
+ if (resourceSet != null) {
+ List<AdapterFactory> factories = resourceSet.getAdapterFactories();
+ // iterate only as long as we don't find an adapter factory
+ // that successfully adapted the eObject
+ for (Iterator<AdapterFactory> iter = factories.iterator(); iter.hasNext() && (result == null);) {
+ AdapterFactory next = iter.next();
+ if (next.isFactoryForType(type)) {
+ result = next.adapt(eObject, type);
+ }
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * A cross referencer that finds resolved proxies against a particular URI while
+ * ignoring non resolved proxies.
+ */
+ public static class URIProxyCrossReferencer extends CrossReferencer {
+
+ private static final long serialVersionUID = 1L;
+
+ private URI _uri;
+
+ /**
+ * Creates an instance for the given resource.
+ *
+ * @param resource
+ * the resource to cross reference.
+ */
+ protected URIProxyCrossReferencer(Resource resource, URI uri) {
+ super(Collections.singleton(resource));
+ _uri = uri;
+ }
+
+ /**
+ * Return true if potential cross references that are proxies should be resolved.
+ *
+ * @return if the cross referencer should resolve proxies.
+ */
+ @Override
+ protected boolean resolve() {
+ return false;
+ }
+
+ /**
+ * Return true if the specified eReference from eObject to crossReferencedEObject should be
+ * considered a cross reference by this cross referencer.
+ *
+ * @param eObject
+ * an object in the cross referencer's content tree.
+ * @param eReference
+ * a reference from the object.
+ * @param crossReferencedEObject
+ * the target of the specified reference.
+ * @return if the cross referencer should consider the specified reference a cross reference.
+ */
+ @Override
+ protected boolean crossReference(EObject eObject, EReference eReference, EObject crossReferencedEObject) {
+ if (crossReferencedEObject.eIsProxy() == false) {
+ return false;
+ }
+ URI uri = EcoreUtil.getURI(crossReferencedEObject);
+ if (uri == null) {
+ return false;
+ }
+ uri = uri.trimFragment();
+ if (_uri.equals(uri)) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Returns the map of proxy references for this cross referencer.
+ *
+ * @return a map of cross references.
+ */
+ protected Map<EObject, Collection<EStructuralFeature.Setting>> findProxyCrossReferences() {
+ crossReference();
+ done();
+ return this;
+ }
+
+ /**
+ * Returns a map of all proxy references from the specified content tree.
+ *
+ * @param resource
+ * a resource whose content tree should be considered.
+ * @return a map of cross references.
+ */
+ public static Map<EObject, Collection<EStructuralFeature.Setting>> find(Resource resource, URI uri) {
+ return new URIProxyCrossReferencer(resource, uri).findProxyCrossReferences();
+ }
+
+ }
+
+}
diff --git a/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/ExtensionPointHelper.java b/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/ExtensionPointHelper.java
new file mode 100644
index 0000000..2dab516
--- /dev/null
+++ b/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/ExtensionPointHelper.java
@@ -0,0 +1,325 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+/**
+ *
+ */
+package org.eclipse.egf.common.helper;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.egf.common.EGFCommonPlugin;
+import org.eclipse.egf.common.constant.EGFCommonConstants;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author fournier
+ */
+public class ExtensionPointHelper {
+
+ private ExtensionPointHelper() {
+ // Prevent Instantiation
+ }
+
+ /**
+ * Define a constant for the attribute named <code>class</code> in
+ * ExtensionPoint tab of plug-in xml files.
+ */
+ public static final String ATT_CLASS = "class"; //$NON-NLS-1$
+
+ /**
+ * Define a constant for the attribute named <code>name</code> in
+ * ExtensionPoint tab of plug-in xml files.
+ */
+ public static final String ATT_NAME = "name"; //$NON-NLS-1$
+
+ /**
+ * Define a constant for the attribute named <code>id</code> in ExtensionPoint
+ * tab of plug-in xml files.
+ */
+ public static final String ATT_ID = "id"; //$NON-NLS-1$
+
+ /**
+ * Define a constant for the element named <code>description</code> in
+ * ExtensionPoint tab of plug-in xml files.
+ */
+ public static final String ELEMENT_DESCRIPTION = "description"; //$NON-NLS-1$
+
+ /**
+ * Get the configuration elements for a specified plugin id & extension point
+ * id.
+ *
+ * @param pluginId
+ * the identifier of the plugin.
+ * @param extensionPointId
+ * the simple identifier of the extension point.
+ * @return an array of {@link IConfigurationElement} or an empty array if the
+ * extension point does not exist,has no extensions configured, or
+ * none of the extensions contain configuration elements.
+ */
+ public static IConfigurationElement[] getConfigurationElements(String pluginId, String extensionPointId) {
+ return Platform.getExtensionRegistry().getConfigurationElementsFor(pluginId, extensionPointId);
+ }
+
+ /**
+ * Get the extensions for identified plug-in extension point coming from an
+ * identified plug-in.
+ *
+ * @param pluginId
+ * The identifier of the plug-in declaring the extension point.
+ * @param extensionPointId
+ * The extension point id.
+ * @param extensionDeclaringPluginId
+ * The identifier of the plug-in potentially declaring extensions for
+ * this extension point.
+ * @return an array of {@link IConfigurationElement}. Empty if no extension
+ * could be found with given criteria.
+ */
+ public static IConfigurationElement[] getConfigurationElements(String pluginId, String extensionPointId, String extensionDeclaringPluginId) {
+ List<IConfigurationElement> resultingElements = new ArrayList<IConfigurationElement>();
+ IConfigurationElement[] allElements = getConfigurationElements(pluginId, extensionPointId);
+ for (IConfigurationElement configurationElement : allElements) {
+ if (isDeclaredBy(configurationElement, extensionDeclaringPluginId)) {
+ resultingElements.add(configurationElement);
+ }
+ }
+ return resultingElements.toArray(new IConfigurationElement[resultingElements.size()]);
+ }
+
+ /**
+ * Is given configuration element declared by identified plug-in ?<br>
+ * That is, is it read from the plugin.xml coming with identified plug-in ?
+ *
+ * @param configurationElement
+ * @param pluginId
+ * @return
+ */
+ public static boolean isDeclaredBy(IConfigurationElement configurationElement, String pluginId) {
+ return configurationElement != null && pluginId != null && pluginId.equals(configurationElement.getContributor().getName());
+ }
+
+ /**
+ * Get the configuration element for specified parameters.
+ *
+ * @param pluginId
+ * the identifier of the plugin.
+ * @param extensionId
+ * the short identifier of the extension point.
+ * @param idValue
+ * the value of the 'id' attribute declared into the extension point.
+ * @return a {@link IConfigurationElement} instance or null if the specified
+ * extension is not found.
+ */
+ public static IConfigurationElement getConfigurationElement(String pluginId, String extensionId, String idValue) {
+ return getConfigurationElement(pluginId, extensionId, ATT_ID, idValue);
+ }
+
+ /**
+ * Get the configuration element for specified parameters.
+ *
+ * @param pluginId
+ * the identifier of the plugin.
+ * @param extensionId
+ * the short identifier of the extension point.
+ * @param attributeName
+ * the attribute name.
+ * @param attributeValue
+ * the attribute value.
+ * @return a {@link IConfigurationElement} instance or null if the specified
+ * extension is not found.
+ */
+ public static IConfigurationElement getConfigurationElement(String pluginId, String extensionId, String attributeName, String attributeValue) {
+ IConfigurationElement[] configElements = getConfigurationElements(pluginId, extensionId);
+ IConfigurationElement result = null;
+ for (int i = 0; i < configElements.length && (null == result); i++) {
+ IConfigurationElement configElement = configElements[i];
+ // Check if attribute value is the expected one.
+ if (hasValue(configElement, attributeName, attributeValue)) {
+ result = configElement;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Is given configuration element containing an attribute named
+ * <code>attName_p</code> with value set to given one ?
+ *
+ * @param configurationElement
+ * @param attributeName
+ * @param attributeValue
+ * @return
+ */
+ public static boolean hasValue(IConfigurationElement configurationElement, String attributeName, String attributeValue) {
+ boolean result = false;
+ // Preconditions.
+ if (configurationElement == null || attributeName == null || attributeValue == null) {
+ return result;
+ }
+ // Get attribute value for the configuration element.
+ String innerAttributeValue = configurationElement.getAttribute(attributeName);
+ // Compare it with given one.
+ result = attributeValue.equals(innerAttributeValue);
+ return result;
+ }
+
+ /**
+ * Return the value of the "id" attribute for given configuration element.
+ *
+ * @param configurationElement
+ * @return null if given element is null, or has no attribute named "id".
+ */
+ public static String getId(IConfigurationElement configurationElement) {
+ String result = null;
+ if (configurationElement != null) {
+ result = configurationElement.getAttribute(ATT_ID);
+ }
+ return result;
+ }
+
+ /**
+ * Return the value of the "id" attribute for given configuration element.
+ *
+ * @param configurationElement
+ * @return null if given element is null, or has no attribute named "id".
+ */
+ public static String getAttributeValue(IConfigurationElement configurationElement, String attribute) {
+ String result = null;
+ if (configurationElement != null && attribute != null) {
+ result = configurationElement.getAttribute(attribute);
+ }
+ return result;
+ }
+
+ /**
+ * Create an executable extension for a specified plugin's id & extension
+ * point id, matching an attribute's value.<br>
+ * The extension point must define an attribute 'class'.
+ *
+ * @param pluginId
+ * the identifier of the plugin.
+ * @param extensionPointId
+ * the simple identifier of the extension point.
+ * @param attributeId
+ * the identifier of the attribute used into the comparison. If null,
+ * matching is not performed.
+ * @param attributeValue
+ * the value of the attribute used for comparison matching. If null,
+ * matching is not performed.
+ * @return an instance of the interface regarding the attribute 'class'
+ * @see ATT_CLASS
+ */
+ public static Object createExecutableExtension(String pluginId, String extensionPointId, String attributeId, String attributeValue) throws CoreException {
+ IConfigurationElement[] configElements = getConfigurationElements(pluginId, extensionPointId);
+ if (configElements.length == 0) {
+ throw new CoreException(EGFCommonPlugin.getDefault().newStatus(IStatus.ERROR, NLS.bind("ExtensionPointHelper.createExecutableExtension(..) _ extensionPointId ''{0}'' should exist.", extensionPointId), null)); //$NON-NLS-1$
+ }
+ boolean isMatchingImperative = false;
+ // Test if matching is imperative
+ if (attributeId != null && attributeValue != null) {
+ isMatchingImperative = true;
+ }
+ // Loop over configuration until object is created.
+ for (int i = 0; i < configElements.length; i++) {
+ IConfigurationElement configElement = configElements[i];
+ boolean isExecutableExtensionCreatable = true;
+ if (isMatchingImperative) {
+ // Perform matching on the attribute defined by an
+ // identifier
+ String innerAttributeValue = configElement.getAttribute(attributeId);
+ // If different, do not instantiate the object.
+ if (attributeValue.equals(innerAttributeValue) == false) {
+ isExecutableExtensionCreatable = false;
+ }
+ }
+ if (isExecutableExtensionCreatable) {
+ return createInstance(configElement);
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Create an executable extension for given parameters.<br>
+ * The extension point must define an attribute 'class'.
+ *
+ * @param pluginId
+ * the plug-in that exposes the extension point.
+ * @param extensionPointId
+ * the extension point containing an attribute 'class' to
+ * instantiate.
+ * @param idValue
+ * the extension id value (attribute 'id') that matches the extension
+ * point estensionPointId_p.<br>
+ * If null, comparison is not performed.
+ * @return an Object instance if instantiation is successful; null otherwise.
+ */
+ public static Object createExecutableExtension(String pluginId, String extensionPointId, String idValue) throws CoreException {
+ return createExecutableExtension(pluginId, extensionPointId, ATT_ID, idValue);
+ }
+
+ /**
+ * Create an object instance for specified parameters.
+ *
+ * @param configurationElement
+ * a configuration element loaded from an extension point.
+ * @return an Object instance if instantiation is successful; null otherwise.
+ */
+ public static Object createInstance(IConfigurationElement configurationElement) throws CoreException {
+ return createInstance(configurationElement, ATT_CLASS);
+ }
+
+ /**
+ * Create an object instance for specified parameters.
+ *
+ * @param configurationElement
+ * a configuration element loaded from an extension point.
+ * @param attributeName
+ * the attribute that hosts the java type.
+ * @return an Object instance if instantiation is successful; null otherwise.
+ */
+ public static Object createInstance(IConfigurationElement configurationElement, String attributeName) throws CoreException {
+ return configurationElement.createExecutableExtension(attributeName);
+ }
+
+ /**
+ * Return the fully qualified extension-point id from given parameters.
+ *
+ * @param pluginId
+ * the id of the plug-in that defines the extension-point.
+ * @param extensionPointId
+ * the short id of the extension-point.
+ * @return the fully qualified extension-point id : <code>'plug-in id.'extension-point id'.
+ */
+ public static String getExtensionPointId(String pluginId, String extensionPointId) {
+ return new StringBuilder(pluginId).append(EGFCommonConstants.DOT_STRING).append(extensionPointId).toString();
+ }
+
+ /**
+ * Get the bundleId of this IConfigurationElement
+ *
+ * @param configurationElement
+ * a configuration element
+ * @return a {@link String} instance or null if the specified
+ * extension is not found.
+ */
+ public static String getNamespace(IConfigurationElement configurationElement) {
+ if (configurationElement == null) {
+ return null;
+ }
+ return configurationElement.getContributor().getName();
+ }
+
+}
diff --git a/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/FileHelper.java b/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/FileHelper.java
new file mode 100644
index 0000000..be49e39
--- /dev/null
+++ b/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/FileHelper.java
@@ -0,0 +1,546 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.common.helper;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.nio.ByteBuffer;
+import java.nio.channels.FileChannel;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.egf.common.EGFCommonPlugin;
+import org.eclipse.egf.common.constant.EGFCommonConstants;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.core.plugin.PluginRegistry;
+
+/**
+ * @author brocard
+ */
+public class FileHelper {
+
+ private FileHelper() {
+ // Prevent Instantiation
+ }
+
+ /**
+ * Get file full url from relative one.
+ *
+ * @param fileRelativePath_p
+ * File path relative to workspace.<br>
+ * It <b>must</b> start with <i>pluginId</i>. It is also recommended
+ * that both plug-in id and plug-in project names are the same.<br>
+ * As a convenience, the full path will refer to the plug-in id.<br>
+ * <b>Example</b> :
+ * <i>com.thalesgroup.mde.mdsofa/model/example.ecore</i> is a path
+ * relative to the workspace that refers to the
+ * <i>com.thalesgroup.mde.mdsofa plug-in</i>, having a
+ * <i>model/example.ecore</i> file in its project.<br>
+ * In Eclipse resource system, such a path is considered as an
+ * absolute one against the workspace root.<br>
+ * It's still referred to as a relative path, since the returned URL
+ * is absolute in the file system.
+ * @return
+ */
+ public static URL getFileFullUrl(String fileRelativePath_p) {
+ // Get the URI for given relative path.
+ return getFileFullUrl(getFileFullUri(fileRelativePath_p));
+ }
+
+ /**
+ * Get file full url from its full uri.<br>
+ * See {@link #getFileFullUri(String)} method.
+ *
+ * @param fileFullUri_p
+ * @return
+ */
+ public static URL getFileFullUrl(URI fileFullUri_p) {
+ URL result = null;
+ // Resolve url from returned uri.
+ try {
+ result = FileLocator.resolve(new URL(fileFullUri_p.toString()));
+ } catch (Exception e) {
+ StringBuilder msg = new StringBuilder("FileHelper.getFileFullPath(..) _ "); //$NON-NLS-1$
+ msg.append("Unable to resolve the url for ").append(fileFullUri_p.toString()); //$NON-NLS-1$
+ EGFCommonPlugin.getDefault().logError(msg.toString(), e);
+ }
+ return result;
+ }
+
+ /**
+ * Get a file uri from relative one which is not resolved against the eclipse
+ * platform.<br>
+ * The returned uri starts with either 'platform:/plug-in/' or
+ * 'platform:/resource/'.
+ *
+ * @param fileRelativePath_p
+ * File path relative to workspace.<br>
+ * It <b>must</b> start with <i>pluginId</i>. It is also recommended
+ * that both plug-in id and plug-in project names are the same.<br>
+ * As a convenience, the full path will refer to the plug-in id.<br>
+ * <b>Example</b> :
+ * <i>com.thalesgroup.mde.mdsofa/model/example.ecore</i> is a path
+ * relative to the workspace that refers to the
+ * <i>com.thalesgroup.mde.mdsofa plug-in</i>, having a
+ * <i>model/example.ecore</i> file in its project.
+ * @return an {@link URI} not resolved against the eclipse platform.<br>
+ */
+ public static URI getFileFullUri(String fileRelativePath_p) {
+ URI fileUri = null;
+ // Precondition.
+ if (fileRelativePath_p == null) {
+ return fileUri;
+ }
+ // Find plug-in model base from relative first segment.
+ IPath path = new Path(fileRelativePath_p);
+ IPluginModelBase modelBase = PluginRegistry.findModel(path.segment(0));
+ // Get underlying resource.
+ IResource resource = modelBase != null ? modelBase.getUnderlyingResource() : null;
+ if (resource != null) { // Resource found, the file is in the workspace.
+ fileUri = URI.createPlatformResourceURI(fileRelativePath_p, true);
+ } else { // Resource not found, the file is deployed elsewhere.
+ fileUri = URI.createPlatformPluginURI(fileRelativePath_p, true);
+ }
+ return fileUri;
+ }
+
+ /**
+ * Convert package name to a correct java folder path.
+ *
+ * @param packageName_p
+ * @return
+ */
+ public static String convertPackageNameToFolderPath(String packageName_p) {
+ return packageName_p != null ? packageName_p.replace(EGFCommonConstants.DOT_CHARACTER, EGFCommonConstants.SLASH_CHARACTER) : null;
+ }
+
+ /**
+ * Read given input stream as an array of bytes.
+ *
+ * @param inputStream_p
+ * @return a not null array.
+ */
+ public static byte[] readFile(InputStream inputStream_p) {
+ byte[] data = null;
+ try {
+ data = new byte[inputStream_p.available()];
+ inputStream_p.read(data);
+ } catch (Exception e) {
+ StringBuilder msg = new StringBuilder("FileHelper.readFile(..) _ "); //$NON-NLS-1$
+ msg.append("Failed to read the input stream ! "); //$NON-NLS-1$
+ EGFCommonPlugin.getDefault().logError(msg.toString(), e);
+ } finally {
+ if (inputStream_p != null) {
+ try {
+ inputStream_p.close();
+ } catch (IOException ioe) {
+ StringBuilder msg = new StringBuilder("FileHelper.readFile(..) _ "); //$NON-NLS-1$
+ msg.append("Failed to close input stream ! "); //$NON-NLS-1$
+ EGFCommonPlugin.getDefault().logError(msg.toString(), ioe);
+ }
+ }
+ }
+ // Ensure to return a not null array.
+ return (null == data) ? new byte[0] : data;
+ }
+
+ /**
+ * Read file as a string.
+ *
+ * @param filePath_p
+ * File path relative to the plug-in, plug-in id included.<br>
+ * See {@link #getFileFullUrl(String)} documentation.
+ * @return If an error occurred {@link EGFCommonConstants#EMPTY_STRING} is
+ * returned.
+ */
+ public static String readFile(String filePath_p) {
+ byte[] rawContent = readRawFile(filePath_p);
+ return rawContent.length == 0 ? EGFCommonConstants.EMPTY_STRING : new String(rawContent);
+ }
+
+ /**
+ * Get file as a stream.
+ *
+ * @param filePath_p
+ * File path relative to the plug-in, plug-in id included.<br>
+ * See {@link #getFileFullUrl(String)} documentation.
+ * @return If an error occurred null is returned.
+ */
+ public static InputStream readFileAsStream(String filePath_p) {
+ InputStream result = null;
+ // Get input stream and copy its content to resulting string.
+ URL fileURL = getFileFullUrl(filePath_p);
+ try {
+ result = fileURL.openStream();
+ } catch (Exception e) {
+ StringBuilder msg = new StringBuilder("FileHelper.readFileAsStream(..) _ "); //$NON-NLS-1$
+ msg.append("Failed to load ").append(filePath_p); //$NON-NLS-1$
+ EGFCommonPlugin.getDefault().logError(msg.toString(), e);
+ }
+ return result;
+ }
+
+ /**
+ * Read file as an array of bytes.
+ *
+ * @param filePath_p
+ * File path relative to the plug-in, plug-in id included.<br>
+ * See {@link #getFileFullUrl(String)} documentation.
+ * @return a not null array.
+ */
+ public static byte[] readRawFile(String filePath_p) {
+ byte[] result = null;
+ // Get stream from file.
+ InputStream inputStream = readFileAsStream(filePath_p);
+ // Ensure the input stream got from the file path is not null.
+ if (inputStream != null) {
+ result = readFile(inputStream);
+ }
+ return (null == result) ? new byte[0] : result;
+ }
+
+ /**
+ * Copy given source file content in given target file.
+ *
+ * @param sourceFileRelativePath_p
+ * File path relative to the plug-in, plug-in id included.<br>
+ * See {@link #getFileFullUrl(String)} documentation.
+ * @param targetFileRelativePath_p
+ * File path relative to the plug-in, plug-in id included.<br>
+ * See {@link #getFileFullUrl(String)} documentation.
+ */
+ public static void copyFile(String sourceFileRelativePath_p, String targetFileRelativePath_p) {
+ writeFile(targetFileRelativePath_p, true, readRawFile(sourceFileRelativePath_p));
+ }
+
+ /**
+ * Write given string contents at specified path.
+ *
+ * @param filePath_p
+ * File path relative to the plug-in, plug-in id included.<br>
+ * See {@link #getFileFullUrl(String)} documentation.
+ * @param ensureFolders_p
+ * Make sure all parent folders exist by creating all necessary ones.
+ * @param contents_p
+ * Contents that should be written to pointed file.
+ * @return
+ */
+ public static boolean writeFile(String filePath_p, boolean ensureFolders_p, String contents_p) {
+ return writeFile(filePath_p, ensureFolders_p, contents_p.getBytes());
+ }
+
+ /**
+ * Write given contents of bytes at specified path.
+ *
+ * @param filePath_p
+ * File path relative to the plug-in, plug-in id included.<br>
+ * See {@link #getFileFullUrl(String)} documentation.
+ * @param ensureFolders_p
+ * Make sure all parent folders exist by creating all necessary ones.
+ * @param contents_p
+ * Contents that should be written to pointed file.
+ * @return
+ */
+ public static boolean writeFile(String filePath_p, boolean ensureFolders_p, byte[] contents_p) {
+ FileChannel channel = null;
+ try {
+ // Get file full path from its relative one.
+ String fileFullPath = getFileFullUrl(filePath_p).getFile();
+ // Should path be enforced ?
+ if (ensureFolders_p) {
+ ensurePathAvailability(fileFullPath);
+ }
+ // Try and open the resulting file.
+ channel = new FileOutputStream(fileFullPath).getChannel();
+ // Write contents.
+ channel.write(ByteBuffer.wrap(contents_p));
+ } catch (Exception e) {
+ StringBuilder msg = new StringBuilder("FileHelper.writeFile(..) _ "); //$NON-NLS-1$
+ msg.append("Failed to open channel in write mode for "); //$NON-NLS-1$
+ msg.append(filePath_p).append(" !"); //$NON-NLS-1$
+ EGFCommonPlugin.getDefault().logError(msg.toString(), e);
+ return false;
+ } finally {
+ if (channel != null && channel.isOpen()) {
+ try {
+ // Close the channel.
+ channel.close();
+ } catch (IOException e) {
+ StringBuilder msg = new StringBuilder("FileHelper.writeFile(..) _ "); //$NON-NLS-1$
+ msg.append("Failed to close opened channel in write mode ! "); //$NON-NLS-1$
+ msg.append(filePath_p).append(" may no longer be usable."); //$NON-NLS-1$
+ EGFCommonPlugin.getDefault().logError(msg.toString(), e);
+ }
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Rename file from source file relative path to destination relative path.
+ *
+ * @param sourceFileRelativePath_p
+ * File path relative to the plug-in, plug-in id included.<br>
+ * See {@link #getFileFullUrl(String)} documentation.
+ * @param destinationFileRelativePath_p
+ * File path relative to the plug-in, plug-in id included.<br>
+ * See {@link #getFileFullUrl(String)} documentation.
+ * @return
+ */
+ public static boolean renameFile(String sourceFileRelativePath_p, String destinationFileRelativePath_p) {
+ // Preconditions.
+ if (sourceFileRelativePath_p == null || destinationFileRelativePath_p == null) {
+ return false;
+ }
+ IFile sourceFile = getPlatformFile(sourceFileRelativePath_p);
+ IPath destinationPath = getPlatformFile(destinationFileRelativePath_p).getFullPath();
+ return moveResource(sourceFile, destinationPath);
+ }
+
+ /**
+ * Rename folder from source folder relative path to destination relative
+ * path.
+ *
+ * @param sourceFolderRelativePath_p
+ * Folder path relative to the plug-in, plug-in id included.<br>
+ * See {@link #getFileFullUrl(String)} documentation.
+ * @param destinationFolderRelativePath_p
+ * Folder path relative to the plug-in, plug-in id included.<br>
+ * See {@link #getFileFullUrl(String)} documentation.
+ * @return
+ */
+ public static boolean renameFolder(String sourceFolderRelativePath_p, String destinationFolderRelativePath_p) {
+ // Preconditions.
+ if (sourceFolderRelativePath_p == null || destinationFolderRelativePath_p == null) {
+ return false;
+ }
+ IFolder sourceFolder = getPlatformFolder(sourceFolderRelativePath_p);
+ IPath destinationPath = getPlatformFolder(destinationFolderRelativePath_p).getFullPath();
+ return moveResource(sourceFolder, destinationPath);
+ }
+
+ /**
+ * Move resource to given destination path.
+ *
+ * @param resource_p
+ * @param destinationPath_p
+ * @return true if move occurred with no exception, false otherwise.
+ */
+ public static boolean moveResource(IResource resource_p, IPath destinationPath_p) {
+ boolean result = false;
+ try {
+ resource_p.move(destinationPath_p, true, new NullProgressMonitor());
+ result = true;
+ } catch (Exception e) {
+ StringBuilder msg = new StringBuilder("FileHelper.moveResource(..) _ "); //$NON-NLS-1$
+ msg.append("Could not move ").append(resource_p.getFullPath()); //$NON-NLS-1$
+ msg.append(" to ").append(destinationPath_p); //$NON-NLS-1$
+ EGFCommonPlugin.getDefault().logError(msg.toString(), e);
+ }
+ return result;
+ }
+
+ /**
+ * Is given file relative path pointing to an existing file ?
+ *
+ * @param fileRelativePath_p
+ * File path relative to the plug-in, plug-in id included.<br>
+ * See {@link #getFileFullUrl(String)} documentation.
+ * @return
+ */
+ public static boolean exists(String fileRelativePath_p) {
+ IFile file = getPlatformFile(fileRelativePath_p);
+ return file != null ? file.exists() : false;
+ }
+
+ /**
+ * Make sure that given path is safe to use, ie ensure that all parent folders
+ * exist.
+ *
+ * @param fileFullPath_p
+ */
+ public static void ensurePathAvailability(String fileFullPath_p) {
+ // Get rid of file extension and file name, for this has no meaning in the
+ // parent folders chain.
+ IPath parentFolderPath = new Path(fileFullPath_p).removeFileExtension().removeLastSegments(1);
+ // If it still makes sense to create a folder, go for it.
+ if (parentFolderPath.isEmpty() == false) {
+ File parentFolder = parentFolderPath.toFile();
+ // Create the chain of parent folders.
+ parentFolder.mkdirs();
+ }
+ }
+
+ /**
+ * Delete a workspace Resource. Optionally delete its parent folder if they
+ * are empty. Root folder is never deleted.
+ *
+ * @param javaProject_p
+ * @param resourcePath_p
+ */
+ public static boolean deleteResource(IFolder root_p, IResource resource_p, boolean deleteParent_p) {
+ if (resource_p == null) {
+ return false;
+ }
+ // Delete found resource member
+ if (FileHelper.deleteResource(resource_p) == false) {
+ return false;
+ }
+ // Delete children container if they are empty
+ if (root_p != null && deleteParent_p) {
+ IContainer container = resource_p.getParent();
+ while (container.equals(root_p) == false) {
+ try {
+ IResource[] members = container.members();
+ if (members == null || members.length == 0) {
+ if (FileHelper.deleteResource(container)) {
+ container = container.getParent();
+ } else {
+ break;
+ }
+ } else {
+ break;
+ }
+ } catch (CoreException ce) {
+ break;
+ }
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Delete given relative resource in the workspace.
+ *
+ * @param fileRelativePath_p
+ */
+ public static boolean deleteFile(String fileRelativePath_p) {
+ if (fileRelativePath_p == null || fileRelativePath_p.trim().length() == 0) {
+ return false;
+ }
+ return deleteResource(getPlatformFile(fileRelativePath_p));
+ }
+
+ /**
+ * Delete given relative folder in the workspace.
+ *
+ * @param workspaceRelativePath_p
+ * @return true if successfully deleted, false otherwise.
+ */
+ public static boolean deleteFolder(String folderRelativePath_p) {
+ if (folderRelativePath_p == null || folderRelativePath_p.trim().length() == 0) {
+ return false;
+ }
+ return deleteResource(getPlatformFolder(folderRelativePath_p));
+ }
+
+ /**
+ * Delete given relative resource in the workspace.
+ *
+ * @param resource_p
+ */
+ public static boolean deleteResource(IResource resource_p) {
+ if (resource_p == null || resource_p.exists() == false) {
+ return false;
+ }
+ try {
+ resource_p.delete(true, new NullProgressMonitor());
+ return true;
+ } catch (CoreException ce) {
+ StringBuilder msg = new StringBuilder("FileHelper.deleteFile(..) _ "); //$NON-NLS-1$
+ msg.append("Unable to delete file:").append(resource_p.getFullPath()); //$NON-NLS-1$
+ EGFCommonPlugin.getDefault().logError(msg.toString(), ce);
+ }
+ return false;
+ }
+
+ /**
+ * Get platform IResource as an {@link IResource} from its relative IPath.
+ *
+ * @param path_p
+ * IPath relative to workspace.<br>
+ * @return
+ */
+ public static IResource getPlatformResource(IPath path_p) {
+ // Precondition.
+ if (path_p == null) {
+ return null;
+ }
+ return ResourcesPlugin.getWorkspace().getRoot().findMember(path_p);
+ }
+
+ /**
+ * Get platform file as an {@link IResource} from its relative path.
+ *
+ * @param fileRelativePath
+ * File path relative to the plug-in, plug-in id included.<br>
+ * See {@link #getFileFullUrl(String)} documentation.
+ * @return
+ */
+ public static IFile getPlatformFile(String fileRelativePath) {
+ // Precondition.
+ if (fileRelativePath == null) {
+ return null;
+ }
+ return ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(fileRelativePath));
+ }
+
+ /**
+ * Get platform folder as an {@link IResource} from its relative path.
+ *
+ * @param folderRelativePath_p
+ * Folder path relative to the plug-in, plug-in id included.<br>
+ * See {@link #getFileFullUrl(String)} documentation.
+ * @return
+ */
+ public static IFolder getPlatformFolder(String folderRelativePath_p) {
+ // Precondition.
+ if (folderRelativePath_p == null) {
+ return null;
+ }
+ return ResourcesPlugin.getWorkspace().getRoot().getFolder(new Path(folderRelativePath_p));
+ }
+
+ /**
+ * Returns the file extension portion for given file path, <br>
+ * or <code>null</code> if there is none.<br>
+ * <p>
+ * The file extension portion is defined as the string<br>
+ * following the last period (".") character in the last segment.<br>
+ * If there is no period in the last segment, the path has no<br>
+ * file extension portion. If the last segment ends in a period,<br>
+ * the file extension portion is the empty string.<br>
+ * </p>
+ *
+ * @param filePath_p
+ * @return the file extension or <code>null</code>
+ */
+ public static String getFileExtension(String filePath_p) {
+ // Precondition.
+ if (filePath_p == null) {
+ return null;
+ }
+ return new Path(filePath_p).getFileExtension();
+ }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/JavaHelper.java b/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/JavaHelper.java
new file mode 100644
index 0000000..8628561
--- /dev/null
+++ b/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/JavaHelper.java
@@ -0,0 +1,259 @@
+/**
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S and others
+ * 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
+ *
+ */
+package org.eclipse.egf.common.helper;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.List;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.egf.common.EGFCommonPlugin;
+import org.eclipse.egf.common.l10n.EGFCommonMessages;
+import org.eclipse.emf.common.util.UniqueEList;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.osgi.util.NLS;
+
+public class JavaHelper {
+
+ private JavaHelper() {
+ // Prevent Instantiation
+ }
+
+ private static IFolder findFolder(IPath path) {
+ if (path == null) {
+ return null;
+ }
+ IResource resource = ResourcesPlugin.getWorkspace().getRoot().findMember(path);
+ if (resource == null || resource instanceof IFolder == false) {
+ return null;
+ }
+ return (IFolder) resource;
+ }
+
+ public static ClassLoader getProjectClassLoader(IJavaProject project) throws CoreException {
+ return new URLClassLoader(getURLOutputFolders(project), ProjectHelper.class.getClassLoader());
+ }
+
+ /**
+ * Get output folders.<br>
+ *
+ * @param project
+ * @return a List of IFolders
+ */
+ public static List<IFolder> getOutputFolders(IJavaProject project) throws CoreException {
+ List<IFolder> folders = new UniqueEList<IFolder>();
+ if (project == null || project.exists() == false) {
+ return folders;
+ }
+ // Default Output Location
+ IFolder folder = findFolder(project.getOutputLocation());
+ if (folder != null) {
+ folders.add(folder);
+ }
+ // Lookup in source folders
+ for (IClasspathEntry entry : project.getResolvedClasspath(true)) {
+ if (entry.getEntryKind() == IClasspathEntry.CPE_SOURCE) {
+ IFolder innerFolder = findFolder(entry.getOutputLocation());
+ if (innerFolder != null) {
+ folders.add(innerFolder);
+ }
+ }
+ }
+ return folders;
+ }
+
+ /**
+ * This will return the set of output folders name for the given
+ * project.
+ * <p>
+ * For example, if a project has a source folder "src" with its output folder
+ * set as "bin" and a source
+ * folder "src-gen" with its output folder set as "bin-gen", this will return
+ * a LinkedHashSet containing
+ * both "bin" and "bin-gen".
+ * </p>
+ *
+ * @param project
+ * The project we seek the output folders of.
+ * @return The set of output folders name for the given (java) project.
+ */
+ public static List<String> getStringOutputFolders(IJavaProject project) throws CoreException {
+ List<String> folders = new UniqueEList<String>();
+ if (project.exists() == false) {
+ return folders;
+ }
+ List<IFolder> innerFolders = getOutputFolders(project);
+ for (IFolder folder : innerFolders) {
+ folders.add(folder.getFullPath().removeFirstSegments(1).toString());
+ }
+ folders.add(project.getOutputLocation().removeFirstSegments(1).toString());
+ return folders;
+ }
+
+ private static URL[] getURLOutputFolders(IJavaProject project) throws CoreException {
+ List<String> outputFolders = getStringOutputFolders(project);
+ List<URL> urls = new UniqueEList<URL>(outputFolders.size());
+ for (String outputFolder : outputFolders) {
+ try {
+ urls.add(new URL("file", null, outputFolder)); //$NON-NLS-1$
+ } catch (MalformedURLException mue) {
+ throw new CoreException(EGFCommonPlugin.getDefault().newStatus(IStatus.ERROR, NLS.bind(EGFCommonMessages.JavaHelper_AnalysingFailure, project.getProject().getName()), mue));
+ }
+ }
+ return urls.toArray(new URL[urls.size()]);
+ }
+
+ /**
+ * Locate in source folders and Delete a java class file.
+ * Optionally delete its parent folder if they are empty.
+ * Source folder is never deleted.
+ *
+ * @param project
+ * @param path
+ * @param deleteParent
+ */
+ public static boolean deleteClass(IJavaProject project, IPath path, boolean deleteParent) throws CoreException {
+ if (project == null || path == null) {
+ return false;
+ }
+ // Retrieve the java source folder who contain the resource path
+ IFolder sourceFolder = JavaHelper.getSourceFolder(project, path);
+ if (sourceFolder == null) {
+ return false;
+ }
+ // Locate the resource path member
+ IResource resource = sourceFolder.findMember(path);
+ if (resource == null || resource instanceof IFile == false) {
+ return false;
+ }
+ // Delete found resource member
+ if (FileHelper.deleteResource(resource) == false) {
+ return false;
+ }
+ // Delete children container if they are empty
+ if (deleteParent) {
+ IContainer container = (IContainer) sourceFolder.findMember(path.removeLastSegments(1));
+ while (container.equals(sourceFolder) == false) {
+ try {
+ IResource[] members = container.members();
+ if (members == null || members.length == 0) {
+ if (FileHelper.deleteResource(container)) {
+ container = container.getParent();
+ } else {
+ break;
+ }
+ } else {
+ break;
+ }
+ } catch (CoreException ce) {
+ break;
+ }
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Get a java source IFile within a IJavaProject.<br>
+ *
+ * @param project
+ * @param path
+ * @return null if it could not be found.
+ */
+ public static IFile getSourceFile(IJavaProject project, IPath path) throws CoreException {
+ if (project == null || path == null) {
+ return null;
+ }
+ List<IFolder> folders = getSourceFolders(project);
+ // Lookup in source folders
+ for (IFolder folder : folders) {
+ // Check if a resource exist in this folder
+ IResource resource = folder.findMember(path);
+ if (resource != null && resource instanceof IFile) {
+ // We got it, we return the current java source folder
+ return (IFile) resource;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Get a java source folder who contain an IPath.<br>
+ *
+ * @param project
+ * @param path
+ * @return null if it could not be found.
+ */
+ public static IFolder getSourceFolder(IJavaProject project, IPath path) throws CoreException {
+ if (project == null || path == null) {
+ return null;
+ }
+ List<IFolder> folders = getSourceFolders(project);
+ // Lookup in source folders
+ for (IFolder folder : folders) {
+ // Check if a resource exist in this folder
+ IResource resource = folder.findMember(path);
+ if (resource != null) {
+ // We got it, we return the current java source folder
+ return folder;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Get source folders.<br>
+ *
+ * @param project
+ * @return a List of IFolders
+ */
+ public static List<IFolder> getSourceFolders(IJavaProject project) throws CoreException {
+ List<IFolder> folders = new UniqueEList<IFolder>();
+ if (project == null || project.exists() == false) {
+ return folders;
+ }
+ // Lookup in source folders
+ for (IClasspathEntry entry : project.getResolvedClasspath(true)) {
+ if (entry.getEntryKind() == IClasspathEntry.CPE_SOURCE) {
+ IFolder innerFolder = findFolder(entry.getPath());
+ if (innerFolder != null) {
+ folders.add(innerFolder);
+ }
+ }
+ }
+ return folders;
+ }
+
+ /**
+ * Get source and output folders.<br>
+ *
+ * @param project
+ * @return a List of IFolders
+ */
+ public static List<IFolder> getSourceAndOutputFolders(IJavaProject project) throws CoreException {
+ List<IFolder> folders = new UniqueEList<IFolder>();
+ folders.addAll(getSourceFolders(project));
+ folders.addAll(getOutputFolders(project));
+ return folders;
+ }
+
+}
diff --git a/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/MathHelper.java b/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/MathHelper.java
new file mode 100644
index 0000000..259484e
--- /dev/null
+++ b/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/MathHelper.java
@@ -0,0 +1,104 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.common.helper;
+
+/**
+ * Extra mathematical functions.
+ *
+ * @author brocard
+ */
+public class MathHelper {
+
+ private MathHelper() {
+ // Prevent Instantiation
+ }
+
+ public final static long SECOND = 1000;
+
+ public final static long MINUTE = SECOND * 60;
+
+ public final static long HOUR = MINUTE * 60;
+
+ public final static long DAY = HOUR * 24;
+
+ public static String formatAsDuration(long duration) {
+ long temp = 0;
+ long innerDuration = duration;
+ StringBuilder formatted = new StringBuilder();
+ // Days
+ temp = innerDuration / DAY;
+ if (temp > 0) {
+ formatted.append(temp).append(" day"); //$NON-NLS-1$
+ if (temp > 1) {
+ formatted.append("s"); //$NON-NLS-1$
+ }
+ innerDuration = innerDuration - (temp * DAY);
+ }
+ // Hours
+ temp = innerDuration / HOUR;
+ if (temp > 0) {
+ if (formatted.length() > 0) {
+ formatted.append(" "); //$NON-NLS-1$
+ }
+ formatted.append(temp).append(" hr"); //$NON-NLS-1$
+ if (temp > 1) {
+ formatted.append("s"); //$NON-NLS-1$
+ }
+ innerDuration = innerDuration - (temp * HOUR);
+ }
+ // Minutes
+ temp = innerDuration / MINUTE;
+ if (temp > 0) {
+ if (formatted.length() > 0) {
+ formatted.append(" "); //$NON-NLS-1$
+ }
+ formatted.append(temp).append(" min"); //$NON-NLS-1$
+ if (temp > 1) {
+ formatted.append("s"); //$NON-NLS-1$
+ }
+ innerDuration = innerDuration - (temp * MINUTE);
+ }
+ // Seconds
+ if (innerDuration >= SECOND) {
+ temp = innerDuration / SECOND;
+ if (temp > 0) {
+ if (formatted.length() > 0) {
+ formatted.append(" "); //$NON-NLS-1$
+ }
+ formatted.append(temp).append(" sec"); //$NON-NLS-1$
+ if (temp > 1) {
+ formatted.append("s"); //$NON-NLS-1$
+ }
+ innerDuration = innerDuration - (temp * SECOND);
+ }
+ }
+ // Millisecond
+ if (innerDuration > 0) {
+ if (formatted.length() > 0) {
+ formatted.append(" "); //$NON-NLS-1$
+ }
+ formatted.append(innerDuration).append(" ms"); //$NON-NLS-1$
+ }
+ return formatted.toString();
+ }
+
+ /**
+ * Multiply given integer and float value, and return result as an int.
+ *
+ * @param sourceValue_p
+ * @param multiplier_p
+ * @return
+ */
+ public static int multiply(int sourceValue_p, float multiplier_p) {
+ return (int) (sourceValue_p * multiplier_p);
+ }
+
+}
diff --git a/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/MiscHelper.java b/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/MiscHelper.java
new file mode 100644
index 0000000..eeb1e74
--- /dev/null
+++ b/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/MiscHelper.java
@@ -0,0 +1,42 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.common.helper;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Miscellaneous helper.
+ *
+ * @author Guillaume Brocard
+ */
+public class MiscHelper {
+
+ private MiscHelper() {
+ // Prevent Instantiation
+ }
+
+ /**
+ * Returns a list backed by the specified array.
+ *
+ * @param elements_p
+ * the array by which the list will be backed.
+ * @return a not null list.
+ */
+ public static <T> List<T> asList(T[] elements_p) {
+ ArrayList<T> result = new ArrayList<T>(elements_p.length);
+ for (T element : elements_p) {
+ result.add(element);
+ }
+ return result;
+ }
+
+}
diff --git a/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/ObjectHolder.java b/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/ObjectHolder.java
new file mode 100644
index 0000000..be2f93f
--- /dev/null
+++ b/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/ObjectHolder.java
@@ -0,0 +1,36 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.common.helper;
+
+/**
+ * @author Guiu
+ *
+ */
+public class ObjectHolder<E> {
+
+ public E object;
+
+ public ObjectHolder(E object) {
+ super();
+ this.object = object;
+ }
+
+ @Override
+ public String toString() {
+ return object == null ? "null" : object.toString(); //$NON-NLS-1$
+ }
+
+}
diff --git a/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/ProjectHelper.java b/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/ProjectHelper.java
new file mode 100644
index 0000000..0ef0c51
--- /dev/null
+++ b/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/ProjectHelper.java
@@ -0,0 +1,307 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.common.helper;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.egf.common.EGFCommonPlugin;
+import org.eclipse.egf.common.constant.EGFCommonConstants;
+import org.eclipse.egf.common.generator.IEgfGeneratorConstants;
+import org.eclipse.emf.codegen.ecore.Generator;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+
+/**
+ * Workspace projects helper.
+ *
+ * @author brocard
+ */
+public class ProjectHelper {
+
+ private ProjectHelper() {
+ // Prevent Instantiation
+ }
+
+ /**
+ * Required plug-ins class path entry path identifier.
+ */
+ protected static final String CLASS_PATH_ENTRY_REQUIRED_PLUGINS_PATH_ID = "requiredPlugins"; //$NON-NLS-1$
+
+ /**
+ * Project existence status after check.<br>
+ * The project already exists (including default structure), or it has just
+ * been created, or creation process failed.<br>
+ * Internal purpose only.
+ */
+ public enum ProjectExistenceStatus {
+ ALREADY_EXISTS, CREATED, CREATION_FAILED
+ }
+
+ /**
+ * Get project from its name.<br>
+ * It is assumed that this project name refers to a plug-in.<br>
+ * If not, the method
+ * <code>ResourcesPlugin.getWorkspace().getRoot().getProject(projectName_p)</code>
+ * is invoked as result.
+ *
+ * @param bundleId
+ * A project name that points to a plug-in in the workspace.
+ * @return
+ */
+ public static IProject getProject(String bundleId) {
+ // Precondition.
+ if (bundleId == null) {
+ return null;
+ }
+ return ResourcesPlugin.getWorkspace().getRoot().getProject(bundleId);
+ }
+
+ /**
+ * Get the IProject for specified plug-in model.
+ *
+ * @param model
+ * @return null if the plug-in is not in the workspace.
+ */
+ public static IProject getProject(IPluginModelBase model) {
+ // Precondition.
+ if (model == null) {
+ return null;
+ }
+ IResource underlyingResource = model.getUnderlyingResource();
+ if (underlyingResource != null) {
+ return underlyingResource.getProject();
+ }
+ return null;
+ }
+
+ /**
+ * Refresh given project in the workspace.
+ *
+ * @param project
+ * @param monitor
+ */
+ public static void refreshProject(IProject project, IProgressMonitor monitor) throws CoreException {
+ refreshProject(project, IResource.DEPTH_INFINITE, monitor);
+ }
+
+ /**
+ * Refresh a project in the workspace.
+ *
+ * @param project
+ * @param depth
+ * @param monitor
+ * @see {@link IResource#refreshLocal(int, IProgressMonitor)}
+ */
+ public static void refreshProject(IProject project, int depth, IProgressMonitor monitor) throws CoreException {
+ project.refreshLocal(depth, monitor);
+ }
+
+ /**
+ * Create a source folder in given project.
+ *
+ * @param folder
+ * the name of the source folder.
+ * @param project
+ * the hosting project.
+ * @param monitor
+ * progress monitor.
+ * @return <code>true</code> means the creation is successful.
+ */
+ public static void createSourceFolder(String folder, IProject project, IProgressMonitor monitor) throws CoreException {
+ // Preconditions
+ if (folder == null || project == null || monitor == null) {
+ return;
+ }
+ try {
+ // Get the related java project.
+ IJavaProject javaProject = JavaCore.create(project);
+ // Get all source entries.
+ IClasspathEntry[] sourceEntries = javaProject.getRawClasspath();
+ // Add a generated source folder.
+ IPath generatedSourceFolderPath = project.getFullPath().append(folder);
+ createFolder(folder, project, new SubProgressMonitor(monitor, 1));
+ // Create a new source entry for the 'generated' source folder.
+ IClasspathEntry generatedSourceEntry = JavaCore.newSourceEntry(generatedSourceFolderPath);
+ IClasspathEntry[] newEntries = new IClasspathEntry[sourceEntries.length + 1];
+ // Copy the 'src' source entry.
+ newEntries[0] = sourceEntries[0];
+ // Add the 'generated' entry.
+ newEntries[1] = generatedSourceEntry;
+ // Copy the remaining entries.
+ System.arraycopy(sourceEntries, 1, newEntries, 2, sourceEntries.length - 1);
+ // Set the new entries on the java project.
+ javaProject.setRawClasspath(newEntries, new SubProgressMonitor(monitor, 1));
+ } catch (Throwable t) {
+ throw new CoreException(EGFCommonPlugin.getDefault().newStatus(IStatus.ERROR, NLS.bind("ProjectHelper.createSourceFolder(..) _ project ''{0}'' folder ''{1}''.", project.getName(), folder), t)); //$NON-NLS-1$
+ }
+ return;
+ }
+
+ /**
+ * Create a folder with given name in given project.
+ *
+ * @param folderName
+ * @param project
+ * @param monitor
+ * @return <code>null</code> if creation failed.
+ */
+ public static IFolder createFolder(String folderName, IProject project, IProgressMonitor monitor) throws CoreException {
+ IFolder folder = project.getFolder(folderName);
+ // Create the physical resource.
+ if (folder.exists() == false) {
+ // Get parent path.
+ IPath parentPath = new Path(folderName);
+ if (parentPath.segmentCount() > 1) {
+ parentPath = parentPath.removeLastSegments(1);
+ // Make sure parent exists first.
+ createFolder(parentPath.toString(), project, monitor);
+ }
+ // Then try and create given folder.
+ try {
+ folder.create(true, true, monitor);
+ } catch (Throwable t) {
+ throw new CoreException(EGFCommonPlugin.getDefault().newStatus(IStatus.ERROR, NLS.bind("ProjectHelper.createFolder(..) _ project ''{0}'' folder ''{1}''.", project.getName(), folderName), t)); //$NON-NLS-1$
+ }
+ }
+ return folder;
+ }
+
+ /**
+ * Make sure named project exists.<br>
+ * If not try and create a new one with given name.
+ *
+ * @param projectName
+ * The expected project name.
+ * @param cleanProject
+ * true to clean project structure after creation, false otherwise.
+ * @param projectType
+ * {@link Generator#EMF_EMPTY_PROJECT_STYLE} see other values.
+ * @return {@link ProjectExistenceStatus} value.
+ */
+ private static ProjectExistenceStatus ensureProjectExists(String projectName, boolean cleanProject, int projectType, IProgressMonitor monitor) throws CoreException {
+ ProjectExistenceStatus result = ProjectExistenceStatus.CREATION_FAILED;
+ // Precondition.
+ if (projectName == null) {
+ return result;
+ }
+ IFile file = FileHelper.getPlatformFile(projectName + IEgfGeneratorConstants.PROJECT_ROOT_FILE);
+ // Project already exists, stop here.
+ if (file != null && file.exists()) {
+ return ProjectExistenceStatus.ALREADY_EXISTS;
+ }
+ // Else, try and create an EMF project.
+ IPath projectLocationPath = new Path(EGFCommonConstants.SLASH_CHARACTER + projectName);
+ IProject resultingProject = Generator.createEMFProject(projectLocationPath.append(EGFCommonConstants.SLASH_CHARACTER + IEgfGeneratorConstants.SRC_FOLDER), null, Collections.<IProject> emptyList(), monitor, projectType, Collections.EMPTY_LIST);
+ if (resultingProject != null && resultingProject.exists()) {
+ result = ProjectExistenceStatus.CREATED;
+ // If project should be cleaned, do it.
+ if (cleanProject) {
+ cleanProjectStructure(resultingProject, monitor);
+ }
+ } else {
+ result = ProjectExistenceStatus.CREATION_FAILED;
+ }
+ return result;
+ }
+
+ /**
+ * Clean newly created project structure.<br/>
+ * Remove plug-in dependencies class path container from given project (if
+ * applicable).<br/>
+ * Also set nature back to Java one.
+ *
+ * @param project
+ */
+ private static void cleanProjectStructure(IProject project, IProgressMonitor monitor) throws CoreException {
+ IJavaProject javaProject = JavaCore.create(project);
+ // Precondition.
+ if (javaProject == null) {
+ return;
+ }
+ // Restore Java nature only.
+ String natureIds[] = new String[] { JavaCore.NATURE_ID };
+ IProjectDescription description = project.getDescription();
+ description.setNatureIds(natureIds);
+ project.setDescription(description, monitor);
+ // Get raw class path.
+ IClasspathEntry[] rawClasspath = null;
+ try {
+ rawClasspath = javaProject.getRawClasspath();
+ } catch (JavaModelException jme) {
+ throw new CoreException(EGFCommonPlugin.getDefault().newStatus(IStatus.ERROR, NLS.bind("ProjectHelper.cleanProjectStructure(..) _ project ''{0}''.", project.getName()), jme)); //$NON-NLS-1$
+ }
+ // Iterate over class path elements.
+ if (rawClasspath != null && rawClasspath.length != 0) {
+ List<IClasspathEntry> newRawClasspath = new ArrayList<IClasspathEntry>(rawClasspath.length);
+ for (IClasspathEntry classpathEntry : rawClasspath) {
+ if (classpathEntry.getEntryKind() == IClasspathEntry.CPE_CONTAINER) {
+ // Do not retain required plug-ins container.
+ IPath path = classpathEntry.getPath();
+ if (CLASS_PATH_ENTRY_REQUIRED_PLUGINS_PATH_ID.equals(path.getFileExtension()) == false) {
+ newRawClasspath.add(classpathEntry);
+ }
+ } else {
+ newRawClasspath.add(classpathEntry);
+ }
+ }
+ // Set new raw class path.
+ try {
+ javaProject.setRawClasspath(newRawClasspath.toArray(new IClasspathEntry[newRawClasspath.size()]), new NullProgressMonitor());
+ } catch (JavaModelException jme) {
+ throw new CoreException(EGFCommonPlugin.getDefault().newStatus(IStatus.ERROR, NLS.bind("ProjectHelper.cleanProjectStructure(..) _ project ''{0}''.", project.getName()), jme)); //$NON-NLS-1$
+ }
+ }
+ }
+
+ /**
+ * Make sure named plug-in project exists.<br>
+ * If not try and create a new one with given name.
+ *
+ * @param projectName
+ * The expected project name.
+ * @return
+ */
+ public static ProjectExistenceStatus ensurePluginProjectExists(String projectName, IProgressMonitor monitor) throws CoreException {
+ return ensureProjectExists(projectName, false, Generator.EMF_PLUGIN_PROJECT_STYLE, monitor);
+ }
+
+ /**
+ * Make sure named project exists.<br>
+ * If not try and create a new one with given name.
+ *
+ * @param projectName
+ * The expected project name.
+ * @return
+ */
+ public static ProjectExistenceStatus ensureProjectExists(String projectName, IProgressMonitor monitor) throws CoreException {
+ return ensureProjectExists(projectName, true, Generator.EMF_EMPTY_PROJECT_STYLE, monitor);
+ }
+
+}
diff --git a/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/StatusHelper.java b/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/StatusHelper.java
new file mode 100644
index 0000000..bbc4291
--- /dev/null
+++ b/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/StatusHelper.java
@@ -0,0 +1,129 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ *
+ */
+
+package org.eclipse.egf.common.helper;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.egf.common.EGFCommonPlugin;
+
+public class StatusHelper {
+
+ private StatusHelper() {
+ // Prevent Instantiation
+ }
+
+ /**
+ *
+ * Utility method for creating status.
+ *
+ * @param severity
+ * @param message
+ * @param exception
+ * @return {@link IStatus}
+ */
+ public static IStatus newStatus(int severity, String message, Throwable exception) {
+ String statusMessage = message;
+ if (message == null || message.trim().length() == 0) {
+ if (exception == null) {
+ throw new IllegalArgumentException();
+ } else if (exception.getMessage() == null) {
+ statusMessage = exception.toString();
+ } else {
+ statusMessage = exception.getMessage();
+ }
+ }
+ return new Status(severity, EGFCommonPlugin.getDefault().getPluginID(), severity, statusMessage, exception);
+ }
+
+ /**
+ *
+ * Utility method for creating status.
+ */
+ protected static IStatus newStatus(String pluginID, IStatus[] stati, String message, Throwable exception) {
+ if (message == null || message.trim().length() == 0) {
+ throw new IllegalArgumentException();
+ }
+ return new MultiStatus(pluginID != null && pluginID.trim().length() > 0 ? pluginID : EGFCommonPlugin.getDefault().getPluginID(), IStatus.ERROR, stati, message, exception);
+ }
+
+ /**
+ *
+ * Utility method for creating status.
+ */
+ public static IStatus newStatus(String pluginID, int severity, String message, Throwable exception) {
+ String statusMessage = message;
+ if (message == null || message.trim().length() == 0) {
+ if (exception == null) {
+ throw new IllegalArgumentException();
+ } else if (exception.getMessage() == null) {
+ statusMessage = exception.toString();
+ } else {
+ statusMessage = exception.getMessage();
+ }
+ }
+ return new Status(severity, pluginID != null && pluginID.trim().length() > 0 ? pluginID : EGFCommonPlugin.getDefault().getPluginID(), severity, statusMessage, exception);
+ }
+
+ /**
+ *
+ * Utility method for creating status.
+ */
+ public static IStatus newStatus(String pluginID, List<IStatus> children, String message, Throwable exception) {
+ List<IStatus> flatStatusCollection = new ArrayList<IStatus>();
+ Iterator<IStatus> iter = children.iterator();
+ while (iter.hasNext()) {
+ IStatus currentStatus = iter.next();
+ Iterator<IStatus> childrenIter = flatten(currentStatus).iterator();
+ while (childrenIter.hasNext()) {
+ flatStatusCollection.add(childrenIter.next());
+ }
+ }
+ IStatus[] stati = new IStatus[flatStatusCollection.size()];
+ flatStatusCollection.toArray(stati);
+ return newStatus(pluginID, stati, message, exception);
+ }
+
+ /**
+ * Answer a flat collection of the passed status and its recursive children
+ */
+ protected static List<IStatus> flatten(IStatus aStatus) {
+ List<IStatus> result = new ArrayList<IStatus>();
+ if (aStatus.isMultiStatus()) {
+ IStatus[] children = aStatus.getChildren();
+ for (int i = 0; i < children.length; i++) {
+ IStatus currentChild = children[i];
+ if (currentChild.isMultiStatus()) {
+ Iterator<IStatus> childStatiiEnum = flatten(currentChild).iterator();
+ while (childStatiiEnum.hasNext()) {
+ result.add(childStatiiEnum.next());
+ }
+ } else {
+ result.add(currentChild);
+ }
+ }
+ } else {
+ result.add(aStatus);
+ }
+ return result;
+ }
+
+}
diff --git a/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/StringHelper.java b/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/StringHelper.java
new file mode 100644
index 0000000..480c8b1
--- /dev/null
+++ b/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/StringHelper.java
@@ -0,0 +1,241 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.common.helper;
+
+import java.text.MessageFormat;
+import java.util.StringTokenizer;
+
+import org.eclipse.egf.common.constant.EGFCommonConstants;
+
+/**
+ * String helper.
+ *
+ * @author brocard
+ */
+public class StringHelper {
+
+ private StringHelper() {
+ // Prevent Instantiation
+ }
+
+ /**
+ * Non word characters regular expression.
+ */
+ private static final String REGEXP_NON_WORD_CHARACTERS = "[^a-zA-Z0-9]"; //$NON-NLS-1$
+
+ /**
+ * Format given message with given arguments.<br>
+ * See {@link MessageFormat} for the acceptable form of the given message
+ * and the arguments.
+ *
+ * @param message_p
+ * @param arguments_p
+ * @return
+ */
+ public static String formatMessage(String message_p, Object[] arguments_p) {
+ MessageFormat formatter = new MessageFormat(message_p);
+ return formatter.format(arguments_p);
+ }
+
+ /**
+ * Convert first character of given string to lower case.
+ *
+ * @param source_p
+ * @return new String with first character converted.
+ */
+ public static String toLowerFirst(String source_p) {
+ StringBuffer result = new StringBuffer(source_p);
+ String firstCharacter = source_p.substring(0, 1).toLowerCase();
+ result.setCharAt(0, firstCharacter.charAt(0));
+ return result.toString();
+ }
+
+ /**
+ * Convert first character of given string to upper case.
+ *
+ * @param source_p
+ * @return new String with first character converted.
+ */
+ public static String toUpperFirst(String source_p) {
+ StringBuffer result = new StringBuffer(source_p);
+ String firstCharacter = source_p.substring(0, 1).toUpperCase();
+ result.setCharAt(0, firstCharacter.charAt(0));
+ return result.toString();
+ }
+
+ /**
+ * Get tokens from given source string using given separators.
+ *
+ * @param source_p
+ * @param separators_p
+ * a string of separators to use while searching for tokens.
+ * @return null if source string is null, source string if no token could be
+ * found.<br>
+ * Otherwise return tokenized source string, separators excluded.
+ */
+ public static String[] getTokens(String source_p, String separators_p) {
+ String[] result = null;
+ // Preconditions.
+ // Do nothing if given source string is null.
+ if (source_p == null || source_p.trim().length() == 0) {
+ return result;
+ }
+ // Return source string if no separator was provided.
+ if (separators_p == null || separators_p.trim().length() == 0) {
+ result = new String[] { source_p };
+ return result;
+ }
+ // Create a new tokenizer.
+ StringTokenizer tokenizer = new StringTokenizer(source_p, separators_p);
+ // Add its result to the returned array.
+ int tokensCount = tokenizer.countTokens();
+ if (tokensCount > 0) {
+ result = new String[tokensCount];
+ for (int i = 0; i < tokensCount; i++) {
+ result[i] = tokenizer.nextToken();
+ }
+ } else { // Could not find any token, return source string.
+ result = new String[] { source_p };
+ }
+ return result;
+ }
+
+ /**
+ * Get the substring from given source string before given separator.
+ *
+ * @param separator_p
+ * @param source_p
+ * @return null if source string is null, source string itself if no
+ * substring could be found.<br>
+ * Otherwise return the substring from source string from the
+ * beginning to the separator position (separator excluded).
+ */
+ public static String substringBefore(char separator_p, String source_p) {
+ String result = null;
+ // Precondition.
+ if (source_p == null || source_p.trim().length() == 0) {
+ return result;
+ }
+ // Search for the last index of given separator.
+ int separatorPosition = source_p.lastIndexOf(separator_p);
+ if (separatorPosition >= 0) {
+ result = source_p.substring(0, separatorPosition);
+ } else {
+ // No separator found, return the source itself.
+ result = source_p;
+ }
+ return result;
+ }
+
+ /**
+ * Get the substring from given source string after given separator.
+ *
+ * @param separator_p
+ * @param source_p
+ * @return null if source string is null, source string itself if no
+ * substring could be found.<br>
+ * Otherwise return the substring from the separator position
+ * (separator excluded) to the end of source string.
+ */
+ public static String substringAfter(char separator_p, String source_p) {
+ String result = null;
+ // Precondition.
+ if (source_p == null || source_p.trim().length() == 0) {
+ return result;
+ }
+ // Search for the last index of given separator.
+ int separatorPosition = source_p.lastIndexOf(separator_p);
+ if (separatorPosition >= 0) {
+ result = source_p.substring(separatorPosition + 1); // separator
+ // excluded.
+ } else {
+ // No separator found, return the source itself.
+ result = source_p;
+ }
+ return result;
+ }
+
+ /**
+ * Returns a new string that is a substring of this string for specified
+ * parameters.<br>
+ * The substring begins at the index of <code>beginningDelimiter_p</code>
+ * and extends to the character at index of <code>endingDelimiter_p</code>.<br>
+ * Delimiters can be included in the returned substring depending on
+ * <code>includeDelimiters_p</code> value.
+ *
+ * @param beginningDelimiter_p
+ * the delimiter used as beginning delimiter.
+ * @param endingDelimiter_p
+ * the delimiter used as ending delimiter.
+ * @param content_p
+ * the source that the substring is extracted from.
+ * @param includeDelimiters_p
+ * <code>true</code> means the delimiters are included in the
+ * returned string.
+ * @return null if no substring found for given delimiters.
+ */
+ public static String substring(String beginningDelimiter_p, String endingDelimiter_p, String content_p, boolean includeDelimiters_p) {
+ String result = null;
+ // Get the index of beginning delimiter.
+ int indexBeginningDelimiter = content_p.indexOf(beginningDelimiter_p);
+ // If the beginning delimiter is found, locates the index of ending
+ // delimiter.
+ if (indexBeginningDelimiter >= 0) {
+ int indexEndingDelimiter = content_p.indexOf(endingDelimiter_p, indexBeginningDelimiter);
+ // If the ending delimiter is found, extract the substring.
+ if (indexEndingDelimiter >= 0) {
+ if (includeDelimiters_p) {
+ // Extract the substring including the delimiters,
+ result = content_p.substring(indexBeginningDelimiter, indexEndingDelimiter + endingDelimiter_p.length());
+ } else {
+ // Extract the substring contained between delimiters
+ result = content_p.substring(indexBeginningDelimiter + beginningDelimiter_p.length(), indexEndingDelimiter);
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Replace non word characters with dot characters
+ *
+ * @param originalString_p
+ * @return Each non-conforming character in given string is replaced by a
+ * dot character.
+ */
+ public static String replaceNonWordCharactersWithDot(String originalString_p) {
+ return replaceNonWordCharacters(originalString_p, String.valueOf(EGFCommonConstants.DOT_CHARACTER));
+ }
+
+ /**
+ * Replace non word characters with underscore characters
+ *
+ * @param originalString_p
+ * @return Each non-conforming character in given string is replaced by an
+ * underscore character.
+ */
+ public static String replaceNonWordCharactersWithUnderscore(String originalString_p) {
+ return replaceNonWordCharacters(originalString_p, String.valueOf(EGFCommonConstants.UNDERSCORE_CHARACTER));
+ }
+
+ /**
+ * Replace non word characters with a replacement String
+ *
+ * @param originalString_p
+ * @param replacementString_p
+ * each non word character is replaced by given string.
+ * @return
+ */
+ public static String replaceNonWordCharacters(String originalString_p, String replacementString_p) {
+ return originalString_p.replaceAll(REGEXP_NON_WORD_CHARACTERS, replacementString_p != null ? replacementString_p : EGFCommonConstants.EMPTY_STRING);
+ }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/URIHelper.java b/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/URIHelper.java
new file mode 100644
index 0000000..5479fa2
--- /dev/null
+++ b/org.eclipse.egf.common/src/org/eclipse/egf/common/helper/URIHelper.java
@@ -0,0 +1,106 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.common.helper;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class URIHelper {
+
+ private URIHelper() {
+ // Prevent Instantiation
+ }
+
+ public static final URI PLATFORM_PLUGIN_URI = URI.createURI("platform:/plugin/"); //$NON-NLS-1$
+
+ public static final URI PLATFORM_RESOURCE_URI = URI.createURI("platform:/resource/"); //$NON-NLS-1$
+
+ public static URI getPlatformPluginURI(URI uri) {
+ if (uri == null) {
+ return null;
+ }
+ if (uri.isRelative()) {
+ return URI.createPlatformPluginURI(URI.decode(uri.toString()), true);
+ } else if (uri.isPlatformResource()) {
+ return uri.replacePrefix(PLATFORM_RESOURCE_URI, PLATFORM_PLUGIN_URI);
+ }
+ return uri;
+ }
+
+ public static URI getPlatformResourceURI(URI uri) {
+ if (uri == null) {
+ return null;
+ }
+ if (uri.isRelative()) {
+ return URI.createPlatformResourceURI(URI.decode(uri.toString()), true);
+ } else if (uri.isPlatformPlugin()) {
+ return uri.replacePrefix(PLATFORM_PLUGIN_URI, PLATFORM_RESOURCE_URI);
+ }
+ return uri;
+ }
+
+ public static URI getPlatformURI(IPluginModelBase model, String value) {
+ if (model == null || value == null || value.trim().length() == 0) {
+ return null;
+ }
+ String bundleId = BundleHelper.getBundleId(model);
+ if (bundleId == null) {
+ return null;
+ }
+ return getPlatformURI(bundleId, value.trim(), true);
+ }
+
+ public static URI getPlatformURI(IPath path) {
+ if (path == null || path.segmentCount() < 2) {
+ return null;
+ }
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(path.segment(0));
+ if (project == null) {
+ return null;
+ }
+ String bundleId = BundleHelper.getBundleId(project);
+ if (bundleId == null) {
+ return null;
+ }
+ return getPlatformURI(bundleId, path.removeFirstSegments(1).toString(), true);
+ }
+
+ public static URI getPlatformURI(IResource resource) {
+ if (resource == null || resource.getFullPath() == null || resource.getFullPath().segmentCount() < 2) {
+ return null;
+ }
+ String bundleId = BundleHelper.getBundleId(resource);
+ if (bundleId == null) {
+ return null;
+ }
+ return getPlatformURI(bundleId, resource.getFullPath().removeFirstSegments(1).toString(), true);
+ }
+
+ public static URI getPlatformURI(String bundleId, String value, boolean encode) {
+ if (bundleId == null || bundleId.trim().length() == 0 || value == null || value.trim().length() == 0) {
+ return null;
+ }
+ URI uri = URI.createURI(value.trim());
+ if (uri.isRelative()) {
+ uri = URI.createPlatformPluginURI(bundleId.trim() + "/" + uri.toString(), encode); //$NON-NLS-1$
+ }
+ return uri;
+ }
+
+}
diff --git a/org.eclipse.egf.common/src/org/eclipse/egf/common/l10n/EGFCommonMessages.java b/org.eclipse.egf.common/src/org/eclipse/egf/common/l10n/EGFCommonMessages.java
new file mode 100644
index 0000000..3425c73
--- /dev/null
+++ b/org.eclipse.egf.common/src/org/eclipse/egf/common/l10n/EGFCommonMessages.java
@@ -0,0 +1,38 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.common.l10n;
+
+import org.eclipse.osgi.util.NLS;
+
+public class EGFCommonMessages {
+
+ private static final String BUNDLE_NAME = "org.eclipse.egf.common.l10n.messages"; //$NON-NLS-1$
+
+ private EGFCommonMessages() {
+ // Do not instantiate
+ }
+
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, EGFCommonMessages.class);
+ }
+
+ public static String URI_errorInstance;
+
+ public static String Exception_unexpectedException;
+
+ public static String JavaHelper_AnalysingFailure;
+
+ public static String TypeClassHelper_classHierachy_JobName;
+
+}
diff --git a/org.eclipse.egf.common/src/org/eclipse/egf/common/l10n/messages.properties b/org.eclipse.egf.common/src/org/eclipse/egf/common/l10n/messages.properties
new file mode 100644
index 0000000..e624d66
--- /dev/null
+++ b/org.eclipse.egf.common/src/org/eclipse/egf/common/l10n/messages.properties
@@ -0,0 +1,18 @@
+##
+# 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
+##
+
+URI_errorInstance= Error while creating an URI instance ''{0}''.
+
+Exception_unexpectedException= Unexpected Exception.
+
+JavaHelper_AnalysingFailure= Unexpected exception while analysing project ''{0}''.
+
+TypeClassHelper_classHierachy_JobName= Processing EGF Class Hierarchy
diff --git a/org.eclipse.egf.common/src/org/eclipse/egf/common/log/IEGFLogger.java b/org.eclipse.egf.common/src/org/eclipse/egf/common/log/IEGFLogger.java
new file mode 100644
index 0000000..c081628
--- /dev/null
+++ b/org.eclipse.egf.common/src/org/eclipse/egf/common/log/IEGFLogger.java
@@ -0,0 +1,37 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.common.log;
+
+import org.eclipse.core.runtime.IStatus;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public interface IEGFLogger {
+
+ public void logError(String line);
+
+ public void logError(String line, int nesting);
+
+ public void logStatus(IStatus status);
+
+ public void logStatus(IStatus status, int nesting);
+
+ public void logInfo(String line);
+
+ public void logInfo(String line, int nesting);
+
+ public void logWarning(String line);
+
+ public void logWarning(String line, int nesting);
+
+}
diff --git a/org.eclipse.egf.common/src/org/eclipse/egf/common/log/IEGFLoggerFactory.java b/org.eclipse.egf.common/src/org/eclipse/egf/common/log/IEGFLoggerFactory.java
new file mode 100644
index 0000000..34989a2
--- /dev/null
+++ b/org.eclipse.egf.common/src/org/eclipse/egf/common/log/IEGFLoggerFactory.java
@@ -0,0 +1,21 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.common.log;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public interface IEGFLoggerFactory {
+
+ public IEGFLogger getLogger();
+
+}
diff --git a/org.eclipse.egf.console/.classpath b/org.eclipse.egf.console/.classpath
new file mode 100644
index 0000000..2d1a430
--- /dev/null
+++ b/org.eclipse.egf.console/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.egf.console/.options b/org.eclipse.egf.console/.options
new file mode 100644
index 0000000..6fb4a6b
--- /dev/null
+++ b/org.eclipse.egf.console/.options
@@ -0,0 +1,2 @@
+# Prints debug information
+org.eclipse.egf.console/debug=true
diff --git a/org.eclipse.egf.console/.project b/org.eclipse.egf.console/.project
new file mode 100644
index 0000000..fe36608
--- /dev/null
+++ b/org.eclipse.egf.console/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.console</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.console/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egf.console/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..2840238
--- /dev/null
+++ b/org.eclipse.egf.console/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:47:48 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.egf.console/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egf.console/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..08dff53
--- /dev/null
+++ b/org.eclipse.egf.console/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Mon Mar 09 16:03:57 CET 2009
+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/org.eclipse.egf.console/META-INF/MANIFEST.MF b/org.eclipse.egf.console/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..5463b1c
--- /dev/null
+++ b/org.eclipse.egf.console/META-INF/MANIFEST.MF
@@ -0,0 +1,28 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.console; singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.egf.console.EGFConsolePlugin
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle:
+ com.ibm.icu,
+ org.eclipse.emf.edit,
+ org.eclipse.emf.common,
+ org.eclipse.emf.common.ui,
+ org.eclipse.ui.ide,
+ org.eclipse.jface.text,
+ org.eclipse.ui.console,
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.ui.editors,
+ org.eclipse.egf.common.ui
+Export-Package:
+ org.eclipse.egf.console,
+ org.eclipse.egf.console.internal,
+ org.eclipse.egf.console.l10n,
+ org.eclipse.egf.console.preferences
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.egf.console/about.html b/org.eclipse.egf.console/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/org.eclipse.egf.console/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/org.eclipse.egf.console/build.properties b/org.eclipse.egf.console/build.properties
new file mode 100644
index 0000000..ac558c2
--- /dev/null
+++ b/org.eclipse.egf.console/build.properties
@@ -0,0 +1,21 @@
+##
+# Copyright (c) 2000, 2009 IBM Corporation and others.
+# 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:
+# IBM Corporation - initial API and implementation
+# Thales Corporate Services S.A.S
+##
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html,\
+ icons/,\
+ .options
+src.includes = about.html
diff --git a/org.eclipse.egf.console/icons/dlcl16/close_console.gif b/org.eclipse.egf.console/icons/dlcl16/close_console.gif
new file mode 100644
index 0000000..bb19dea
--- /dev/null
+++ b/org.eclipse.egf.console/icons/dlcl16/close_console.gif
Binary files differ
diff --git a/org.eclipse.egf.console/icons/elcl16/close_console.gif b/org.eclipse.egf.console/icons/elcl16/close_console.gif
new file mode 100644
index 0000000..64b4384
--- /dev/null
+++ b/org.eclipse.egf.console/icons/elcl16/close_console.gif
Binary files differ
diff --git a/org.eclipse.egf.console/icons/eview16/console_view.gif b/org.eclipse.egf.console/icons/eview16/console_view.gif
new file mode 100644
index 0000000..7018684
--- /dev/null
+++ b/org.eclipse.egf.console/icons/eview16/console_view.gif
Binary files differ
diff --git a/org.eclipse.egf.console/plugin.properties b/org.eclipse.egf.console/plugin.properties
new file mode 100644
index 0000000..8424a9e
--- /dev/null
+++ b/org.eclipse.egf.console/plugin.properties
@@ -0,0 +1,22 @@
+##
+# Copyright (c) 2000, 2009 IBM Corporation and others.
+# 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:
+# IBM Corporation - initial API and implementation
+# Thales Corporate Services S.A.S
+##
+
+pluginName=EGF Console (Incubation)
+providerName=Eclipse Modeling Project
+
+egf.preferences.keyword.general=EGF
+Console=Console
+EGF=EGF
+
+consolePresentation.label=EGF
+ConsoleFont.description=The font used by EGF.
+ConsoleFont.label=Console font
\ No newline at end of file
diff --git a/org.eclipse.egf.console/plugin.xml b/org.eclipse.egf.console/plugin.xml
new file mode 100644
index 0000000..4d10cc2
--- /dev/null
+++ b/org.eclipse.egf.console/plugin.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+
+ <extension
+ point="org.eclipse.egf.common.logger"
+ >
+ <logger
+ class="org.eclipse.egf.console.internal.EGFLoggerFactory"
+ />
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.themes"
+ >
+
+ <themeElementCategory
+ label="%consolePresentation.label"
+ id="org.eclipse.egf.presentation.themes"
+ />
+
+ <fontDefinition
+ defaultsTo="org.eclipse.jface.textfont"
+ label="%ConsoleFont.label"
+ categoryId="org.eclipse.egf.presentation.themes"
+ id="org.eclipse.egf.presentation.font"
+ >
+ <description>%ConsoleFont.description</description>
+ </fontDefinition>
+
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.keywords"
+ >
+ <keyword
+ label="%egf.preferences.keyword.general"
+ id="org.eclipse.egf.general"
+ />
+ </extension>
+
+ <extension
+ point="org.eclipse.core.runtime.preferences"
+ >
+ <initializer
+ class="org.eclipse.egf.console.internal.ConsolePreferenceInitializer"
+ />
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.preferencePages"
+ >
+ <page
+ name="%Console"
+ class="org.eclipse.egf.console.preferences.EGFPreferencePage"
+ category="org.eclipse.egf.preferences"
+ id="org.eclipse.egf.console.preferences.EGFPreferencePage"
+ >
+ <keywordReference
+ id="org.eclipse.egf.general"
+ />
+ </page>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.console.consoleFactories"
+ >
+ <consoleFactory
+ label="%EGF"
+ icon="$nl$/icons/eview16/console_view.gif"
+ class="org.eclipse.egf.console.internal.ConsoleFactory"
+ />
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.console.consolePageParticipants"
+ >
+ <consolePageParticipant
+ class="org.eclipse.egf.console.internal.ConsolePageParticipant"
+ id="org.eclipse.egf.console.internal.ConsolePageParticipant"
+ >
+ <enablement>
+ <instanceof
+ value="org.eclipse.egf.console.internal.Console"
+ />
+ </enablement>
+ </consolePageParticipant>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.console.consolePatternMatchListeners"
+ >
+ <consolePatternMatchListener
+ class="org.eclipse.egf.console.internal.ConsoleLineNotifier"
+ id="org.eclipse.egf.console.internal.ConsoleLineNotifier"
+ qualifier=".+"
+ regex=".+"
+ >
+ <enablement>
+ <test
+ property="org.eclipse.ui.console.consoleTypeTest"
+ value="%EGF"
+ />
+ </enablement>
+ </consolePatternMatchListener>
+ </extension>
+
+</plugin>
\ No newline at end of file
diff --git a/org.eclipse.egf.console/src/org/eclipse/egf/console/EGFConsolePlugin.java b/org.eclipse.egf.console/src/org/eclipse/egf/console/EGFConsolePlugin.java
new file mode 100644
index 0000000..59e9245
--- /dev/null
+++ b/org.eclipse.egf.console/src/org/eclipse/egf/console/EGFConsolePlugin.java
@@ -0,0 +1,106 @@
+/**
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ * Thales Corporate Services S.A.S
+ */
+package org.eclipse.egf.console;
+
+import org.eclipse.egf.common.ui.activator.EGFAbstractUIPlugin;
+import org.eclipse.egf.console.internal.ColorManager;
+import org.eclipse.egf.console.internal.Console;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+import org.osgi.framework.BundleContext;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class EGFConsolePlugin extends EGFAbstractUIPlugin {
+
+ private static EGFConsolePlugin __plugin;
+
+ /**
+ * @return the EGF console
+ */
+ public static Console getConsole() {
+ return getDefault().getInnerConsole();
+ }
+
+ /**
+ * Returns the standard display to be used. The method first checks, if
+ * the thread calling this method has an associated display. If so, this
+ * display is returned. Otherwise the method returns the default display.
+ */
+ public static Display getStandardDisplay() {
+ Display display = Display.getCurrent();
+ if (display == null) {
+ display = Display.getDefault();
+ }
+ return display;
+ }
+
+ private Console _console;
+
+ /**
+ * The constructor
+ */
+ public EGFConsolePlugin() {
+ super();
+ }
+
+ public Color getPreferenceColor(String type) {
+ return ColorManager.getDefault().getColor(PreferenceConverter.getColor(getDefault().getPreferenceStore(), type));
+ }
+
+ protected Console getInnerConsole() {
+ return _console;
+ }
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ __plugin = this;
+ if (PlatformUI.isWorkbenchRunning()) {
+ try {
+ _console = new Console();
+ } catch (RuntimeException re) {
+ // Don't let the console bring down UI
+ logError("Errors occurred starting the EGF console", re); //$NON-NLS-1$
+ }
+ }
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ try {
+ if (PlatformUI.isWorkbenchRunning()) {
+ ColorManager.getDefault().dispose();
+ if (_console != null) {
+ _console.shutdown();
+ }
+ }
+ __plugin = null;
+ } finally {
+ super.stop(context);
+ }
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static EGFConsolePlugin getDefault() {
+ return __plugin;
+ }
+
+}
diff --git a/org.eclipse.egf.console/src/org/eclipse/egf/console/internal/ColorManager.java b/org.eclipse.egf.console/src/org/eclipse/egf/console/internal/ColorManager.java
new file mode 100644
index 0000000..c27b459
--- /dev/null
+++ b/org.eclipse.egf.console/src/org/eclipse/egf/console/internal/ColorManager.java
@@ -0,0 +1,58 @@
+/**
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ * Thales Corporate Services S.A.S
+ */
+package org.eclipse.egf.console.internal;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * Generic color manager.
+ */
+public class ColorManager {
+
+ private static ColorManager fgColorManager;
+
+ protected Map<RGB, Color> fColorTable = new HashMap<RGB, Color>(10);
+
+ private ColorManager() {
+ // Nothing to do
+ }
+
+ public static ColorManager getDefault() {
+ if (fgColorManager == null) {
+ fgColorManager = new ColorManager();
+ }
+ return fgColorManager;
+ }
+
+ public Color getColor(RGB rgb) {
+ Color color = fColorTable.get(rgb);
+ if (color == null) {
+ color = new Color(Display.getCurrent(), rgb);
+ fColorTable.put(rgb, color);
+ }
+ return color;
+ }
+
+ public void dispose() {
+ Iterator<Color> e = fColorTable.values().iterator();
+ while (e.hasNext()) {
+ e.next().dispose();
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.console/src/org/eclipse/egf/console/internal/Console.java b/org.eclipse.egf.console/src/org/eclipse/egf/console/internal/Console.java
new file mode 100644
index 0000000..066f037
--- /dev/null
+++ b/org.eclipse.egf.console/src/org/eclipse/egf/console/internal/Console.java
@@ -0,0 +1,490 @@
+/**
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ * Thales Corporate Services S.A.S
+ */
+package org.eclipse.egf.console.internal;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.egf.common.log.IEGFLogger;
+import org.eclipse.egf.console.EGFConsolePlugin;
+import org.eclipse.egf.console.l10n.ConsoleMessages;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.console.ConsolePlugin;
+import org.eclipse.ui.console.IConsole;
+import org.eclipse.ui.console.IConsoleManager;
+import org.eclipse.ui.console.MessageConsole;
+import org.eclipse.ui.console.MessageConsoleStream;
+
+import com.ibm.icu.text.DateFormat;
+import com.ibm.icu.text.SimpleDateFormat;
+
+/**
+ * Console that shows the output of CVS commands. It is shown as a page in the
+ * generic console view. It supports coloring for message, command, and error
+ * lines in addition the font can be configured.
+ *
+ * @since 3.0
+ */
+public class Console extends MessageConsole implements IPropertyChangeListener, IEGFLogger {
+
+ private Color _errorColor;
+
+ private Color _infoColor;
+
+ private Color _warningColor;
+
+ // streams for each command type - each stream has its own color
+
+ private MessageConsoleStream _errorStream;
+
+ private MessageConsoleStream _infoStream;
+
+ private MessageConsoleStream _warningStream;
+
+ private boolean _showOnMessage;
+
+ private ConsoleDocument _document;
+
+ private IConsoleManager _consoleManager;
+
+ // format for timings printed to console
+ @SuppressWarnings("unused")
+ private static final DateFormat TIME_FORMAT;
+
+ static {
+ DateFormat format;
+ try {
+ format = new SimpleDateFormat(ConsoleMessages.Console_resultTimeFormat);
+ } catch (RuntimeException e) {
+ // This can happen if the bundle contains an invalid format
+ format = new SimpleDateFormat("'(took 'm:ss.SSS')')"); //$NON-NLS-1$
+ }
+ TIME_FORMAT = format;
+ }
+
+ // Indicates whether the console is visible in the Console view
+ private boolean _visible = false;
+
+ // Indicates whether the console's streams have been initialized
+ private boolean _initialized = false;
+
+ /*
+ * Constant used for indenting error status printing
+ */
+ private static final String NESTING = " "; //$NON-NLS-1$
+
+ public class MyLifecycle implements org.eclipse.ui.console.IConsoleListener {
+
+ public void consolesAdded(IConsole[] consoles) {
+ for (int i = 0; i < consoles.length; i++) {
+ IConsole console = consoles[i];
+ if (console == Console.this) {
+ init();
+ }
+ }
+ }
+
+ public void consolesRemoved(IConsole[] consoles) {
+ for (int i = 0; i < consoles.length; i++) {
+ IConsole console = consoles[i];
+ if (console == Console.this) {
+ ConsolePlugin.getDefault().getConsoleManager().removeConsoleListener(this);
+ dispose();
+ }
+ }
+ }
+
+ }
+
+ /**
+ * Constructor initializes preferences and colors but doesn't create the
+ * console page yet.
+ */
+ public Console() {
+ super(ConsoleMessages.EGF_Console, EGFConsolePlugin.getDefault().getImageDescriptor(IEGFConsoleConstants.IMG_SEARCH_CONSOLE));
+ setType("EGF"); //$NON-NLS-1$
+ _showOnMessage = EGFConsolePlugin.getDefault().getPreferenceStore().getBoolean(IEGFConsoleConstants.CONSOLE_SHOW_ON_MESSAGE);
+ _document = new ConsoleDocument();
+ _consoleManager = ConsolePlugin.getDefault().getConsoleManager();
+ EGFConsolePlugin.getDefault().getPreferenceStore().addPropertyChangeListener(this);
+ }
+
+ public MessageConsoleStream getErrorStream() {
+ return _errorStream;
+ }
+
+ public MessageConsoleStream getInfoStream() {
+ return _infoStream;
+ }
+
+ public MessageConsoleStream getWarningStream() {
+ return _warningStream;
+ }
+
+ public void logError(String line) {
+ logError(line, 0);
+ }
+
+ public void logError(String line, int nesting) {
+ if (_showOnMessage) {
+ bringConsoleToFront();
+ }
+ appendLine(ConsoleDocument.ERROR, line, nesting);
+ }
+
+ public void logStatus(IStatus status) {
+ logStatus(status, 0);
+ }
+
+ public void logStatus(IStatus status, int nesting) {
+ if (_showOnMessage) {
+ bringConsoleToFront();
+ }
+ outputStatus(status, nesting);
+ // In case of IStatus.ERROR with a defined exception, we print a final
+ // Message
+ if (status != null && status.getSeverity() == IStatus.ERROR && status.getException() != null) {
+ logError(ConsoleMessages.Console_see_your_log_file, nesting);
+ }
+ }
+
+ public void logInfo(String line) {
+ logInfo(line, 0);
+ }
+
+ public void logInfo(String line, int nesting) {
+ if (_showOnMessage) {
+ bringConsoleToFront();
+ }
+ appendLine(ConsoleDocument.INFO, line, nesting);
+ }
+
+ public void logWarning(String line) {
+ logWarning(line, 0);
+ }
+
+ public void logWarning(String line, int nesting) {
+ appendLine(ConsoleDocument.WARNING, line, nesting);
+ }
+
+ private void bringConsoleToFront() {
+ if (_visible == false) {
+ _consoleManager.addConsoles(new IConsole[] { this });
+ }
+ _consoleManager.showConsoleView(this);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.console.AbstractConsole#init()
+ */
+ @Override
+ protected void init() {
+ // Called when console is added to the console view
+ super.init();
+
+ initLimitOutput();
+ initWrapSetting();
+
+ // Ensure that initialization occurs in the ui thread
+ EGFConsolePlugin.getStandardDisplay().asyncExec(new Runnable() {
+
+ public void run() {
+ JFaceResources.getFontRegistry().addListener(Console.this);
+ initializeStreams();
+ dump();
+ }
+ });
+ }
+
+ private void initWrapSetting() {
+ IPreferenceStore store = EGFConsolePlugin.getDefault().getPreferenceStore();
+ if (store.getBoolean(IEGFConsoleConstants.CONSOLE_WRAP)) {
+ setConsoleWidth(store.getInt(IEGFConsoleConstants.CONSOLE_WIDTH));
+ } else {
+ setConsoleWidth(-1);
+ }
+ }
+
+ private void initLimitOutput() {
+ IPreferenceStore store = EGFConsolePlugin.getDefault().getPreferenceStore();
+ if (store.getBoolean(IEGFConsoleConstants.CONSOLE_LIMIT_OUTPUT)) {
+ int lowWater = store.getInt(IEGFConsoleConstants.CONSOLE_LOW_WATER_MARK);
+ int highWater = store.getInt(IEGFConsoleConstants.CONSOLE_HIGH_WATER_MARK);
+ setWaterMarks(lowWater, highWater);
+ } else {
+ setWaterMarks(-1, 0);
+ }
+ }
+
+ /*
+ * Initialize thre streams of the console. Must be called from the UI thread.
+ */
+ protected void initializeStreams() {
+ synchronized (_document) {
+ if (_initialized == false) {
+ _errorStream = newMessageStream();
+ _infoStream = newMessageStream();
+ _warningStream = newMessageStream();
+ // install colors
+ _errorColor = createColor(EGFConsolePlugin.getWorkbenchDisplay(), IEGFConsoleConstants.CONSOLE_ERROR_COLOR);
+ _errorStream.setColor(_errorColor);
+ _infoColor = createColor(EGFConsolePlugin.getWorkbenchDisplay(), IEGFConsoleConstants.CONSOLE_INFO_COLOR);
+ _infoStream.setColor(_infoColor);
+ _warningColor = createColor(EGFConsolePlugin.getWorkbenchDisplay(), IEGFConsoleConstants.CONSOLE_WARNING_COLOR);
+ _warningStream.setColor(_warningColor);
+ // install font
+ Font f = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().getFontRegistry().get(IEGFConsoleConstants.CONSOLE_FONT);
+ setFont(f);
+ _initialized = true;
+ }
+ }
+ }
+
+ protected void dump() {
+ synchronized (_document) {
+ _visible = true;
+ ConsoleDocument.ConsoleLine[] lines = _document.getLines();
+ for (int i = 0; i < lines.length; i++) {
+ ConsoleDocument.ConsoleLine line = lines[i];
+ appendLine(line._type, line._line, line._nesting);
+ }
+ _document.clear();
+ }
+ }
+
+ private void appendLine(int type, String line, int nesting) {
+ final StringBuffer buffer = new StringBuffer();
+ for (int i = 0; i < nesting; i++) {
+ buffer.append(NESTING);
+ }
+ if (_showOnMessage) {
+ bringConsoleToFront();
+ }
+ showConsole();
+ synchronized (_document) {
+ if (_visible) {
+ switch (type) {
+ case ConsoleDocument.ERROR:
+ getErrorStream().println(buffer.toString() + line);
+ break;
+ case ConsoleDocument.INFO:
+ getInfoStream().println(buffer.toString() + line);
+ break;
+ case ConsoleDocument.WARNING:
+ getWarningStream().println(buffer.toString() + line);
+ break;
+ }
+ } else {
+ _document.appendConsoleLine(type, line, nesting);
+ }
+ }
+ }
+
+ private void showConsole() {
+ show(false);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.console.MessageConsole#dispose()
+ */
+ @Override
+ protected void dispose() {
+ // Here we can't call super.dispose() because we actually want the
+ // partitioner to remain
+ // connected, but we won't show lines until the console is added to the
+ // console manager
+ // again.
+
+ // Called when console is removed from the console view
+ synchronized (_document) {
+ _visible = false;
+ JFaceResources.getFontRegistry().removeListener(this);
+ }
+ }
+
+ /**
+ * Clean-up created fonts.
+ */
+ public void shutdown() {
+ // Call super dispose because we want the partitioner to be
+ // disconnected.
+ super.dispose();
+ if (_errorColor != null) {
+ _errorColor.dispose();
+ }
+ if (_infoColor != null) {
+ _infoColor.dispose();
+ }
+ if (_warningColor != null) {
+ _warningColor.dispose();
+ }
+ EGFConsolePlugin.getDefault().getPreferenceStore().removePropertyChangeListener(this);
+ }
+
+ private void outputStatus(IStatus status, int nesting) {
+ // Nothing to output
+ if (status == null) {
+ return;
+ }
+ // Current Status Management
+ // Output the Current Status Message
+ outputStatusMessage(status, nesting);
+ // MultiStatus Management
+ if (status.isMultiStatus()) {
+ IStatus[] children = status.getChildren();
+ for (int i = 0; i < children.length; i++) {
+ outputStatus(children[i], nesting + 1);
+ }
+ }
+ // Manage standard InvocationTargetException and CoreException
+ if (status.getException() instanceof InvocationTargetException) {
+ if (((InvocationTargetException) status.getException()).getTargetException() instanceof CoreException) {
+ outputStatus(((CoreException) (((InvocationTargetException) status.getException()).getTargetException())).getStatus(), nesting + 1);
+ }
+ } else if (status.getException() instanceof CoreException) {
+ outputStatus(((CoreException) status.getException()).getStatus(), nesting + 1);
+ }
+ }
+
+ private void outputStatusMessage(IStatus status, int nesting) {
+ // StringBuffer and Indent Management
+ StringBuffer buffer = new StringBuffer();
+ for (int i = 0; i < nesting; i++) {
+ buffer.append(NESTING);
+ }
+ // First we print the status message if applicable
+ if (status.getMessage() != null && status.getMessage().trim().length() > 0) {
+ if (status.getException() == null || status.getException() != null && status.getMessage().equals(status.getException().toString()) == false) {
+ buffer.append(status.getMessage());
+ if (status.getSeverity() == IStatus.ERROR) {
+ appendLine(ConsoleDocument.ERROR, buffer.toString(), 0);
+ } else if (status.getSeverity() == IStatus.WARNING) {
+ appendLine(ConsoleDocument.WARNING, buffer.toString(), 0);
+ } else {
+ appendLine(ConsoleDocument.INFO, buffer.toString(), 0);
+ }
+ buffer = new StringBuffer();
+ for (int i = 0; i < nesting + 1; i++) {
+ buffer.append(NESTING);
+ }
+ }
+ }
+ // Then we process the inner Exception if necessary
+ if (status.getException() != null) {
+ buffer.append(messageLineForStatus(status));
+ if (status.getSeverity() == IStatus.ERROR) {
+ appendLine(ConsoleDocument.ERROR, buffer.toString(), 0);
+ } else if (status.getSeverity() == IStatus.WARNING) {
+ appendLine(ConsoleDocument.WARNING, buffer.toString(), 0);
+ } else {
+ appendLine(ConsoleDocument.INFO, buffer.toString(), 0);
+ }
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse
+ * .jface.util.PropertyChangeEvent)
+ */
+ public void propertyChange(PropertyChangeEvent event) {
+ String property = event.getProperty();
+ // colors
+ if (_visible) {
+ if (property.equals(IEGFConsoleConstants.CONSOLE_WRAP) || property.equals(IEGFConsoleConstants.CONSOLE_WIDTH)) {
+ initWrapSetting();
+ } else if (property.equals(IEGFConsoleConstants.CONSOLE_LIMIT_OUTPUT) || property.equals(IEGFConsoleConstants.CONSOLE_HIGH_WATER_MARK) || property.equals(IEGFConsoleConstants.CONSOLE_LOW_WATER_MARK)) {
+ initLimitOutput();
+ } else if (property.equals(IEGFConsoleConstants.CONSOLE_ERROR_COLOR)) {
+ Color newColor = createColor(EGFConsolePlugin.getWorkbenchDisplay(), IEGFConsoleConstants.CONSOLE_ERROR_COLOR);
+ _errorStream.setColor(newColor);
+ _errorColor.dispose();
+ _errorColor = newColor;
+ } else if (property.equals(IEGFConsoleConstants.CONSOLE_INFO_COLOR)) {
+ Color newColor = createColor(EGFConsolePlugin.getWorkbenchDisplay(), IEGFConsoleConstants.CONSOLE_INFO_COLOR);
+ _infoStream.setColor(newColor);
+ _infoColor.dispose();
+ _infoColor = newColor;
+ } else if (property.equals(IEGFConsoleConstants.CONSOLE_WARNING_COLOR)) {
+ Color newColor = createColor(EGFConsolePlugin.getWorkbenchDisplay(), IEGFConsoleConstants.CONSOLE_WARNING_COLOR);
+ _warningStream.setColor(newColor);
+ _warningColor.dispose();
+ _warningColor = newColor;
+ } else if (property.equals(IEGFConsoleConstants.CONSOLE_FONT)) {
+ setFont(JFaceResources.getFont(IEGFConsoleConstants.CONSOLE_FONT));
+ } else if (property.equals(IEGFConsoleConstants.CONSOLE_BACKGROUND_COLOR)) {
+ setBackground(EGFConsolePlugin.getDefault().getPreferenceColor(IEGFConsoleConstants.CONSOLE_BACKGROUND_COLOR));
+ }
+ }
+ if (property.equals(IEGFConsoleConstants.CONSOLE_SHOW_ON_MESSAGE)) {
+ Object value = event.getNewValue();
+ if (value instanceof String) {
+ _showOnMessage = Boolean.valueOf((String) value).booleanValue();
+ } else {
+ _showOnMessage = ((Boolean) value).booleanValue();
+ }
+ }
+ }
+
+ private String messageLineForStatus(IStatus status) {
+ if (status.getSeverity() == IStatus.ERROR) {
+ return NLS.bind(ConsoleMessages.Console_error, new String[] { status.getException().toString() });
+ } else if (status.getSeverity() == IStatus.WARNING) {
+ return NLS.bind(ConsoleMessages.Console_warning, new String[] { status.getException().toString() });
+ } else if (status.getSeverity() == IStatus.INFO) {
+ return NLS.bind(ConsoleMessages.Console_info, new String[] { status.getException().toString() });
+ }
+ return status.getMessage();
+ }
+
+ /**
+ * Returns a color instance based on data from a preference field.
+ */
+ private Color createColor(Display display, String preference) {
+ RGB rgb = PreferenceConverter.getColor(EGFConsolePlugin.getDefault().getPreferenceStore(), preference);
+ return new Color(display, rgb);
+ }
+
+ /**
+ * Show the console.
+ *
+ * @param showNoMatterWhat
+ * ignore preferences if <code>true</code>
+ */
+ public void show(boolean showNoMatterWhat) {
+ if (showNoMatterWhat || _showOnMessage) {
+ if (_visible == false) {
+ ConsoleFactory.showConsole();
+ } else {
+ _consoleManager.showConsoleView(this);
+ }
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.console/src/org/eclipse/egf/console/internal/ConsoleDocument.java b/org.eclipse.egf.console/src/org/eclipse/egf/console/internal/ConsoleDocument.java
new file mode 100644
index 0000000..1fb257e
--- /dev/null
+++ b/org.eclipse.egf.console/src/org/eclipse/egf/console/internal/ConsoleDocument.java
@@ -0,0 +1,114 @@
+/**
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ * Thales Corporate Services S.A.S
+ */
+package org.eclipse.egf.console.internal;
+
+/**
+ * Simple circular buffer that stores a fix number of lines.
+ */
+public class ConsoleDocument {
+
+ public static final int ERROR = 0; // error received
+
+ public static final int INFO = 1; // message received
+
+ public static final int WARNING = 2; // error received
+
+ public static final int DELIMITER = 3; // delimiter text between runs
+
+ private int[] _lineTypes;
+
+ private String[] _lines;
+
+ private int[] _lineNestings;
+
+ private int _writeIndex = 0;
+
+ private int _readIndex = 0;
+
+ private static final int BUFFER_SIZE = 200;
+
+ public static class ConsoleLine {
+
+ public String _line;
+
+ public int _type;
+
+ public int _nesting;
+
+ ConsoleLine(String line, int type, int nesting) {
+ _line = line;
+ _type = type;
+ _nesting = nesting;
+ }
+
+ }
+
+ /**
+ * Creates an empty console document.
+ */
+ public ConsoleDocument() {
+ // Nothing to do
+ }
+
+ /**
+ * Clears the console document.
+ */
+ public void clear() {
+ _lineTypes = null;
+ _lines = null;
+ _writeIndex = 0;
+ _readIndex = 0;
+ }
+
+ /**
+ * Appends a line of the specified type to the end of the console.
+ */
+ public void appendConsoleLine(int type, String line, int nesting) {
+ if (_lines == null) {
+ _lines = new String[BUFFER_SIZE];
+ _lineTypes = new int[BUFFER_SIZE];
+ _lineNestings = new int[BUFFER_SIZE];
+ }
+ _lines[_writeIndex] = line;
+ _lineTypes[_writeIndex] = type;
+ _lineNestings[_writeIndex] = nesting;
+
+ if (++_writeIndex >= BUFFER_SIZE) {
+ _writeIndex = 0;
+ }
+ if (_writeIndex == _readIndex) {
+ if (++_readIndex >= BUFFER_SIZE) {
+ _readIndex = 0;
+ }
+ }
+ }
+
+ public ConsoleLine[] getLines() {
+ if (isEmpty()) {
+ return new ConsoleLine[0];
+ }
+ ConsoleLine[] docLines = new ConsoleLine[_readIndex > _writeIndex ? BUFFER_SIZE : _writeIndex];
+ int index = _readIndex;
+ for (int i = 0; i < docLines.length; i++) {
+ docLines[i] = new ConsoleLine(_lines[index], _lineTypes[index], _lineNestings[index]);
+ if (++index >= BUFFER_SIZE) {
+ index = 0;
+ }
+ }
+ return docLines;
+ }
+
+ public boolean isEmpty() {
+ return _writeIndex == _readIndex;
+ }
+
+}
diff --git a/org.eclipse.egf.console/src/org/eclipse/egf/console/internal/ConsoleFactory.java b/org.eclipse.egf.console/src/org/eclipse/egf/console/internal/ConsoleFactory.java
new file mode 100644
index 0000000..5545194
--- /dev/null
+++ b/org.eclipse.egf.console/src/org/eclipse/egf/console/internal/ConsoleFactory.java
@@ -0,0 +1,57 @@
+/**
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ * Thales Corporate Services S.A.S
+ */
+package org.eclipse.egf.console.internal;
+
+import org.eclipse.egf.console.EGFConsolePlugin;
+import org.eclipse.ui.console.ConsolePlugin;
+import org.eclipse.ui.console.IConsole;
+import org.eclipse.ui.console.IConsoleFactory;
+import org.eclipse.ui.console.IConsoleManager;
+
+public class ConsoleFactory implements IConsoleFactory {
+
+ public ConsoleFactory() {
+ // Nothing to do
+ }
+
+ public void openConsole() {
+ showConsole();
+ }
+
+ public static void showConsole() {
+ Console console = EGFConsolePlugin.getConsole();
+ if (console != null) {
+ IConsoleManager manager = ConsolePlugin.getDefault().getConsoleManager();
+ IConsole[] existing = manager.getConsoles();
+ boolean exists = false;
+ for (int i = 0; i < existing.length; i++) {
+ if (console == existing[i]) {
+ exists = true;
+ }
+ }
+ if (exists == false) {
+ manager.addConsoles(new IConsole[] { console });
+ }
+ manager.showConsoleView(console);
+ }
+ }
+
+ public static void closeConsole() {
+ IConsoleManager manager = ConsolePlugin.getDefault().getConsoleManager();
+ Console console = EGFConsolePlugin.getConsole();
+ if (console != null) {
+ manager.removeConsoles(new IConsole[] { console });
+ ConsolePlugin.getDefault().getConsoleManager().addConsoleListener(console.new MyLifecycle());
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.console/src/org/eclipse/egf/console/internal/ConsoleLineNotifier.java b/org.eclipse.egf.console/src/org/eclipse/egf/console/internal/ConsoleLineNotifier.java
new file mode 100644
index 0000000..f551167
--- /dev/null
+++ b/org.eclipse.egf.console/src/org/eclipse/egf/console/internal/ConsoleLineNotifier.java
@@ -0,0 +1,167 @@
+/**
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ * Thales Corporate Services S.A.S
+ */
+package org.eclipse.egf.console.internal;
+
+import java.util.StringTokenizer;
+
+import org.eclipse.egf.common.ui.helper.EditorHelper;
+import org.eclipse.egf.console.EGFConsolePlugin;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.console.IHyperlink;
+import org.eclipse.ui.console.IPatternMatchListener;
+import org.eclipse.ui.console.PatternMatchEvent;
+import org.eclipse.ui.console.TextConsole;
+
+/**
+ * Tracks text appended to the console and notifies listeners in terms of whole
+ * lines.
+ */
+public class ConsoleLineNotifier implements IPatternMatchListener {
+
+ /**
+ * The console this notifier is tracking
+ */
+ private Console _console = null;
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.console.IPatternMatchListenerDelegate#connect(org.eclipse
+ * .ui.console.TextConsole)
+ */
+ public void connect(TextConsole console) {
+ if (console instanceof Console) {
+ _console = (Console) console;
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.console.IPatternMatchListener#disconnect()
+ */
+ public synchronized void disconnect() {
+ _console = null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.console.IPatternMatchListener#matchFound(org.eclipse.ui.
+ * console.PatternMatchEvent)
+ */
+ public void matchFound(PatternMatchEvent event) {
+ try {
+ int offset = event.getOffset();
+ int length = event.getLength();
+ String text = _console.getDocument().get(offset, length);
+ // Platform
+ //
+ int index = text.indexOf("platform:/"); //$NON-NLS-1$
+ if (index != -1) {
+ buildLink(text, offset, length, "platform:/"); //$NON-NLS-1$
+ return;
+ }
+ // Plugin
+ //
+ index = text.indexOf("plugin:/"); //$NON-NLS-1$
+ if (index != -1) {
+ buildLink(text, offset, length, "plugin:/"); //$NON-NLS-1$
+ return;
+ }
+ } catch (BadLocationException e) {
+ // ignore
+ }
+ }
+
+ private void buildLink(String text, int offset, int length, String type) {
+ try {
+ int index = text.indexOf(type);
+ StringTokenizer tokenizer = new StringTokenizer(text, " "); //$NON-NLS-1$
+ while (tokenizer.hasMoreElements()) {
+ String elementName = tokenizer.nextToken();
+ if (elementName.startsWith(type)) {
+ URIHyperlink link = new URIHyperlink(URI.createURI(elementName));
+ _console.addHyperlink(link, offset + index, elementName.length());
+ return;
+ }
+ }
+ } catch (Exception e) {
+ // ignore
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.console.IPatternMatchListener#getPattern()
+ */
+ public String getPattern() {
+ return ".*\\r(\\n?)|.*\\n"; //$NON-NLS-1$
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.console.IPatternMatchListener#getCompilerFlags()
+ */
+ public int getCompilerFlags() {
+ return 0;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.console.IPatternMatchListener#getLineQualifier()
+ */
+ public String getLineQualifier() {
+ return "\\n|\\r"; //$NON-NLS-1$
+ }
+
+ private static class URIHyperlink implements IHyperlink {
+
+ private URI _uri;
+
+ public URIHyperlink(URI uri) {
+ _uri = uri;
+ }
+
+ public void linkEntered() {
+ // Nothing to do
+ }
+
+ public void linkExited() {
+ // Nothing to do
+ }
+
+ public void linkActivated() {
+ try {
+ if (_uri != null) {
+ IEditorPart part = EditorHelper.openEditor(_uri);
+ if (part != null && part instanceof IEditingDomainProvider) {
+ EditorHelper.setSelectionToViewer(part, _uri);
+ }
+ }
+ } catch (PartInitException pie) {
+ EGFConsolePlugin.getDefault().logError(pie);
+ }
+ }
+
+ }
+
+}
diff --git a/org.eclipse.egf.console/src/org/eclipse/egf/console/internal/ConsolePageParticipant.java b/org.eclipse.egf.console/src/org/eclipse/egf/console/internal/ConsolePageParticipant.java
new file mode 100644
index 0000000..1b56c83
--- /dev/null
+++ b/org.eclipse.egf.console/src/org/eclipse/egf/console/internal/ConsolePageParticipant.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ * Thales Corporate Services S.A.S
+ */
+package org.eclipse.egf.console.internal;
+
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.console.IConsole;
+import org.eclipse.ui.console.IConsoleConstants;
+import org.eclipse.ui.console.IConsolePageParticipant;
+import org.eclipse.ui.part.IPageBookViewPage;
+
+public class ConsolePageParticipant implements IConsolePageParticipant {
+
+ private ConsoleRemoveAction consoleRemoveAction;
+
+ public void init(IPageBookViewPage page, IConsole console) {
+ this.consoleRemoveAction = new ConsoleRemoveAction();
+ IActionBars bars = page.getSite().getActionBars();
+ bars.getToolBarManager().appendToGroup(IConsoleConstants.LAUNCH_GROUP, consoleRemoveAction);
+ }
+
+ public void dispose() {
+ this.consoleRemoveAction = null;
+ }
+
+ public void activated() {
+ // Nothing to do
+ }
+
+ public void deactivated() {
+ // Nothing to do
+ }
+
+ @SuppressWarnings("unchecked")
+ public Object getAdapter(Class adapter) {
+ return null;
+ }
+
+}
diff --git a/org.eclipse.egf.console/src/org/eclipse/egf/console/internal/ConsolePreferenceInitializer.java b/org.eclipse.egf.console/src/org/eclipse/egf/console/internal/ConsolePreferenceInitializer.java
new file mode 100644
index 0000000..b7daaf2
--- /dev/null
+++ b/org.eclipse.egf.console/src/org/eclipse/egf/console/internal/ConsolePreferenceInitializer.java
@@ -0,0 +1,62 @@
+/**
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ * Thales Corporate Services S.A.S
+ */
+package org.eclipse.egf.console.internal;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.egf.console.EGFConsolePlugin;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class ConsolePreferenceInitializer extends AbstractPreferenceInitializer {
+
+ public ConsolePreferenceInitializer() {
+ super();
+ }
+
+ /**
+ * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
+ */
+ @Override
+ public void initializeDefaultPreferences() {
+ final IPreferenceStore prefs = EGFConsolePlugin.getDefault().getPreferenceStore();
+ PreferenceConverter.setDefault(prefs, IEGFConsoleConstants.CONSOLE_ERROR_COLOR, new RGB(255, 0, 0));
+ PreferenceConverter.setDefault(prefs, IEGFConsoleConstants.CONSOLE_WARNING_COLOR, new RGB(0, 0, 255));
+ PreferenceConverter.setDefault(prefs, IEGFConsoleConstants.CONSOLE_INFO_COLOR, new RGB(64, 128, 128));
+ prefs.setDefault(IEGFConsoleConstants.CONSOLE_SHOW_ON_MESSAGE, true);
+ prefs.setDefault(IEGFConsoleConstants.CONSOLE_WRAP, false);
+ prefs.setDefault(IEGFConsoleConstants.CONSOLE_WIDTH, 220);
+ prefs.setDefault(IEGFConsoleConstants.CONSOLE_LIMIT_OUTPUT, true);
+ prefs.setDefault(IEGFConsoleConstants.CONSOLE_LOW_WATER_MARK, 8 * 1024);
+ prefs.setDefault(IEGFConsoleConstants.CONSOLE_HIGH_WATER_MARK, 64 * 1024);
+ // can be called in non-UI thread, so we must play safe
+ final Display display = EGFConsolePlugin.getWorkbenchDisplay();
+ if (display != null) {
+ if (Thread.currentThread().equals(display.getThread())) {
+ PreferenceConverter.setDefault(prefs, IEGFConsoleConstants.CONSOLE_BACKGROUND_COLOR, display.getSystemColor(SWT.COLOR_LIST_BACKGROUND).getRGB());
+ } else {
+ display.asyncExec(new Runnable() {
+ public void run() {
+ PreferenceConverter.setDefault(prefs, IEGFConsoleConstants.CONSOLE_BACKGROUND_COLOR, display.getSystemColor(SWT.COLOR_LIST_BACKGROUND).getRGB());
+ }
+ });
+ }
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.console/src/org/eclipse/egf/console/internal/ConsoleRemoveAction.java b/org.eclipse.egf.console/src/org/eclipse/egf/console/internal/ConsoleRemoveAction.java
new file mode 100644
index 0000000..94ba1e3
--- /dev/null
+++ b/org.eclipse.egf.console/src/org/eclipse/egf/console/internal/ConsoleRemoveAction.java
@@ -0,0 +1,34 @@
+/**
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ * Thales Corporate Services S.A.S
+ */
+package org.eclipse.egf.console.internal;
+
+import org.eclipse.egf.console.EGFConsolePlugin;
+import org.eclipse.egf.console.l10n.ConsoleMessages;
+import org.eclipse.jface.action.Action;
+
+public class ConsoleRemoveAction extends Action {
+
+ public static final String _id = "org.eclipse.egf.console.internal.ConsoleRemoveAction"; //$NON-NLS-1$
+
+ ConsoleRemoveAction() {
+ super(ConsoleMessages.Console_close);
+ setDisabledImageDescriptor(EGFConsolePlugin.getDefault().getImageDescriptor(IEGFConsoleConstants.IMG_DISABLED_CLOSE_CONSOLE));
+ setImageDescriptor(EGFConsolePlugin.getDefault().getImageDescriptor(IEGFConsoleConstants.IMG_ENABLED_CLOSE_CONSOLE));
+ setId(_id);
+ }
+
+ @Override
+ public void run() {
+ ConsoleFactory.closeConsole();
+ }
+
+}
diff --git a/org.eclipse.egf.console/src/org/eclipse/egf/console/internal/EGFLoggerFactory.java b/org.eclipse.egf.console/src/org/eclipse/egf/console/internal/EGFLoggerFactory.java
new file mode 100644
index 0000000..8ff453b
--- /dev/null
+++ b/org.eclipse.egf.console/src/org/eclipse/egf/console/internal/EGFLoggerFactory.java
@@ -0,0 +1,27 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.console.internal;
+
+import org.eclipse.egf.common.log.IEGFLogger;
+import org.eclipse.egf.common.log.IEGFLoggerFactory;
+import org.eclipse.egf.console.EGFConsolePlugin;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class EGFLoggerFactory implements IEGFLoggerFactory {
+
+ public IEGFLogger getLogger() {
+ return EGFConsolePlugin.getConsole();
+ }
+
+}
diff --git a/org.eclipse.egf.console/src/org/eclipse/egf/console/internal/IEGFConsoleConstants.java b/org.eclipse.egf.console/src/org/eclipse/egf/console/internal/IEGFConsoleConstants.java
new file mode 100644
index 0000000..5169507
--- /dev/null
+++ b/org.eclipse.egf.console/src/org/eclipse/egf/console/internal/IEGFConsoleConstants.java
@@ -0,0 +1,48 @@
+/**
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ * Thales Corporate Services S.A.S
+ */
+package org.eclipse.egf.console.internal;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public interface IEGFConsoleConstants {
+
+ public static final String IMG_SEARCH_CONSOLE = "eview16/console_view.gif"; //$NON-NLS-1$
+
+ public static final String IMG_DISABLED_CLOSE_CONSOLE = "dlcl16/close_console.gif"; //$NON-NLS-1$
+
+ public static final String IMG_ENABLED_CLOSE_CONSOLE = "elcl16/close_console.gif"; //$NON-NLS-1$
+
+ public static final String CONSOLE_WRAP = "org.eclipse.egf.console.internal.wrap"; //$NON-NLS-1$
+
+ public static final String CONSOLE_WIDTH = "org.eclipse.egf.console.internal.width"; //$NON-NLS-1$
+
+ public static final String CONSOLE_ERROR_COLOR = "org.eclipse.egf.console.internal.errorColor"; //$NON-NLS-1$
+
+ public static final String CONSOLE_WARNING_COLOR = "org.eclipse.egf.console.internal.warningColor"; //$NON-NLS-1$
+
+ public static final String CONSOLE_INFO_COLOR = "org.eclipse.egf.console.internal.informationColor"; //$NON-NLS-1$
+
+ public static final String CONSOLE_SHOW_ON_MESSAGE = "org.eclipse.egf.console.internal.showOnMessage"; //$NON-NLS-1$
+
+ public static final String CONSOLE_LIMIT_OUTPUT = "org.eclipse.egf.console.internal.limitOutput"; //$NON-NLS-1$
+
+ public static final String CONSOLE_LOW_WATER_MARK = "org.eclipse.egf.console.internal.lowWaterMark"; //$NON-NLS-1$
+
+ public static final String CONSOLE_HIGH_WATER_MARK = "org.eclipse.egf.console.internal.highWaterMark"; //$NON-NLS-1$
+
+ public static final String CONSOLE_BACKGROUND_COLOR = "org.eclipse.egf.console.internal.backgroundColor"; //$NON-NLS-1$
+
+ public static final String CONSOLE_FONT = "org.eclipse.egf.console.internal.font"; //$NON-NLS-1$
+
+}
diff --git a/org.eclipse.egf.console/src/org/eclipse/egf/console/l10n/ConsoleMessages.java b/org.eclipse.egf.console/src/org/eclipse/egf/console/l10n/ConsoleMessages.java
new file mode 100644
index 0000000..fa87941
--- /dev/null
+++ b/org.eclipse.egf.console/src/org/eclipse/egf/console/l10n/ConsoleMessages.java
@@ -0,0 +1,69 @@
+/**
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ * Thales Corporate Services S.A.S
+ */
+package org.eclipse.egf.console.l10n;
+
+import org.eclipse.osgi.util.NLS;
+
+public class ConsoleMessages {
+
+ private static final String BUNDLE_NAME = "org.eclipse.egf.console.l10n.messages"; //$NON-NLS-1$
+
+ private ConsoleMessages() {
+ // Do not instantiate
+ }
+
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, ConsoleMessages.class);
+ }
+
+ public static String ConsolePreferencePage_Error;
+
+ public static String ConsolePreferencePage_Warning;
+
+ public static String ConsolePreferencePage_Information;
+
+ public static String ConsolePreferencePage_Debug;
+
+ public static String ConsolePreferencePage_General;
+
+ public static String ConsolePreferencePage_ShowOnMessage;
+
+ public static String ConsolePreferencePage_limitOutput;
+
+ public static String ConsolePreferencePage_highWaterMark;
+
+ public static String ConsolePreferencePage_Wrap_text;
+
+ public static String ConsolePreferencePage_Maximum_Console_width;
+
+ public static String ConsolePreferencePage_Error_Console_width;
+
+ public static String ConsolePreferencePage_Console_buffer_size;
+
+ public static String ConsolePreferencePage_BackgroundColor;
+
+ public static String Console_resultTimeFormat;
+
+ public static String Console_close;
+
+ public static String Console_error;
+
+ public static String Console_info;
+
+ public static String Console_warning;
+
+ public static String Console_see_your_log_file;
+
+ public static String EGF_Console;
+
+}
diff --git a/org.eclipse.egf.console/src/org/eclipse/egf/console/l10n/messages.properties b/org.eclipse.egf.console/src/org/eclipse/egf/console/l10n/messages.properties
new file mode 100644
index 0000000..9734bdf
--- /dev/null
+++ b/org.eclipse.egf.console/src/org/eclipse/egf/console/l10n/messages.properties
@@ -0,0 +1,31 @@
+##
+# Copyright (c) 2000, 2009 IBM Corporation and others.
+# 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:
+# IBM Corporation - initial API and implementation
+# Thales Corporate Services S.A.S
+##
+ConsolePreferencePage_General=EGF Console Settings:
+ConsolePreferencePage_Error=Error Message
+ConsolePreferencePage_Warning=Warning Message
+ConsolePreferencePage_Information=Information Message
+ConsolePreferencePage_Debug=Debug Message
+ConsolePreferencePage_ShowOnMessage=&Show on Message
+ConsolePreferencePage_limitOutput=&Limit Output
+ConsolePreferencePage_highWaterMark=&Buffer Size (Characters):
+ConsolePreferencePage_Wrap_text=Fixed &width
+ConsolePreferencePage_Maximum_Console_width=&Maximum character width:
+ConsolePreferencePage_Error_Console_width=Character width must be between 80 and Integer.MAX_VALUE - 1.
+ConsolePreferencePage_Console_buffer_size=Buffer size must be between 1000 and Integer.MAX_VALUE - 1.
+ConsolePreferencePage_BackgroundColor=Back&ground color:
+Console_resultTimeFormat='(took 'm:ss.SSS')'
+Console_close=Close
+Console_error=Error: {0}
+Console_info=Info: {0}
+Console_warning=Warning: {0}
+Console_see_your_log_file=See your Log file for further details.
+EGF_Console=EGF Console
diff --git a/org.eclipse.egf.console/src/org/eclipse/egf/console/preferences/EGFPreferencePage.java b/org.eclipse.egf.console/src/org/eclipse/egf/console/preferences/EGFPreferencePage.java
new file mode 100644
index 0000000..1f9ff30
--- /dev/null
+++ b/org.eclipse.egf.console/src/org/eclipse/egf/console/preferences/EGFPreferencePage.java
@@ -0,0 +1,236 @@
+/**
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ */
+package org.eclipse.egf.console.preferences;
+
+import org.eclipse.egf.common.ui.fields.BooleanFieldEditor2;
+import org.eclipse.egf.console.EGFConsolePlugin;
+import org.eclipse.egf.console.internal.IEGFConsoleConstants;
+import org.eclipse.egf.console.l10n.ConsoleMessages;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.preference.ColorFieldEditor;
+import org.eclipse.jface.preference.FieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.jface.preference.IntegerFieldEditor;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+public class EGFPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
+
+ private BooleanFieldEditor2 _wrapEditor = null;
+
+ private ConsoleIntegerFieldEditor _widthEditor = null;
+
+ private ColorFieldEditor _errorColorEditor;
+
+ private ColorFieldEditor _infoColorEditor;
+
+ private ColorFieldEditor _warningColorEditor;
+
+ private ColorFieldEditor _backgroundColorEditor;
+
+ private BooleanFieldEditor2 _showOnMessage;
+
+ private BooleanFieldEditor2 _restrictOutput;
+
+ private ConsoleIntegerFieldEditor _highWaterMark;
+
+ /**
+ * This class exists to provide visibility to the
+ * <code>refreshValidState</code> method and to perform more intelligent
+ * clearing of the error message.
+ */
+ protected class ConsoleIntegerFieldEditor extends IntegerFieldEditor {
+
+ public ConsoleIntegerFieldEditor(String name, String labelText, Composite parent) {
+ super(name, labelText, parent);
+ }
+
+ /**
+ * @see org.eclipse.jface.preference.FieldEditor#refreshValidState()
+ */
+ @Override
+ protected void refreshValidState() {
+ super.refreshValidState();
+ }
+
+ /**
+ * Clears the error message from the message line if the error message is
+ * the error message from this field editor.
+ */
+ @Override
+ protected void clearErrorMessage() {
+ if (canClearErrorMessage()) {
+ super.clearErrorMessage();
+ }
+ }
+
+ }
+
+ public EGFPreferencePage() {
+ super(GRID);
+ setDescription(ConsoleMessages.ConsolePreferencePage_General);
+ setPreferenceStore(EGFConsolePlugin.getDefault().getPreferenceStore());
+ }
+
+ protected boolean canClearErrorMessage() {
+ if (_widthEditor.isValid() && _highWaterMark.isValid()) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Creates a new color field editor.
+ */
+ private ColorFieldEditor createColorFieldEditor(String preferenceName, String label, Composite parent) {
+ ColorFieldEditor editor = new ColorFieldEditor(preferenceName, label, parent);
+ editor.setPage(this);
+ editor.setPreferenceStore(getPreferenceStore());
+ return editor;
+ }
+
+ /**
+ * Update enablement of width editor based on enablement of 'fixed width'
+ * editor.
+ */
+ protected void updateWidthEditor() {
+ Button b = _wrapEditor.getChangeControl(getFieldEditorParent());
+ _widthEditor.getTextControl(getFieldEditorParent()).setEnabled(b.getSelection());
+ _widthEditor.getLabelControl(getFieldEditorParent()).setEnabled(b.getSelection());
+ }
+
+ /**
+ * Update enablement of buffer size editor based on enablement of 'limit
+ * console output' editor.
+ */
+ protected void updateBufferSizeEditor() {
+ Button b = _restrictOutput.getChangeControl(getFieldEditorParent());
+ _highWaterMark.getTextControl(getFieldEditorParent()).setEnabled(b.getSelection());
+ _highWaterMark.getLabelControl(getFieldEditorParent()).setEnabled(b.getSelection());
+ }
+
+ @Override
+ protected void createFieldEditors() {
+
+ _wrapEditor = new BooleanFieldEditor2(IEGFConsoleConstants.CONSOLE_WRAP, ConsoleMessages.ConsolePreferencePage_Wrap_text, SWT.NONE, getFieldEditorParent());
+ addField(_wrapEditor);
+
+ _widthEditor = new ConsoleIntegerFieldEditor(IEGFConsoleConstants.CONSOLE_WIDTH, ConsoleMessages.ConsolePreferencePage_Maximum_Console_width, getFieldEditorParent());
+ _widthEditor.setValidRange(80, Integer.MAX_VALUE - 1);
+ addField(_widthEditor);
+ _widthEditor.setErrorMessage(ConsoleMessages.ConsolePreferencePage_Error_Console_width);
+
+ _wrapEditor.getChangeControl(getFieldEditorParent()).addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ updateWidthEditor();
+ }
+ });
+
+ _restrictOutput = new BooleanFieldEditor2(IEGFConsoleConstants.CONSOLE_LIMIT_OUTPUT, ConsoleMessages.ConsolePreferencePage_limitOutput, SWT.NONE, getFieldEditorParent());
+ addField(_restrictOutput);
+
+ _highWaterMark = new ConsoleIntegerFieldEditor(IEGFConsoleConstants.CONSOLE_HIGH_WATER_MARK, ConsoleMessages.ConsolePreferencePage_highWaterMark, getFieldEditorParent());
+ addField(_highWaterMark);
+ _highWaterMark.setValidRange(1000, Integer.MAX_VALUE - 1);
+ _highWaterMark.setErrorMessage(ConsoleMessages.ConsolePreferencePage_Console_buffer_size);
+
+ _restrictOutput.getChangeControl(getFieldEditorParent()).addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ updateBufferSizeEditor();
+ }
+ });
+
+ _showOnMessage = new BooleanFieldEditor2(IEGFConsoleConstants.CONSOLE_SHOW_ON_MESSAGE, ConsoleMessages.ConsolePreferencePage_ShowOnMessage, SWT.NONE, getFieldEditorParent());
+ addField(_showOnMessage);
+
+ _errorColorEditor = createColorFieldEditor(IEGFConsoleConstants.CONSOLE_ERROR_COLOR, ConsoleMessages.ConsolePreferencePage_Error, getFieldEditorParent());
+ addField(_errorColorEditor);
+
+ _infoColorEditor = createColorFieldEditor(IEGFConsoleConstants.CONSOLE_INFO_COLOR, ConsoleMessages.ConsolePreferencePage_Information, getFieldEditorParent());
+ addField(_infoColorEditor);
+
+ _warningColorEditor = createColorFieldEditor(IEGFConsoleConstants.CONSOLE_WARNING_COLOR, ConsoleMessages.ConsolePreferencePage_Warning, getFieldEditorParent());
+ addField(_warningColorEditor);
+
+ _backgroundColorEditor = createColorFieldEditor(IEGFConsoleConstants.CONSOLE_BACKGROUND_COLOR, ConsoleMessages.ConsolePreferencePage_BackgroundColor, getFieldEditorParent());
+ addField(_backgroundColorEditor);
+
+ Dialog.applyDialogFont(getFieldEditorParent());
+ getPreferenceStore().addPropertyChangeListener(this);
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+ */
+ public void init(IWorkbench workbench) {
+ // Nothing to do
+ }
+
+ /**
+ * @see org.eclipse.jface.preference.FieldEditorPreferencePage#initialize()
+ */
+ @Override
+ protected void initialize() {
+ super.initialize();
+ updateWidthEditor();
+ updateBufferSizeEditor();
+ }
+
+ /**
+ * @see org.eclipse.jface.preference.PreferencePage#performDefaults()
+ */
+ @Override
+ protected void performDefaults() {
+ super.performDefaults();
+ updateWidthEditor();
+ updateBufferSizeEditor();
+ }
+
+ /**
+ * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
+ */
+ @Override
+ public void propertyChange(PropertyChangeEvent event) {
+
+ if (event.getProperty().equals(FieldEditor.IS_VALID)) {
+ boolean newValue = ((Boolean) event.getNewValue()).booleanValue();
+ // If the new value is true then we must check all field editors.
+ // If it is false, then the page is invalid in any case.
+ if (newValue) {
+ if (_widthEditor != null && event.getSource() != _widthEditor) {
+ _widthEditor.refreshValidState();
+ }
+ if (_highWaterMark != null && event.getSource() != _highWaterMark) {
+ _highWaterMark.refreshValidState();
+ }
+ checkState();
+ } else {
+ super.propertyChange(event);
+ }
+
+ } else {
+ super.propertyChange(event);
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.core.pde/.classpath b/org.eclipse.egf.core.pde/.classpath
new file mode 100644
index 0000000..ce15958
--- /dev/null
+++ b/org.eclipse.egf.core.pde/.classpath
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
+ <accessrules>
+ <accessrule kind="accessible" pattern="org/eclipse/**/internal/**"/>
+ </accessrules>
+ </classpathentry>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.egf.core.pde/.options b/org.eclipse.egf.core.pde/.options
new file mode 100644
index 0000000..a5ac963
--- /dev/null
+++ b/org.eclipse.egf.core.pde/.options
@@ -0,0 +1,2 @@
+# Prints debug information
+org.eclipse.egf.core.pde/debug=true
diff --git a/org.eclipse.egf.core.pde/.project b/org.eclipse.egf.core.pde/.project
new file mode 100644
index 0000000..0428625
--- /dev/null
+++ b/org.eclipse.egf.core.pde/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.core.pde</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.core.pde/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egf.core.pde/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..d50d681
--- /dev/null
+++ b/org.eclipse.egf.core.pde/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:49:22 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.egf.core.pde/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egf.core.pde/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..1cc5fc6
--- /dev/null
+++ b/org.eclipse.egf.core.pde/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Mon Mar 09 16:04:04 CET 2009
+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/org.eclipse.egf.core.pde/META-INF/MANIFEST.MF b/org.eclipse.egf.core.pde/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..ac84211
--- /dev/null
+++ b/org.eclipse.egf.core.pde/META-INF/MANIFEST.MF
@@ -0,0 +1,26 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.core.pde;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.egf.core.pde.EGFPDEPlugin
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle:
+ org.eclipse.egf.common.ui;visibility:=reexport,
+ org.eclipse.egf.core;visibility:=reexport,
+ org.eclipse.jface.text,
+ org.eclipse.pde.ui,
+ org.eclipse.search,
+ org.eclipse.ui.editors,
+ org.eclipse.ui.forms,
+ org.eclipse.ui.ide
+Export-Package:
+ org.eclipse.egf.core.pde,
+ org.eclipse.egf.core.pde.extension,
+ org.eclipse.egf.core.pde.helper,
+ org.eclipse.egf.core.pde.plugin,
+ org.eclipse.egf.core.pde.tools
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.egf.core.pde/about.html b/org.eclipse.egf.core.pde/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/org.eclipse.egf.core.pde/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/org.eclipse.egf.core.pde/build.properties b/org.eclipse.egf.core.pde/build.properties
new file mode 100644
index 0000000..c9848de
--- /dev/null
+++ b/org.eclipse.egf.core.pde/build.properties
@@ -0,0 +1,18 @@
+##
+# 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
+##
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ .options,\
+ about.html,\
+ plugin.properties
+src.includes = about.html
diff --git a/org.eclipse.egf.core.pde/plugin.properties b/org.eclipse.egf.core.pde/plugin.properties
new file mode 100644
index 0000000..0d2ff1a
--- /dev/null
+++ b/org.eclipse.egf.core.pde/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 Core PDE (Incubation)
+providerName=Eclipse Modeling Project
diff --git a/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/EGFPDEPlugin.java b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/EGFPDEPlugin.java
new file mode 100644
index 0000000..7d929b9
--- /dev/null
+++ b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/EGFPDEPlugin.java
@@ -0,0 +1,271 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.pde;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.ISaveContext;
+import org.eclipse.core.resources.ISaveParticipant;
+import org.eclipse.core.resources.ISavedState;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.egf.common.helper.ProjectHelper;
+import org.eclipse.egf.common.ui.activator.EGFAbstractUIPlugin;
+import org.eclipse.egf.core.fcore.IResourceFcoreListener;
+import org.eclipse.egf.core.pde.extension.IFcoreExtensionFactory;
+import org.eclipse.egf.core.pde.internal.FcoreGeneratorHelper;
+import org.eclipse.egf.core.pde.internal.extension.FcoreExtensionFactory;
+import org.eclipse.egf.core.pde.internal.resource.FcoreResourceListener;
+import org.eclipse.egf.core.pde.l10n.EGFPDEMessages;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.internal.core.build.WorkspaceBuildModel;
+import org.eclipse.pde.internal.ui.util.PDEModelUtility;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class EGFPDEPlugin extends EGFAbstractUIPlugin implements ISaveParticipant {
+
+ /**
+ * The shared instance
+ */
+ private static EGFPDEPlugin __plugin;
+
+ /**
+ * Fcore Resource listener
+ */
+ private FcoreResourceListener _fcoreResourceListener;
+
+ /**
+ * Return the display.
+ *
+ * @return
+ */
+ public static Display getDisplay() {
+ // Get the display.
+ Display display = null;
+ if (PlatformUI.isWorkbenchRunning()) {
+ display = PlatformUI.getWorkbench().getDisplay();
+ } else {
+ // Case of the headless mode.
+ display = Display.getDefault();
+ }
+ return display;
+ }
+
+ /**
+ *
+ * Returns the currently active window for this workbench (if any). Returns
+ * <code>null</code> if there is no active workbench window. Returns
+ * <code>null</code> if called from a non-UI thread.
+ *
+ * @return the active workbench window, or <code>null</code> if there is
+ * no active workbench window or if called from a non-UI thread
+ */
+ public static IWorkbenchWindow getActiveWorkbenchWindow() {
+ return getDefault().getWorkbench().getActiveWorkbenchWindow();
+ }
+
+ /**
+ * Returns the currently active shell for this workbench (if any).
+ *
+ * @return the active workbench shell.
+ */
+ public static Shell getActiveWorkbenchShell() {
+ IWorkbenchWindow window = getActiveWorkbenchWindow();
+ if (window == null) {
+ IWorkbenchWindow[] windows = getDefault().getWorkbench().getWorkbenchWindows();
+ if (windows.length > 0) {
+ return windows[0].getShell();
+ }
+ } else {
+ return window.getShell();
+ }
+ return null;
+ }
+
+ /**
+ * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ __plugin = this;
+ // Listener initalization
+ _fcoreResourceListener = new FcoreResourceListener();
+ // process deltas since last activated in indexer thread so that indexes are
+ // up-to-date.
+ // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=38658
+ final IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ Job processSavedState = new Job(EGFPDEMessages.savedState_jobName) {
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ // add save participant and process delta atomically
+ // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=59937
+ workspace.run(new IWorkspaceRunnable() {
+ public void run(IProgressMonitor progress) throws CoreException {
+ ISavedState savedState = workspace.addSaveParticipant(EGFPDEPlugin.getDefault(), EGFPDEPlugin.this);
+ if (savedState != null) {
+ // the event type coming from the saved state is always POST_BUILD
+ // force it to be POST_CHANGE so that the delta processor can handle it
+ EGFPDEPlugin.this._fcoreResourceListener._overridenEventType = IResourceChangeEvent.POST_CHANGE;
+ savedState.processResourceChangeEvents(EGFPDEPlugin.this._fcoreResourceListener);
+ }
+ }
+ }, monitor);
+ } catch (CoreException e) {
+ return e.getStatus();
+ }
+ return Status.OK_STATUS;
+ }
+ };
+ processSavedState.setSystem(true);
+ processSavedState.setPriority(Job.SHORT);
+ processSavedState.schedule();
+ }
+
+ public void doneSaving(ISaveContext saveContext) {
+ // Nothing to do
+ }
+
+ public void prepareToSave(ISaveContext saveContext) throws CoreException {
+ // Nothing to do
+ }
+
+ public void rollback(ISaveContext saveContext) {
+ // Nothing to do
+ }
+
+ public void saving(ISaveContext saveContext) throws CoreException {
+ // no state to be saved by the plug-in, but request a
+ // resource delta to be used on next activation.
+ saveContext.needDelta();
+ }
+
+ /**
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ // Stop our listeners
+ _fcoreResourceListener.dispose();
+ _fcoreResourceListener = null;
+ __plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static EGFPDEPlugin getDefault() {
+ return __plugin;
+ }
+
+ /**
+ * Get a factory component extension helper.
+ *
+ * @return
+ */
+ public static IFcoreExtensionFactory getFcoreExtensionHelper() {
+ return FcoreExtensionFactory.getInstance();
+ }
+
+ /**
+ * Add a listener
+ *
+ * @param listener
+ * the listener to be added
+ */
+ public void addResourceFcoreListener(IResourceFcoreListener listener) {
+ _fcoreResourceListener.addResourceFcoreListener(listener);
+ }
+
+ /**
+ * Remove a listener
+ *
+ * @param listener
+ * the listener to be removed
+ */
+ public void removeResourceFcoreListener(IResourceFcoreListener listener) {
+ _fcoreResourceListener.removeResourceFcoreListener(listener);
+ }
+
+ /**
+ * Get the plug-in file from an {@link IPluginModelBase} element.
+ *
+ * @param pluginModelBase_p
+ * @return null if file does not exist.
+ */
+ public IFile getFile(IPluginModelBase pluginModelBase) {
+ return getFile(ProjectHelper.getProject(pluginModelBase));
+ }
+
+ /**
+ * Get the plug-in file for given project.
+ *
+ * @param project
+ * @return null if file does not exist.
+ */
+ public IFile getFile(IProject project) {
+ // Precondition.
+ if (project == null) {
+ return null;
+ }
+ IFile plugin = project.getFile(PDEModelUtility.F_PLUGIN);
+ return plugin.exists() ? plugin : null;
+ }
+
+ /**
+ * Is the given file the plug-in file hosts in an {@link IProject}.
+ *
+ * @param resource
+ * @return true if given resource is the plug-in file (plugin.xml); false
+ * otherwise.
+ */
+ public boolean isPluginFile(IResource resource) {
+ // Check if given resource is an IFile and the plug-in file ?
+ if (resource != null && resource instanceof IFile) {
+ return ((IFile) resource).getName().equals(PDEModelUtility.F_PLUGIN);
+ }
+ return false;
+ }
+
+ /**
+ * Add an entry with specified entry name in the binary build for given
+ * project.
+ */
+ public void addEntryInBinaryBuild(IProject project, String entryName) throws CoreException {
+ // Preconditions.
+ if (project == null || entryName == null) {
+ return;
+ }
+ WorkspaceBuildModel buildModel = FcoreGeneratorHelper.getBuildModel(project);
+ FcoreGeneratorHelper.addEntryInBinaryBuild(buildModel, entryName);
+ buildModel.save();
+ }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/extension/IFcoreExtensionFactory.java b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/extension/IFcoreExtensionFactory.java
new file mode 100644
index 0000000..25c312c
--- /dev/null
+++ b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/extension/IFcoreExtensionFactory.java
@@ -0,0 +1,43 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.pde.extension;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.egf.core.pde.plugin.IPluginChangesCommand;
+
+/**
+ * This factory creates commands to deal with "fcore" extension-point.
+ *
+ * @author Xavier Maysonnave
+ */
+public interface IFcoreExtensionFactory {
+
+ /**
+ * Set an extension matching "fcore" extension-point for given parameters.
+ *
+ * @param path
+ * @return an {@link IPluginChangesCommand} instance that performs this
+ * change.
+ */
+ public IPluginChangesCommand setFcoreExtension(IPath path) throws CoreException;
+
+ /**
+ * Unset an existing extension matching "fcore" extension-point for given
+ * parameters.
+ *
+ * @param path
+ * @return an {@link IPluginChangesCommand} instance that performs this
+ * change.
+ */
+ public IPluginChangesCommand unsetFcoreExtension(IPath path) throws CoreException;
+
+}
diff --git a/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/helper/ExtensionHelper.java b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/helper/ExtensionHelper.java
new file mode 100644
index 0000000..51e0417
--- /dev/null
+++ b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/helper/ExtensionHelper.java
@@ -0,0 +1,146 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.pde.helper;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.pde.core.plugin.IExtensions;
+import org.eclipse.pde.core.plugin.IExtensionsModelFactory;
+import org.eclipse.pde.core.plugin.IPluginElement;
+import org.eclipse.pde.core.plugin.IPluginExtension;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.core.plugin.IPluginModelFactory;
+import org.eclipse.pde.core.plugin.IPluginObject;
+import org.eclipse.pde.core.plugin.IPluginParent;
+
+/**
+ * Provides helpful methods to deal with Extension used in plug-in file.
+ *
+ * @author fournier
+ */
+public class ExtensionHelper {
+
+ /**
+ * Create a new extension into given plug-in model object.
+ *
+ * @param pluginModelBase
+ * @param extensionPointId
+ * the fully qualified extension-point id.
+ * @return an {@link IPluginExtension} instance or null if a creation error
+ * occurs.
+ */
+ public static IPluginExtension createExtension(IPluginModelBase pluginModelBase, String extensionPointId) throws CoreException {
+ IPluginExtension extension = null;
+ // Get the factory.
+ IPluginModelFactory pluginModelFactory = pluginModelBase.getPluginFactory();
+ if (pluginModelFactory == null) {
+ return null;
+ }
+ // Create an extension.
+ extension = pluginModelFactory.createExtension();
+ if (extension == null) {
+ return null;
+ }
+ // Set the matching extension point.
+ extension.setPoint(extensionPointId);
+ // Add it to the plug-in extensions container.
+ pluginModelBase.getExtensions().add(extension);
+ // Return extension
+ return extension;
+ }
+
+ /**
+ * Create a plug-in element and add it into parent.
+ *
+ * @param parent
+ * @return an {@link IPluginElement} instance or null if a creation error
+ * occurs.
+ */
+ public static IPluginElement createPluginElement(IPluginParent parent, String name) throws CoreException {
+ if (parent == null) {
+ return null;
+ }
+ IPluginElement element = null;
+ // Get the factory.
+ IExtensionsModelFactory factory = parent.getModel().getFactory();
+ if (factory == null) {
+ return null;
+ }
+ element = factory.createElement(parent);
+ if (element == null) {
+ return null;
+ }
+ // Set element name.
+ element.setName(name);
+ // Add it to the extension content.
+ parent.add(element);
+ // Return element
+ return element;
+ }
+
+ /**
+ * Get a list of {@link IPluginExtension} matching given extension-point id.
+ *
+ * @param extensions
+ * extension part where is stored all extensions and
+ * extension-points.
+ * @param fullyQualifiedExtensionPointId
+ * fully qualified extension-point id (with the id of plug-in that
+ * hosts that one.)
+ * @return a not null array of {@link IPluginExtension}.
+ */
+ public static IPluginExtension[] getPluginExtension(IExtensions extensions, String fullyQualifiedExtensionPointId) {
+ List<IPluginExtension> result = new ArrayList<IPluginExtension>();
+ // Check Preconditions
+ if (fullyQualifiedExtensionPointId == null || extensions == null) {
+ return result.toArray(new IPluginExtension[0]);
+ }
+ // Get all defined extensions.
+ for (IPluginExtension pluginExtension : extensions.getExtensions()) {
+ // Look up for the one related to given point id.
+ if (fullyQualifiedExtensionPointId.equals(pluginExtension.getPoint())) {
+ result.add(pluginExtension);
+ }
+ }
+ return result.toArray(new IPluginExtension[result.size()]);
+ }
+
+ /**
+ * Get the {@link IPluginElement} instances for given parameters.<br>
+ * The research looks up for children with a name equals to
+ * <code>nodeName_p</code>.
+ *
+ * @param parent
+ * @param element
+ * @return a not null array of {@link IPluginElement}.
+ */
+ public static IPluginElement[] getPluginElement(IPluginParent parent, String element) {
+ List<IPluginElement> result = new ArrayList<IPluginElement>(0);
+ // Check Preconditions.
+ if (element == null || parent == null) {
+ return result.toArray(new IPluginElement[0]);
+ }
+ // Loop over children to find the ones with specified node name.
+ for (IPluginObject pluginObject : parent.getChildren()) {
+ if (pluginObject instanceof IPluginElement == false) {
+ continue;
+ }
+ IPluginElement pluginElement = (IPluginElement) pluginObject;
+ if (element.equals(pluginElement.getName())) {
+ result.add(pluginElement);
+ }
+ }
+ return result.toArray(new IPluginElement[result.size()]);
+ }
+
+}
diff --git a/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/helper/PluginHelper.java b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/helper/PluginHelper.java
new file mode 100644
index 0000000..7d9f6e8
--- /dev/null
+++ b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/helper/PluginHelper.java
@@ -0,0 +1,158 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.pde.helper;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.egf.common.helper.BundleHelper;
+import org.eclipse.egf.common.helper.ProjectHelper;
+import org.eclipse.egf.core.pde.EGFPDEPlugin;
+import org.eclipse.egf.core.pde.internal.FcoreGeneratorHelper;
+import org.eclipse.egf.core.pde.internal.ui.PDEModelUtility;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.core.plugin.IPluginBase;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.internal.core.TargetPlatformHelper;
+import org.eclipse.pde.internal.core.build.WorkspaceBuildModel;
+import org.eclipse.pde.internal.core.plugin.WorkspaceFragmentModel;
+import org.eclipse.pde.internal.core.plugin.WorkspacePluginModel;
+import org.eclipse.pde.internal.core.plugin.WorkspacePluginModelBase;
+
+/**
+ * Implement a plug-in changes command runner.
+ *
+ * @author Guillaume Brocard
+ */
+public class PluginHelper {
+
+ private PluginHelper() {
+ // Prevent Instantiation
+ }
+
+ /**
+ * 3.0 level compliance of plugin.xml
+ */
+ private static final String PLUGIN_VERSION_3_0 = "3.0"; //$NON-NLS-1$
+
+ /**
+ * 3.2 level compliance of plugin.xml
+ */
+ private static final String PLUGIN_VERSION_3_2 = "3.2"; //$NON-NLS-1$
+
+ /**
+ * Update the build.properties file to add the plugin.xml file in
+ * bin.includes.
+ *
+ * @param model
+ */
+ public static void updateBuildFile(WorkspacePluginModelBase model) throws CoreException {
+ // Add the newly created plug-in file in the build.properties.
+ IFile file = model.getFile();
+ WorkspaceBuildModel buildModel = (WorkspaceBuildModel) model.getBuildModel();
+ IProject project = file.getProject();
+ if (buildModel == null) {
+ buildModel = FcoreGeneratorHelper.getBuildModel(project);
+ model.setBuildModel(buildModel);
+ }
+ FcoreGeneratorHelper.addEntryInBinaryBuild(buildModel, PDEModelUtility.F_PLUGIN);
+ // Save the build.properties.
+ buildModel.save();
+ }
+
+ /**
+ * Create plug-in model object
+ *
+ * @param model
+ * @param bundleRelativeFileName
+ * the searched bundle file name.<br>
+ * @param bundleId
+ * The bundle id.
+ * @return a {@link WorkspacePluginModelBase} instance or null if
+ * instantiation fails.
+ */
+ public static WorkspacePluginModelBase createWorkspacePluginModelBase(IPluginModelBase model) throws CoreException {
+ IFile file = getFile(model, PDEModelUtility.F_PLUGIN);
+ if (file == null) {
+ return null;
+ }
+ WorkspacePluginModelBase pluginModel = null;
+ // Get the real model file.
+ pluginModel = (WorkspacePluginModelBase) getModel(file);
+ if (pluginModel == null) {
+ throw new CoreException(EGFPDEPlugin.getDefault().newStatus(IStatus.ERROR, NLS.bind("PluginChangesCommandRunner.createWorkspacePluginModelBase(..) _ bundleId ''{0}''.", BundleHelper.getBundleId(model)), null)); //$NON-NLS-1$
+ }
+ // Set default attributes.
+ IPluginBase base = pluginModel.getPluginBase();
+ base.setSchemaVersion(TargetPlatformHelper.getTargetVersion() < 3.2 ? PLUGIN_VERSION_3_0 : PLUGIN_VERSION_3_2);
+ return pluginModel;
+ }
+
+ /**
+ * Test whether or not given bundle model object exists.
+ *
+ * @param model
+ * @param bundleRelativeFileName
+ * the searched bundle file name.<br>
+ * @return
+ */
+ public static boolean bundleFileExists(IPluginModelBase model, String file) {
+ IFile result = getFile(model, file);
+ if (file != null) {
+ return result.exists();
+ }
+ return false;
+ }
+
+ /**
+ * Get the Plug-in object for given {@link IFile} related to a plugin.xml
+ * file.
+ *
+ * @param file
+ * @return
+ */
+ public static IPluginModelBase getModel(IFile file) {
+ if (file == null) {
+ return null;
+ }
+ if (PDEModelUtility.F_PLUGIN.equals(file.getName())) {
+ return new WorkspacePluginModel(file, false);
+ } else if (PDEModelUtility.F_FRAGMENT.equals(file.getName())) {
+ return new WorkspaceFragmentModel(file, false);
+ }
+ return null;
+ }
+
+ /**
+ * Get the plug-in file for given plug-in model object (without checking
+ * existence) for specified bundle fileName.
+ *
+ * @param model
+ * @param file
+ * the searched bundle file name.<br>
+ * @return.
+ */
+ public static IFile getFile(IPluginModelBase model, String file) {
+ // Precondition.
+ if (model == null) {
+ return null;
+ }
+ IProject project = ProjectHelper.getProject(model);
+ if (project == null) {
+ project = ProjectHelper.getProject(BundleHelper.getBundleId(model));
+ }
+ if (project == null) {
+ return null;
+ }
+ return project.getFile(file);
+ }
+}
diff --git a/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/internal/FcoreGeneratorHelper.java b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/internal/FcoreGeneratorHelper.java
new file mode 100644
index 0000000..7353c03
--- /dev/null
+++ b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/internal/FcoreGeneratorHelper.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.egf.core.pde.internal;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.common.constant.EGFCommonConstants;
+import org.eclipse.egf.common.helper.ProjectHelper;
+import org.eclipse.pde.core.build.IBuild;
+import org.eclipse.pde.core.build.IBuildEntry;
+import org.eclipse.pde.core.build.IBuildModel;
+import org.eclipse.pde.internal.core.build.WorkspaceBuildModel;
+import org.eclipse.pde.internal.ui.util.PDEModelUtility;
+
+/**
+ * Provides services when creating fcore or converting existing
+ * plug-ins in fcore projects.
+ *
+ * @author Guillaume Brocard
+ */
+public class FcoreGeneratorHelper {
+
+ /**
+ * Create and add a new folder in given plug-in. <br>
+ * The 'build.properties' file is updated accordingly if requested.
+ *
+ * @param pluginId
+ * @param folderName
+ * @param updateBuildProperties
+ * @param monitor
+ */
+ public static void addFolderIn(String pluginId, String folderName, boolean updateBuildProperties, IProgressMonitor monitor) throws CoreException {
+ IProject project = ProjectHelper.getProject(pluginId);
+ IFolder folder = ProjectHelper.createFolder(folderName, project, monitor);
+ if (folder != null && updateBuildProperties) {
+ WorkspaceBuildModel buildModel = getBuildModel(project);
+ addEntryInBinaryBuild(buildModel, folderName + EGFCommonConstants.SLASH_CHARACTER);
+ buildModel.save();
+ }
+ }
+
+ /**
+ * Add an entry in the binary entry of the build.properties i.e bin.include.<br>
+ * Caller is responsible to save the modified build model.
+ *
+ * @param buildModel
+ */
+ public static void addEntryInBinaryBuild(IBuildModel buildModel, String entry) throws CoreException {
+ IBuild build = buildModel.getBuild();
+ // Update the bin.includes property
+ IBuildEntry binEntry = build.getEntry(IBuildEntry.BIN_INCLUDES);
+ if (binEntry != null) {
+ if (binEntry.contains(entry) == false) {
+ binEntry.addToken(entry);
+ }
+ }
+ }
+
+ /**
+ * Get the build model for given project.
+ *
+ * @param project
+ * @return
+ */
+ public static WorkspaceBuildModel getBuildModel(IProject project) {
+ // Precondition.
+ if (project == null) {
+ return null;
+ }
+ WorkspaceBuildModel buildModel = null;
+ IFile buildFile = project.getFile(PDEModelUtility.F_BUILD);
+ buildModel = new WorkspaceBuildModel(buildFile);
+ if (buildFile.exists()) {
+ buildModel.load();
+ }
+ return buildModel;
+ }
+
+}
diff --git a/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/internal/extension/AbstractFcoreExtensionCommand.java b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/internal/extension/AbstractFcoreExtensionCommand.java
new file mode 100644
index 0000000..eb67f36
--- /dev/null
+++ b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/internal/extension/AbstractFcoreExtensionCommand.java
@@ -0,0 +1,93 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.pde.internal.extension;
+
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.egf.common.helper.ExtensionPointHelper;
+import org.eclipse.egf.common.helper.URIHelper;
+import org.eclipse.egf.core.fcore.IPlatformFcoreConstants;
+import org.eclipse.egf.core.pde.plugin.AbstractExtensionChangesCommand;
+import org.eclipse.emf.common.util.URI;
+
+/**
+ * Base class to implement commands that deal with 'fcore' extension-point.
+ *
+ * @author Xavier Maysonnave
+ */
+public abstract class AbstractFcoreExtensionCommand extends AbstractExtensionChangesCommand {
+
+ public IPath _path;
+
+ /**
+ * Constructor.
+ *
+ * @param uri
+ */
+ protected AbstractFcoreExtensionCommand(IPath path) throws CoreException {
+ super(ResourcesPlugin.getWorkspace().getRoot().getProject(path.segment(0)));
+ _path = path;
+ }
+
+ /**
+ * @see org.eclipse.egf.core.pde.plugin.AbstractExtensionChangesCommand#getExtensionChildName()
+ */
+ @Override
+ protected String getExtensionChildName() {
+ return IPlatformFcoreConstants.FCORE_EXTENSION_CHILD;
+ }
+
+ /**
+ * @see org.eclipse.egf.core.pde.plugin.AbstractExtensionChangesCommand#getExtensionPointId()
+ */
+ @Override
+ protected String getExtensionPointId() {
+ return IPlatformFcoreConstants.FULLY_QUALIFIED_EXTENSION_POINT_ID;
+ }
+
+ /**
+ * Get the id attribute of the children for the extension.
+ *
+ * @return
+ */
+ @Override
+ protected String getExtensionChildAttribute() {
+ return ExtensionPointHelper.ATT_ID;
+ }
+
+ @Override
+ protected boolean matchValue(String value) {
+ if (value == null || value.trim().length() == 0) {
+ return false;
+ }
+ URI uri = URIHelper.getPlatformURI(getBundleId(), value, true);
+ if (uri.equals(getURI())) {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public String getValue() {
+ return _path.removeFirstSegments(1).makeRelative().toString();
+ }
+
+ /**
+ * Get the Fcore URI.
+ *
+ * @return
+ */
+ protected URI getURI() {
+ return URIHelper.getPlatformURI(_path);
+ }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/internal/extension/FcoreExtensionFactory.java b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/internal/extension/FcoreExtensionFactory.java
new file mode 100644
index 0000000..76f18e1
--- /dev/null
+++ b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/internal/extension/FcoreExtensionFactory.java
@@ -0,0 +1,57 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.pde.internal.extension;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.egf.core.pde.extension.IFcoreExtensionFactory;
+import org.eclipse.egf.core.pde.plugin.IPluginChangesCommand;
+
+/**
+ * This factory creates commands to deal with "fcore" extension-point.
+ *
+ * @author Xavier Maysonnave
+ */
+public class FcoreExtensionFactory implements IFcoreExtensionFactory {
+
+ /**
+ * Unique reference.
+ */
+ private static FcoreExtensionFactory __instance;
+
+ /**
+ * Private constructor to implement singleton pattern.
+ */
+ private FcoreExtensionFactory() {
+ // Do nothing.
+ }
+
+ /**
+ * Get the unique instance.
+ *
+ * @return
+ */
+ public static FcoreExtensionFactory getInstance() {
+ if (__instance == null) {
+ __instance = new FcoreExtensionFactory();
+ }
+ return __instance;
+ }
+
+ public IPluginChangesCommand setFcoreExtension(IPath path) throws CoreException {
+ return new SetFcoreExtensionCommand(path);
+ }
+
+ public IPluginChangesCommand unsetFcoreExtension(IPath path) throws CoreException {
+ return new UnsetFcoreExtensionCommand(path);
+ }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/internal/extension/SetFcoreExtensionCommand.java b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/internal/extension/SetFcoreExtensionCommand.java
new file mode 100644
index 0000000..0210849
--- /dev/null
+++ b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/internal/extension/SetFcoreExtensionCommand.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.egf.core.pde.internal.extension;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+
+/**
+ * This command updates or creates an extension matching 'fcore'
+ * extension-point.
+ *
+ * @author Xavier Maysonnave
+ */
+public class SetFcoreExtensionCommand extends AbstractFcoreExtensionCommand {
+
+ /**
+ * Constructor.
+ *
+ * @param path
+ */
+ public SetFcoreExtensionCommand(IPath path) throws CoreException {
+ super(path);
+ }
+
+ /**
+ * @see org.eclipse.egf.core.pde.plugin.AbstractChangesCommand#doExecute()
+ */
+ @Override
+ public void doExecute(IProgressMonitor monitor) throws CoreException {
+ createExtensionElement();
+ }
+
+}
diff --git a/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/internal/extension/UnsetFcoreExtensionCommand.java b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/internal/extension/UnsetFcoreExtensionCommand.java
new file mode 100644
index 0000000..3890253c
--- /dev/null
+++ b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/internal/extension/UnsetFcoreExtensionCommand.java
@@ -0,0 +1,41 @@
+/**
+ * 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
+ **/
+package org.eclipse.egf.core.pde.internal.extension;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+
+/**
+ * This command unsets an existing extension matching 'fcore' extension-point.
+ *
+ * @author Xavier Maysonnave
+ */
+public class UnsetFcoreExtensionCommand extends AbstractFcoreExtensionCommand {
+
+ /**
+ * Constructor.
+ *
+ * @param path
+ */
+ public UnsetFcoreExtensionCommand(IPath path) throws CoreException {
+ super(path);
+ }
+
+ /**
+ * @see org.eclipse.egf.pde.plugin.command.AbstractUnsetExtensionCommand#execute()
+ */
+ @Override
+ public void doExecute(IProgressMonitor monitor) throws CoreException {
+ removeExtensionElement();
+ }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/internal/resource/FcoreResourceListener.java b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/internal/resource/FcoreResourceListener.java
new file mode 100644
index 0000000..ad4135f
--- /dev/null
+++ b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/internal/resource/FcoreResourceListener.java
@@ -0,0 +1,370 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.pde.internal.resource;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceDeltaVisitor;
+import org.eclipse.core.resources.IResourceRuleFactory;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.resources.WorkspaceJob;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.core.runtime.jobs.MultiRule;
+import org.eclipse.egf.common.helper.BundleHelper;
+import org.eclipse.egf.common.helper.URIHelper;
+import org.eclipse.egf.core.fcore.IPlatformFcoreConstants;
+import org.eclipse.egf.core.fcore.IResourceFcoreDelta;
+import org.eclipse.egf.core.fcore.IResourceFcoreListener;
+import org.eclipse.egf.core.pde.EGFPDEPlugin;
+import org.eclipse.egf.core.pde.l10n.EGFPDEMessages;
+import org.eclipse.egf.core.pde.plugin.IPluginChangesCommand;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.common.util.UniqueEList;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class FcoreResourceListener implements IResourceChangeListener {
+
+ // Type of event that should be processed no matter what the real event type is.
+ public int _overridenEventType = -1;
+
+ // A list of listeners interested in changes to fcore resources
+ private List<IResourceFcoreListener> _listeners;
+
+ public FcoreResourceListener() {
+ // ensure that we are listening to the workspace
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(this, IResourceChangeEvent.POST_CHANGE);
+ }
+
+ /**
+ * Notify all interested listeners in changes made to fcore resource
+ *
+ * @param delta
+ * the delta of changes
+ */
+ private void fireResourceFcore(IResourceFcoreDelta delta) {
+ if (_listeners != null) {
+ for (IResourceFcoreListener listener : _listeners) {
+ listener.fcoreChanged(delta);
+ }
+ }
+ }
+
+ /**
+ * Add a listener
+ *
+ * @param listener
+ * the listener to be added
+ */
+ public void addResourceFcoreListener(IResourceFcoreListener listener) {
+ if (_listeners == null) {
+ _listeners = new ArrayList<IResourceFcoreListener>();
+ }
+ if (_listeners.contains(listener) == false) {
+ _listeners.add(listener);
+ }
+ }
+
+ /**
+ * Remove a listener
+ *
+ * @param listener
+ * the listener to be removed
+ */
+ public void removeResourceFcoreListener(IResourceFcoreListener listener) {
+ if (_listeners == null) {
+ return;
+ }
+ _listeners.remove(listener);
+ }
+
+ /**
+ * This listens for workspace changes.
+ */
+
+ public void resourceChanged(IResourceChangeEvent event) {
+
+ int eventType = _overridenEventType == -1 ? event.getType() : _overridenEventType;
+
+ try {
+
+ class ResourceDeltaVisitor implements IResourceDeltaVisitor {
+
+ protected List<IProject> _affectedProjects = new UniqueEList<IProject>();
+
+ protected List<IPath> _newFcores = new UniqueEList<IPath>();
+
+ protected List<IPath> _removedFcores = new UniqueEList<IPath>();
+
+ protected Map<IPath, IPath> _movedFcores = new HashMap<IPath, IPath>();
+
+ protected ResourceFcoreDelta _deltaFcores = new ResourceFcoreDelta();
+
+ public boolean visit(IResourceDelta delta) throws CoreException {
+ try {
+ // only interested with file with an fcore extension
+ if (delta.getResource().getType() == IResource.FILE && IPlatformFcoreConstants.FCORE_FILE_EXTENSION.equals(delta.getResource().getFileExtension())) {
+ URI uri = URIHelper.getPlatformURI(delta.getResource());
+ // Locate the bundleId, resource should be located in a bundle project
+ String bundleId = BundleHelper.getBundleId(delta.getResource());
+ if (uri != null && bundleId != null) {
+ if (delta.getKind() == IResourceDelta.CHANGED) {
+ if (delta.getFlags() != IResourceDelta.MARKERS && (delta.getFlags() & IResourceDelta.CONTENT) != 0) {
+ _deltaFcores.addUpdatedFcore(uri);
+ }
+ } else if (delta.getKind() == IResourceDelta.ADDED) {
+ if ((delta.getFlags() & IResourceDelta.MOVED_FROM) == 0) {
+ _deltaFcores.addNewFcore(uri);
+ _newFcores.add(delta.getResource().getFullPath());
+ _affectedProjects.add(delta.getResource().getProject());
+ }
+ } else if (delta.getKind() == IResourceDelta.REMOVED) {
+ if ((delta.getFlags() & IResourceDelta.MOVED_TO) != 0) {
+ _deltaFcores.addMovedFcore(uri, URIHelper.getPlatformURI(delta.getMovedToPath()));
+ _movedFcores.put(delta.getResource().getFullPath(), delta.getMovedToPath());
+ } else {
+ _deltaFcores.addRemovedFcore(uri);
+ _removedFcores.add(delta.getResource().getFullPath());
+ _affectedProjects.add(delta.getResource().getProject());
+ }
+ }
+ }
+ }
+ } catch (Throwable t) {
+ EGFPDEPlugin.getDefault().logError(new String("FcoreResourceListener.resourceChanged(..) _ "), t); //$NON-NLS-1$
+ }
+ return true;
+
+ }
+
+ public ResourceFcoreDelta getFcoresDelta() {
+ return _deltaFcores;
+ }
+
+ public Map<IPath, IPath> getMovedFcores() {
+ return _movedFcores;
+ }
+
+ public List<IPath> getRemovedFcores() {
+ return _removedFcores;
+ }
+
+ public List<IPath> getNewFcores() {
+ return _newFcores;
+ }
+
+ public List<IProject> getAffectedProjects() {
+ return _affectedProjects;
+ }
+
+ }
+
+ switch (eventType) {
+ case IResourceChangeEvent.POST_CHANGE:
+ final ResourceDeltaVisitor visitor = new ResourceDeltaVisitor();
+ event.getDelta().accept(visitor);
+ // Process added, moved and removed resources
+ if (visitor.getMovedFcores().isEmpty() == false || visitor.getRemovedFcores().isEmpty() == false || visitor.getNewFcores().isEmpty() == false) {
+ WorkspaceJob job = new FcoreSynchJob(visitor.getAffectedProjects(), visitor.getMovedFcores(), visitor.getRemovedFcores(), visitor.getNewFcores());
+ job.setUser(true);
+ job.schedule();
+ }
+ // Broadcast events if any
+ if (visitor.getFcoresDelta().isEmpty() == false) {
+ // Debug
+ if (EGFPDEPlugin.getDefault().isDebugging()) {
+ trace(visitor.getFcoresDelta());
+ }
+ // Notify all interested listeners in the changes made to models
+ fireResourceFcore(visitor.getFcoresDelta());
+ }
+ }
+
+ } catch (CoreException ce) {
+ EGFPDEPlugin.getDefault().logError(new String("FcoreResourceListener.resourceChanged(..) _"), ce); //$NON-NLS-1$
+ }
+
+ }
+
+ public void dispose() {
+ ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
+ _listeners = null;
+ }
+
+ protected IRunnableWithProgress createFcoreOperation(final IStatus[] errorStatus, final List<IResource> removedFcores, final List<IResource> newFcores) {
+ return new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+
+ }
+ };
+ }
+
+ private void trace(IResourceFcoreDelta delta) {
+ if (delta.getNewFcores().size() > 0) {
+ EGFPDEPlugin.getDefault().logInfo(NLS.bind("FcoreResourceListener New {0} Fcore{1}.", //$NON-NLS-1$
+ delta.getNewFcores().size(), delta.getNewFcores().size() < 2 ? "" : "s" //$NON-NLS-1$ //$NON-NLS-2$
+ ));
+ for (URI uri : delta.getNewFcores()) {
+ EGFPDEPlugin.getDefault().logWarning(URI.decode(uri.toString()), 1);
+ }
+ }
+ if (delta.getRemovedFcores().size() > 0) {
+ EGFPDEPlugin.getDefault().logInfo(NLS.bind("FcoreResourceListener Removed {0} Fcore{1}.", //$NON-NLS-1$
+ delta.getRemovedFcores().size(), delta.getRemovedFcores().size() < 2 ? "" : "s" //$NON-NLS-1$ //$NON-NLS-2$
+ ));
+ for (URI uri : delta.getRemovedFcores()) {
+ EGFPDEPlugin.getDefault().logWarning(URI.decode(uri.toString()), 1);
+ }
+ }
+ if (delta.getUpdatedFcores().size() > 0) {
+ EGFPDEPlugin.getDefault().logInfo(NLS.bind("FcoreResourceListener Updated {0} Fcore{1}.", //$NON-NLS-1$
+ delta.getUpdatedFcores().size(), delta.getUpdatedFcores().size() < 2 ? "" : "s" //$NON-NLS-1$ //$NON-NLS-2$
+ ));
+ for (URI uri : delta.getUpdatedFcores()) {
+ EGFPDEPlugin.getDefault().logWarning(URI.decode(uri.toString()), 1);
+ }
+ }
+ if (delta.getMovedFcores().size() > 0) {
+ EGFPDEPlugin.getDefault().logInfo(NLS.bind("FcoreResourceListener Moved {0} Fcore{1}.", //$NON-NLS-1$
+ delta.getMovedFcores().size(), delta.getMovedFcores().size() < 2 ? "" : "s" //$NON-NLS-1$ //$NON-NLS-2$
+ ));
+ for (URI uri : delta.getMovedFcores().keySet()) {
+ EGFPDEPlugin.getDefault().logWarning(URI.decode(uri.toString()), 1);
+ EGFPDEPlugin.getDefault().logInfo("To: " + URI.decode(delta.getMovedFcores().get(uri).toString()), 2); //$NON-NLS-1$
+ }
+ }
+ }
+
+ private static class FcoreSynchJob extends WorkspaceJob {
+
+ private Map<IPath, IPath> _movedFcores;
+
+ private List<IPath> _newFcores;
+
+ private List<IPath> _removedFcores;
+
+ /**
+ * Initializes me with the list of resources changes that I am to
+ * process.
+ *
+ * @param affectedProjects
+ * the projects affected by the workspace changes
+ */
+ FcoreSynchJob(List<IProject> affectedProjects, Map<IPath, IPath> movedFcores, List<IPath> removedFcores, List<IPath> newFcores) {
+ super(EGFPDEMessages.PluginModelUpdate_progressMessage);
+ _movedFcores = movedFcores;
+ _removedFcores = removedFcores;
+ _newFcores = newFcores;
+ setRule(getRule(affectedProjects));
+ }
+
+ @Override
+ public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
+ try {
+ SubMonitor subMonitor = SubMonitor.convert(monitor, EGFPDEMessages.PluginModelUpdate_progressMessage, (_movedFcores.size() + _removedFcores.size() + _newFcores.size()) * 1000);
+ // Moved Fcores
+ for (IPath path : _movedFcores.keySet()) {
+ // Ignore non Bundle project
+ if (BundleHelper.getPluginModelBase(ResourcesPlugin.getWorkspace().getRoot().getProject(path.segment(0))) == null) {
+ continue;
+ }
+ // Delete command
+ IPluginChangesCommand unsetCommand = EGFPDEPlugin.getFcoreExtensionHelper().unsetFcoreExtension(path);
+ unsetCommand.execute(subMonitor.newChild(1000, SubMonitor.SUPPRESS_NONE));
+ if (monitor.isCanceled()) {
+ throw new InterruptedException();
+ }
+ // Ignore non Bundle project
+ if (BundleHelper.getPluginModelBase(ResourcesPlugin.getWorkspace().getRoot().getProject(_movedFcores.get(path).segment(0))) == null) {
+ continue;
+ }
+ // Create command
+ IPluginChangesCommand createCommand = EGFPDEPlugin.getFcoreExtensionHelper().setFcoreExtension(_movedFcores.get(path));
+ createCommand.execute(subMonitor.newChild(1000, SubMonitor.SUPPRESS_NONE));
+ if (monitor.isCanceled()) {
+ throw new InterruptedException();
+ }
+ }
+ // Removed Fcores
+ for (IPath path : _removedFcores) {
+ // Ignore non Bundle project
+ if (BundleHelper.getPluginModelBase(ResourcesPlugin.getWorkspace().getRoot().getProject(path.segment(0))) == null) {
+ continue;
+ }
+ // Delete command
+ IPluginChangesCommand unsetCommand = EGFPDEPlugin.getFcoreExtensionHelper().unsetFcoreExtension(path);
+ unsetCommand.execute(subMonitor.newChild(1000, SubMonitor.SUPPRESS_NONE));
+ if (monitor.isCanceled()) {
+ throw new InterruptedException();
+ }
+ }
+ // Added Fcores
+ for (IPath path : _newFcores) {
+ // Ignore non Bundle project
+ if (BundleHelper.getPluginModelBase(ResourcesPlugin.getWorkspace().getRoot().getProject(path.segment(0))) == null) {
+ continue;
+ }
+ // Create command
+ IPluginChangesCommand createCommand = EGFPDEPlugin.getFcoreExtensionHelper().setFcoreExtension(path);
+ createCommand.execute(subMonitor.newChild(1000, SubMonitor.SUPPRESS_NONE));
+ if (monitor.isCanceled()) {
+ throw new InterruptedException();
+ }
+ }
+ } catch (InterruptedException e) {
+ return Status.CANCEL_STATUS;
+ } finally {
+ monitor.done();
+ }
+ return Status.OK_STATUS;
+ }
+
+ /**
+ * Obtains a scheduling rule to schedule myself on to give my delegate
+ * access to the specified affected resources.
+ *
+ * @param affectedResources
+ * @return the appropriate scheduling rule, or <code>null</code> if
+ * none is required
+ */
+ private ISchedulingRule getRule(List<IProject> affectedProjects) {
+ ISchedulingRule result = null;
+ if (affectedProjects.isEmpty() == false) {
+ IResourceRuleFactory factory = ResourcesPlugin.getWorkspace().getRuleFactory();
+ for (IResource next : affectedProjects) {
+ result = MultiRule.combine(result, factory.modifyRule(next));
+ }
+ }
+ return result;
+ }
+
+ }
+
+}
diff --git a/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/internal/resource/ResourceFcoreDelta.java b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/internal/resource/ResourceFcoreDelta.java
new file mode 100644
index 0000000..64122e5
--- /dev/null
+++ b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/internal/resource/ResourceFcoreDelta.java
@@ -0,0 +1,88 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.pde.internal.resource;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.egf.core.fcore.IResourceFcoreDelta;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.common.util.UniqueEList;
+
+public class ResourceFcoreDelta implements IResourceFcoreDelta {
+
+ private UniqueEList<URI> _added = new UniqueEList<URI>();
+
+ private UniqueEList<URI> _updated = new UniqueEList<URI>();
+
+ private UniqueEList<URI> _removed = new UniqueEList<URI>();
+
+ private HashMap<URI, URI> _moved = new HashMap<URI, URI>();
+
+ public ResourceFcoreDelta() {
+ // Nothing to do
+ }
+
+ @SuppressWarnings("unchecked")
+ public List<URI> getNewFcores() {
+ return (List<URI>) _added.clone();
+ }
+
+ @SuppressWarnings("unchecked")
+ public List<URI> getUpdatedFcores() {
+ return (List<URI>) _updated.clone();
+ }
+
+ @SuppressWarnings("unchecked")
+ public List<URI> getRemovedFcores() {
+ return (List<URI>) _removed.clone();
+ }
+
+ @SuppressWarnings("unchecked")
+ public Map<URI, URI> getMovedFcores() {
+ return (Map<URI, URI>) _moved.clone();
+ }
+
+ protected boolean isEmpty() {
+ return _added.size() == 0 && _updated.size() == 0 && _removed.size() == 0 && _moved.size() == 0 ? true : false;
+ }
+
+ protected boolean addNewFcore(URI uri) {
+ if (uri == null) {
+ return false;
+ }
+ return _added.add(uri);
+ }
+
+ protected boolean addUpdatedFcore(URI uri) {
+ if (uri == null) {
+ return false;
+ }
+ return _updated.add(uri);
+ }
+
+ protected boolean addRemovedFcore(URI uri) {
+ if (uri == null) {
+ return false;
+ }
+ return _removed.add(uri);
+ }
+
+ protected boolean addMovedFcore(URI uri, URI newURI) {
+ if (uri == null || newURI == null) {
+ return false;
+ }
+ _moved.put(uri, newURI);
+ return true;
+ }
+
+}
diff --git a/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/internal/ui/ModelModification.java b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/internal/ui/ModelModification.java
new file mode 100644
index 0000000..4a08ce6
--- /dev/null
+++ b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/internal/ui/ModelModification.java
@@ -0,0 +1,150 @@
+/**
+ * Copyright (c) 2005-2006 IBM Corporation and others.
+ * 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:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.egf.core.pde.internal.ui;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.pde.core.IBaseModel;
+
+
+/**
+ * ModelModification class used my the PDEModelUtility
+ * Subclass me to create changes to your models.
+ *
+ */
+public abstract class ModelModification {
+
+ private IFile fModelFile;
+
+ private IFile fManifestFile;
+
+ private IFile fXMLFile;
+
+ private IFile fPropertiesFile;
+
+ private boolean fIsBundleModel;
+
+ /**
+ * Create a single model modification - used for modifying single AbstractEditingModels
+ * @param modelFile the basic underlying file for the model you wish to modify.
+ */
+ public ModelModification(IFile modelFile) {
+ singleFileModification(modelFile);
+ }
+
+ /**
+ * Create a full IBundlePluginModelBase modification
+ * @param bundleFile the MANIFEST.MF file
+ * @param xmlFile the plugin.xml/fragment.xml file for this modification (optional - can be null)
+ * @pre bundleFile must not be <code>null</code>
+ */
+ public ModelModification(IFile bundleFile, IFile xmlFile) {
+ createFullBundleModification(bundleFile, xmlFile);
+ }
+
+ /**
+ * Create a ModelModification based on the contents of the project
+ * ie. if the project contains a MANIFEST.MF this will be tagged as a
+ * fullBundleModification, otherwise (this project is an old-style plugin)
+ * this will be a PluginModel/FragmentModel modification.
+ * @param project
+ */
+ public ModelModification(IProject project) {
+ IFile xml = project.getFile(PDEModelUtility.F_PLUGIN);
+ if (xml.exists() == false) {
+ xml = project.getFile(PDEModelUtility.F_FRAGMENT);
+ }
+ if (xml.exists() == false) {
+ xml = null;
+ }
+ IFile manifest = project.getFile(PDEModelUtility.F_MANIFEST_FP);
+ if (manifest.exists() == false && xml != null) {
+ singleFileModification(xml);
+ } else if (manifest.exists()) {
+ createFullBundleModification(manifest, xml);
+ }
+ }
+
+ private void singleFileModification(IFile file) {
+ // Precondition.
+ if (file == null) {
+ return;
+ }
+ assignFile(file);
+ if (fManifestFile != null) {
+ fModelFile = fManifestFile;
+ } else if (fXMLFile != null) {
+ fModelFile = fXMLFile;
+ } else if (fPropertiesFile != null) {
+ fModelFile = fPropertiesFile;
+ }
+ fIsBundleModel = file.getName().equals(PDEModelUtility.F_MANIFEST);
+ }
+
+ private void createFullBundleModification(IFile bundleFile, IFile xmlFile) {
+ assignFile(bundleFile);
+ assignFile(xmlFile);
+ Assert.isNotNull(fManifestFile);
+ fModelFile = fManifestFile;
+ fIsBundleModel = true;
+ }
+
+ private void assignFile(IFile file) {
+ if (file == null) {
+ return;
+ }
+ String name = file.getName();
+ if (name.equals(PDEModelUtility.F_MANIFEST)) {
+ fManifestFile = file;
+ } else if (name.equals(PDEModelUtility.F_PLUGIN) || name.equals(PDEModelUtility.F_FRAGMENT)) {
+ fXMLFile = file;
+ } else if (name.endsWith(PDEModelUtility.F_PROPERTIES)) {
+ fPropertiesFile = file;
+ }
+ }
+
+ /**
+ * Invoke this using PDEModelUtility.modifyModel(ModelModification modification)
+ * Clients / subclasses should not invoke this method.
+ * @param model
+ * @param monitor
+ * @throws CoreException
+ */
+ protected abstract void modifyModel(IBaseModel model, IProgressMonitor monitor) throws CoreException;
+
+ protected final IFile getFile() {
+ return fModelFile;
+ }
+
+ protected final IFile getManifestFile() {
+ return fManifestFile;
+ }
+
+ protected final IFile getXMLFile() {
+ return fXMLFile;
+ }
+
+ protected final IFile getPropertiesFile() {
+ return fPropertiesFile;
+ }
+
+ protected final boolean isFullBundleModification() {
+ return fIsBundleModel;
+ }
+
+ public boolean saveOpenEditor() {
+ return true;
+ }
+
+}
diff --git a/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/internal/ui/PDEModelUtility.java b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/internal/ui/PDEModelUtility.java
new file mode 100644
index 0000000..451699d
--- /dev/null
+++ b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/internal/ui/PDEModelUtility.java
@@ -0,0 +1,564 @@
+/**
+ * Copyright (c) 2005-2008 IBM Corporation and others.
+ * 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:
+ * IBM - Initial API and implementation
+ */
+
+package org.eclipse.egf.core.pde.internal.ui;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.Iterator;
+
+import org.eclipse.core.filebuffers.FileBuffers;
+import org.eclipse.core.filebuffers.ITextFileBuffer;
+import org.eclipse.core.filebuffers.ITextFileBufferManager;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.pde.core.IBaseModel;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.core.plugin.ISharedExtensionsModel;
+import org.eclipse.pde.internal.core.bundle.BundleFragmentModel;
+import org.eclipse.pde.internal.core.bundle.BundlePluginModel;
+import org.eclipse.pde.internal.core.ibundle.IBundleModel;
+import org.eclipse.pde.internal.core.ibundle.IBundlePluginModelBase;
+import org.eclipse.pde.internal.core.text.AbstractEditingModel;
+import org.eclipse.pde.internal.core.text.IEditingModel;
+import org.eclipse.pde.internal.core.text.IModelTextChangeListener;
+import org.eclipse.pde.internal.core.text.build.BuildModel;
+import org.eclipse.pde.internal.core.text.build.PropertiesTextChangeListener;
+import org.eclipse.pde.internal.core.text.bundle.BundleModel;
+import org.eclipse.pde.internal.core.text.bundle.BundleTextChangeListener;
+import org.eclipse.pde.internal.core.text.plugin.FragmentModel;
+import org.eclipse.pde.internal.core.text.plugin.PluginModel;
+import org.eclipse.pde.internal.ui.IPDEUIConstants;
+import org.eclipse.pde.internal.ui.PDEPlugin;
+import org.eclipse.pde.internal.ui.editor.PDEFormEditor;
+import org.eclipse.pde.internal.ui.editor.build.BuildEditor;
+import org.eclipse.pde.internal.ui.editor.build.BuildInputContext;
+import org.eclipse.pde.internal.ui.editor.build.BuildSourcePage;
+import org.eclipse.pde.internal.ui.editor.context.InputContext;
+import org.eclipse.pde.internal.ui.editor.plugin.ManifestEditor;
+import org.eclipse.pde.internal.ui.editor.schema.SchemaEditor;
+import org.eclipse.pde.internal.ui.editor.schema.SchemaInputContext;
+import org.eclipse.pde.internal.ui.editor.site.SiteEditor;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.text.edits.MalformedTreeException;
+import org.eclipse.text.edits.MultiTextEdit;
+import org.eclipse.text.edits.TextEdit;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.forms.editor.IFormPage;
+import org.osgi.framework.Constants;
+
+/**
+ * Your one stop shop for performing changes to your plug-in models.
+ */
+public class PDEModelUtility {
+
+ public static final String F_MANIFEST = "MANIFEST.MF"; //$NON-NLS-1$
+
+ public static final String F_MANIFEST_FP = "META-INF/" + F_MANIFEST; //$NON-NLS-1$
+
+ public static final String F_PLUGIN = "plugin.xml"; //$NON-NLS-1$
+
+ public static final String F_FRAGMENT = "fragment.xml"; //$NON-NLS-1$
+
+ public static final String F_PROPERTIES = ".properties"; //$NON-NLS-1$
+
+ public static final String F_BUILD = "build" + F_PROPERTIES; //$NON-NLS-1$
+
+ // bundle / xml various Object[] indices
+ private static final int F_Bi = 0; // the manifest.mf-related object will
+ // always be 1st
+
+ private static final int F_Xi = 1; // the xml-related object will always be
+ // 2nd
+
+ @SuppressWarnings("unchecked")
+ private static Hashtable fOpenPDEEditors = new Hashtable();
+
+ /**
+ * PDE editors should call this during their creation. Currently the pde
+ * editor superclass (PDEFormEditor) connects during its createPages method
+ * and so this
+ * method does not need to be invoked anywhere else.
+ *
+ * @param editor
+ * the editor to connect to
+ */
+ @SuppressWarnings("unchecked")
+ public static void connect(PDEFormEditor editor) {
+ IProject project = editor.getCommonProject();
+ if (project == null) {
+ return;
+ }
+ if (fOpenPDEEditors.containsKey(project)) {
+ ArrayList list = (ArrayList) fOpenPDEEditors.get(project);
+ if (list.contains(editor) == false) {
+ list.add(editor);
+ }
+ } else {
+ ArrayList list = new ArrayList();
+ list.add(editor);
+ fOpenPDEEditors.put(project, list);
+ }
+ }
+
+ /**
+ * PDE editors should call this when they are closing down.
+ *
+ * @param editor
+ * the pde editor to disconnect from
+ */
+ @SuppressWarnings("unchecked")
+ public static void disconnect(PDEFormEditor editor) {
+ IProject project = editor.getCommonProject();
+ if (project == null) {
+ return;
+ }
+ if (fOpenPDEEditors.containsKey(project) == false) {
+ return;
+ }
+ ArrayList list = (ArrayList) fOpenPDEEditors.get(project);
+ list.remove(editor);
+ if (list.size() == 0) {
+ fOpenPDEEditors.remove(project);
+ }
+ }
+
+ /**
+ * Returns an open ManifestEditor that is associated with this project.
+ *
+ * @param project
+ * @return null if no ManifestEditor is open for this project
+ */
+ public static ManifestEditor getOpenManifestEditor(IProject project) {
+ return (ManifestEditor) getOpenEditor(project, IPDEUIConstants.MANIFEST_EDITOR_ID);
+ }
+
+ /**
+ * Returns an open BuildEditor that is associated with this project.
+ *
+ * @param project
+ * @return null if no BuildEditor is open for this project
+ */
+ public static BuildEditor getOpenBuildPropertiesEditor(IProject project) {
+ return (BuildEditor) getOpenEditor(project, IPDEUIConstants.BUILD_EDITOR_ID);
+ }
+
+ /**
+ * Returns an open SiteEditor that is associated with this project.
+ *
+ * @param project
+ * @return null if no SiteEditor is open for this project
+ */
+ public static SiteEditor getOpenUpdateSiteEditor(IProject project) {
+ return (SiteEditor) getOpenEditor(project, IPDEUIConstants.SITE_EDITOR_ID);
+ }
+
+ @SuppressWarnings("unchecked")
+ private static PDEFormEditor getOpenEditor(IProject project, String editorId) {
+ ArrayList list = (ArrayList) fOpenPDEEditors.get(project);
+ if (list == null) {
+ return null;
+ }
+ for (int i = 0; i < list.size(); i++) {
+ PDEFormEditor editor = (PDEFormEditor) list.get(i);
+ if (editor.getEditorSite().getId().equals(editorId))
+ return editor;
+ }
+ return null;
+ }
+
+ /**
+ * Get the open schema editor rooted at the specified underlying file
+ *
+ * @param file
+ * @return editor if found or null
+ */
+ public static SchemaEditor getOpenSchemaEditor(IFile file) {
+ return (SchemaEditor) getOpenEditor(IPDEUIConstants.SCHEMA_EDITOR_ID, SchemaInputContext.CONTEXT_ID, file);
+ }
+
+ /**
+ * @param editorID
+ * @param inputContextID
+ * @param file
+ * @return
+ */
+ @SuppressWarnings("unchecked")
+ private static PDEFormEditor getOpenEditor(String editorID, String inputContextID, IFile file) {
+ // Get the file's project
+ IProject project = file.getProject();
+ // Check for open editors housed in the specified project
+ ArrayList list = (ArrayList) fOpenPDEEditors.get(project);
+ // No open editors found
+ if (list == null) {
+ return null;
+ }
+ // Get the open editor whose
+ // (1) Editor ID matches the specified editor ID
+ // (2) Underlying file matches the specified file
+ // Check all open editors
+ for (int i = 0; i < list.size(); i++) {
+ // Get the editor
+ PDEFormEditor editor = (PDEFormEditor) list.get(i);
+ // Check for the specified type
+ // Get the editor ID
+ String currentEditorID = editor.getEditorSite().getId();
+ if (currentEditorID.equals(editorID) == false) {
+ continue;
+ }
+ // Check for the specified file
+ // Find the editor's input context
+ InputContext context = editor.getContextManager().findContext(inputContextID);
+ // Ensure we have an input context
+ if (context == null) {
+ continue;
+ }
+ // Get the editor input
+ IEditorInput input = context.getInput();
+ // Ensure we have a file editor input
+ if ((input instanceof IFileEditorInput) == false) {
+ continue;
+ }
+ // Get the editor's underlying file
+ IFile currentFile = ((IFileEditorInput) input).getFile();
+ // If the file matches the specified file, we have found the
+ // specified editor
+ if (currentFile.equals(file)) {
+ return editor;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns an IPluginModelBase from the active ManifestEditor or null if no
+ * manifest editor is open.
+ *
+ * @return the active IPluginModelBase
+ */
+ public static IPluginModelBase getActivePluginModel() {
+ IEditorPart editor = PDEPlugin.getActivePage().getActiveEditor();
+ if (editor instanceof ManifestEditor) {
+ IBaseModel model = ((ManifestEditor) editor).getAggregateModel();
+ if (model instanceof IPluginModelBase)
+ return (IPluginModelBase) model;
+ }
+ return null;
+ }
+
+ /**
+ * @param doc
+ * @return
+ */
+ @SuppressWarnings("unchecked")
+ public static IEditingModel getOpenModel(IDocument doc) {
+ Iterator it = fOpenPDEEditors.values().iterator();
+ while (it.hasNext()) {
+ ArrayList list = (ArrayList) it.next();
+ for (int i = 0; i < list.size(); i++) {
+ PDEFormEditor e = (PDEFormEditor) list.get(i);
+ IPluginModelBase model = (IPluginModelBase) e.getAggregateModel();
+ if (model instanceof IBundlePluginModelBase) {
+ IBundleModel bModel = ((IBundlePluginModelBase) model).getBundleModel();
+ if (bModel instanceof IEditingModel && doc == ((IEditingModel) bModel).getDocument()) {
+ return (IEditingModel) bModel;
+ }
+ ISharedExtensionsModel eModel = ((IBundlePluginModelBase) model).getExtensionsModel();
+ if (eModel instanceof IEditingModel && doc == ((IEditingModel) eModel).getDocument()) {
+ return (IEditingModel) eModel;
+ }
+ }
+ // IBuildModel bModel = model.getBuildModel();
+ // if (bModel instanceof IEditingModel &&
+ // doc == ((IEditingModel)bModel).getDocument())
+ // return (IEditingModel)bModel;
+ if (model instanceof IEditingModel && doc == ((IEditingModel) model).getDocument()) {
+ return (IEditingModel) model;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Modify a model based on the specifications provided by the
+ * ModelModification parameter. A model will be searched for in the open
+ * editors, if it is found
+ * changes will be applied and the editor will be saved. If no model is found
+ * one will be created and text edit operations will be generated / applied.
+ * NOTE:
+ * If a MANIFEST.MF file is specified in the ModelModification a
+ * BundlePluginModel will be searched for / created and passed to
+ * ModelModification#modifyModel(IBaseModel). (not a BundleModel - which can
+ * be retreived from the BundlePluginModel)
+ *
+ * @param modification
+ * @param monitor
+ * @throws CoreException
+ */
+ @SuppressWarnings("deprecation")
+ public static void modifyModel(final ModelModification modification, final IProgressMonitor monitor) {
+ // ModelModification was not supplied with the right files
+ // TODO should we just fail silently?
+ if (modification.getFile() == null) {
+ return;
+ }
+ PDEFormEditor editor = getOpenEditor(modification);
+ IBaseModel model = getModelFromEditor(editor, modification);
+ if (model != null) {
+ // open editor found, should have underlying text listeners -> apply
+ // modification
+ modifyEditorModel(modification, editor, model, monitor);
+ } else {
+ // create own model, attach listeners and grab text edits
+ ITextFileBufferManager manager = FileBuffers.getTextFileBufferManager();
+ IFile[] files;
+ if (modification.isFullBundleModification()) {
+ files = new IFile[2];
+ files[F_Bi] = modification.getManifestFile();
+ files[F_Xi] = modification.getXMLFile();
+ } else {
+ files = new IFile[] { modification.getFile() };
+ }
+ // need to monitor number of successfull buffer connections for
+ // disconnection purposes
+ // @see } finally { statement
+ int sc = 0;
+ try {
+ ITextFileBuffer[] buffers = new ITextFileBuffer[files.length];
+ IDocument[] documents = new IDocument[files.length];
+ for (int i = 0; i < files.length; i++) {
+ if (files[i] == null || files[i].exists() == false) {
+ continue;
+ }
+ manager.connect(files[i].getFullPath(), monitor);
+ sc++;
+ buffers[i] = manager.getTextFileBuffer(files[i].getFullPath());
+ if (buffers[i].isDirty()) {
+ buffers[i].commit(monitor, true);
+ }
+ documents[i] = buffers[i].getDocument();
+ }
+
+ IBaseModel editModel;
+ if (modification.isFullBundleModification()) {
+ editModel = prepareBundlePluginModel(files, documents);
+ } else {
+ editModel = prepareAbstractEditingModel(files[0], documents[0]);
+ }
+
+ modification.modifyModel(editModel, monitor);
+
+ IModelTextChangeListener[] listeners = gatherListeners(editModel);
+ for (int i = 0; i < listeners.length; i++) {
+ if (listeners[i] == null) {
+ continue;
+ }
+ TextEdit[] edits = listeners[i].getTextOperations();
+ if (edits.length > 0) {
+ MultiTextEdit multi = new MultiTextEdit();
+ multi.addChildren(edits);
+ multi.apply(documents[i]);
+ buffers[i].commit(monitor, true);
+ }
+ }
+ } catch (CoreException e) {
+ PDEPlugin.log(e);
+ } catch (MalformedTreeException e) {
+ PDEPlugin.log(e);
+ } catch (BadLocationException e) {
+ PDEPlugin.log(e);
+ } finally {
+ // don't want to over-disconnect in case we ran into an exception during
+ // connections
+ // dc <= sc stops this from happening
+ int dc = 0;
+ for (int i = 0; i < files.length && dc <= sc; i++) {
+ if (files[i] == null || files[i].exists() == false) {
+ continue;
+ }
+ try {
+ manager.disconnect(files[i].getFullPath(), monitor);
+ dc++;
+ } catch (CoreException e) {
+ PDEPlugin.log(e);
+ }
+ }
+ }
+ }
+ }
+
+ private static void modifyEditorModel(final ModelModification mod, final PDEFormEditor editor, final IBaseModel model, final IProgressMonitor monitor) {
+ getDisplay().syncExec(new Runnable() {
+ public void run() {
+ try {
+ mod.modifyModel(model, monitor);
+ IFile[] files = new IFile[] { mod.getManifestFile(), mod.getXMLFile(), mod.getPropertiesFile() };
+ for (int i = 0; i < files.length; i++) {
+ if (files[i] == null) {
+ continue;
+ }
+ InputContext con = editor.getContextManager().findContext(files[i]);
+ if (con != null) {
+ con.flushEditorInput();
+ }
+ }
+ if (mod.saveOpenEditor()) {
+ editor.doSave(monitor);
+ }
+ } catch (CoreException e) {
+ PDEPlugin.log(e);
+ }
+ }
+ });
+ }
+
+ private static PDEFormEditor getOpenEditor(ModelModification modification) {
+ IProject project = modification.getFile().getProject();
+ String name = modification.getFile().getName();
+ if (name.equals(F_PLUGIN) || name.equals(F_FRAGMENT) || name.equals(F_MANIFEST)) {
+ return getOpenManifestEditor(project);
+ } else if (name.equals(F_BUILD)) {
+ PDEFormEditor openEditor = getOpenBuildPropertiesEditor(project);
+ if (openEditor == null) {
+ openEditor = getOpenManifestEditor(project);
+ }
+ return openEditor;
+ }
+ return null;
+ }
+
+ private static IBaseModel getModelFromEditor(PDEFormEditor openEditor, ModelModification modification) {
+ if (openEditor == null) {
+ return null;
+ }
+ String name = modification.getFile().getName();
+ IBaseModel model = null;
+ if (name.equals(F_PLUGIN) || name.equals(F_FRAGMENT)) {
+ model = openEditor.getAggregateModel();
+ if (model instanceof IBundlePluginModelBase) {
+ model = ((IBundlePluginModelBase) model).getExtensionsModel();
+ }
+ } else if (name.equals(F_BUILD)) {
+ if (openEditor instanceof BuildEditor) {
+ model = openEditor.getAggregateModel();
+ } else if (openEditor instanceof ManifestEditor) {
+ IFormPage page = openEditor.findPage(BuildInputContext.CONTEXT_ID);
+ if (page instanceof BuildSourcePage) {
+ model = ((BuildSourcePage) page).getInputContext().getModel();
+ }
+ }
+ } else if (name.equals(F_MANIFEST)) {
+ model = openEditor.getAggregateModel();
+ if (model instanceof IBundlePluginModelBase) {
+ return model;
+ }
+ }
+ if (model instanceof AbstractEditingModel) {
+ return model;
+ }
+ return null;
+ }
+
+ private static IModelTextChangeListener createListener(String filename, IDocument doc) {
+ if (filename.equals(F_PLUGIN) || filename.equals(F_FRAGMENT)) {
+ return new XMLTextChangeListener(doc);
+ } else if (filename.equals(F_MANIFEST)) {
+ return new BundleTextChangeListener(doc);
+ } else if (filename.endsWith(F_PROPERTIES)) {
+ return new PropertiesTextChangeListener(doc);
+ }
+ return null;
+ }
+
+ private static AbstractEditingModel prepareAbstractEditingModel(IFile file, IDocument doc) {
+ AbstractEditingModel model;
+ String filename = file.getName();
+ if (filename.equals(F_MANIFEST)) {
+ model = new BundleModel(doc, true);
+ } else if (filename.equals(F_FRAGMENT)) {
+ model = new FragmentModel(doc, true);
+ } else if (filename.equals(F_PLUGIN)) {
+ model = new PluginModel(doc, true);
+ } else if (filename.endsWith(F_PROPERTIES)) {
+ model = new BuildModel(doc, true);
+ } else {
+ return null;
+ }
+ model.setUnderlyingResource(file);
+ try {
+ model.load();
+ IModelTextChangeListener listener = createListener(filename, doc);
+ model.addModelChangedListener(listener);
+ } catch (CoreException e) {
+ PDEPlugin.log(e);
+ }
+ return model;
+ }
+
+ private static IBaseModel prepareBundlePluginModel(IFile[] files, IDocument[] docs) {
+ AbstractEditingModel[] models = new AbstractEditingModel[docs.length];
+ boolean isFragment = false;
+ models[F_Bi] = prepareAbstractEditingModel(files[F_Bi], docs[F_Bi]);
+ if (models[F_Bi] instanceof IBundleModel) {
+ isFragment = ((IBundleModel) models[F_Bi]).getBundle().getHeader(Constants.FRAGMENT_HOST) != null;
+ }
+ IBundlePluginModelBase pluginModel;
+ if (isFragment) {
+ pluginModel = new BundleFragmentModel();
+ } else {
+ pluginModel = new BundlePluginModel();
+ }
+ pluginModel.setBundleModel((IBundleModel) models[F_Bi]);
+ if (files.length > F_Xi && files[F_Xi] != null) {
+ models[F_Xi] = prepareAbstractEditingModel(files[F_Xi], docs[F_Xi]);
+ pluginModel.setExtensionsModel((ISharedExtensionsModel) models[F_Xi]);
+ }
+ return pluginModel;
+ }
+
+ private static IModelTextChangeListener[] gatherListeners(IBaseModel editModel) {
+ IModelTextChangeListener[] listeners = new IModelTextChangeListener[0];
+ if (editModel instanceof AbstractEditingModel) {
+ listeners = new IModelTextChangeListener[] { ((AbstractEditingModel) editModel).getLastTextChangeListener() };
+ }
+ if (editModel instanceof IBundlePluginModelBase) {
+ IBundlePluginModelBase modelBase = (IBundlePluginModelBase) editModel;
+ listeners = new IModelTextChangeListener[2];
+ listeners[F_Bi] = gatherListener(modelBase.getBundleModel());
+ listeners[F_Xi] = gatherListener(modelBase.getExtensionsModel());
+ return listeners;
+ }
+ return listeners;
+ }
+
+ private static IModelTextChangeListener gatherListener(IBaseModel model) {
+ if (model instanceof AbstractEditingModel) {
+ return ((AbstractEditingModel) model).getLastTextChangeListener();
+ }
+ return null;
+ }
+
+ private static Display getDisplay() {
+ Display display = Display.getCurrent();
+ if (display == null) {
+ display = Display.getDefault();
+ }
+ return display;
+ }
+
+}
diff --git a/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/internal/ui/XMLTextChangeListener.java b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/internal/ui/XMLTextChangeListener.java
new file mode 100644
index 0000000..b56cb94
--- /dev/null
+++ b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/internal/ui/XMLTextChangeListener.java
@@ -0,0 +1,503 @@
+/**
+ * Copyright (c) 2005-2008 IBM Corporation and others.
+ * 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:
+ * IBM - Initial API and implementation
+ */
+package org.eclipse.egf.core.pde.internal.ui;
+
+import java.util.ArrayList;
+
+import org.eclipse.egf.common.constant.EGFCommonConstants;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.TextUtilities;
+import org.eclipse.pde.core.IModelChangedEvent;
+import org.eclipse.pde.internal.core.text.AbstractTextChangeListener;
+import org.eclipse.pde.internal.core.text.IDocumentAttributeNode;
+import org.eclipse.pde.internal.core.text.IDocumentElementNode;
+import org.eclipse.pde.internal.core.text.IDocumentTextNode;
+import org.eclipse.pde.internal.core.util.PDEXMLHelper;
+import org.eclipse.pde.internal.core.util.PropertiesUtil;
+import org.eclipse.text.edits.DeleteEdit;
+import org.eclipse.text.edits.InsertEdit;
+import org.eclipse.text.edits.MoveSourceEdit;
+import org.eclipse.text.edits.MoveTargetEdit;
+import org.eclipse.text.edits.MultiTextEdit;
+import org.eclipse.text.edits.ReplaceEdit;
+import org.eclipse.text.edits.TextEdit;
+
+
+/**
+ * Fix a PDE bug, https://bugs.eclipse.org/bugs/show_bug.cgi?id=184737
+ */
+public class XMLTextChangeListener extends AbstractTextChangeListener {
+
+ @SuppressWarnings("unchecked")
+ private ArrayList fOperationList = new ArrayList();
+
+ public XMLTextChangeListener(IDocument document) {
+ super(document);
+ }
+
+ public TextEdit[] getTextOperations() {
+ if (fOperationList.size() == 0)
+ return new TextEdit[0];
+
+ MultiTextEdit edit = new MultiTextEdit();
+ try {
+ if (PropertiesUtil.isNewlineNeeded(fDocument))
+ insert(edit, new InsertEdit(fDocument.getLength(), TextUtilities.getDefaultLineDelimiter(fDocument)));
+ } catch (BadLocationException e) {
+ // do nothing.
+ }
+ Object[] operations = fOperationList.toArray();
+ for (int i = 0; i < operations.length; i++)
+ insert(edit, (TextEdit) operations[i]);
+
+ return new TextEdit[] { edit };
+ }
+
+ protected static void insert(TextEdit parent, TextEdit edit) {
+ if (parent.hasChildren() == false) {
+ parent.addChild(edit);
+ if (edit instanceof MoveSourceEdit) {
+ parent.addChild(((MoveSourceEdit) edit).getTargetEdit());
+ }
+ return;
+ }
+ TextEdit[] children = parent.getChildren();
+ // First dive down to find the right parent.
+ for (int i = 0; i < children.length; i++) {
+ TextEdit child = children[i];
+ if (covers(child, edit)) {
+ insert(child, edit);
+ return;
+ }
+ }
+ // We have the right parent. Now check if some of the children have to
+ // be moved under the new edit since it is covering it.
+ for (int i = children.length - 1; i >= 0; i--) {
+ TextEdit child = children[i];
+ if (covers(edit, child)) {
+ parent.removeChild(i);
+ edit.addChild(child);
+ }
+ }
+ parent.addChild(edit);
+ if (edit instanceof MoveSourceEdit) {
+ parent.addChild(((MoveSourceEdit) edit).getTargetEdit());
+ }
+ }
+
+ protected static boolean covers(TextEdit thisEdit, TextEdit otherEdit) {
+ // an insertion point can't cover anything
+ if (thisEdit.getLength() == 0) {
+ return false;
+ }
+ int thisOffset = thisEdit.getOffset();
+ int thisEnd = thisEdit.getExclusiveEnd();
+ if (otherEdit.getLength() == 0) {
+ int otherOffset = otherEdit.getOffset();
+ return thisOffset < otherOffset && otherOffset < thisEnd;
+ }
+ int otherOffset = otherEdit.getOffset();
+ int otherEnd = otherEdit.getExclusiveEnd();
+ return thisOffset <= otherOffset && otherEnd <= thisEnd;
+ }
+
+ @SuppressWarnings("unchecked")
+ protected void deleteNode(IDocumentElementNode node) {
+ // delete previous op on this node, if any
+ TextEdit old = (TextEdit) fOperationTable.get(node);
+ if (old != null) {
+ Object op = fOperationTable.remove(node);
+ fOperationList.remove(op);
+ }
+ // if node has an offset, delete it
+ if (node.getOffset() > -1) {
+ // Create a delete op for this node
+ TextEdit op = getDeleteNodeOperation(node);
+ fOperationTable.put(node, op);
+ fOperationList.add(op);
+ } else if (old == null) {
+ // No previous op on this non-offset node, just rewrite highest ancestor with an offset
+ insertNode(node);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ protected void insertNode(IDocumentElementNode node_p) {
+ TextEdit op = null;
+ IDocumentElementNode node = getHighestNodeToBeWritten(node_p);
+ if (node.getParentNode() == null) {
+ // Only add the insertion edit operation if the node is a root node
+ // Otherwise the insertion edit operation will specify to add the
+ // node to the beginning of the file and corrupt it
+ // See Bugs 163161, 166520
+ if (node.isRoot()) {
+ op = new InsertEdit(0, node.write(true));
+ }
+ } else {
+ if (node.getOffset() > -1) {
+ // this is an element that was of the form <element/>
+ // it now needs to be broken up into <element><new/></element>
+ op = new ReplaceEdit(node.getOffset(), node.getLength(), node.write(false));
+ } else {
+ // try to insert after last sibling that has an offset
+ op = insertAfterSibling(node);
+ // insert as first child of its parent
+ if (op == null) {
+ op = insertAsFirstChild(node);
+ }
+ }
+ }
+ // TODO Stephane : patch bug modification de plugin.xml
+ TextEdit old = (TextEdit) fOperationTable.get(node);
+ if (old != null) {
+ fOperationList.remove(old);
+ }
+ // Fin modif Stephane.
+ fOperationTable.put(node, op);
+ fOperationList.add(op);
+ }
+
+ private InsertEdit insertAfterSibling(IDocumentElementNode node) {
+ IDocumentElementNode sibling = node.getPreviousSibling();
+ for (;;) {
+ if (sibling == null) {
+ break;
+ }
+ if (sibling.getOffset() > -1) {
+ node.setLineIndent(sibling.getLineIndent());
+ return new InsertEdit(sibling.getOffset() + sibling.getLength(), fSep + node.write(true));
+ }
+ sibling = sibling.getPreviousSibling();
+ }
+ return null;
+ }
+
+ private InsertEdit insertAsFirstChild(IDocumentElementNode node) {
+ int offset = node.getParentNode().getOffset();
+ int length = getNextPosition(fDocument, offset, '>');
+ node.setLineIndent(node.getParentNode().getLineIndent() + 3);
+ return new InsertEdit(offset + length + 1, fSep + node.write(true));
+ }
+
+ @SuppressWarnings("unchecked")
+ protected void modifyNode(IDocumentElementNode node, IModelChangedEvent event) {
+ IDocumentElementNode oldNode = (IDocumentElementNode) event.getOldValue();
+ IDocumentElementNode newNode = (IDocumentElementNode) event.getNewValue();
+ IDocumentElementNode node1 = (oldNode.getPreviousSibling() == null || oldNode.equals(newNode.getPreviousSibling())) ? oldNode : newNode;
+ IDocumentElementNode node2 = node1.equals(oldNode) ? newNode : oldNode;
+ if (node1.getOffset() < 0 && node2.getOffset() < 0) {
+ TextEdit op = (TextEdit) fOperationTable.get(node1);
+ if (op == null) {
+ // node 1 has no rule, so node 2 has no rule, therefore rewrite parent/ancestor
+ insertNode(node);
+ }
+ } else if (node1.getOffset() > -1 && node2.getOffset() > -1) {
+ // both nodes have offsets, so create a move target/source combo operation
+ IRegion region = getMoveRegion(node1);
+ MoveSourceEdit source = new MoveSourceEdit(region.getOffset(), region.getLength());
+ region = getMoveRegion(node2);
+ source.setTargetEdit(new MoveTargetEdit(region.getOffset()));
+ // TODO Stephane : patch bug modification de plugin.xml
+ TextEdit old = (TextEdit) fOperationTable.get(node);
+ if (old != null) {
+ fOperationList.remove(old);
+ }
+ // Fin modif Stephane.
+ fOperationTable.put(node, source);
+ fOperationList.add(source);
+ } else {
+ // one node with offset, the other without offset. Delete/reinsert the one without offset
+ insertNode((node1.getOffset() < 0) ? node1 : node2);
+ }
+ }
+
+ private IRegion getMoveRegion(IDocumentElementNode node) {
+ int offset = node.getOffset();
+ int length = node.getLength();
+ int i = 1;
+ try {
+ for (;; i++) {
+ char ch = fDocument.get(offset - i, 1).toCharArray()[0];
+ if (Character.isWhitespace(ch) == false) {
+ i -= 1;
+ break;
+ }
+ }
+ } catch (BadLocationException e) {
+ //
+ }
+ return new Region(offset - i, length + i);
+ }
+
+ @SuppressWarnings("unchecked")
+ protected void addAttributeOperation(IDocumentAttributeNode attr, IModelChangedEvent event) {
+ int offset = attr.getValueOffset();
+ Object newValue = event.getNewValue();
+ Object changedObject = attr;
+ TextEdit op = null;
+ if (offset > -1) {
+ if (newValue == null || newValue.toString().length() == 0) {
+ int length = attr.getValueOffset() + attr.getValueLength() + 1 - attr.getNameOffset();
+ op = getAttributeDeleteEditOperation(attr.getNameOffset(), length);
+ } else {
+ op = new ReplaceEdit(offset, attr.getValueLength(), getWritableString(event.getNewValue().toString()));
+ }
+ }
+
+ if (op == null) {
+ IDocumentElementNode node = attr.getEnclosingElement();
+ if (node.getOffset() > -1) {
+ changedObject = node;
+ int len = getNextPosition(fDocument, node.getOffset(), '>');
+ op = new ReplaceEdit(node.getOffset(), len + 1, node.writeShallow(shouldTerminateElement(fDocument, node.getOffset() + len)));
+ } else {
+ insertNode(node);
+ return;
+ }
+ }
+ // TODO Stephane : patch bug modification de plugin.xml
+ TextEdit old = (TextEdit) fOperationTable.get(changedObject);
+ if (old != null) {
+ fOperationList.remove(old);
+ }
+ // Fin modif Stephane.
+ fOperationTable.put(changedObject, op);
+ fOperationList.add(op);
+ }
+
+ @SuppressWarnings("unchecked")
+ protected void addElementContentOperation(IDocumentTextNode textNode) {
+ TextEdit op = null;
+ Object changedObject = textNode;
+ if (textNode.getOffset() > -1) {
+ String newText = getWritableString(textNode.getText());
+ op = new ReplaceEdit(textNode.getOffset(), textNode.getLength(), newText);
+ } else {
+ IDocumentElementNode parent = textNode.getEnclosingElement();
+ if (parent.getOffset() > -1) {
+ try {
+ String endChars = fDocument.get(parent.getOffset() + parent.getLength() - 2, 2);
+ if ("/>".equals(endChars)) { //$NON-NLS-1$
+ // parent element is of the form <element/>, rewrite it
+ insertNode(parent);
+ return;
+ }
+ } catch (BadLocationException e) {
+ //
+ }
+ // add text as first child
+ changedObject = parent;
+ StringBuffer buffer = new StringBuffer(fSep);
+ for (int i = 0; i < parent.getLineIndent(); i++) {
+ buffer.append(" "); //$NON-NLS-1$
+ }
+ buffer.append(" " + getWritableString(textNode.getText())); //$NON-NLS-1$
+ int offset = parent.getOffset();
+ int length = getNextPosition(fDocument, offset, '>');
+ op = new InsertEdit(offset + length + 1, buffer.toString());
+ } else {
+ insertNode(parent);
+ return;
+ }
+ }
+ // TODO Stephane : patch bug modification de plugin.xml
+ TextEdit old = (TextEdit) fOperationTable.get(changedObject);
+ if (old != null) {
+ fOperationList.remove(old);
+ }
+ // Fin modif Stephane.
+ fOperationTable.put(changedObject, op);
+ fOperationList.add(op);
+ }
+
+ private boolean shouldTerminateElement(IDocument doc, int offset) {
+ try {
+ return doc.get(offset - 1, 1).toCharArray()[0] == '/';
+ } catch (BadLocationException e) {
+ //
+ }
+ return false;
+ }
+
+ private int getNextPosition(IDocument doc, int offset, char ch) {
+ int i = 0;
+ try {
+ for (i = 0; i + offset < doc.getLength(); i++) {
+ if (ch == doc.get(offset + i, 1).toCharArray()[0])
+ break;
+ }
+ } catch (BadLocationException e) {
+ //
+ }
+ return i;
+ }
+
+ private DeleteEdit getAttributeDeleteEditOperation(int offset, int length_p) {
+ int length = length_p;
+ try {
+ for (;;) {
+ char ch = fDocument.get(offset + length, 1).toCharArray()[0];
+ if (!Character.isWhitespace(ch)) {
+ break;
+ }
+ length += 1;
+ }
+ } catch (BadLocationException e) {
+ //
+ }
+ return new DeleteEdit(offset, length);
+ }
+
+ private DeleteEdit getDeleteNodeOperation(IDocumentElementNode node) {
+ int offset = node.getOffset();
+ int length = node.getLength();
+ try {
+ // node starts on this line:
+ int startLine = fDocument.getLineOfOffset(offset);
+ // 1st char on startLine has this offset:
+ int startLineOffset = fDocument.getLineOffset(startLine);
+ // hunt down 1st whitespace/start of line with startOffset:
+ int startOffset;
+ // loop backwards to the beginning of the line, stop if we find non-whitespace
+ for (startOffset = offset - 1; startOffset >= startLineOffset; startOffset -= 1) {
+ if (Character.isWhitespace(fDocument.getChar(startOffset)) == false) {
+ break;
+ }
+ }
+ // move forward one (loop stopped after reaching too far)
+ startOffset += 1;
+ // node ends on this line:
+ int endLine = fDocument.getLineOfOffset(offset + length);
+ // length of last line's delimiter:
+ int endLineDelimLength = fDocument.getLineDelimiter(endLine).length();
+ // hunt last whitespace/end of line with extraLength:
+ int extraLength = length;
+ while (true) {
+ extraLength += 1;
+ if (Character.isWhitespace(fDocument.getChar(offset + extraLength)) == false) {
+ // found non-white space, move back one
+ extraLength -= 1;
+ break;
+ }
+ if (fDocument.getLineOfOffset(offset + extraLength) > endLine) {
+ // don't want to touch the lineDelimeters
+ extraLength -= endLineDelimLength;
+ break;
+ }
+ }
+
+ // if we reached start of line, remove newline
+ if (startOffset == startLineOffset) {
+ startOffset -= fDocument.getLineDelimiter(startLine).length();
+ }
+ // add difference of new offset
+ length = extraLength + (offset - startOffset);
+ offset = startOffset;
+ // printDeletionRange(offset, length);
+ } catch (BadLocationException e) {
+ //
+ }
+ return new DeleteEdit(offset, length);
+ }
+
+ protected void printDeletionRange(int offset, int length) {
+ try {
+ // newlines printed as \n
+ // carriage returns printed as \r
+ // tabs printed as \t
+ // spaces printed as *
+ String string = fDocument.get(offset, length);
+ StringBuffer buffer = new StringBuffer();
+ for (int i = 0; i < string.length(); i++) {
+ char c = string.charAt(i);
+ if (c == '\n')
+ buffer.append("\\n"); //$NON-NLS-1$
+ else if (c == '\r')
+ buffer.append("\\r"); //$NON-NLS-1$
+ else if (c == '\t')
+ buffer.append("\\t"); //$NON-NLS-1$
+ else if (c == ' ')
+ buffer.append('*');
+ else
+ buffer.append(c);
+ }
+ System.out.println(buffer.toString());
+ } catch (BadLocationException e) {
+ //
+ }
+ }
+
+ private IDocumentElementNode getHighestNodeToBeWritten(IDocumentElementNode node) {
+ IDocumentElementNode parent = node.getParentNode();
+ if (parent == null) {
+ return node;
+ }
+ if (parent.getOffset() > -1) {
+ try {
+ String endChars = fDocument.get(parent.getOffset() + parent.getLength() - 2, 2);
+ return ("/>".equals(endChars)) ? parent : node; //$NON-NLS-1$
+ } catch (BadLocationException e) {
+ return node;
+ }
+ }
+ return getHighestNodeToBeWritten(parent);
+ }
+
+ private String getWritableString(String source) {
+ return PDEXMLHelper.getWritableString(source);
+ }
+
+ public void modelChanged(IModelChangedEvent event) {
+ Object[] objects = event.getChangedObjects();
+ if (objects == null) {
+ return;
+ }
+ for (int i = 0; i < objects.length; i++) {
+ if (objects[i] instanceof IDocumentElementNode == false) {
+ continue;
+ }
+ IDocumentElementNode node = (IDocumentElementNode) objects[i];
+ Object op = fOperationTable.remove(node);
+ fOperationList.remove(op);
+ switch (event.getChangeType()) {
+ case IModelChangedEvent.REMOVE:
+ deleteNode(node);
+ break;
+ case IModelChangedEvent.INSERT:
+ insertNode(node);
+ break;
+ case IModelChangedEvent.CHANGE:
+ IDocumentAttributeNode attr = node.getDocumentAttribute(event.getChangedProperty());
+ if (attr != null) {
+ addAttributeOperation(attr, event);
+ } else {
+ if (event.getOldValue() instanceof IDocumentTextNode) {
+ addElementContentOperation((IDocumentTextNode) event.getOldValue());
+ } else if (event.getOldValue() instanceof IDocumentElementNode && event.getNewValue() instanceof IDocumentElementNode) {
+ // swapping of nodes
+ modifyNode(node, event);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * @see org.eclipse.pde.internal.core.text.IModelTextChangeListener#getReadableName(org.eclipse.text.edits.TextEdit)
+ */
+ public String getReadableName(TextEdit edit_p) {
+ return EGFCommonConstants.EMPTY_STRING;
+ }
+
+}
diff --git a/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/l10n/EGFPDEMessages.java b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/l10n/EGFPDEMessages.java
new file mode 100644
index 0000000..441070e
--- /dev/null
+++ b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/l10n/EGFPDEMessages.java
@@ -0,0 +1,33 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.pde.l10n;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class EGFPDEMessages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.egf.core.pde.l10n.messages";//$NON-NLS-1$
+
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, EGFPDEMessages.class);
+ }
+
+ public static String savedState_jobName;
+
+ public static String PluginModelUpdate_progressMessage;
+ public static String PluginModelUpdate_logTitle;
+
+}
diff --git a/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/l10n/messages.properties b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/l10n/messages.properties
new file mode 100644
index 0000000..6767ade
--- /dev/null
+++ b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/l10n/messages.properties
@@ -0,0 +1,15 @@
+##
+# 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
+##
+
+savedState_jobName = Processing EGF changes since last activation
+
+PluginModelUpdate_progressMessage = EGF Plugin Model Update
+PluginModelUpdate_logTitle = Exception in {0}. run: {1}
diff --git a/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/plugin/AbstractChangesCommand.java b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/plugin/AbstractChangesCommand.java
new file mode 100644
index 0000000..81f58f8
--- /dev/null
+++ b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/plugin/AbstractChangesCommand.java
@@ -0,0 +1,124 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.pde.plugin;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.egf.common.helper.BundleHelper;
+import org.eclipse.egf.core.pde.EGFPDEPlugin;
+import org.eclipse.egf.core.pde.helper.PluginHelper;
+import org.eclipse.egf.core.pde.internal.ui.ModelModification;
+import org.eclipse.egf.core.pde.internal.ui.PDEModelUtility;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.core.IBaseModel;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.internal.core.plugin.WorkspacePluginModelBase;
+
+/**
+ * Base class to implement a command that performs bundle changes in the plugin.xml file.
+ *
+ * @author Guillaume Brocard
+ */
+public abstract class AbstractChangesCommand implements IPluginChangesCommand {
+
+ private String _bundleId;
+
+ private IPluginModelBase _pluginModelBase;
+
+ private IProject _project;
+
+ public AbstractChangesCommand(IProject project) throws CoreException {
+ Assert.isNotNull(project);
+ _project = project;
+ IPluginModelBase fakeModel = BundleHelper.getPluginModelBase(_project);
+ if (fakeModel == null) {
+ throw new CoreException(EGFPDEPlugin.getDefault().newStatus(IStatus.ERROR, NLS.bind("AbstractChangesCommand(..) _ project ''{0}'' is not a bundle project.", _project.getModificationStamp()), null)); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * Get the plug-in model id
+ *
+ * @return the bundleId
+ */
+ public String getBundleId() {
+ if (_bundleId == null) {
+ if (_pluginModelBase != null) {
+ _bundleId = BundleHelper.getBundleId(_pluginModelBase);
+ }
+ }
+ return _bundleId;
+ }
+
+ /**
+ * Get the plug-in model that this command is performed against.
+ *
+ * @return the pluginModelBase
+ */
+ public IPluginModelBase getPluginModelBase() {
+ return _pluginModelBase;
+ }
+
+ /**
+ * @see org.eclipse.egf.core.pde.plugin.IPluginChangesCommand#execute()
+ */
+ public void execute(IProgressMonitor monitor) throws CoreException {
+ if (_project.getFile(PDEModelUtility.F_PLUGIN).exists()) {
+ modifyExistingPlugin(monitor);
+ } else {
+ createNewPlugin(monitor);
+ }
+ }
+
+ private void createNewPlugin(IProgressMonitor monitor) throws CoreException {
+ IPluginModelBase fakeModel = BundleHelper.getPluginModelBase(_project);
+ if (fakeModel == null) {
+ throw new CoreException(EGFPDEPlugin.getDefault().newStatus(IStatus.ERROR, NLS.bind("AbstractChangesCommand.createNewPlugin(..) _ project ''{0}'' is not a bundle project.", _project.getModificationStamp()), null)); //$NON-NLS-1$
+ }
+ WorkspacePluginModelBase pluginModel = PluginHelper.createWorkspacePluginModelBase(fakeModel);
+ if (pluginModel == null) {
+ return;
+ }
+ _pluginModelBase = pluginModel;
+ doExecute(monitor);
+ pluginModel.save();
+ PluginHelper.updateBuildFile(pluginModel);
+ }
+
+ private void modifyExistingPlugin(final IProgressMonitor monitor) {
+ EGFPDEPlugin.getDisplay().syncExec(new Runnable() {
+ public void run() {
+ // Create an update operation that deals with modifying extensions.
+ ModelModification updateOperation = new ModelModification(_project.getFile(PDEModelUtility.F_PLUGIN)) {
+ @Override
+ protected void modifyModel(IBaseModel model, IProgressMonitor innerMonitor) throws CoreException {
+ if (model == null) {
+ return;
+ }
+ if (model instanceof IPluginModelBase == false) {
+ return;
+ }
+ _pluginModelBase = (IPluginModelBase) model;
+ doExecute(innerMonitor);
+ }
+ };
+ // Let's update the file.
+ PDEModelUtility.modifyModel(updateOperation, monitor);
+ }
+ });
+ }
+
+ protected abstract void doExecute(IProgressMonitor monitor) throws CoreException;
+
+}
diff --git a/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/plugin/AbstractExtensionChangesCommand.java b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/plugin/AbstractExtensionChangesCommand.java
new file mode 100644
index 0000000..39fcfc2
--- /dev/null
+++ b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/plugin/AbstractExtensionChangesCommand.java
@@ -0,0 +1,191 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.pde.plugin;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.egf.core.pde.helper.ExtensionHelper;
+import org.eclipse.pde.core.plugin.IExtensions;
+import org.eclipse.pde.core.plugin.IPluginAttribute;
+import org.eclipse.pde.core.plugin.IPluginElement;
+import org.eclipse.pde.core.plugin.IPluginExtension;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+
+/**
+ * Base class to implement a command that performs plug-in changes in extension
+ * part.<br>
+ * Changes can be an extension adding operation.
+ *
+ * @author fournier
+ */
+public abstract class AbstractExtensionChangesCommand extends AbstractChangesCommand {
+
+ public AbstractExtensionChangesCommand(IProject project) throws CoreException {
+ super(project);
+ }
+
+ /**
+ * Create extension for extension-point id returned by {@link #getExtensionPointId()}.
+ *
+ * @return
+ */
+ protected IPluginExtension createExtension() throws CoreException {
+ // Create a new extension matching extension-point id.
+ return ExtensionHelper.createExtension(getPluginModelBase(), getExtensionPointId());
+ }
+
+ /**
+ * Remove extension point according to the result of {@link #getExtensionPointId()}.
+ */
+ protected void removeExtensionElement() throws CoreException {
+ // Retrieve the extension.
+ IPluginExtension[] pluginExtensions = ExtensionHelper.getPluginExtension(getExtensions(), getExtensionPointId());
+ if (pluginExtensions == null) {
+ return;
+ }
+ for (IPluginExtension pluginExtension : pluginExtensions) {
+ boolean removed = false;
+ IPluginElement[] pluginElements = ExtensionHelper.getPluginElement(pluginExtension, getExtensionChildName());
+ if (pluginElements == null) {
+ continue;
+ }
+ for (IPluginElement pluginElement : pluginElements) {
+ // Look up for the one related to given element name.
+ IPluginAttribute pluginAttribute = pluginElement.getAttribute(getExtensionChildAttribute());
+ if (pluginAttribute != null && matchValue(pluginAttribute.getValue())) {
+ pluginExtension.remove(pluginElement);
+ removed = true;
+ }
+ }
+ // Is the element removed ?
+ if (removed == false) {
+ continue;
+ }
+ int childCount = pluginExtension.getChildCount();
+ if (childCount == 0) {
+ // Remove it.
+ getExtensions().remove(pluginExtension);
+ }
+ }
+ }
+
+ /**
+ * Get a child for given id in extension matching {@link #getExtensionPointId()}, {@link #getExtensionChildName()} and {@link #getExtensionChildIdAttribute()}.
+ *
+ * @param value
+ * @return null if
+ */
+ protected IPluginElement createExtensionElement() throws CoreException {
+ IPluginElement pluginElement = null;
+ // Get the extension.
+ IPluginExtension[] pluginExtensions = ExtensionHelper.getPluginExtension(getExtensions(), getExtensionPointId());
+ if (pluginExtensions == null) {
+ return null;
+ }
+ // Check if an extension is already containing the searched element?
+ // Loop over retrieved extensions to seek for a plug-in element with specified id attribute and id value.
+ // We stop when the first one is found
+ LOOP: for (int i = 0; i < pluginExtensions.length; i++) {
+ // Retrieve contained element.
+ IPluginElement[] pluginElements = ExtensionHelper.getPluginElement(pluginExtensions[i], getExtensionChildName());
+ if (pluginElements != null) {
+ for (IPluginElement innerPluginElement : pluginElements) {
+ // Look up for the one related to given element name.
+ IPluginAttribute pluginAttribute = innerPluginElement.getAttribute(getExtensionChildAttribute());
+ if (pluginAttribute != null && matchValue(pluginAttribute.getValue())) {
+ pluginElement = innerPluginElement;
+ break LOOP;
+ }
+ }
+ }
+ }
+ // If the plug-in element is not found, create a new extension with its
+ // extension element.
+ if (pluginElement == null) {
+ // Extension doesn't exist yet, let's create it.
+ IPluginExtension extension = null;
+ if (pluginExtensions != null && pluginExtensions.length > 0) {
+ extension = pluginExtensions[0];
+ }
+ if (extension == null) {
+ extension = createExtension();
+ }
+ // Create the element.
+ pluginElement = ExtensionHelper.createPluginElement(extension, getExtensionChildName());
+ if (pluginElement != null) {
+ // Set it its id.
+ pluginElement.setAttribute(getExtensionChildAttribute(), getValue().toString());
+ }
+ }
+ return pluginElement;
+ }
+
+ /**
+ * Returns the extensions matching the given extension point id.
+ *
+ * @param extensionPointId
+ * @return
+ */
+ protected IPluginExtension[] getExtensions(String extensionPointId) {
+ // Get the portion of plug-in responsible for extensions and
+ // extension-points and get the extension.
+ return ExtensionHelper.getPluginExtension(getExtensions(), extensionPointId);
+ }
+
+ /**
+ * Get {@link IExtensions} instance from plug-in object.
+ *
+ * @return
+ */
+ protected IExtensions getExtensions() {
+ IPluginModelBase pluginModelBase = getPluginModelBase();
+ if (pluginModelBase == null) {
+ return null;
+ }
+ return pluginModelBase.getExtensions();
+ }
+
+ /**
+ * matching rule for values
+ *
+ * @return
+ */
+ protected abstract boolean matchValue(String value);
+
+ /**
+ * Get the extension point id.
+ *
+ * @return
+ */
+ protected abstract String getExtensionPointId();
+
+ /**
+ * Get the children's node name for the extension.
+ *
+ * @return
+ */
+ protected abstract String getExtensionChildName();
+
+ /**
+ * Get the children's attribute for the extension.
+ *
+ * @return
+ */
+ protected abstract String getExtensionChildAttribute();
+
+ /**
+ * Get the value
+ *
+ * @return
+ */
+ protected abstract Object getValue();
+
+}
diff --git a/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/plugin/IPluginChangesCommand.java b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/plugin/IPluginChangesCommand.java
new file mode 100644
index 0000000..622b3e4
--- /dev/null
+++ b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/plugin/IPluginChangesCommand.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.egf.core.pde.plugin;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+
+/**
+ * Define an interface to implement commands that perform plug-in changes.<br>
+ * Changes can be an extension adding operation.
+ *
+ * @author fournier
+ */
+public interface IPluginChangesCommand {
+
+ /**
+ * get the plug-in model that this command is performed against.
+ *
+ */
+ public IPluginModelBase getPluginModelBase();
+
+ /**
+ * Performs changes on the underlying plug-in.
+ */
+ public void execute(IProgressMonitor monitor) throws CoreException;
+
+ /**
+ * get the plug-in model id
+ *
+ * @param pluginModel
+ */
+ public String getBundleId();
+
+}
diff --git a/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/tools/ConvertProjectOperation.java b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/tools/ConvertProjectOperation.java
new file mode 100644
index 0000000..1a0b09b
--- /dev/null
+++ b/org.eclipse.egf.core.pde/src/org/eclipse/egf/core/pde/tools/ConvertProjectOperation.java
@@ -0,0 +1,682 @@
+/**
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ * Code 9 Corporation - ongoing enhancements
+ * Les Jones <lesojones@gmaill.com> - bug 205361
+ * Xavier Maysonnave - ongoing enhancements
+ */
+package org.eclipse.egf.core.pde.tools;
+
+import java.lang.reflect.InvocationTargetException;
+import java.net.URISyntaxException;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.resources.ICommand;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.egf.common.constant.EGFCommonConstants;
+import org.eclipse.egf.common.helper.JavaHelper;
+import org.eclipse.egf.common.l10n.EGFCommonMessages;
+import org.eclipse.egf.core.helper.EclipseBuilderHelper;
+import org.eclipse.egf.core.l10n.EGFCoreMessages;
+import org.eclipse.egf.core.natures.EGFNatures;
+import org.eclipse.egf.core.pde.EGFPDEPlugin;
+import org.eclipse.emf.codegen.util.CodeGenUtil;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.common.util.UniqueEList;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.launching.JavaRuntime;
+import org.eclipse.pde.core.IBaseModel;
+import org.eclipse.pde.core.build.IBuild;
+import org.eclipse.pde.core.build.IBuildEntry;
+import org.eclipse.pde.core.build.IBuildModel;
+import org.eclipse.pde.core.plugin.IPluginBase;
+import org.eclipse.pde.core.plugin.IPluginImport;
+import org.eclipse.pde.core.plugin.IPluginLibrary;
+import org.eclipse.pde.core.plugin.IPluginModelFactory;
+import org.eclipse.pde.internal.core.ICoreConstants;
+import org.eclipse.pde.internal.core.TargetPlatformHelper;
+import org.eclipse.pde.internal.core.build.WorkspaceBuildModel;
+import org.eclipse.pde.internal.core.bundle.WorkspaceBundlePluginModel;
+import org.eclipse.pde.internal.core.ibundle.IBundle;
+import org.eclipse.pde.internal.core.ibundle.IBundlePluginModelBase;
+import org.eclipse.pde.internal.core.ibundle.IManifestHeader;
+import org.eclipse.pde.internal.core.natures.PDE;
+import org.eclipse.pde.internal.core.text.bundle.BundleSymbolicNameHeader;
+import org.eclipse.pde.internal.core.util.IdUtil;
+import org.eclipse.pde.internal.ui.util.ModelModification;
+import org.eclipse.pde.internal.ui.util.PDEModelUtility;
+import org.eclipse.pde.internal.ui.wizards.tools.OrganizeManifest;
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
+import org.osgi.framework.Constants;
+
+/**
+ * Operation to convert a normal workspace project into a plug-in project. This
+ * code has, in the main, been refactored (copied with little or no amendment)
+ * from org.eclipse.pde.internal.ui.wizards.tool.ConvertedProjectsPage.
+ */
+public class ConvertProjectOperation extends WorkspaceModifyOperation {
+
+ private IProject _project;
+
+ private boolean _createJavaProject;
+
+ private boolean _createEGFNature;
+
+ private String _library;
+
+ private List<String> _sourceFolders;
+
+ private List<String> _outputFolders;
+
+ private List<String> _libraries;
+
+ private List<String> _directories;
+
+ private List<IClasspathEntry> _classpathEntries;
+
+ private boolean _hasEGFNature;
+
+ private boolean _hasPluginNature;
+
+ private boolean _hasJavaNature;
+
+ private boolean _hasPatternBuilder;
+
+ private boolean _hasManifestBuilder;
+
+ private boolean _hasSchemaBuilder;
+
+ private boolean _hasJavaBuilder;
+
+ /**
+ * Workspace operation to convert the specified project into a plug-in
+ * project.
+ *
+ * @param theProjectsToConvert
+ * The project to be converted.
+ */
+ public ConvertProjectOperation(IProject project, boolean createJavaProject, boolean createEGFNature) {
+ _project = project;
+ _createJavaProject = createJavaProject;
+ _createEGFNature = createEGFNature;
+ }
+
+ /**
+ * Convert a project
+ *
+ * @param monitor
+ * Progress monitor
+ */
+
+ @Override
+ protected void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException {
+
+ SubMonitor subMonitor = SubMonitor.convert(monitor, EGFCoreMessages.ConvertProjectOperation_converter, 1000);
+
+ _hasEGFNature = false;
+ _hasPluginNature = false;
+ _hasJavaNature = false;
+ _hasPatternBuilder = false;
+ _hasManifestBuilder = false;
+ _hasSchemaBuilder = false;
+ _hasJavaBuilder = false;
+ _outputFolders = new UniqueEList<String>();
+ _classpathEntries = new UniqueEList<IClasspathEntry>();
+
+ // Do early checks to make sure we can get out fast if we're not setup properly
+ if (_project == null || _project.exists() == false) {
+ return;
+ }
+
+ // Build an EMF URI Style
+ URI projectLocationURI = URI.createFileURI(_project.getFullPath().toOSString());
+
+ // Nature check
+ if (_project.hasNature(EGFNatures.EGF_NATURE)) {
+ _hasEGFNature = true;
+ }
+ if (_project.hasNature(PDE.PLUGIN_NATURE)) {
+ _hasPluginNature = true;
+ }
+ if (_project.hasNature(JavaCore.NATURE_ID)) {
+ _hasJavaNature = true;
+ IJavaProject javaProject = JavaCore.create(_project);
+ _classpathEntries.addAll(Arrays.asList(javaProject.getRawClasspath()));
+ for (String outputFolder : JavaHelper.getStringOutputFolders(javaProject)) {
+ _outputFolders.add(outputFolder + EGFCommonConstants.SLASH_CHARACTER);
+ }
+ }
+
+ // Create Project Description if necessary
+ IProjectDescription projectDescription = null;
+ if (_project.exists() == false) {
+ projectDescription = ResourcesPlugin.getWorkspace().newProjectDescription(_project.getName());
+ if (projectLocationURI != null) {
+ try {
+ projectDescription.setLocationURI(new java.net.URI(projectLocationURI.toString()));
+ } catch (URISyntaxException use) {
+ throw new CoreException(EGFPDEPlugin.getDefault().newStatus(IStatus.ERROR, EGFCommonMessages.Exception_unexpectedException, use));
+ }
+ }
+ _project.create(projectDescription, subMonitor.newChild(100, SubMonitor.SUPPRESS_NONE));
+ } else {
+ projectDescription = _project.getDescription();
+ subMonitor.worked(100);
+ }
+
+ // Builder Check
+ ICommand[] builders = projectDescription.getBuildSpec();
+ if (builders != null) {
+ for (int i = 0; i < builders.length; ++i) {
+ if (PDE.MANIFEST_BUILDER_ID.equals(builders[i].getBuilderName())) {
+ _hasManifestBuilder = true;
+ } else if (PDE.SCHEMA_BUILDER_ID.equals(builders[i].getBuilderName())) {
+ _hasSchemaBuilder = true;
+ } else if (JavaCore.BUILDER_ID.equals(builders[i].getBuilderName())) {
+ _hasJavaBuilder = true;
+ } else if (EGFNatures.PATTERN_BUILDER_ID.equals(builders[i].getBuilderName())) {
+ _hasPatternBuilder = true;
+ }
+ }
+ }
+
+ // Nature setup
+ String[] natureIds = projectDescription.getNatureIds();
+ if (natureIds == null) {
+ if (_createJavaProject) {
+ natureIds = new String[] { JavaCore.NATURE_ID, PDE.PLUGIN_NATURE, EGFNatures.EGF_NATURE };
+ } else {
+ natureIds = new String[] { PDE.PLUGIN_NATURE };
+ }
+ projectDescription.setNatureIds(natureIds);
+ subMonitor.worked(200);
+ } else {
+ if (_hasEGFNature == false && _createEGFNature) {
+ EclipseBuilderHelper.addNature(projectDescription, EGFNatures.EGF_NATURE, subMonitor.newChild(100, SubMonitor.SUPPRESS_NONE));
+ } else {
+ subMonitor.worked(100);
+ }
+ if (_hasJavaNature == false && _createJavaProject) {
+ EclipseBuilderHelper.addNature(projectDescription, JavaCore.NATURE_ID, subMonitor.newChild(100, SubMonitor.SUPPRESS_NONE));
+ } else {
+ subMonitor.worked(100);
+ }
+ if (_hasPluginNature == false) {
+ EclipseBuilderHelper.addNature(projectDescription, PDE.PLUGIN_NATURE, subMonitor.newChild(100, SubMonitor.SUPPRESS_NONE));
+ } else {
+ subMonitor.worked(100);
+ }
+ }
+
+ // Builder Setup
+ if (_hasPatternBuilder == false && _createEGFNature) {
+ EclipseBuilderHelper.addToFrontOfBuildSpec(projectDescription, EGFNatures.PATTERN_BUILDER_ID, subMonitor.newChild(100, SubMonitor.SUPPRESS_NONE));
+ } else {
+ subMonitor.worked(100);
+ }
+ if (_hasJavaBuilder == false && _createJavaProject) {
+ EclipseBuilderHelper.addToBuildSpec(projectDescription, JavaCore.BUILDER_ID, subMonitor.newChild(100, SubMonitor.SUPPRESS_NONE));
+ } else {
+ subMonitor.worked(100);
+ }
+ if (_hasManifestBuilder == false) {
+ EclipseBuilderHelper.addToBuildSpec(projectDescription, PDE.MANIFEST_BUILDER_ID, subMonitor.newChild(100, SubMonitor.SUPPRESS_NONE));
+ } else {
+ subMonitor.worked(100);
+ }
+ if (_hasSchemaBuilder == false) {
+ EclipseBuilderHelper.addToBuildSpec(projectDescription, PDE.SCHEMA_BUILDER_ID, subMonitor.newChild(100, SubMonitor.SUPPRESS_NONE));
+ } else {
+ subMonitor.worked(100);
+ }
+
+ // Set Project Description
+ _project.setDescription(projectDescription, subMonitor.newChild(100, SubMonitor.SUPPRESS_NONE));
+
+ setupEntries(monitor);
+ setupLibraryName();
+
+ // Manifest
+ if (_hasPluginNature && _project.getFile(PDEModelUtility.F_MANIFEST_FP).exists()) {
+ updateManifestFile(subMonitor.newChild(100, SubMonitor.SUPPRESS_NONE));
+ } else {
+ createManifestFile(_project.getFile(PDEModelUtility.F_MANIFEST_FP), subMonitor.newChild(100, SubMonitor.SUPPRESS_NONE));
+ }
+
+ // build.properties
+ if (_hasPluginNature && _project.getFile(PDEModelUtility.F_BUILD).exists()) {
+ updateBuildFile(subMonitor.newChild(100, SubMonitor.SUPPRESS_NONE));
+ } else {
+ createBuildFile(_project.getFile(PDEModelUtility.F_BUILD), subMonitor.newChild(100, SubMonitor.SUPPRESS_NONE));
+ }
+
+ }
+
+ private void setupEntries(IProgressMonitor monitor) throws CoreException {
+
+ SubMonitor subMonitor = SubMonitor.convert(monitor, EGFCoreMessages.ConvertProjectOperation_setupClasspath, 400);
+
+ // Current variables
+ boolean isInitiallyEmpty = _classpathEntries.isEmpty();
+ List<String> sources = new UniqueEList<String>();
+ List<String> libraries = new UniqueEList<String>();
+ List<String> directories = new UniqueEList<String>();
+
+ // Classpath analysis
+ for (IClasspathEntry currentClassPath : _classpathEntries) {
+ int contentType = currentClassPath.getEntryKind();
+ // Process existing source folder
+ if (contentType == IClasspathEntry.CPE_SOURCE) {
+ String relativePath = getRelativePath(currentClassPath, _project);
+ if (EGFCommonConstants.EMPTY_STRING.equals(relativePath)) {
+ IPath src = new Path("src"); //$NON-NLS-1$
+ IContainer sourceContainer = _project.getFolder(src);
+ if (sourceContainer.exists() == false) {
+ ((IFolder) sourceContainer).create(false, true, subMonitor.newChild(100, SubMonitor.SUPPRESS_NONE));
+ }
+ sources.add(src.toString() + EGFCommonConstants.SLASH_CHARACTER);
+ IClasspathEntry sourceClasspathEntry = JavaCore.newSourceEntry(sourceContainer.getFullPath());
+ for (Iterator<IClasspathEntry> i = _classpathEntries.iterator(); i.hasNext();) {
+ IClasspathEntry classpathEntry = i.next();
+ if (classpathEntry.getPath().isPrefixOf(sourceContainer.getFullPath())) {
+ // Remove previous source folder if any
+ i.remove();
+ }
+ }
+ _classpathEntries.add(0, sourceClasspathEntry);
+ } else {
+ sources.add(relativePath + EGFCommonConstants.SLASH_CHARACTER);
+ }
+ // Process existing library
+ } else if (contentType == IClasspathEntry.CPE_LIBRARY) {
+ String path = getRelativePath(currentClassPath, _project);
+ if (path.length() > 0)
+ libraries.add(path);
+ else
+ libraries.add(EGFCommonConstants.DOT_STRING);
+ }
+ }
+ subMonitor.worked(100);
+
+ // Create source folders if necessary
+ if ((_hasJavaNature || _createJavaProject) && addSourceFolders() != null) {
+ for (String sourceFolder : addSourceFolders()) {
+ IPath src = new Path(sourceFolder);
+ IContainer sourceContainer = _project.getFolder(src);
+ // Create folder if it doesn't exist
+ if (sourceContainer.exists() == false) {
+ ((IFolder) sourceContainer).create(false, true, subMonitor.newChild(100, SubMonitor.SUPPRESS_NONE));
+ }
+ // Classpath processing
+ sources.add(src.toString() + EGFCommonConstants.SLASH_CHARACTER);
+ IClasspathEntry sourceClasspathEntry = JavaCore.newSourceEntry(sourceContainer.getFullPath());
+ for (Iterator<IClasspathEntry> i = _classpathEntries.iterator(); i.hasNext();) {
+ IClasspathEntry classpathEntry = i.next();
+ if (classpathEntry.getPath().isPrefixOf(sourceContainer.getFullPath())) {
+ // Remove previous source folder if any
+ i.remove();
+ }
+ }
+ _classpathEntries.add(0, sourceClasspathEntry);
+ sources.add(sourceFolder + EGFCommonConstants.SLASH_CHARACTER);
+ }
+ } else {
+ subMonitor.worked(100);
+ }
+
+ // Folder analysis
+ for (IResource resource : _project.members()) {
+ if (resource instanceof IContainer == false) {
+ continue;
+ }
+ String path = resource.getFullPath().removeFirstSegments(1).toString() + EGFCommonConstants.SLASH_CHARACTER;
+ if (sources.contains(path) == false) {
+ directories.add(path);
+ }
+ }
+
+ _sourceFolders = sources;
+ _libraries = libraries;
+ _directories = directories;
+
+ // Finally setup classpath if necessary
+ if (_hasJavaNature || _createJavaProject) {
+ try {
+ if (isInitiallyEmpty) {
+ IClasspathEntry jreClasspathEntry = JavaCore.newVariableEntry(new Path(JavaRuntime.JRELIB_VARIABLE), new Path(JavaRuntime.JRESRC_VARIABLE), new Path(JavaRuntime.JRESRCROOT_VARIABLE));
+ for (Iterator<IClasspathEntry> i = _classpathEntries.iterator(); i.hasNext();) {
+ IClasspathEntry classpathEntry = i.next();
+ if (classpathEntry.getPath().isPrefixOf(jreClasspathEntry.getPath())) {
+ i.remove();
+ }
+ }
+ String jreContainer = JavaRuntime.JRE_CONTAINER;
+ String complianceLevel = CodeGenUtil.EclipseUtil.getJavaComplianceLevel(_project);
+ if (JavaCore.VERSION_1_5.equals(complianceLevel)) {
+ jreContainer += "/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"; //$NON-NLS-1$
+ } else if (JavaCore.VERSION_1_6.equals(complianceLevel)) {
+ jreContainer += "/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"; //$NON-NLS-1$
+ } else if (JavaCore.VERSION_1_7.equals(complianceLevel)) {
+ jreContainer += "/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"; //$NON-NLS-1$
+ }
+ _classpathEntries.add(JavaCore.newContainerEntry(new Path(jreContainer)));
+ }
+ _classpathEntries.add(JavaCore.newContainerEntry(new Path("org.eclipse.pde.core.requiredPlugins"))); //$NON-NLS-1$
+ IJavaProject javaProject = JavaCore.create(_project);
+ javaProject.setRawClasspath(_classpathEntries.toArray(new IClasspathEntry[_classpathEntries.size()]), subMonitor.newChild(100, SubMonitor.SUPPRESS_NONE));
+ } catch (JavaModelException jme) {
+ throw new CoreException(EGFPDEPlugin.getDefault().newStatus(IStatus.ERROR, EGFCommonMessages.Exception_unexpectedException, jme));
+ }
+ } else {
+ subMonitor.worked(100);
+ }
+
+ }
+
+ private String getRelativePath(IClasspathEntry cpe, IProject project) {
+ IPath path = project.getFile(cpe.getPath()).getProjectRelativePath();
+ return path.removeFirstSegments(1).toString();
+ }
+
+ private void setupLibraryName() {
+ if (isOldTarget() || (_libraries.size() > 0 && _sourceFolders.size() > 0)) {
+ String libName = _project.getName();
+ int i = libName.lastIndexOf(EGFCommonConstants.DOT_STRING);
+ if (i != -1) {
+ libName = libName.substring(i + 1);
+ }
+ _library = libName + ".jar"; //$NON-NLS-1$
+ } else {
+ _library = EGFCommonConstants.DOT_STRING;
+ }
+ }
+
+ private void organizeExports(IProgressMonitor monitor) {
+ PDEModelUtility.modifyModel(new ModelModification(_project.getFile(PDEModelUtility.F_MANIFEST_FP)) {
+ @Override
+ protected void modifyModel(IBaseModel model, IProgressMonitor innerMonitor) throws CoreException {
+ SubMonitor.convert(innerMonitor, EGFCoreMessages.ConvertProjectOperation_organizeExport, 100);
+ if (model instanceof IBundlePluginModelBase == false) {
+ return;
+ }
+ OrganizeManifest.organizeExportPackages(((IBundlePluginModelBase) model).getBundleModel().getBundle(), _project, true, true);
+ }
+ }, monitor);
+ }
+
+ private String createInitialName(String id) {
+ int loc = id.lastIndexOf(EGFCommonConstants.DOT_STRING);
+ if (loc == -1) {
+ return id;
+ }
+ StringBuffer buf = new StringBuffer(id.substring(loc + 1));
+ buf.setCharAt(0, Character.toUpperCase(buf.charAt(0)));
+ return buf.toString();
+ }
+
+ private void createBuildFile(IFile file, IProgressMonitor monitor) throws CoreException {
+ SubMonitor.convert(monitor, EGFCoreMessages.ConvertProjectOperation_setupBuildfile, 100);
+ if (file.exists() == false) {
+ WorkspaceBuildModel model = new WorkspaceBuildModel(file);
+ manageBuildFile(model);
+ model.save();
+ }
+ }
+
+ private void updateBuildFile(IProgressMonitor monitor) {
+ PDEModelUtility.modifyModel(new ModelModification(_project.getFile(PDEModelUtility.F_BUILD)) {
+ @Override
+ protected void modifyModel(IBaseModel base, IProgressMonitor innerMonitor) throws CoreException {
+ SubMonitor.convert(innerMonitor, EGFCoreMessages.ConvertProjectOperation_setupBuildfile, 100);
+ if (base instanceof IBuildModel == false) {
+ return;
+ }
+ manageBuildFile((IBuildModel) base);
+ }
+ }, monitor);
+ }
+
+ private void manageBuildFile(IBuildModel model) throws CoreException {
+ IBuild build = model.getBuild();
+ // source.
+ if (_sourceFolders.size() > 0) {
+ IBuildEntry sourceEntry = build.getEntry(IBuildEntry.JAR_PREFIX + _library);
+ if (sourceEntry == null) {
+ sourceEntry = model.getFactory().createEntry(IBuildEntry.JAR_PREFIX + _library);
+ }
+ for (String source : _sourceFolders) {
+ addToken(sourceEntry, source);
+ }
+ build.add(sourceEntry);
+ }
+ // output.
+ if (_outputFolders.size() > 0) {
+ IBuildEntry outputEntry = build.getEntry(IBuildEntry.OUTPUT_PREFIX + EGFCommonConstants.DOT_STRING);
+ if (outputEntry == null) {
+ outputEntry = model.getFactory().createEntry(IBuildEntry.OUTPUT_PREFIX + EGFCommonConstants.DOT_STRING);
+ }
+ for (String source : _outputFolders) {
+ addToken(outputEntry, source);
+ }
+ build.add(outputEntry);
+ }
+ // bin.includes
+ IBuildEntry binIncludesEntry = build.getEntry(IBuildEntry.BIN_INCLUDES);
+ if (binIncludesEntry == null) {
+ binIncludesEntry = model.getFactory().createEntry(IBuildEntry.BIN_INCLUDES);
+ }
+ if (_project.getFile(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR).exists()) {
+ addToken(binIncludesEntry, ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR);
+ }
+ if (_project.getFile(EGFCommonConstants.PLUGIN_PROPERTIES_DESCRIPTOR).exists()) {
+ addToken(binIncludesEntry, EGFCommonConstants.PLUGIN_PROPERTIES_DESCRIPTOR);
+ }
+ if (_project.getFile(EGFCommonConstants.BUNDLE_FILENAME_DESCRIPTOR).exists()) {
+ addToken(binIncludesEntry, EGFCommonConstants.BUNDLE_FILENAME_DIRECTORY_DESCRIPTOR);
+ }
+ // About.html in bin includes (eclipse EPL open source project convention)
+ if (_project.getFile(EGFCommonConstants.ABOUT_HTML_DESCRIPTOR).exists()) {
+ addToken(binIncludesEntry, EGFCommonConstants.ABOUT_HTML_DESCRIPTOR);
+ }
+ for (String directory : _directories) {
+ // ignore dot directories and output folders
+ if (directory.startsWith(EGFCommonConstants.DOT_STRING) == false && _outputFolders.contains(directory) == false) {
+ addToken(binIncludesEntry, directory);
+ }
+ }
+ for (String library : _libraries) {
+ addToken(binIncludesEntry, library);
+ }
+ if (_sourceFolders.size() > 0) {
+ addToken(binIncludesEntry, _library);
+ }
+ // add it to build model
+ if (binIncludesEntry.getTokens().length > 0) {
+ build.add(binIncludesEntry);
+ }
+ // src.includes
+ IBuildEntry srcIncludesEntry = build.getEntry(IBuildEntry.SRC_INCLUDES);
+ if (srcIncludesEntry == null) {
+ srcIncludesEntry = model.getFactory().createEntry(IBuildEntry.SRC_INCLUDES);
+ }
+ // About.html in src includes (eclipse EPL open source project convention)
+ if (_project.getFile(EGFCommonConstants.ABOUT_HTML_DESCRIPTOR).exists()) {
+ addToken(srcIncludesEntry, EGFCommonConstants.ABOUT_HTML_DESCRIPTOR);
+ }
+ // add it to build model
+ if (srcIncludesEntry.getTokens().length > 0) {
+ build.add(srcIncludesEntry);
+ }
+ }
+
+ private void addToken(IBuildEntry entry, String descriptor) throws CoreException {
+ boolean found = false;
+ for (String token : entry.getTokens()) {
+ if (token.equals(descriptor)) {
+ found = true;
+ break;
+ }
+ }
+ if (found == false) {
+ entry.addToken(descriptor);
+ }
+ }
+
+ private void createManifestFile(IFile file, IProgressMonitor monitor) throws CoreException {
+ SubMonitor subMonitor = SubMonitor.convert(monitor, EGFCoreMessages.ConvertProjectOperation_setupManifestfile, 200);
+ WorkspaceBundlePluginModel model = new WorkspaceBundlePluginModel(file, null);
+ model.load();
+ manageManifestFile(model);
+ model.save();
+ organizeExports(subMonitor.newChild(100, SubMonitor.SUPPRESS_NONE));
+ }
+
+ private void updateManifestFile(IProgressMonitor monitor) {
+ PDEModelUtility.modifyModel(new ModelModification(_project.getFile(PDEModelUtility.F_MANIFEST_FP)) {
+ @Override
+ protected void modifyModel(IBaseModel model, IProgressMonitor innerMonitor) throws CoreException {
+ SubMonitor subMonitor = SubMonitor.convert(innerMonitor, EGFCoreMessages.ConvertProjectOperation_setupManifestfile, 200);
+ if (model instanceof IBundlePluginModelBase == false) {
+ return;
+ }
+ manageManifestFile((IBundlePluginModelBase) model);
+ subMonitor.worked(100);
+ OrganizeManifest.organizeExportPackages(((IBundlePluginModelBase) model).getBundleModel().getBundle(), _project, true, true);
+ }
+ }, monitor);
+ }
+
+ private void manageManifestFile(IBundlePluginModelBase model) throws CoreException {
+
+ IBundle bundle = model.getBundleModel().getBundle();
+
+ String pluginId = bundle.getHeader(Constants.BUNDLE_SYMBOLICNAME);
+ String pluginName = bundle.getHeader(Constants.BUNDLE_NAME);
+ String pluginVersion = bundle.getHeader(Constants.BUNDLE_VERSION);
+ String complianceLevel = bundle.getHeader(Constants.BUNDLE_REQUIREDEXECUTIONENVIRONMENT);
+
+ boolean missingInfo = (pluginId == null || pluginName == null || pluginVersion == null);
+
+ // If no ID exists, create one
+ if (pluginId == null) {
+ pluginId = IdUtil.getValidId(_project.getName());
+ }
+ // At this point, the plug-in ID is not null
+
+ // If no version number exists, create one
+ if (pluginVersion == null) {
+ pluginVersion = "0.1.0.qualifier"; //$NON-NLS-1$
+ }
+
+ // If no name exists, create one using the non-null pluginID
+ if (pluginName == null) {
+ pluginName = createInitialName(pluginId);
+ }
+
+ bundle.setHeader(Constants.BUNDLE_VERSION, pluginVersion);
+ bundle.setHeader(Constants.BUNDLE_NAME, pluginName);
+
+ // Symbolic Name
+ IManifestHeader header = bundle.getManifestHeader(Constants.BUNDLE_SYMBOLICNAME);
+ if (header != null && header instanceof BundleSymbolicNameHeader) {
+ BundleSymbolicNameHeader symbolic = (BundleSymbolicNameHeader) header;
+ if (symbolic.getId() == null || symbolic.getId().trim().length() == 0) {
+ symbolic.setId(pluginId);
+ }
+ if (symbolic.isSingleton() == false) {
+ symbolic.setSingleton(true);
+ }
+ } else {
+ bundle.setHeader(Constants.BUNDLE_SYMBOLICNAME, pluginId + ";singleton:=true"); //$NON-NLS-1$
+ }
+
+ if (complianceLevel == null && _createJavaProject) {
+ complianceLevel = CodeGenUtil.EclipseUtil.getJavaComplianceLevel(_project);
+ if (JavaCore.VERSION_1_5.equals(complianceLevel)) {
+ bundle.setHeader(Constants.BUNDLE_REQUIREDEXECUTIONENVIRONMENT, "J2SE-1.5"); //$NON-NLS-1$
+ } else if (JavaCore.VERSION_1_6.equals(complianceLevel)) {
+ bundle.setHeader(Constants.BUNDLE_REQUIREDEXECUTIONENVIRONMENT, "JavaSE-1.6"); //$NON-NLS-1$
+ } else if (JavaCore.VERSION_1_7.equals(complianceLevel)) {
+ bundle.setHeader(Constants.BUNDLE_REQUIREDEXECUTIONENVIRONMENT, "JavaSE-1.7"); //$NON-NLS-1$
+ }
+ }
+
+ IPluginModelFactory factory = model.getPluginFactory();
+ IPluginBase base = model.getPluginBase();
+
+ if (missingInfo) {
+ if (_library != null && _library.equals(EGFCommonConstants.DOT_STRING) == false) {
+ IPluginLibrary library = factory.createLibrary();
+ library.setName(_library);
+ library.setExported(true);
+ base.add(library);
+ }
+ for (String library : _libraries) {
+ IPluginLibrary pluginLibrary = factory.createLibrary();
+ pluginLibrary.setName(library);
+ pluginLibrary.setExported(true);
+ base.add(pluginLibrary);
+ }
+ if (TargetPlatformHelper.getTargetVersion() >= 3.1) {
+ bundle.setHeader(Constants.BUNDLE_MANIFESTVERSION, "2"); //$NON-NLS-1$
+ }
+ }
+
+ // Add Dependencies
+ if (_createJavaProject) {
+ LOOP: for (String dependency : addDependencies()) {
+ if (base.getImports() != null) {
+ for (IPluginImport plugin : base.getImports()) {
+ if (plugin.getId().equals(dependency)) {
+ continue LOOP;
+ }
+ }
+ }
+ // At this stage dependency is not found, create one
+ IPluginImport plugin = factory.createImport();
+ plugin.setId(dependency);
+ plugin.setName(dependency);
+ plugin.setReexported(true);
+ base.add(plugin);
+ }
+ }
+
+ }
+
+ private boolean isOldTarget() {
+ return TargetPlatformHelper.getTargetVersion() < 3.1;
+ }
+
+ public List<String> addDependencies() {
+ return Collections.<String> emptyList();
+ }
+
+ public List<String> addSourceFolders() {
+ return Collections.<String> emptyList();
+ }
+
+}
diff --git a/org.eclipse.egf.core.platform/.classpath b/org.eclipse.egf.core.platform/.classpath
new file mode 100644
index 0000000..ce15958
--- /dev/null
+++ b/org.eclipse.egf.core.platform/.classpath
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
+ <accessrules>
+ <accessrule kind="accessible" pattern="org/eclipse/**/internal/**"/>
+ </accessrules>
+ </classpathentry>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.egf.core.platform/.options b/org.eclipse.egf.core.platform/.options
new file mode 100644
index 0000000..97d402f
--- /dev/null
+++ b/org.eclipse.egf.core.platform/.options
@@ -0,0 +1,2 @@
+# Prints debug information
+org.eclipse.egf.core.platform/debug=true
diff --git a/org.eclipse.egf.core.platform/.project b/org.eclipse.egf.core.platform/.project
new file mode 100644
index 0000000..1a9513d
--- /dev/null
+++ b/org.eclipse.egf.core.platform/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.core.platform</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.core.platform/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egf.core.platform/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..e6b88b7
--- /dev/null
+++ b/org.eclipse.egf.core.platform/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:49:32 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.egf.core.platform/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egf.core.platform/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..5e688a1
--- /dev/null
+++ b/org.eclipse.egf.core.platform/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Mon Mar 02 10:40:58 CET 2009
+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/org.eclipse.egf.core.platform/META-INF/MANIFEST.MF b/org.eclipse.egf.core.platform/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..f7c1055
--- /dev/null
+++ b/org.eclipse.egf.core.platform/META-INF/MANIFEST.MF
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.core.platform;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.egf.core.platform.EGFPlatformPlugin
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle:
+ org.eclipse.core.runtime,
+ org.eclipse.egf.common
+Export-Package:
+ org.eclipse.egf.core.platform,
+ org.eclipse.egf.core.platform.pde
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.egf.core.platform/about.html b/org.eclipse.egf.core.platform/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/org.eclipse.egf.core.platform/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/org.eclipse.egf.core.platform/build.properties b/org.eclipse.egf.core.platform/build.properties
new file mode 100644
index 0000000..e169a27
--- /dev/null
+++ b/org.eclipse.egf.core.platform/build.properties
@@ -0,0 +1,20 @@
+##
+# 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
+##
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ schema/,\
+ plugin.xml,\
+ plugin.properties,\
+ .options
+src.includes = about.html
diff --git a/org.eclipse.egf.core.platform/plugin.properties b/org.eclipse.egf.core.platform/plugin.properties
new file mode 100644
index 0000000..eeb7683
--- /dev/null
+++ b/org.eclipse.egf.core.platform/plugin.properties
@@ -0,0 +1,14 @@
+##
+# 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 Platform (Incubation)
+providerName=Eclipse Modeling Project
+
+EGFManagerExtensionPoint=EGF Platform Manager
diff --git a/org.eclipse.egf.core.platform/plugin.xml b/org.eclipse.egf.core.platform/plugin.xml
new file mode 100644
index 0000000..b5a97be
--- /dev/null
+++ b/org.eclipse.egf.core.platform/plugin.xml
Binary files differ
diff --git a/org.eclipse.egf.core.platform/schema/manager.exsd b/org.eclipse.egf.core.platform/schema/manager.exsd
new file mode 100644
index 0000000..caf1b6a
--- /dev/null
+++ b/org.eclipse.egf.core.platform/schema/manager.exsd
@@ -0,0 +1,128 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.egf.core.platform" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.eclipse.egf.core.platform" id="manager" name="EGF Platform Manager"/>
+ </appInfo>
+ <documentation>
+ Exposes EGF Platform Manager.
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appInfo>
+ <meta.element />
+ </appInfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="manager" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="identifier"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="manager">
+ <complexType>
+ <sequence minOccurs="1" maxOccurs="unbounded">
+ </sequence>
+ <attribute name="extension" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="identifier"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ The implementation of the expected services.
+Must implement IPlatformExtensionPointFactory interface (either directly or not).
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.egf.core.platform.pde.IPlatformExtensionPointFactory"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ 0.2.0
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiinfo"/>
+ </appInfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="copyright"/>
+ </appInfo>
+ <documentation>
+ Copyright (c) 2009-2010 Thales Corporate Services S.A.S.<br>
+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 <a
+href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/EGFPlatformPlugin.java b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/EGFPlatformPlugin.java
new file mode 100644
index 0000000..da2d0a6
--- /dev/null
+++ b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/EGFPlatformPlugin.java
@@ -0,0 +1,192 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.platform;
+
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.egf.common.activator.EGFAbstractPlugin;
+import org.eclipse.egf.common.helper.ExtensionPointHelper;
+import org.eclipse.egf.core.platform.internal.pde.IManagerConstants;
+import org.eclipse.egf.core.platform.internal.pde.PlatformManager;
+import org.eclipse.egf.core.platform.pde.IPlatformBundle;
+import org.eclipse.egf.core.platform.pde.IPlatformExtensionPoint;
+import org.eclipse.egf.core.platform.pde.IPlatformExtensionPointFactory;
+import org.eclipse.egf.core.platform.pde.IPlatformManager;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.core.plugin.IPluginElement;
+import org.osgi.framework.BundleContext;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class EGFPlatformPlugin extends EGFAbstractPlugin {
+
+ private static EGFPlatformPlugin _plugin;
+
+ public static IPlatformManager getPlatformManager() {
+ return PlatformManager.getInstance();
+ }
+
+ /**
+ * EGF Registered Managers.
+ *
+ */
+ private static Map<String, IConfigurationElement> __managers;
+
+ /**
+ * EGF Registered Interface.
+ *
+ */
+ private static Map<String, Object> __interfaces;
+
+ /**
+ * Get Platforms.
+ *
+ * @return an empty map if none could be found.
+ */
+ public Map<String, IConfigurationElement> getPlatform() {
+ // Lazy loading.
+ if (__managers == null) {
+ __managers = new HashMap<String, IConfigurationElement>();
+ __interfaces = new HashMap<String, Object>();
+ // Get EGF Platform extension points.
+ for (IConfigurationElement configurationElement : ExtensionPointHelper.getConfigurationElements(getDefault().getBundle().getSymbolicName(), IManagerConstants.MANAGER_EXTENSION_POINT_ID)) {
+ // Extension retrieval
+ String extension = ExtensionPointHelper.getAttributeValue(configurationElement, IManagerConstants.MANAGER_ATT_EXTENSION);
+ // Ignore
+ if (extension == null || extension.trim().length() == 0) {
+ continue;
+ }
+ extension = extension.trim();
+ // Check
+ if (__managers.containsKey(extension)) {
+ getDefault().logError(NLS.bind("Duplicate Extension {0}", extension)); //$NON-NLS-1$
+ getDefault().logInfo(NLS.bind("Extension-Point ''{0}''", configurationElement.getName()), 1); //$NON-NLS-1$
+ getDefault().logInfo(NLS.bind("Bundle ''{0}''", ExtensionPointHelper.getNamespace(configurationElement)), 1); //$NON-NLS-1$
+ continue;
+ }
+ // Check factory
+ Object object = null;
+ try {
+ object = ExtensionPointHelper.createInstance(configurationElement, IManagerConstants.MANAGER_ATT_CLASS);
+ } catch (CoreException ce) {
+ getDefault().logError(ce);
+ }
+ if (object == null) {
+ continue;
+ }
+ if (object instanceof IPlatformExtensionPointFactory<?> == false) {
+ getDefault().logError(NLS.bind("Wrong Class {0}", object.getClass().getName())); //$NON-NLS-1$
+ getDefault().logInfo(NLS.bind("Class should be an implementation of ''{0}''.", IPlatformExtensionPointFactory.class.getName()), 1); //$NON-NLS-1$
+ getDefault().logInfo(NLS.bind("Bundle ''{0}''", ExtensionPointHelper.getNamespace(configurationElement)), 1); //$NON-NLS-1$
+ getDefault().logInfo(NLS.bind("Extension-Point ''{0}''", configurationElement.getName()), 1); //$NON-NLS-1$
+ getDefault().logInfo(NLS.bind("extension ''{0}''", extension), 1); //$NON-NLS-1$
+ continue;
+ }
+ // Fetch Returned Types from Class
+ Class<?> key = fetchReturnedTypeFromFactory(object.getClass());
+ if (key == null) {
+ getDefault().logError(NLS.bind("Wrong Class {0}", object.getClass().getName())); //$NON-NLS-1$
+ getDefault().logInfo("Unable to find ''createExtensionPoint(IPlatformBundle platformBundle, IPluginElement pluginElement)'' method."); //$NON-NLS-1$
+ getDefault().logInfo(NLS.bind("Extension-Point ''{0}''", configurationElement.getName()), 1); //$NON-NLS-1$
+ getDefault().logInfo(NLS.bind("Bundle ''{0}''", ExtensionPointHelper.getNamespace(configurationElement)), 1); //$NON-NLS-1$
+ continue;
+ }
+ if (__interfaces.get(key) != null) {
+ getDefault().logError(NLS.bind("Duplicate Interface {0}", key.getClass().getName())); //$NON-NLS-1$
+ getDefault().logInfo(NLS.bind("Extension-Point ''{0}''", configurationElement.getName()), 1); //$NON-NLS-1$
+ getDefault().logInfo(NLS.bind("Bundle ''{0}''", ExtensionPointHelper.getNamespace(configurationElement)), 1); //$NON-NLS-1$
+ continue;
+ }
+ // Register
+ __managers.put(extension, configurationElement);
+ __interfaces.put(object.getClass().getName(), key);
+ }
+ }
+ return __managers;
+ }
+
+ /**
+ * The constructor
+ */
+ public EGFPlatformPlugin() {
+ super();
+ }
+
+ @SuppressWarnings("unchecked")
+ public static Class<? extends IPlatformExtensionPoint> fetchReturnedTypeFromFactory(Class<?> factory) {
+ Class<? extends IPlatformExtensionPoint> clazz = null;
+ Method method = null;
+ try {
+ method = factory.getDeclaredMethod("createExtensionPoint", IPlatformBundle.class, IPluginElement.class); //$NON-NLS-1$
+ } catch (NoSuchMethodException nsme) {
+ // Just Ignore
+ }
+ if (method != null) {
+ Type type = null;
+ try {
+ type = method.getGenericReturnType();
+ } catch (Throwable t) {
+ // Just ignore
+ }
+ if (type != null) {
+ try {
+ clazz = (Class<? extends IPlatformExtensionPoint>) type;
+ } catch (ClassCastException cce) {
+ // Just Ignore
+ }
+ }
+ }
+ return clazz;
+ }
+
+ /**
+ *
+ * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.
+ * BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ _plugin = this;
+ }
+
+ /**
+ * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.
+ * BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ // Dispose PlatformManager
+ PlatformManager.getInstance().dispose();
+ // Final steps
+ _plugin = null;
+ __managers = null;
+ __interfaces = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static EGFPlatformPlugin getDefault() {
+ return _plugin;
+ }
+
+}
diff --git a/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/internal/pde/IManagerConstants.java b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/internal/pde/IManagerConstants.java
new file mode 100644
index 0000000..ba4cbe1
--- /dev/null
+++ b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/internal/pde/IManagerConstants.java
@@ -0,0 +1,48 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.platform.internal.pde;
+
+import org.eclipse.egf.common.helper.ExtensionPointHelper;
+import org.eclipse.egf.core.platform.EGFPlatformPlugin;
+
+/**
+ * Defines all constants related to a manager into extension point
+ * declaration.
+ */
+public interface IManagerConstants {
+
+ /**
+ * Define a constant for the Manager extension-point id.
+ */
+ public static final String MANAGER_EXTENSION_POINT_ID = "manager"; //$NON-NLS-1$
+
+ /**
+ * Define a constant for the Manager extension-point id as a fully
+ * qualified id.
+ */
+ public static final String FULLY_QUALIFIED_EXTENSION_POINT_ID = ExtensionPointHelper.getExtensionPointId(EGFPlatformPlugin.getDefault().getPluginID(), MANAGER_EXTENSION_POINT_ID);
+
+ /**
+ * Define a constant for the Manager extension-point child.
+ */
+ static final String MANAGER_EXTENSION_CHILD = MANAGER_EXTENSION_POINT_ID;
+
+ /**
+ * Define a constant for the 'extension' attribute.
+ */
+ public static final String MANAGER_ATT_EXTENSION = "extension"; //$NON-NLS-1$
+
+ /**
+ * Define a constant for the 'class' attribute.
+ */
+ public static final String MANAGER_ATT_CLASS = "class"; //$NON-NLS-1$
+
+}
diff --git a/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/internal/pde/PlatformBundle.java b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/internal/pde/PlatformBundle.java
new file mode 100644
index 0000000..15b7fa4
--- /dev/null
+++ b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/internal/pde/PlatformBundle.java
@@ -0,0 +1,346 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.platform.internal.pde;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.egf.common.helper.BundleHelper;
+import org.eclipse.egf.common.helper.ExtensionPointHelper;
+import org.eclipse.egf.core.platform.EGFPlatformPlugin;
+import org.eclipse.egf.core.platform.l10n.CorePlatformMessages;
+import org.eclipse.egf.core.platform.pde.IPlatformBundle;
+import org.eclipse.egf.core.platform.pde.IPlatformExtensionPoint;
+import org.eclipse.egf.core.platform.pde.IPlatformExtensionPointFactory;
+import org.eclipse.egf.core.platform.util.CollectionHelper;
+import org.eclipse.osgi.service.resolver.BundleDescription;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.core.plugin.IPluginBase;
+import org.eclipse.pde.core.plugin.IPluginElement;
+import org.eclipse.pde.core.plugin.IPluginExtension;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.core.plugin.IPluginObject;
+import org.osgi.framework.Bundle;
+
+public class PlatformBundle implements IPlatformBundle {
+
+ private static Map<Class<? extends IPlatformExtensionPoint>, IPlatformExtensionPointFactory<? extends IPlatformExtensionPoint>> _extensionPointFactories;
+
+ @SuppressWarnings("unchecked")
+ private static Map<Class<? extends IPlatformExtensionPoint>, IPlatformExtensionPointFactory<? extends IPlatformExtensionPoint>> getExtensionPointFactories() {
+ if (_extensionPointFactories == null) {
+ _extensionPointFactories = new HashMap<Class<? extends IPlatformExtensionPoint>, IPlatformExtensionPointFactory<? extends IPlatformExtensionPoint>>();
+ for (String extensionPoint : EGFPlatformPlugin.getDefault().getPlatform().keySet()) {
+ // Factory
+ IPlatformExtensionPointFactory<?> clazz = null;
+ try {
+ clazz = (IPlatformExtensionPointFactory<?>) ExtensionPointHelper.createInstance(EGFPlatformPlugin.getDefault().getPlatform().get(extensionPoint), IManagerConstants.MANAGER_ATT_CLASS);
+ } catch (CoreException ce) {
+ EGFPlatformPlugin.getDefault().logError(ce);
+ }
+ if (clazz == null) {
+ continue;
+ }
+ // Fetch Returned Types from Factory
+ Class<?> key = EGFPlatformPlugin.fetchReturnedTypeFromFactory(((IPlatformExtensionPointFactory<?>) clazz).getClass());
+ // Store it
+ _extensionPointFactories.put((Class<? extends IPlatformExtensionPoint>) key, (IPlatformExtensionPointFactory<?>) clazz);
+ }
+ }
+ return _extensionPointFactories;
+ }
+
+ public static Set<Class<? extends IPlatformExtensionPoint>> getExtensionPointFactoriesKeys() {
+ return getExtensionPointFactories().keySet();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static <T extends IPlatformExtensionPoint> IPlatformExtensionPointFactory<T> getPlatformExtensionPointFactory(Class<T> clazz) {
+ return (IPlatformExtensionPointFactory<T>) getExtensionPointFactories().get(clazz);
+ }
+
+ private IPluginModelBase _base;
+
+ private String _previousBundleId;
+
+ private Map<Class<?>, Map<String, Object>> _extensions = new HashMap<Class<?>, Map<String, Object>>();
+
+ public PlatformBundle(IPluginModelBase base) {
+ Assert.isNotNull(base);
+ Assert.isNotNull(base.getBundleDescription());
+ Assert.isNotNull(BundleHelper.getBundleId(base));
+ _base = base;
+ _previousBundleId = BundleHelper.getBundleId(base);
+ }
+
+ @Override
+ public boolean equals(Object object) {
+ if (this == object) {
+ return true;
+ }
+ if (object instanceof IPlatformBundle == false) {
+ return false;
+ }
+ IPlatformBundle model = (IPlatformBundle) object;
+ if (isTarget() && model.isTarget()) {
+ if (getBundle().equals(model.getBundle())) {
+ return true;
+ }
+ } else if (isTarget() == false && model.isTarget() == false) {
+ if (getProject().equals(model.getProject())) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public String getBundleId() {
+ return BundleHelper.getBundleId(getPluginModelBase());
+ }
+
+ public String getPreviousBundleId() {
+ return _previousBundleId;
+ }
+
+ public IPluginBase getPluginBase() {
+ return _base.getPluginBase();
+ }
+
+ public IPluginModelBase getPluginModelBase() {
+ return _base;
+ }
+
+ public boolean isFragment() {
+ return getPluginModelBase().isFragmentModel();
+ }
+
+ /**
+ * Get the IProject from this IPlatformBundle
+ *
+ * @return null if the bundle is not in the workspace.
+ */
+ public IProject getProject() {
+ if (isTarget() == false) {
+ // Retrieve project from the model.
+ return getPluginModelBase().getUnderlyingResource().getProject();
+ }
+ return null;
+ }
+
+ /**
+ * Get the Bundle from this IPlatformBundle
+ *
+ * @return null if the bundle is in the workspace.
+ */
+ public Bundle getBundle() {
+ if (isTarget()) {
+ // Retrieve bundle from the registry
+ return Platform.getBundle(getBundleId());
+ }
+ return null;
+ }
+
+ public BundleDescription getBundleDescription() {
+ return getPluginModelBase().getBundleDescription();
+ }
+
+ public boolean isTarget() {
+ return getPluginModelBase().getUnderlyingResource() == null;
+ }
+
+ public void addPlatformExtensionPoint(Class<? extends IPlatformExtensionPoint> clazz, IPluginExtension extension) {
+ if (extension == null || extension.getPluginModel() == null) {
+ return;
+ }
+ for (IPluginObject pluginObject : extension.getChildren()) {
+ if (pluginObject instanceof IPluginElement) {
+ addPlatformExtensionPoint(clazz, (IPluginElement) pluginObject);
+ }
+ }
+ }
+
+ public <T extends IPlatformExtensionPoint> T addPlatformExtensionPoint(Class<T> clazz, IPluginElement pluginElement) {
+ if (pluginElement == null) {
+ return null;
+ }
+ // Check
+ if (pluginElement.isValid() == false) {
+ EGFPlatformPlugin.getDefault().logWarning(NLS.bind("PlatformPlugin.addPlatformExtensionPoint(..) _ Bundle ''{0}'' invalid PluginElement ''{1}''.", //$NON-NLS-1$
+ getBundleId(), pluginElement.getName()));
+ return null;
+ }
+ // Retrieve Factory
+ IPlatformExtensionPointFactory<T> extensionPointFactory = getPlatformExtensionPointFactory(clazz);
+ if (extensionPointFactory == null) {
+ return null;
+ }
+ T extensionPoint = extensionPointFactory.createExtensionPoint(this, pluginElement);
+ if (extensionPoint == null) {
+ return null;
+ }
+ Map<String, Object> extensionPoints = _extensions.get(clazz);
+ if (extensionPoints == null) {
+ extensionPoints = new HashMap<String, Object>();
+ _extensions.put(clazz, extensionPoints);
+ }
+ try {
+ if (extensionPoints.get(extensionPoint.getId()) != null) {
+ EGFPlatformPlugin.getDefault().logWarning(NLS.bind("PlatformPlugin.addPlatformExtensionPoint(..) _ Bundle ''{0}'' already contains such Extension Point ''{1}''.", //$NON-NLS-1$
+ getBundleId(), extensionPoint.getId()));
+ return null;
+ }
+ if (extensionPoints.put(extensionPoint.getId(), extensionPoint) != null) {
+ EGFPlatformPlugin.getDefault().logError(NLS.bind("PlatformPlugin.addPlatformExtensionPoint(..) _ Bundle ''{0}'' unable to add Extension Point ''{1}''.", //$NON-NLS-1$
+ getBundleId(), extensionPoint.getId()));
+ return null;
+ }
+ } catch (Exception e) {
+ EGFPlatformPlugin.getDefault().logError(new String("PlatformPlugin.addPlatformExtensionPoint(..)"), e); //$NON-NLS-1$
+ return null;
+ }
+ return clazz.cast(extensionPoint);
+ }
+
+ public IPlatformExtensionPoint[] getPlatformExtensionPoints() {
+ List<Object> extensionPoints = new ArrayList<Object>();
+ for (Map<String, Object> extensionPoint : _extensions.values()) {
+ extensionPoints.addAll(extensionPoint.values());
+ }
+ return extensionPoints.toArray(new IPlatformExtensionPoint[extensionPoints.size()]);
+ }
+
+ public <T extends IPlatformExtensionPoint> T[] getPlatformExtensionPoints(Class<T> clazz) {
+ List<Object> extensionPoints = new ArrayList<Object>();
+ if (clazz != null && getExtensionPointFactoriesKeys().contains(clazz)) {
+ Map<String, Object> extensions = _extensions.get(clazz);
+ if (extensions != null) {
+ extensionPoints.addAll(_extensions.get(clazz).values());
+ }
+ }
+ return CollectionHelper.toArray(extensionPoints, clazz);
+ }
+
+ public boolean removePlatformExtensionPoint(IPlatformExtensionPoint extensionPoint) {
+ if (extensionPoint == null) {
+ return false;
+ }
+ for (Class<? extends IPlatformExtensionPoint> clazz : getExtensionPointFactoriesKeys()) {
+ if (removePlatformExtensionPoint(clazz, extensionPoint)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public boolean removePlatformExtensionPoint(Class<? extends IPlatformExtensionPoint> clazz, IPlatformExtensionPoint extensionPoint) {
+ if (clazz == null || getExtensionPointFactoriesKeys().contains(clazz) == false || extensionPoint == null) {
+ return false;
+ }
+ if (_extensions.get(clazz) != null && _extensions.get(clazz).remove(extensionPoint.getId()) != null) {
+ return true;
+ }
+ return false;
+ }
+
+ public boolean isEmpty() {
+ for (Class<? extends IPlatformExtensionPoint> clazz : getExtensionPointFactoriesKeys()) {
+ if (_extensions.get(clazz) != null && _extensions.get(clazz).size() > 0) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public boolean hasPlatformExtensionPoint(IPlatformExtensionPoint extensionPoint) {
+ if (extensionPoint == null) {
+ return false;
+ }
+ for (Class<? extends IPlatformExtensionPoint> clazz : getExtensionPointFactoriesKeys()) {
+ if (hasPlatformExtensionPoint(clazz, extensionPoint)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public boolean hasPlatformExtensionPoint(Class<? extends IPlatformExtensionPoint> clazz, IPlatformExtensionPoint extensionPoint) {
+ if (clazz == null || getExtensionPointFactoriesKeys().contains(clazz) == false || extensionPoint == null) {
+ return false;
+ }
+ if (_extensions.get(clazz) != null && _extensions.get(clazz).get(extensionPoint.getId()) != null) {
+ return true;
+ }
+ return false;
+ }
+
+ public String getBundleLocation() {
+ if (getBundleDescription() != null) {
+ return getBundleDescription().getLocation();
+ }
+ return null;
+ }
+
+ public URL getBundleURL() {
+ // Target Bundle
+ if (isTarget()) {
+ return Platform.getBundle(getBundleId()).getEntry("/"); //$NON-NLS-1$
+ }
+ // Workspace Bundle
+ try {
+ StringBuffer buffer = new StringBuffer("platform:/resource/"); //$NON-NLS-1$
+ buffer.append(getBundleId());
+ buffer.append("/"); //$NON-NLS-1$
+ return new URL(buffer.toString());
+ } catch (MalformedURLException mue) {
+ EGFPlatformPlugin.getDefault().logError(mue);
+ }
+ return null;
+ }
+
+ @Override
+ public String toString() {
+ IPluginBase pluginBase = getPluginModelBase().getPluginBase();
+ String id = getBundleId();
+ String previousId = getPreviousBundleId();
+ String version = pluginBase.getVersion();
+ StringBuilder text = new StringBuilder();
+ if (version != null && version.length() > 0) {
+ text.append(id).append(" ").append(pluginBase.getVersion()); //$NON-NLS-1$
+ } else {
+ text.append(id);
+ }
+ if (id.equals(previousId) == false) {
+ text.append(" PreviousId: ").append(previousId); //$NON-NLS-1$
+ }
+ if (pluginBase.getModel() != null && pluginBase.getModel().isInSync() == false) {
+ text.append(" ").append(CorePlatformMessages.PlatformManager_outOfSync); //$NON-NLS-1$
+ }
+ if (isTarget()) {
+ text.append(" [Target]"); //$NON-NLS-1$
+ } else {
+ text.append(" [Workspace]"); //$NON-NLS-1$
+ }
+ if (getBundleLocation() != null) {
+ text.append(" [").append(getBundleLocation()).append("]"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ return text.toString();
+ }
+
+}
diff --git a/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/internal/pde/PlatformExtensionPointDelta.java b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/internal/pde/PlatformExtensionPointDelta.java
new file mode 100644
index 0000000..d917d5c
--- /dev/null
+++ b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/internal/pde/PlatformExtensionPointDelta.java
@@ -0,0 +1,96 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.platform.internal.pde;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.egf.core.platform.pde.IPlatformExtensionPoint;
+import org.eclipse.egf.core.platform.pde.IPlatformExtensionPointDelta;
+import org.eclipse.egf.core.platform.util.CollectionHelper;
+
+public class PlatformExtensionPointDelta implements IPlatformExtensionPointDelta {
+
+ private Map<Class<? extends IPlatformExtensionPoint>, List<IPlatformExtensionPoint>> _added = new HashMap<Class<? extends IPlatformExtensionPoint>, List<IPlatformExtensionPoint>>();
+
+ private Map<Class<? extends IPlatformExtensionPoint>, List<IPlatformExtensionPoint>> _removed = new HashMap<Class<? extends IPlatformExtensionPoint>, List<IPlatformExtensionPoint>>();
+
+ public PlatformExtensionPointDelta() {
+ // Nothing to do
+ }
+
+ public IPlatformExtensionPoint[] getAddedPlatformExtensionPoints() {
+ List<IPlatformExtensionPoint> extensionPoints = new ArrayList<IPlatformExtensionPoint>();
+ for (Class<? extends IPlatformExtensionPoint> clazz : _added.keySet()) {
+ extensionPoints.addAll(_added.get(clazz));
+ }
+ return extensionPoints.toArray(new IPlatformExtensionPoint[extensionPoints.size()]);
+ }
+
+ public <T extends IPlatformExtensionPoint> T[] getAddedPlatformExtensionPoints(Class<T> clazz) {
+ List<Object> extensionPoints = new ArrayList<Object>();
+ if (clazz != null && PlatformManager.getExtensionPointsValues().contains(clazz)) {
+ if (_added.get(clazz) != null) {
+ extensionPoints.addAll(_added.get(clazz));
+ }
+ }
+ return CollectionHelper.toArray(extensionPoints, clazz);
+ }
+
+ public IPlatformExtensionPoint[] getRemovedPlatformExtensionPoints() {
+ List<IPlatformExtensionPoint> extensionPoints = new ArrayList<IPlatformExtensionPoint>();
+ for (Class<? extends IPlatformExtensionPoint> clazz : _removed.keySet()) {
+ extensionPoints.addAll(_removed.get(clazz));
+ }
+ return extensionPoints.toArray(new IPlatformExtensionPoint[extensionPoints.size()]);
+ }
+
+ public <T extends IPlatformExtensionPoint> T[] getRemovedPlatformExtensionPoints(Class<T> clazz) {
+ List<Object> extensionPoints = new ArrayList<Object>();
+ if (clazz != null && PlatformManager.getExtensionPointsValues().contains(clazz)) {
+ if (_removed.get(clazz) != null) {
+ extensionPoints.addAll(_removed.get(clazz));
+ }
+ }
+ return CollectionHelper.toArray(extensionPoints, clazz);
+ }
+
+ protected boolean isEmpty() {
+ return _added.size() == 0 && _removed.size() == 0 ? true : false;
+ }
+
+ protected boolean storeAddedPlatformExtensionPoint(Class<? extends IPlatformExtensionPoint> clazz, IPlatformExtensionPoint extensionPoint) {
+ if (clazz == null || PlatformManager.getExtensionPointsValues().contains(clazz) == false || extensionPoint == null) {
+ return false;
+ }
+ List<IPlatformExtensionPoint> extensionPoints = _added.get(clazz);
+ if (extensionPoints == null) {
+ extensionPoints = new ArrayList<IPlatformExtensionPoint>();
+ _added.put(clazz, extensionPoints);
+ }
+ return extensionPoints.add(extensionPoint);
+ }
+
+ protected boolean storeRemovedPlatformExtensionPoint(Class<? extends IPlatformExtensionPoint> clazz, IPlatformExtensionPoint extensionPoint) {
+ if (clazz == null || PlatformManager.getExtensionPointsValues().contains(clazz) == false || extensionPoint == null) {
+ return false;
+ }
+ List<IPlatformExtensionPoint> extensionPoints = _removed.get(clazz);
+ if (extensionPoints == null) {
+ extensionPoints = new ArrayList<IPlatformExtensionPoint>();
+ _removed.put(clazz, extensionPoints);
+ }
+ return extensionPoints.add(extensionPoint);
+ }
+
+}
diff --git a/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/internal/pde/PlatformManager.java b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/internal/pde/PlatformManager.java
new file mode 100644
index 0000000..f66d6ea
--- /dev/null
+++ b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/internal/pde/PlatformManager.java
@@ -0,0 +1,775 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.platform.internal.pde;
+
+import java.lang.reflect.Array;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.InvalidRegistryObjectException;
+import org.eclipse.egf.common.helper.BundleHelper;
+import org.eclipse.egf.common.helper.ExtensionPointHelper;
+import org.eclipse.egf.core.platform.EGFPlatformPlugin;
+import org.eclipse.egf.core.platform.pde.IPlatformBundle;
+import org.eclipse.egf.core.platform.pde.IPlatformExtensionPoint;
+import org.eclipse.egf.core.platform.pde.IPlatformExtensionPointDelta;
+import org.eclipse.egf.core.platform.pde.IPlatformExtensionPointFactory;
+import org.eclipse.egf.core.platform.pde.IPlatformExtensionPointListener;
+import org.eclipse.egf.core.platform.pde.IPlatformManager;
+import org.eclipse.egf.core.platform.util.CollectionHelper;
+import org.eclipse.emf.common.util.UniqueEList;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.core.plugin.IPluginExtension;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.core.plugin.ModelEntry;
+import org.eclipse.pde.core.plugin.PluginRegistry;
+import org.eclipse.pde.internal.core.IExtensionDeltaEvent;
+import org.eclipse.pde.internal.core.IExtensionDeltaListener;
+import org.eclipse.pde.internal.core.IPluginModelListener;
+import org.eclipse.pde.internal.core.PDECore;
+import org.eclipse.pde.internal.core.PluginModelDelta;
+
+/**
+ * PlatformManager manage factory components extension point based on PDE
+ * registry. It tracks Target Platform FCs and workspace FCs. PDE doesn't manage
+ * n versions of the same plugin. As a result only the latest found is managed
+ * in the registry. As such each bundle has its symbolic name as its ID.
+ *
+ * @since 1.0
+ */
+public final class PlatformManager implements IPlatformManager, IPluginModelListener, IExtensionDeltaListener {
+
+ private static Map<String, Class<? extends IPlatformExtensionPoint>> _extensionPoints;
+
+ @SuppressWarnings("unchecked")
+ private static Map<String, Class<? extends IPlatformExtensionPoint>> getExtensionPoints() {
+ if (_extensionPoints == null) {
+ _extensionPoints = new HashMap<String, Class<? extends IPlatformExtensionPoint>>();
+ for (String extensionPoint : EGFPlatformPlugin.getDefault().getPlatform().keySet()) {
+ // Factory
+ IPlatformExtensionPointFactory<?> clazz = null;
+ try {
+ clazz = (IPlatformExtensionPointFactory<?>) ExtensionPointHelper.createInstance(EGFPlatformPlugin.getDefault().getPlatform().get(extensionPoint), IManagerConstants.MANAGER_ATT_CLASS);
+ } catch (CoreException ce) {
+ EGFPlatformPlugin.getDefault().logError(ce);
+ }
+ if (clazz == null) {
+ continue;
+ }
+ // Fetch Returned Types from Factory
+ Class<?> key = EGFPlatformPlugin.fetchReturnedTypeFromFactory(((IPlatformExtensionPointFactory<?>) clazz).getClass());
+ // Store it
+ _extensionPoints.put(extensionPoint, (Class<? extends IPlatformExtensionPoint>) key);
+ }
+ }
+ return _extensionPoints;
+ }
+
+ public static Collection<Class<? extends IPlatformExtensionPoint>> getExtensionPointsValues() {
+ return getExtensionPoints().values();
+ }
+
+ private static volatile PlatformManager __platformManager;
+
+ // Use a lock object, this will prevent us against
+ // a lock against the PlatformManager instance
+ private static Object _lock = new Object();
+
+ public static PlatformManager getInstance() {
+ if (__platformManager == null) {
+ synchronized (_lock) {
+ if (__platformManager == null) {
+ __platformManager = new PlatformManager();
+ }
+ }
+ }
+ return __platformManager;
+ }
+
+ // IPlatformBundle registry
+ private Map<String, IPlatformBundle> _platformBundles;
+
+ // IPlatformExtensionPoint Workspace registry
+ private Map<Class<?>, List<Object>> _workspaceRegistry;
+
+ // IPlatformExtensionPoint Target registry
+ private Map<Class<?>, List<Object>> _targetRegistry;
+
+ // A list of listeners interested in changes to extension points
+ private List<IPlatformExtensionPointListener> _listeners;
+
+ private PlatformManager() {
+ // Nothing to do
+ }
+
+ public void dispose() {
+ PDECore.getDefault().getModelManager().removePluginModelListener(this);
+ PDECore.getDefault().getModelManager().removeExtensionDeltaListener(this);
+ _platformBundles = null;
+ _targetRegistry = null;
+ _workspaceRegistry = null;
+ _listeners = null;
+ }
+
+ public IPlatformBundle getPlatformBundle(String id) {
+ // Lock PlatformManager
+ synchronized (_lock) {
+ if (id == null) {
+ return null;
+ }
+ if (_platformBundles == null) {
+ initializePlatformManager();
+ }
+ return _platformBundles.get(id);
+ }
+ }
+
+ public IPlatformBundle getPlatformBundle(IPluginModelBase base) {
+ // Lock PlatformManager
+ synchronized (_lock) {
+ if (base == null) {
+ return null;
+ }
+ String id = BundleHelper.getBundleId(base);
+ if (id == null) {
+ return null;
+ }
+ return getPlatformBundle(id);
+ }
+ }
+
+ public IPlatformBundle getPlatformBundle(IProject project) {
+ // Lock PlatformManager
+ synchronized (_lock) {
+ if (project == null) {
+ return null;
+ }
+ IPluginModelBase base = BundleHelper.getPluginModelBase(project);
+ if (base == null) {
+ return null;
+ }
+ String id = BundleHelper.getBundleId(base);
+ if (id == null) {
+ return null;
+ }
+ return getPlatformBundle(id);
+ }
+ }
+
+ public IPlatformBundle[] getPlatformBundles() {
+ // Lock PlatformManager
+ synchronized (_lock) {
+ if (_platformBundles == null) {
+ initializePlatformManager();
+ }
+ // Create a copy of known values
+ return _platformBundles.values().toArray(new IPlatformBundle[_platformBundles.size()]);
+ }
+ }
+
+ public <T extends IPlatformExtensionPoint> T[] getWorkspacePlatformExtensionPoints(Class<T> clazz) {
+ // Lock PlatformManager
+ synchronized (_lock) {
+ List<Object> extensionPoints = new ArrayList<Object>();
+ if (clazz != null && getExtensionPointsValues().contains(clazz)) {
+ if (_platformBundles == null) {
+ initializePlatformManager();
+ }
+ if (_workspaceRegistry.get(clazz) != null) {
+ extensionPoints.addAll(_workspaceRegistry.get(clazz));
+ }
+ }
+ return CollectionHelper.toArray(extensionPoints, clazz);
+ }
+ }
+
+ public <T extends IPlatformExtensionPoint> T[] getTargetPlatformExtensionPoints(Class<T> clazz) {
+ // Lock PlatformManager
+ synchronized (_lock) {
+ List<Object> extensionPoints = new ArrayList<Object>();
+ if (clazz != null && getExtensionPointsValues().contains(clazz)) {
+ if (_platformBundles == null) {
+ initializePlatformManager();
+ }
+ if (_targetRegistry.get(clazz) != null) {
+ extensionPoints.addAll(_targetRegistry.get(clazz));
+ }
+ }
+ return CollectionHelper.toArray(extensionPoints, clazz);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public <T extends IPlatformExtensionPoint> T[] getPlatformExtensionPoints(Class<T> clazz) {
+ // Lock PlatformManager
+ synchronized (_lock) {
+ if (clazz == null || getExtensionPointsValues().contains(clazz) == false) {
+ return null;
+ }
+ if (_platformBundles == null) {
+ initializePlatformManager();
+ }
+ // Create a copy of known values
+ T[] targetExtensionPoints = getTargetPlatformExtensionPoints(clazz);
+ T[] workspaceExtensionPoints = getWorkspacePlatformExtensionPoints(clazz);
+ T[] extensionPoints = (T[]) Array.newInstance(clazz, targetExtensionPoints.length + workspaceExtensionPoints.length);
+ System.arraycopy(targetExtensionPoints, 0, extensionPoints, 0, targetExtensionPoints.length);
+ System.arraycopy(workspaceExtensionPoints, 0, extensionPoints, targetExtensionPoints.length, workspaceExtensionPoints.length);
+ // Return
+ return extensionPoints;
+ }
+ }
+
+ public <T extends IPlatformExtensionPoint> T[] getPlatformExtensionPoints(IProject project, Class<T> clazz) {
+ // Lock PlatformManager
+ synchronized (_lock) {
+ if (project != null && clazz != null && getExtensionPointsValues().contains(clazz)) {
+ if (_platformBundles == null) {
+ initializePlatformManager();
+ }
+ IPlatformBundle platformBundle = getPlatformBundle(project);
+ if (platformBundle != null) {
+ return platformBundle.getPlatformExtensionPoints(clazz);
+ }
+ }
+ return CollectionHelper.toArray(new ArrayList<Object>(0), clazz);
+ }
+ }
+
+ public <T extends IPlatformExtensionPoint> T[] getPlatformExtensionPoints(String id, Class<T> clazz) {
+ // Lock PlatformManager
+ synchronized (_lock) {
+ if (id != null && clazz != null && getExtensionPointsValues().contains(clazz)) {
+ if (_platformBundles == null) {
+ initializePlatformManager();
+ }
+ IPlatformBundle platformBundle = _platformBundles.get(id);
+ if (platformBundle != null) {
+ return platformBundle.getPlatformExtensionPoints(clazz);
+ }
+ }
+ return CollectionHelper.toArray(new ArrayList<Object>(0), clazz);
+ }
+ }
+
+ private void initializePlatformManager() {
+ if (_platformBundles != null) {
+ return;
+ }
+ // listeners
+ PDECore.getDefault().getModelManager().addPluginModelListener(this);
+ PDECore.getDefault().getModelManager().addExtensionDeltaListener(this);
+ // registries
+ _platformBundles = new TreeMap<String, IPlatformBundle>();
+ _workspaceRegistry = new HashMap<Class<?>, List<Object>>();
+ _targetRegistry = new HashMap<Class<?>, List<Object>>();
+ for (IPluginModelBase base : PluginRegistry.getActiveModels(true)) {
+ addPlatformBundle(BundleHelper.getBundleId(base), createPlatformBundle(base), null);
+ }
+ // Debug
+ if (EGFPlatformPlugin.getDefault().isDebugging()) {
+ IPlatformBundle[] platformBundles = getPlatformBundles();
+ if (platformBundles.length > 0) {
+ EGFPlatformPlugin.getDefault().logInfo(NLS.bind("PlatformManager.initializePlatformManager(..) _ found {0} Platform Bundle{1}", //$NON-NLS-1$
+ platformBundles.length, platformBundles.length < 2 ? "" : "s" //$NON-NLS-1$ //$NON-NLS-2$
+ ));
+ }
+ trace(platformBundles);
+ }
+ }
+
+ /**
+ * Notify all interested listeners in changes made to the models table
+ *
+ * @param delta
+ * the delta of changes
+ */
+ private void firePlatformExtensionPoint(IPlatformExtensionPointDelta delta) {
+ if (_listeners != null) {
+ for (IPlatformExtensionPointListener listener : _listeners) {
+ listener.platformExtensionPointChanged(delta);
+ }
+ }
+ }
+
+ /**
+ * Add a listener to the platform manager
+ *
+ * @param listener
+ * the listener to be added
+ */
+ public void addPlatformExtensionPointListener(IPlatformExtensionPointListener listener) {
+ // Lock PlatformManager
+ synchronized (_lock) {
+ if (_listeners == null) {
+ _listeners = new ArrayList<IPlatformExtensionPointListener>();
+ }
+ if (_listeners.contains(listener) == false) {
+ _listeners.add(listener);
+ }
+ }
+ }
+
+ /**
+ * Add a listener to the platform manager
+ *
+ * @param listener
+ * the listener to be added
+ */
+ public void addInFrontPlatformExtensionPointListener(IPlatformExtensionPointListener listener) {
+ // Lock PlatformManager
+ synchronized (_lock) {
+ if (_listeners == null) {
+ _listeners = new ArrayList<IPlatformExtensionPointListener>();
+ }
+ if (_listeners.contains(listener) == false) {
+ _listeners.add(0, listener);
+ }
+ }
+ }
+
+ /**
+ * Remove a listener from the platform manager
+ *
+ * @param listener
+ * the listener to be removed
+ */
+ public void removePlatformExtensionPointListener(IPlatformExtensionPointListener listener) {
+ // Lock PlatformManager
+ synchronized (_lock) {
+ if (_listeners == null) {
+ return;
+ }
+ _listeners.remove(listener);
+ }
+ }
+
+ /**
+ * Process extension delta event This method is called when listeners are
+ * initialized.
+ *
+ * @see {@link org.eclipse.egf.core.platform.internal.pde.PlatformManager#getPlatformBundles()} for initialization. If someone call dispose() this method is no longer
+ * called. No need to initialize the PlatformManager
+ *
+ * @param event
+ * the event to be processed
+ */
+ public void extensionsChanged(IExtensionDeltaEvent event) {
+ // Lock PlatformManager
+ synchronized (_lock) {
+ // Initialize a delta
+ PlatformExtensionPointDelta delta = new PlatformExtensionPointDelta();
+ // Process Removed Entries
+ for (IPluginModelBase base : event.getRemovedModels()) {
+ String id = BundleHelper.getBundleId(base);
+ // Ignore Model with unknown id
+ if (id == null) {
+ continue;
+ }
+ IPlatformBundle existingPlatformBundle = _platformBundles.get(id);
+ if (existingPlatformBundle != null && base.equals(existingPlatformBundle.getPluginModelBase())) {
+ removePlatformBundle(id, existingPlatformBundle, delta);
+ }
+ }
+ // Process Changed Entries
+ for (IPluginModelBase base : event.getChangedModels()) {
+ handleChange(base, delta);
+ }
+ // Process Added Entries
+ for (IPluginModelBase base : event.getAddedModels()) {
+ String id = BundleHelper.getBundleId(base);
+ // Ignore Model with unknown id
+ if (id == null) {
+ continue;
+ }
+ IPlatformBundle existingPlatformBundle = _platformBundles.get(id);
+ if (existingPlatformBundle != null && base.equals(existingPlatformBundle.getPluginModelBase()) == false) {
+ removePlatformBundle(id, existingPlatformBundle, delta);
+ }
+ addPlatformBundle(id, createPlatformBundle(base), delta);
+ }
+ // Something to process
+ if (delta.isEmpty() == false) {
+ // Debug
+ if (EGFPlatformPlugin.getDefault().isDebugging()) {
+ trace(delta);
+ }
+ // Notify all interested listeners in the changes made to models
+ firePlatformExtensionPoint(delta);
+ }
+ }
+ }
+
+ /**
+ * Process model delta event This method is called when listeners are
+ * initialized.
+ *
+ * @see {@link org.eclipse.egf.core.platform.internal.pde.PlatformManager#getPlatformBundles()} for initialization. If someone call dispose() this method is no longer
+ * called. No need to initialize the PlatformManager
+ *
+ * @param event
+ * the event to be processed
+ */
+ public void modelsChanged(PluginModelDelta event) {
+ // Lock PlatformManager
+ synchronized (_lock) {
+ // Initialize a delta
+ PlatformExtensionPointDelta delta = new PlatformExtensionPointDelta();
+ // Process Removed Entries
+ if ((event.getKind() & PluginModelDelta.REMOVED) != 0) {
+ for (ModelEntry entry : event.getRemovedEntries()) {
+ String id = entry.getId();
+ // Ignore Model with unknown id
+ if (id == null) {
+ continue;
+ }
+ IPlatformBundle existingPlatformBundle = _platformBundles.get(id);
+ if (existingPlatformBundle != null) {
+ removePlatformBundle(id, existingPlatformBundle, delta);
+ }
+ }
+ }
+ // Process Changed Entries
+ if ((event.getKind() & PluginModelDelta.CHANGED) != 0) {
+ for (ModelEntry entry : event.getChangedEntries()) {
+ for (IPluginModelBase base : getExtensionPointModels(entry)) {
+ handleChange(base, delta);
+ }
+ }
+ }
+ // Process Added Entries
+ if ((event.getKind() & PluginModelDelta.ADDED) != 0) {
+ for (ModelEntry entry : event.getAddedEntries()) {
+ for (IPluginModelBase base : getExtensionPointModels(entry)) {
+ String id = BundleHelper.getBundleId(base);
+ // Ignore Model with unknown id
+ if (id == null) {
+ continue;
+ }
+ IPlatformBundle existingPlatformBundle = _platformBundles.get(id);
+ if (existingPlatformBundle != null && base.equals(existingPlatformBundle.getPluginModelBase()) == false) {
+ removePlatformBundle(id, existingPlatformBundle, delta);
+ }
+ addPlatformBundle(id, createPlatformBundle(base), delta);
+ }
+ }
+ }
+ // Something to process
+ if (delta.isEmpty() == false) {
+ // Debug
+ if (EGFPlatformPlugin.getDefault().isDebugging()) {
+ trace(delta);
+ }
+ // Notify all interested listeners in the changes made to models
+ firePlatformExtensionPoint(delta);
+ }
+ }
+ }
+
+ private IPlatformBundle createPlatformBundle(IPluginModelBase base) {
+ // Always create a model
+ IPlatformBundle platformBundle = new PlatformBundle(base);
+ // Process extension point
+ for (IPluginExtension extension : base.getExtensions(false).getExtensions()) {
+ Class<? extends IPlatformExtensionPoint> clazz = getExtensionPoints().get(extension.getPoint());
+ if (clazz != null) {
+ platformBundle.addPlatformExtensionPoint(clazz, extension);
+ }
+ }
+ return platformBundle;
+ }
+
+ private void handleChange(IPluginModelBase base, PlatformExtensionPointDelta delta) {
+ // Check an existing one
+ String id = BundleHelper.getBundleId(base);
+ IPlatformBundle existingPlatformBundle = _platformBundles.get(id);
+ if (base.isEnabled()) {
+ if (existingPlatformBundle != null && base.equals(existingPlatformBundle.getPluginModelBase())) {
+ mergePlatformBundle(id, createPlatformBundle(base), delta);
+ } else {
+ if (existingPlatformBundle != null && base.equals(existingPlatformBundle.getPluginModelBase()) == false) {
+ removePlatformBundle(id, existingPlatformBundle, delta);
+ }
+ addPlatformBundle(id, createPlatformBundle(base), delta);
+ }
+ } else {
+ removePlatformBundle(id, existingPlatformBundle, delta);
+ }
+ }
+
+ private void mergePlatformBundle(String id, IPlatformBundle newPlatformBundle, PlatformExtensionPointDelta delta) {
+ if (id == null || newPlatformBundle == null) {
+ return;
+ }
+ // Retrieve an existing one
+ IPlatformBundle existingPlatformBundle = _platformBundles.get(id);
+ // Nothing to compare with
+ if (existingPlatformBundle == null) {
+ return;
+ }
+ // Analyse existing monitored ExtensionPoints
+ for (Class<? extends IPlatformExtensionPoint> clazz : getExtensionPoints().values()) {
+ // Remove existing Extension Point if necessary
+ LOOP: for (IPlatformExtensionPoint extensionPoint : existingPlatformBundle.getPlatformExtensionPoints(clazz)) {
+ // should we remove extensionPoint ?
+ for (IPlatformExtensionPoint newExtensionPoint : newPlatformBundle.getPlatformExtensionPoints(clazz)) {
+ // TODO: PluginElement equals bug
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=267954
+ try {
+ if (extensionPoint.getPluginElement().equals(newExtensionPoint.getPluginElement())) {
+ continue LOOP;
+ }
+ } catch (InvalidRegistryObjectException iroe) {
+ // org.eclipse.core.internal.registry.RegistryObjectManager raised such exception when
+ // an object is no longer valid. In such case we always discard it.
+ break;
+ }
+ }
+ // Remove ExtensionPoint from our existing model
+ if (existingPlatformBundle.removePlatformExtensionPoint(clazz, extensionPoint) == false) {
+ EGFPlatformPlugin.getDefault().logError(NLS.bind("PlatformManager.mergePlatformBundle(..) _ ''{0}'' unable to remove Extension Point from PlatformBundle.", //$NON-NLS-1$
+ extensionPoint));
+ }
+ // Remove ExtensionPoint from our target or workspace registry
+ if (existingPlatformBundle.isTarget()) {
+ if (_targetRegistry.get(clazz).remove(extensionPoint)) {
+ // Clean Target Registry if necessary
+ if (_targetRegistry.get(clazz).isEmpty()) {
+ _targetRegistry.remove(clazz);
+ }
+ // Update delta
+ if (delta != null) {
+ delta.storeRemovedPlatformExtensionPoint(clazz, extensionPoint);
+ }
+ }
+ } else {
+ if (_workspaceRegistry.get(clazz).remove(extensionPoint)) {
+ // Clean Workspace Registry if necessary
+ if (_workspaceRegistry.get(clazz).isEmpty()) {
+ _workspaceRegistry.remove(clazz);
+ }
+ // Update delta
+ if (delta != null) {
+ delta.storeRemovedPlatformExtensionPoint(clazz, extensionPoint);
+ }
+ }
+ }
+ }
+ // Add unknown Extension Point if necessary
+ LOOP: for (IPlatformExtensionPoint newExtensionPoint : newPlatformBundle.getPlatformExtensionPoints(clazz)) {
+ // should we add newExtensionPoint ?
+ for (IPlatformExtensionPoint extensionPoint : existingPlatformBundle.getPlatformExtensionPoints(clazz)) {
+ // TODO: PluginElement equals bug
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=267954
+ if (extensionPoint.getPluginElement().equals(newExtensionPoint.getPluginElement())) {
+ continue LOOP;
+ }
+ }
+ // Add newExtensionPoint in our existing model
+ newExtensionPoint = existingPlatformBundle.addPlatformExtensionPoint(clazz, newExtensionPoint.getPluginElement());
+ if (newExtensionPoint == null) {
+ continue;
+ }
+ // Add newExtensionPoint in our target or workspace registry
+ if (existingPlatformBundle.isTarget()) {
+ List<Object> extensionPoints = _targetRegistry.get(clazz);
+ // init slot if necessary
+ if (extensionPoints == null) {
+ extensionPoints = new ArrayList<Object>();
+ _targetRegistry.put(clazz, extensionPoints);
+ }
+ if (extensionPoints.add(newExtensionPoint) == false) {
+ EGFPlatformPlugin.getDefault().logError(NLS.bind("PlatformManager.mergePlatformBundle(..) _ ''{0}'' unable to add Extension Point in target registry.", //$NON-NLS-1$
+ newExtensionPoint));
+ } else {
+ // Update delta
+ if (delta != null) {
+ delta.storeAddedPlatformExtensionPoint(clazz, newExtensionPoint);
+ }
+ }
+ } else {
+ List<Object> extensionPoints = _workspaceRegistry.get(clazz);
+ // init slot if necessary
+ if (extensionPoints == null) {
+ extensionPoints = new ArrayList<Object>();
+ _workspaceRegistry.put(clazz, extensionPoints);
+ }
+ if (extensionPoints.add(newExtensionPoint) == false) {
+ EGFPlatformPlugin.getDefault().logError(NLS.bind("PlatformManager.mergePlatformBundle(..) _ ''{0}'' unable to add Extension Point in workspace registry.", //$NON-NLS-1$
+ newExtensionPoint));
+ } else {
+ // Update delta
+ if (delta != null) {
+ delta.storeAddedPlatformExtensionPoint(clazz, newExtensionPoint);
+ }
+ }
+ }
+ }
+ }
+ // Finally remove existingModel if necessary
+ if (existingPlatformBundle.isEmpty()) {
+ if (existingPlatformBundle.equals(_platformBundles.remove(id)) == false) {
+ EGFPlatformPlugin.getDefault().logError(NLS.bind("PlatformManager.mergePlatformBundle(..) _ ''{0}'' unknown PlatformBundle.", //$NON-NLS-1$
+ id));
+ }
+ }
+ }
+
+ private void removePlatformBundle(String id, IPlatformBundle platformBundle, PlatformExtensionPointDelta delta) {
+ if (id == null || platformBundle == null) {
+ return;
+ }
+ // Remove platform bundle from our main registry
+ if (platformBundle.equals(_platformBundles.remove(id)) == false) {
+ EGFPlatformPlugin.getDefault().logError(NLS.bind("PlatformManager.removePlatformBundle(..) _ ''{0}'' unknown PlatformBundle.", //$NON-NLS-1$
+ id));
+ }
+ // Process extension point
+ // Analyse Removed Extension Points
+ for (Class<? extends IPlatformExtensionPoint> clazz : getExtensionPoints().values()) {
+ for (IPlatformExtensionPoint extensionPoint : platformBundle.getPlatformExtensionPoints(clazz)) {
+ // remove extension point from our target or workspace registry
+ if (platformBundle.isTarget()) {
+ if (_targetRegistry.get(clazz).remove(extensionPoint)) {
+ // Clean Target Registry if necessary
+ if (_targetRegistry.get(clazz).isEmpty()) {
+ _targetRegistry.remove(clazz);
+ }
+ // Update delta
+ if (delta != null) {
+ delta.storeRemovedPlatformExtensionPoint(clazz, extensionPoint);
+ }
+ }
+ } else {
+ if (_workspaceRegistry.get(clazz).remove(extensionPoint)) {
+ // Clean Workspace Registry if necessary
+ if (_workspaceRegistry.get(clazz).isEmpty()) {
+ _workspaceRegistry.remove(clazz);
+ }
+ // Update delta
+ if (delta != null) {
+ delta.storeRemovedPlatformExtensionPoint(clazz, extensionPoint);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private void addPlatformBundle(String id, IPlatformBundle newPlatformBundle, PlatformExtensionPointDelta delta) {
+ if (id == null || newPlatformBundle == null || newPlatformBundle.isEmpty()) {
+ return;
+ }
+ // Check existing model
+ // Retrieve an existing one
+ IPlatformBundle existingPlatformBundle = _platformBundles.get(id);
+ if (existingPlatformBundle != null) {
+ // Nothing to add
+ return;
+ }
+ // Add platform bundle to our main registry
+ _platformBundles.put(id, newPlatformBundle);
+ // Process extension point
+ for (Class<? extends IPlatformExtensionPoint> clazz : getExtensionPoints().values()) {
+ for (IPlatformExtensionPoint extensionPoint : newPlatformBundle.getPlatformExtensionPoints(clazz)) {
+ // add extension point in our target or workspace registry
+ if (newPlatformBundle.isTarget()) {
+ List<Object> extensionPoints = _targetRegistry.get(clazz);
+ if (extensionPoints == null) {
+ extensionPoints = new ArrayList<Object>();
+ _targetRegistry.put(clazz, extensionPoints);
+ }
+ if (extensionPoints.add(extensionPoint) == false) {
+ EGFPlatformPlugin.getDefault().logError(NLS.bind("PlatformManager.addPlatformBundle(..) _ ''{0}'' unable to add Extension Point in target registry.", //$NON-NLS-1$
+ extensionPoint.getId()));
+ } else {
+ // Update delta
+ if (delta != null) {
+ delta.storeAddedPlatformExtensionPoint(clazz, extensionPoint);
+ }
+ }
+ } else {
+ List<Object> extensionPoints = _workspaceRegistry.get(clazz);
+ if (extensionPoints == null) {
+ extensionPoints = new ArrayList<Object>();
+ _workspaceRegistry.put(clazz, extensionPoints);
+ }
+ if (extensionPoints.add(extensionPoint) == false) {
+ EGFPlatformPlugin.getDefault().logError(NLS.bind("PlatformManager.addPlatformBundle(..) _ ''{0}'' unable to add Extension Point in workspace registry.", //$NON-NLS-1$
+ extensionPoint.getId()));
+ } else {
+ // Update delta
+ if (delta != null) {
+ delta.storeAddedPlatformExtensionPoint(clazz, extensionPoint);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private List<IPluginModelBase> getExtensionPointModels(ModelEntry entry) {
+ List<IPluginModelBase> plugins = new UniqueEList<IPluginModelBase>();
+ // workspace models are always processed first, pde and jdt default behaviour
+ LOOP: for (IPluginModelBase model : entry.hasWorkspaceModels() ? entry.getWorkspaceModels() : entry.getExternalModels()) {
+ if (model.getExtensions(false) == null || model.getExtensions(false).getExtensions() == null) {
+ continue;
+ }
+ for (IPluginExtension extension : model.getExtensions(false).getExtensions()) {
+ Class<? extends IPlatformExtensionPoint> clazz = getExtensionPoints().get(extension.getPoint());
+ if (clazz != null) {
+ plugins.add(model);
+ // Only one known extension points is enough to further analyse such model
+ continue LOOP;
+ }
+ }
+ }
+ return plugins;
+ }
+
+ private void trace(IPlatformBundle[] platformBundles) {
+ for (IPlatformBundle platformBundle : platformBundles) {
+ EGFPlatformPlugin.getDefault().logInfo(platformBundle.toString(), 1);
+ for (IPlatformExtensionPoint extensionPoint : platformBundle.getPlatformExtensionPoints()) {
+ EGFPlatformPlugin.getDefault().logInfo("Contains: " + extensionPoint.toString(), 2); //$NON-NLS-1$
+ }
+ }
+ }
+
+ private void trace(IPlatformExtensionPointDelta delta) {
+ if (delta.getRemovedPlatformExtensionPoints().length > 0) {
+ EGFPlatformPlugin.getDefault().logInfo(NLS.bind("PlatformManager Removed {0} Extension Point{1}.", //$NON-NLS-1$
+ delta.getRemovedPlatformExtensionPoints().length, delta.getRemovedPlatformExtensionPoints().length < 2 ? "" : "s" //$NON-NLS-1$ //$NON-NLS-2$
+ ));
+ trace(delta.getRemovedPlatformExtensionPoints());
+ }
+ if (delta.getAddedPlatformExtensionPoints().length > 0) {
+ EGFPlatformPlugin.getDefault().logInfo(NLS.bind("PlatformManager Added {0} Extension Point{1}.", //$NON-NLS-1$
+ delta.getAddedPlatformExtensionPoints().length, delta.getAddedPlatformExtensionPoints().length < 2 ? "" : "s" //$NON-NLS-1$ //$NON-NLS-2$
+ ));
+ trace(delta.getAddedPlatformExtensionPoints());
+ }
+ }
+
+ private void trace(IPlatformExtensionPoint[] extensionPoints) {
+ for (IPlatformExtensionPoint extensionPoint : extensionPoints) {
+ EGFPlatformPlugin.getDefault().logInfo(extensionPoint.toString(), 1);
+ EGFPlatformPlugin.getDefault().logInfo(extensionPoint.getPlatformBundle().toString(), 2);
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/l10n/CorePlatformMessages.java b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/l10n/CorePlatformMessages.java
new file mode 100644
index 0000000..fdb2d06
--- /dev/null
+++ b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/l10n/CorePlatformMessages.java
@@ -0,0 +1,30 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.platform.l10n;
+
+import org.eclipse.osgi.util.NLS;
+
+public class CorePlatformMessages {
+
+ private static final String BUNDLE_NAME = "org.eclipse.egf.core.platform.l10n.messages"; //$NON-NLS-1$
+
+ private CorePlatformMessages() {
+ // Do not instantiate
+ }
+
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, CorePlatformMessages.class);
+ }
+
+ public static String PlatformManager_outOfSync;
+
+}
diff --git a/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/l10n/messages.properties b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/l10n/messages.properties
new file mode 100644
index 0000000..481f20a
--- /dev/null
+++ b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/l10n/messages.properties
@@ -0,0 +1,13 @@
+##
+# Copyright (c) 2000, 2009 IBM Corporation and others.
+# 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:
+# IBM Corporation - initial API and implementation
+# Thales Corporate Services S.A.S
+##
+
+PlatformManager_outOfSync = (out of sync)
diff --git a/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/pde/IPlatformBundle.java b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/pde/IPlatformBundle.java
new file mode 100644
index 0000000..b81507f
--- /dev/null
+++ b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/pde/IPlatformBundle.java
@@ -0,0 +1,138 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.platform.pde;
+
+import java.net.URL;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.osgi.service.resolver.BundleDescription;
+import org.eclipse.pde.core.plugin.IPluginBase;
+import org.eclipse.pde.core.plugin.IPluginElement;
+import org.eclipse.pde.core.plugin.IPluginExtension;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.osgi.framework.Bundle;
+
+public interface IPlatformBundle {
+
+ /**
+ * Returns the current bundle id associated with IPlatformBundle
+ *
+ * @return the current bundle id.
+ */
+ public String getBundleId();
+
+ /**
+ * Returns the initial bundle id associated with IPlatformBundle.
+ * useful when the symbolic name has changed in the manifest file.
+ *
+ * @return the initial bundle id.
+ */
+ public String getPreviousBundleId();
+
+ /**
+ * Returns an IProject if this IPlatformBundle is associated with a
+ * workspace IProject.
+ *
+ * @return an IProject if this IPlatformBundle is a workspace project,
+ * or <code>null</code> if this IPlatformBundle is a target one.
+ *
+ */
+ public IProject getProject();
+
+ /**
+ * Returns a Bundle if this IPlatformBundle is a target bundle.
+ *
+ * @return a Bundle if this IPlatformBundle is a target bundle,
+ * or <code>null</code> if this IPlatformBundle is a workspace one.
+ *
+ */
+ public Bundle getBundle();
+
+ /**
+ * Returns a top-level model object.
+ *
+ * @return a top-level model object representing a plug-in or a fragment.
+ */
+ public IPluginBase getPluginBase();
+
+ /**
+ * Manifest file model associated with IPlatformBundle
+ *
+ * @return all plug-ins and (possibly) fragments in the workspace as well as
+ * all plug-ins and
+ * (possibly) fragments that are checked on the Target Platform
+ * preference page.
+ */
+ public IPluginModelBase getPluginModelBase();
+
+ /**
+ * Tests if this IPlatformBundle is for the plug-in fragment.
+ *
+ * @return <code>true</code> if the model is for the fragment,
+ * <code>false</code> otherwise.
+ */
+ public boolean isFragment();
+
+ /**
+ * Returns the bundle description of the plug-in
+ * in case the plug-in uses the new OSGi bundle layout.
+ *
+ * @return bundle description if this is an OSGi plug-in,
+ * or <code>null</code> if the plug-in is in a classic
+ * format.
+ *
+ * @since 3.0
+ */
+ public BundleDescription getBundleDescription();
+
+ /**
+ * Whether or not this IPlatformBundle is a target IPlatformBundle.
+ *
+ * @return true if this IPlatformBundle is a target bundle,
+ * false if this IPlatformBundle is a workspace bundle.
+ *
+ */
+ public boolean isTarget();
+
+ public boolean isEmpty();
+
+ /**
+ * The location string for this bundle.
+ *
+ * @return The bundle location or null if the bundle description
+ * does not have a location
+ */
+ public String getBundleLocation();
+
+ /**
+ * The URL for this bundle.
+ *
+ * @return The bundle URL.
+ */
+ public URL getBundleURL();
+
+ public IPlatformExtensionPoint[] getPlatformExtensionPoints();
+
+ public <T extends IPlatformExtensionPoint> T[] getPlatformExtensionPoints(Class<T> clazz);
+
+ public boolean hasPlatformExtensionPoint(IPlatformExtensionPoint platformExtensionPoint);
+
+ public boolean hasPlatformExtensionPoint(Class<? extends IPlatformExtensionPoint> clazz, IPlatformExtensionPoint platformExtensionPoint);
+
+ public void addPlatformExtensionPoint(Class<? extends IPlatformExtensionPoint> clazz, IPluginExtension extension);
+
+ public <T extends IPlatformExtensionPoint> T addPlatformExtensionPoint(Class<T> clazz, IPluginElement element);
+
+ public boolean removePlatformExtensionPoint(IPlatformExtensionPoint platformExtensionPoint);
+
+ public boolean removePlatformExtensionPoint(Class<? extends IPlatformExtensionPoint> clazz, IPlatformExtensionPoint platformExtensionPoint);
+
+}
diff --git a/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/pde/IPlatformExtensionPoint.java b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/pde/IPlatformExtensionPoint.java
new file mode 100644
index 0000000..48ce23f
--- /dev/null
+++ b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/pde/IPlatformExtensionPoint.java
@@ -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
+ */
+package org.eclipse.egf.core.platform.pde;
+
+import org.eclipse.pde.core.plugin.IPluginElement;
+
+public interface IPlatformExtensionPoint {
+
+ public String getId();
+
+ public IPlatformBundle getPlatformBundle();
+
+ public IPluginElement getPluginElement();
+
+}
diff --git a/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/pde/IPlatformExtensionPointDelta.java b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/pde/IPlatformExtensionPointDelta.java
new file mode 100644
index 0000000..3c06a27
--- /dev/null
+++ b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/pde/IPlatformExtensionPointDelta.java
@@ -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
+ */
+package org.eclipse.egf.core.platform.pde;
+
+public interface IPlatformExtensionPointDelta {
+
+ public IPlatformExtensionPoint[] getAddedPlatformExtensionPoints();
+
+ public IPlatformExtensionPoint[] getRemovedPlatformExtensionPoints();
+
+ public <T extends IPlatformExtensionPoint> T[] getAddedPlatformExtensionPoints(Class<T> clazz);
+
+ public <T extends IPlatformExtensionPoint> T[] getRemovedPlatformExtensionPoints(Class<T> clazz);
+
+}
diff --git a/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/pde/IPlatformExtensionPointFactory.java b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/pde/IPlatformExtensionPointFactory.java
new file mode 100644
index 0000000..1529d47
--- /dev/null
+++ b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/pde/IPlatformExtensionPointFactory.java
@@ -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
+ */
+package org.eclipse.egf.core.platform.pde;
+
+import org.eclipse.pde.core.plugin.IPluginElement;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public interface IPlatformExtensionPointFactory<T extends IPlatformExtensionPoint> {
+
+ public T createExtensionPoint(IPlatformBundle platformBundle, IPluginElement pluginElement);
+
+}
diff --git a/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/pde/IPlatformExtensionPointListener.java b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/pde/IPlatformExtensionPointListener.java
new file mode 100644
index 0000000..8be35aa
--- /dev/null
+++ b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/pde/IPlatformExtensionPointListener.java
@@ -0,0 +1,17 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.platform.pde;
+
+public interface IPlatformExtensionPointListener {
+
+ public void platformExtensionPointChanged(IPlatformExtensionPointDelta delta);
+
+}
diff --git a/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/pde/IPlatformExtensionPointURI.java b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/pde/IPlatformExtensionPointURI.java
new file mode 100644
index 0000000..229325c
--- /dev/null
+++ b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/pde/IPlatformExtensionPointURI.java
@@ -0,0 +1,21 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.platform.pde;
+
+import org.eclipse.emf.common.util.URI;
+
+public interface IPlatformExtensionPointURI extends IPlatformExtensionPoint {
+
+ public URI getURI();
+
+ public URI getPreviousURI();
+
+}
diff --git a/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/pde/IPlatformManager.java b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/pde/IPlatformManager.java
new file mode 100644
index 0000000..3194ace
--- /dev/null
+++ b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/pde/IPlatformManager.java
@@ -0,0 +1,46 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.platform.pde;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public interface IPlatformManager {
+
+ public IPlatformBundle[] getPlatformBundles();
+
+ public IPlatformBundle getPlatformBundle(IPluginModelBase base);
+
+ public IPlatformBundle getPlatformBundle(IProject project);
+
+ public IPlatformBundle getPlatformBundle(String id);
+
+ public <T extends IPlatformExtensionPoint> T[] getPlatformExtensionPoints(Class<T> clazz);
+
+ public <T extends IPlatformExtensionPoint> T[] getPlatformExtensionPoints(IProject project, Class<T> clazz);
+
+ public <T extends IPlatformExtensionPoint> T[] getPlatformExtensionPoints(String id, Class<T> clazz);
+
+ public <T extends IPlatformExtensionPoint> T[] getWorkspacePlatformExtensionPoints(Class<T> clazz);
+
+ public <T extends IPlatformExtensionPoint> T[] getTargetPlatformExtensionPoints(Class<T> clazz);
+
+ public void addPlatformExtensionPointListener(IPlatformExtensionPointListener listener);
+
+ public void addInFrontPlatformExtensionPointListener(IPlatformExtensionPointListener listener);
+
+ public void removePlatformExtensionPointListener(IPlatformExtensionPointListener listener);
+
+}
diff --git a/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/pde/PlatformExtensionPoint.java b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/pde/PlatformExtensionPoint.java
new file mode 100644
index 0000000..a360949
--- /dev/null
+++ b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/pde/PlatformExtensionPoint.java
@@ -0,0 +1,69 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.platform.pde;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.pde.core.plugin.IPluginElement;
+
+public abstract class PlatformExtensionPoint implements IPlatformExtensionPoint {
+
+ private IPluginElement _element;
+
+ private IPlatformBundle _bundle;
+
+ private String _id;
+
+ public PlatformExtensionPoint(IPlatformBundle bundle, IPluginElement element, String id) {
+ Assert.isNotNull(bundle);
+ Assert.isNotNull(bundle.getPluginModelBase());
+ Assert.isNotNull(element);
+ Assert.isNotNull(element.getPluginModel());
+ Assert.isLegal(bundle.getPluginModelBase().equals(element.getPluginModel()));
+ Assert.isNotNull(id);
+ Assert.isLegal(id.trim().length() > 0);
+ _bundle = bundle;
+ _element = element;
+ _id = id.trim();
+ }
+
+ public String getId() {
+ return _id;
+ }
+
+ public IPluginElement getPluginElement() {
+ return _element;
+ }
+
+ public IPlatformBundle getPlatformBundle() {
+ return _bundle;
+ }
+
+ @Override
+ public boolean equals(Object object) {
+ if (this == object) {
+ return true;
+ }
+ if (object instanceof IPlatformExtensionPoint == false) {
+ return false;
+ }
+ IPlatformExtensionPoint platformExtensionPoint = (IPlatformExtensionPoint) object;
+ if (platformExtensionPoint.getPlatformBundle().equals(getPlatformBundle())) {
+ return toString().compareTo(platformExtensionPoint.toString()) == 0;
+ }
+ return false;
+ }
+
+ @Override
+ public String toString() {
+ return getId();
+ }
+
+}
diff --git a/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/pde/PlatformExtensionPointURI.java b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/pde/PlatformExtensionPointURI.java
new file mode 100644
index 0000000..2596c33
--- /dev/null
+++ b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/pde/PlatformExtensionPointURI.java
@@ -0,0 +1,44 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.platform.pde;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.egf.common.helper.URIHelper;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.pde.core.plugin.IPluginElement;
+
+public abstract class PlatformExtensionPointURI extends PlatformExtensionPoint implements IPlatformExtensionPointURI {
+
+ private URI _previousUri;
+
+ public PlatformExtensionPointURI(IPlatformBundle bundle, IPluginElement element, String id) {
+ super(bundle, element, id);
+ _previousUri = URIHelper.getPlatformURI(bundle.getBundleId(), getId(), true);
+ Assert.isNotNull(_previousUri);
+ }
+
+ public URI getPreviousURI() {
+ return _previousUri;
+ }
+
+ public URI getURI() {
+ if (getPlatformBundle().getBundleId().equals(getPlatformBundle().getPreviousBundleId()) == false) {
+ return URIHelper.getPlatformURI(getPlatformBundle().getBundleId(), getId(), true);
+ }
+ return getPreviousURI();
+ }
+
+ @Override
+ public String toString() {
+ return URI.decode(getURI().toString());
+ }
+
+}
diff --git a/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/util/CollectionHelper.java b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/util/CollectionHelper.java
new file mode 100644
index 0000000..31047ae
--- /dev/null
+++ b/org.eclipse.egf.core.platform/src/org/eclipse/egf/core/platform/util/CollectionHelper.java
@@ -0,0 +1,30 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.platform.util;
+
+import java.lang.reflect.Array;
+import java.util.Collection;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class CollectionHelper {
+
+ @SuppressWarnings("unchecked")
+ public static <T> T[] toArray(Collection<Object> collection, Class<T> clazz) {
+ if (clazz == null || collection == null) {
+ return null;
+ }
+ return collection.toArray((T[]) Array.newInstance(clazz, collection.size()));
+ }
+
+}
diff --git a/org.eclipse.egf.core.producer/.classpath b/org.eclipse.egf.core.producer/.classpath
new file mode 100644
index 0000000..2d1a430
--- /dev/null
+++ b/org.eclipse.egf.core.producer/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.egf.core.producer/.options b/org.eclipse.egf.core.producer/.options
new file mode 100644
index 0000000..c75868b
--- /dev/null
+++ b/org.eclipse.egf.core.producer/.options
@@ -0,0 +1,2 @@
+# Prints debug information
+org.eclipse.egf.core.producer/debug=true
diff --git a/org.eclipse.egf.core.producer/.project b/org.eclipse.egf.core.producer/.project
new file mode 100644
index 0000000..77c9560
--- /dev/null
+++ b/org.eclipse.egf.core.producer/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.core.producer</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.core.producer/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egf.core.producer/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..1db36c7
--- /dev/null
+++ b/org.eclipse.egf.core.producer/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:49:44 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.egf.core.producer/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egf.core.producer/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..e3694c0
--- /dev/null
+++ b/org.eclipse.egf.core.producer/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Fri Sep 18 11:34:07 CEST 2009
+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/org.eclipse.egf.core.producer/META-INF/MANIFEST.MF b/org.eclipse.egf.core.producer/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..6433175
--- /dev/null
+++ b/org.eclipse.egf.core.producer/META-INF/MANIFEST.MF
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.core.producer;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.egf.core.producer.EGFCoreProducerPlugin
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle:
+ org.eclipse.egf.common;visibility:=reexport,
+ org.eclipse.egf.core;visibility:=reexport
+Export-Package:
+ org.eclipse.egf.core.producer,
+ org.eclipse.egf.core.producer.context,
+ org.eclipse.egf.core.producer.l10n,
+ org.eclipse.egf.core.producer.manager
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.egf.core.producer/about.html b/org.eclipse.egf.core.producer/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/org.eclipse.egf.core.producer/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/org.eclipse.egf.core.producer/build.properties b/org.eclipse.egf.core.producer/build.properties
new file mode 100644
index 0000000..c9848de
--- /dev/null
+++ b/org.eclipse.egf.core.producer/build.properties
@@ -0,0 +1,18 @@
+##
+# 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
+##
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ .options,\
+ about.html,\
+ plugin.properties
+src.includes = about.html
diff --git a/org.eclipse.egf.core.producer/plugin.properties b/org.eclipse.egf.core.producer/plugin.properties
new file mode 100644
index 0000000..ebba897
--- /dev/null
+++ b/org.eclipse.egf.core.producer/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 Core Producer (Incubation)
+providerName=Eclipse Modeling Project
diff --git a/org.eclipse.egf.core.producer/src/org/eclipse/egf/core/producer/EGFCoreProducerPlugin.java b/org.eclipse.egf.core.producer/src/org/eclipse/egf/core/producer/EGFCoreProducerPlugin.java
new file mode 100644
index 0000000..a6adb18
--- /dev/null
+++ b/org.eclipse.egf.core.producer/src/org/eclipse/egf/core/producer/EGFCoreProducerPlugin.java
@@ -0,0 +1,55 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.producer;
+
+import org.eclipse.egf.common.activator.EGFAbstractPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle.
+ *
+ * @author Xavier Maysonnave
+ */
+public class EGFCoreProducerPlugin extends EGFAbstractPlugin {
+
+ /**
+ * Plug-in unique instance.
+ */
+ private static EGFCoreProducerPlugin __plugin;
+
+ /**
+ * Get activator shared instance.
+ *
+ * @return
+ */
+ public static EGFCoreProducerPlugin getDefault() {
+ return __plugin;
+ }
+
+ /**
+ * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ __plugin = this;
+ }
+
+ /**
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ __plugin = null;
+ super.stop(context);
+ }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.egf.core.producer/src/org/eclipse/egf/core/producer/InvocationException.java b/org.eclipse.egf.core.producer/src/org/eclipse/egf/core/producer/InvocationException.java
new file mode 100644
index 0000000..ee3d455
--- /dev/null
+++ b/org.eclipse.egf.core.producer/src/org/eclipse/egf/core/producer/InvocationException.java
@@ -0,0 +1,54 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.core.producer;
+
+
+/**
+ * @author Guiu
+ *
+ */
+public class InvocationException extends Exception {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -9002049838656655457L;
+
+ /**
+ * @param severity
+ * @param header
+ * @param message
+ * @param cause
+ */
+ public InvocationException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ /**
+ * @param message
+ */
+ public InvocationException(String message) {
+ this(message, null);
+ }
+
+ /**
+ * @param cause
+ */
+ public InvocationException(Throwable cause) {
+ this(null, cause);
+ }
+
+}
diff --git a/org.eclipse.egf.core.producer/src/org/eclipse/egf/core/producer/MissingExtensionException.java b/org.eclipse.egf.core.producer/src/org/eclipse/egf/core/producer/MissingExtensionException.java
new file mode 100644
index 0000000..20ae169
--- /dev/null
+++ b/org.eclipse.egf.core.producer/src/org/eclipse/egf/core/producer/MissingExtensionException.java
@@ -0,0 +1,29 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.producer;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class MissingExtensionException extends Exception {
+
+ static final long serialVersionUID = 8310777379305723688L;
+
+ public MissingExtensionException(String message) {
+ super(message);
+ }
+
+ public MissingExtensionException(String message, Throwable t) {
+ super(message, t);
+ }
+
+}
diff --git a/org.eclipse.egf.core.producer/src/org/eclipse/egf/core/producer/context/IProductionContext.java b/org.eclipse.egf.core.producer/src/org/eclipse/egf/core/producer/context/IProductionContext.java
new file mode 100644
index 0000000..d1a9b74
--- /dev/null
+++ b/org.eclipse.egf.core.producer/src/org/eclipse/egf/core/producer/context/IProductionContext.java
@@ -0,0 +1,56 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.producer.context;
+
+import java.util.Collection;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.egf.core.platform.pde.IPlatformExtensionPoint;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public interface IProductionContext<P extends Object, T extends Object> {
+
+ public String getName();
+
+ public P getElement();
+
+ public boolean isSetAtRuntime(Object key) throws InvocationException;
+
+ public IProductionContext<?, ?> getParent();
+
+ public Bundle getBundle(String id) throws InvocationException;
+
+ public Bundle getBundle(IProject project) throws InvocationException;
+
+ public Bundle getBundle(IPlatformExtensionPoint platformExtensionPoint) throws InvocationException;
+
+ public void clear();
+
+ public Class<?> getInputValueType(Object key) throws InvocationException;
+
+ public <R> R getInputValue(Object key, Class<R> clazz) throws InvocationException;
+
+ public Collection<T> getInputValueKeys() throws InvocationException;
+
+ public Class<?> getOutputValueType(Object key) throws InvocationException;
+
+ public <R> R getOutputValue(Object key, Class<R> clazz) throws InvocationException;
+
+ public Collection<T> getOutputValueKeys() throws InvocationException;
+
+ public void setOutputValue(Object key, Object value) throws InvocationException;
+
+}
diff --git a/org.eclipse.egf.core.producer/src/org/eclipse/egf/core/producer/context/ProductionContext.java b/org.eclipse.egf.core.producer/src/org/eclipse/egf/core/producer/context/ProductionContext.java
new file mode 100644
index 0000000..c8195d4
--- /dev/null
+++ b/org.eclipse.egf.core.producer/src/org/eclipse/egf/core/producer/context/ProductionContext.java
@@ -0,0 +1,310 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.core.producer.context;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.egf.common.helper.ClassHelper;
+import org.eclipse.egf.common.helper.EMFHelper;
+import org.eclipse.egf.core.helper.BundleSessionHelper;
+import org.eclipse.egf.core.platform.pde.IPlatformExtensionPoint;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.core.producer.l10n.CoreProducerMessages;
+import org.eclipse.egf.core.session.ProjectBundleSession;
+import org.eclipse.osgi.util.NLS;
+import org.osgi.framework.Bundle;
+
+/**
+ *
+ * @author Xavier Maysonnave
+ *
+ */
+public abstract class ProductionContext<P extends Object, T extends Object> implements IProductionContext<P, T> {
+
+ protected class Data {
+
+ private T _key;
+
+ private Class<?> _clazz;
+
+ private Object _value;
+
+ public Data(T key, Class<?> clazz, Object value) throws InvocationException {
+ if (key == null) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_null_key, getName()));
+ }
+ _key = key;
+ if (clazz == null) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_null_class, getName()));
+ }
+ _clazz = clazz;
+ // null value is a valid value
+ if (value != null && _clazz.isInstance(value) == false) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_wrong_type, new Object[] { _clazz.getName(), EMFHelper.getText(_key), value.getClass().getName(), getName() }));
+ }
+ _value = value;
+ }
+
+ public Class<?> getType() {
+ return _clazz;
+ }
+
+ public Object getValue() {
+ return _value;
+ }
+
+ public void setValue(Object value) throws InvocationException {
+ // null value is a valid value
+ if (value != null && _clazz.isInstance(value) == false) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_wrong_type, new Object[] { _clazz.getName(), EMFHelper.getText(_key), value.getClass().getName(), getName() }));
+ }
+ _value = value;
+ }
+
+ }
+
+ private String _name;
+
+ private ProjectBundleSession _projectBundleSession;
+
+ protected P _element;
+
+ protected IProductionContext<?, ?> _parent;
+
+ protected final Map<T, Data> _inputDatas = new HashMap<T, Data>();
+
+ protected final Map<T, Data> _outputDatas = new HashMap<T, Data>();
+
+ public ProductionContext(ProjectBundleSession projectBundleSession, P element, String name) {
+ Assert.isNotNull(projectBundleSession);
+ Assert.isNotNull(element);
+ Assert.isNotNull(name);
+ _projectBundleSession = projectBundleSession;
+ _element = element;
+ _name = name;
+ }
+
+ public ProductionContext(IProductionContext<?, ?> parent, ProjectBundleSession projectBundleSession, P element, String name) {
+ Assert.isNotNull(projectBundleSession);
+ Assert.isNotNull(element);
+ Assert.isNotNull(name);
+ _parent = parent;
+ _projectBundleSession = projectBundleSession;
+ _element = element;
+ _name = name;
+ }
+
+ public String getName() {
+ return _name;
+ }
+
+ public P getElement() {
+ return _element;
+ }
+
+ public IProductionContext<?, ?> getParent() {
+ return _parent;
+ }
+
+ public Bundle getBundle(String id) throws InvocationException {
+ try {
+ return _projectBundleSession.getBundle(id);
+ } catch (CoreException ce) {
+ throw new InvocationException(ce);
+ }
+ }
+
+ public Bundle getBundle(IProject project) throws InvocationException {
+ try {
+ return _projectBundleSession.getBundle(project);
+ } catch (CoreException ce) {
+ throw new InvocationException(ce);
+ }
+ }
+
+ public Bundle getBundle(IPlatformExtensionPoint platformExtensionPoint) throws InvocationException {
+ try {
+ return BundleSessionHelper.getBundle(_projectBundleSession, platformExtensionPoint);
+ } catch (CoreException ce) {
+ throw new InvocationException(ce);
+ }
+ }
+
+ public void clear() {
+ _inputDatas.clear();
+ _outputDatas.clear();
+ }
+
+ public boolean isSetAtRuntime(Object key) throws InvocationException {
+ // Usual Tests
+ if (key == null) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_null_key, getName()));
+ }
+ // Looking for Parent
+ if (getParent() != null) {
+ return getParent().isSetAtRuntime(key);
+ }
+ return false;
+ }
+
+ public void addInputData(T key, Class<?> clazz, Object object, boolean check) throws InvocationException {
+ if (_inputDatas.put(key, new Data(key, clazz, object)) != null) {
+ if (check) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_non_unique_key, EMFHelper.getText(key), getName()));
+ }
+ }
+ }
+
+ public void addOutputData(T key, Class<?> clazz, Object object, boolean check) throws InvocationException {
+ if (_outputDatas.put(key, new Data(key, clazz, object)) != null) {
+ if (check) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_non_unique_key, EMFHelper.getText(key), getName()));
+ }
+ }
+ }
+
+ public void setOutputValue(Object key, Object value) throws InvocationException {
+ // Usual Tests
+ if (key == null) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_null_key, getName()));
+ }
+ // Propagate Value to parent if necessary
+ if (getParent() != null) {
+ getParent().setOutputValue(key, value);
+ }
+ // Fetch available output data
+ Data outputData = _outputDatas.get(key);
+ if (outputData == null) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_unknown_key, EMFHelper.getText(key), getName()));
+ }
+ // null value is a valid value
+ if (value != null && (ClassHelper.asSubClass(value.getClass(), outputData.getType()) == false || outputData.getType().isInstance(value) == false)) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_wrong_type, new Object[] { outputData.getType().getName(), EMFHelper.getText(key), value.getClass().getName(), getName() }));
+ }
+ // Set output value
+ outputData.setValue(value);
+ // Set input value if it exists
+ Data inputData = _inputDatas.get(key);
+ if (inputData != null) {
+ inputData.setValue(value);
+ }
+ }
+
+ public Class<?> getInputValueType(Object key) throws InvocationException {
+ // Usual Tests
+ if (key == null) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_null_key, getName()));
+ }
+ // Looking for Parent Value Type if available
+ Class<?> valueType = null;
+ if (getParent() != null) {
+ valueType = getParent().getInputValueType(key);
+ }
+ // Looking for local Value Type if necessary
+ if (valueType == null) {
+ Data inputData = _inputDatas.get(key);
+ if (inputData != null) {
+ valueType = inputData.getType();
+ }
+ }
+ return valueType;
+ }
+
+ public <R> R getInputValue(Object key, Class<R> clazz) throws InvocationException {
+ // Usual Tests
+ if (key == null) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_null_key, getName()));
+ }
+ // Looking for Parent Value if available
+ R value = null;
+ if (getParent() != null) {
+ value = getParent().getInputValue(key, clazz);
+ }
+ // Looking for local value if necessary
+ if (value == null) {
+ Data inputData = _inputDatas.get(key);
+ if (inputData != null) {
+ value = getValue(key, clazz, inputData);
+ }
+ }
+ return value;
+ }
+
+ public Collection<T> getInputValueKeys() throws InvocationException {
+ return _inputDatas.keySet();
+ }
+
+ public Class<?> getOutputValueType(Object key) throws InvocationException {
+ // Usual Tests
+ if (key == null) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_null_key, getName()));
+ }
+ // Looking for Parent Value Type if available
+ Class<?> valueType = null;
+ if (getParent() != null) {
+ valueType = getParent().getOutputValueType(key);
+ }
+ // Looking for local Value Type if necessary
+ if (valueType == null) {
+ Data outputData = _outputDatas.get(key);
+ if (outputData != null) {
+ valueType = outputData.getType();
+ }
+ }
+ return valueType;
+ }
+
+ public <R> R getOutputValue(Object key, Class<R> clazz) throws InvocationException {
+ // Usual Tests
+ if (key == null) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_null_key, getName()));
+ }
+ // Looking for Parent Value if available
+ R value = null;
+ if (getParent() != null) {
+ value = getParent().getOutputValue(key, clazz);
+ }
+ // Looking for local value if necessary
+ if (value == null) {
+ Data outputData = _outputDatas.get(key);
+ if (outputData != null) {
+ value = getValue(key, clazz, outputData);
+ }
+ }
+ return value;
+ }
+
+ public Collection<T> getOutputValueKeys() throws InvocationException {
+ return _outputDatas.keySet();
+ }
+
+ protected <R> R getValue(Object key, Class<R> clazz, Data data) throws InvocationException {
+ if (data == null || data.getValue() == null) {
+ return null;
+ }
+ if (ClassHelper.asSubClass(data.getValue().getClass(), clazz) == false) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_wrong_type, new Object[] { data.getType().getName(), EMFHelper.getText(key), clazz.getName(), getName() }));
+ }
+ try {
+ return clazz.cast(data.getValue());
+ } catch (ClassCastException cce) {
+ throw new InvocationException(cce);
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.core.producer/src/org/eclipse/egf/core/producer/l10n/CoreProducerMessages.java b/org.eclipse.egf.core.producer/src/org/eclipse/egf/core/producer/l10n/CoreProducerMessages.java
new file mode 100644
index 0000000..b07259f
--- /dev/null
+++ b/org.eclipse.egf.core.producer/src/org/eclipse/egf/core/producer/l10n/CoreProducerMessages.java
@@ -0,0 +1,38 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.producer.l10n;
+
+import org.eclipse.osgi.util.NLS;
+
+public class CoreProducerMessages {
+
+ private static final String BUNDLE_NAME = "org.eclipse.egf.core.producer.l10n.messages"; //$NON-NLS-1$
+
+ private CoreProducerMessages() {
+ // Do not instantiate
+ }
+
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, CoreProducerMessages.class);
+ }
+
+ public static String ProductionContext_null_name;
+ public static String ProductionContext_null_key;
+ public static String ProductionContext_null_class;
+ public static String ProductionContext_emtpy_name;
+ public static String ProductionContext_wrong_type;
+ public static String ProductionContext_unknown_name;
+ public static String ProductionContext_unknown_key;
+ public static String ProductionContext_non_unique_name;
+ public static String ProductionContext_non_unique_key;
+
+}
diff --git a/org.eclipse.egf.core.producer/src/org/eclipse/egf/core/producer/l10n/messages.properties b/org.eclipse.egf.core.producer/src/org/eclipse/egf/core/producer/l10n/messages.properties
new file mode 100644
index 0000000..61b2a2c
--- /dev/null
+++ b/org.eclipse.egf.core.producer/src/org/eclipse/egf/core/producer/l10n/messages.properties
@@ -0,0 +1,21 @@
+##
+# Copyright (c) 2000, 2009 IBM Corporation and others.
+# 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
+#
+##
+
+ProductionContext_null_name= ''name'' should be not null in ''{0}''.
+ProductionContext_null_key= ''key'' should be not null in ''{0}''.
+
+ProductionContext_null_class= ''class'' should be not null in ''{0}''.
+ProductionContext_emtpy_name= ''name'' should have a non empty string in ''{0}''.
+ProductionContext_wrong_type= Expected Type ''{0}'' however ''{1}'' has the following type ''{2}'' in ''{3}''.
+
+ProductionContext_unknown_name= Unknown ''name'' ''{0}'' in ''{1}''.
+ProductionContext_unknown_key= Unknown ''key'' ''{0}'' in ''{1}''.
+
+ProductionContext_non_unique_name= Non unique ''name'' in ''{0}''.
+ProductionContext_non_unique_key= Non unique ''key'' in ''{0}''.
\ No newline at end of file
diff --git a/org.eclipse.egf.core.producer/src/org/eclipse/egf/core/producer/manager/IProducerManager.java b/org.eclipse.egf.core.producer/src/org/eclipse/egf/core/producer/manager/IProducerManager.java
new file mode 100644
index 0000000..50ab4a5
--- /dev/null
+++ b/org.eclipse.egf.core.producer/src/org/eclipse/egf/core/producer/manager/IProducerManager.java
@@ -0,0 +1,46 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.producer.manager;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.core.producer.context.IProductionContext;
+import org.eclipse.egf.core.session.ProjectBundleSession;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public interface IProducerManager<P extends Object, T extends Object> {
+
+ public P getElement();
+
+ public IProducerManager<?, ?> getParent();
+
+ public Diagnostic canInvoke() throws InvocationException;
+
+ public IProductionContext<P, T> getProductionContext() throws InvocationException;
+
+ public ProjectBundleSession getProjectBundleSession();
+
+ public Bundle getBundle() throws InvocationException;
+
+ public void initializeContext() throws InvocationException;
+
+ public Diagnostic invoke(IProgressMonitor monitor) throws InvocationException;
+
+ public int getSteps() throws InvocationException;
+
+ public void dispose() throws InvocationException;
+
+}
diff --git a/org.eclipse.egf.core.ui/.classpath b/org.eclipse.egf.core.ui/.classpath
new file mode 100644
index 0000000..4777598
--- /dev/null
+++ b/org.eclipse.egf.core.ui/.classpath
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
+ <accessrules>
+ <accessrule kind="accessible" pattern="org/eclipse/jdt/internal/ui/**"/>
+ <accessrule kind="accessible" pattern="org/eclipse/jdt/internal/corext/util/**"/>
+ <accessrule kind="accessible" pattern="org/eclipse/jdt/internal/core/search/*"/>
+ <accessrule kind="accessible" pattern="org/eclipse/ui/internal/ide/**"/>
+ </accessrules>
+ </classpathentry>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.egf.core.ui/.options b/org.eclipse.egf.core.ui/.options
new file mode 100644
index 0000000..e0c63fe
--- /dev/null
+++ b/org.eclipse.egf.core.ui/.options
@@ -0,0 +1,2 @@
+# Prints debug information
+org.eclipse.egf.core.ui/debug=true
diff --git a/org.eclipse.egf.core.ui/.project b/org.eclipse.egf.core.ui/.project
new file mode 100644
index 0000000..993f39e
--- /dev/null
+++ b/org.eclipse.egf.core.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.core.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.core.ui/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egf.core.ui/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..c1a23d6
--- /dev/null
+++ b/org.eclipse.egf.core.ui/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:49:54 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.egf.core.ui/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egf.core.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..f6d654a
--- /dev/null
+++ b/org.eclipse.egf.core.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Mon Mar 09 16:03:58 CET 2009
+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/org.eclipse.egf.core.ui/META-INF/MANIFEST.MF b/org.eclipse.egf.core.ui/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..9656106
--- /dev/null
+++ b/org.eclipse.egf.core.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,26 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.core.ui; singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.egf.core.ui.EGFCoreUIPlugin
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle:
+ org.eclipse.search,
+ org.eclipse.core.expressions,
+ org.eclipse.jdt.ui;visibility:=reexport,
+ org.eclipse.emf.ecore.xmi;visibility:=reexport,
+ org.eclipse.egf.common.ui;visibility:=reexport,
+ org.eclipse.egf.core;visibility:=reexport,
+ org.eclipse.egf.core.pde;visibility:=reexport
+Export-Package:
+ org.eclipse.egf.core.ui,
+ org.eclipse.egf.core.ui.contributor,
+ org.eclipse.egf.core.ui.diagnostic,
+ org.eclipse.egf.core.ui.dialogs,
+ org.eclipse.egf.core.ui.wizard,
+ org.eclipse.egf.core.ui.l10n
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.egf.core.ui/about.html b/org.eclipse.egf.core.ui/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/org.eclipse.egf.core.ui/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/org.eclipse.egf.core.ui/build.properties b/org.eclipse.egf.core.ui/build.properties
new file mode 100644
index 0000000..0410b2d
--- /dev/null
+++ b/org.eclipse.egf.core.ui/build.properties
@@ -0,0 +1,20 @@
+##
+# 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
+##
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ .options,\
+ icons/,\
+ about.html,\
+ plugin.xml,\
+ plugin.properties
+src.includes = about.html
diff --git a/org.eclipse.egf.core.ui/icons/full/obj16/Fcore.gif b/org.eclipse.egf.core.ui/icons/full/obj16/Fcore.gif
new file mode 100644
index 0000000..b276cac
--- /dev/null
+++ b/org.eclipse.egf.core.ui/icons/full/obj16/Fcore.gif
Binary files differ
diff --git a/org.eclipse.egf.core.ui/icons/full/ovr/Mandatory.gif b/org.eclipse.egf.core.ui/icons/full/ovr/Mandatory.gif
new file mode 100644
index 0000000..055d020
--- /dev/null
+++ b/org.eclipse.egf.core.ui/icons/full/ovr/Mandatory.gif
Binary files differ
diff --git a/org.eclipse.egf.core.ui/plugin.properties b/org.eclipse.egf.core.ui/plugin.properties
new file mode 100644
index 0000000..3af4476
--- /dev/null
+++ b/org.eclipse.egf.core.ui/plugin.properties
@@ -0,0 +1,35 @@
+##
+# 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 Core UI (Incubation)
+providerName= Eclipse Modeling Project
+
+egf.preferences.keyword.general= EGF
+egf.preferences.general= EGF
+egf.preferences.editors= Editors
+egf.preferences.model= Model
+
+egf.preferences.production= Production
+egf.editor.contributor= EGF Editor contributor
+
+egf.editor.menu.contributor= EGF Editor menu contributor
+egf.editor.listener.contributor= EGF Editor listener contributor
+editor.property.contributor=EGF Editor property editor's contributor
+
+EGFFcoreActionSet_label= EGF Fcore
+EGFFcoreActionSet_description= EGF Fcore Action Set
+
+openFcore.label= Open EGF Fcore&...
+openFcore.description= Opens an EGF Fcore
+
+ActionDefinition_openFcore_name = Open EGF Fcore
+ActionDefinition_openFcore_description= Open an EGF Fcore in the Workbench
+
diff --git a/org.eclipse.egf.core.ui/plugin.xml b/org.eclipse.egf.core.ui/plugin.xml
new file mode 100644
index 0000000..68f941c
--- /dev/null
+++ b/org.eclipse.egf.core.ui/plugin.xml
Binary files differ
diff --git a/org.eclipse.egf.core.ui/schema/editor.listener.contributor.exsd b/org.eclipse.egf.core.ui/schema/editor.listener.contributor.exsd
new file mode 100644
index 0000000..4fd8aa5
--- /dev/null
+++ b/org.eclipse.egf.core.ui/schema/editor.listener.contributor.exsd
@@ -0,0 +1,102 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.egf.core.ui" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.eclipse.egf.core.ui" id="editor.listener.contributor" name="Editor Listener Contributor"/>
+ </appInfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appInfo>
+ <meta.element />
+ </appInfo>
+ </annotation>
+ <complexType>
+ <sequence minOccurs="1" maxOccurs="unbounded">
+ <element ref="contribution"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="contribution">
+ <complexType>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java" basedOn="org.eclipse.egf.core.ui.contributor.ListenerContributor:"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiinfo"/>
+ </appInfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/org.eclipse.egf.core.ui/schema/editor.menu.contributor.exsd b/org.eclipse.egf.core.ui/schema/editor.menu.contributor.exsd
new file mode 100644
index 0000000..348a051
--- /dev/null
+++ b/org.eclipse.egf.core.ui/schema/editor.menu.contributor.exsd
@@ -0,0 +1,102 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.egf.core.ui" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.eclipse.egf.core.ui" id="editor.menu.contributor" name="Editor Menu Contributor"/>
+ </appInfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appInfo>
+ <meta.element />
+ </appInfo>
+ </annotation>
+ <complexType>
+ <sequence minOccurs="1" maxOccurs="unbounded">
+ <element ref="contribution"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="contribution">
+ <complexType>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java" basedOn="org.eclipse.egf.core.ui.contributor.MenuContributor:"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiinfo"/>
+ </appInfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/org.eclipse.egf.core.ui/schema/editor.property.contributor.exsd b/org.eclipse.egf.core.ui/schema/editor.property.contributor.exsd
new file mode 100644
index 0000000..a820219
--- /dev/null
+++ b/org.eclipse.egf.core.ui/schema/editor.property.contributor.exsd
@@ -0,0 +1,102 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.egf.core.ui" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.eclipse.egf.core.ui" id="editor.property.contributor" name="Editor Property Contributor"/>
+ </appInfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appInfo>
+ <meta.element />
+ </appInfo>
+ </annotation>
+ <complexType>
+ <sequence minOccurs="1" maxOccurs="unbounded">
+ <element ref="contribution"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="contribution">
+ <complexType>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.egf.core.ui.contributor.PropertyEditorContributor"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiinfo"/>
+ </appInfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/EGFCoreUIPlugin.java b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/EGFCoreUIPlugin.java
new file mode 100644
index 0000000..1d1cf9f
--- /dev/null
+++ b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/EGFCoreUIPlugin.java
@@ -0,0 +1,87 @@
+/**
+ * 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
+ */
+
+package org.eclipse.egf.core.ui;
+
+import org.eclipse.egf.common.ui.activator.EGFAbstractUIPlugin;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class EGFCoreUIPlugin extends EGFAbstractUIPlugin {
+
+ /**
+ * The shared instance
+ */
+ private static EGFCoreUIPlugin __plugin;
+
+ /**
+ *
+ * Returns the currently active window for this workbench (if any). Returns
+ * <code>null</code> if there is no active workbench window. Returns
+ * <code>null</code> if called from a non-UI thread.
+ *
+ * @return the active workbench window, or <code>null</code> if there is
+ * no active workbench window or if called from a non-UI thread
+ */
+ public static IWorkbenchWindow getActiveWorkbenchWindow() {
+ return getDefault().getWorkbench().getActiveWorkbenchWindow();
+ }
+
+ /**
+ * Returns the currently active shell for this workbench (if any).
+ *
+ * @return the active workbench shell.
+ */
+ public static Shell getActiveWorkbenchShell() {
+ IWorkbenchWindow window = getActiveWorkbenchWindow();
+ if (window == null) {
+ IWorkbenchWindow[] windows = getDefault().getWorkbench().getWorkbenchWindows();
+ if (windows.length > 0) {
+ return windows[0].getShell();
+ }
+ } else {
+ return window.getShell();
+ }
+ return null;
+ }
+
+ /**
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ __plugin = this;
+ }
+
+ /**
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ __plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static EGFCoreUIPlugin getDefault() {
+ return __plugin;
+ }
+
+}
diff --git a/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/ExceptionHandler.java b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/ExceptionHandler.java
new file mode 100644
index 0000000..b316293
--- /dev/null
+++ b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/ExceptionHandler.java
@@ -0,0 +1,179 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.egf.core.ui;
+
+import java.io.StringWriter;
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.egf.core.ui.l10n.CoreUIMessages;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * The default exception handler shows an error dialog when one of its handle
+ * methods
+ * is called. If the passed exception is a <code>CoreException</code> an error
+ * dialog
+ * pops up showing the exception's status information. For a
+ * <code>InvocationTargetException</code> a normal message dialog pops up
+ * showing the exception's message. Additionally the exception
+ * is written to the platform log.
+ */
+public class ExceptionHandler {
+
+ private static ExceptionHandler __exceptionHandler = new ExceptionHandler();
+
+ /**
+ * Logs the given exception using the platform's logging mechanism.
+ *
+ * @param message
+ * the message
+ * @param throwable
+ * the throwable to log
+ */
+ public static void log(Throwable throwable, String message) {
+ EGFCoreUIPlugin.getDefault().logError(message, throwable);
+ }
+
+ /**
+ * Handles the given <code>CoreException</code>. The workbench shell is used
+ * as a parent
+ * for the dialog window.
+ *
+ * @param ce
+ * the <code>CoreException</code> to be handled
+ * @param title
+ * the dialog window's window title
+ * @param message
+ * message to be displayed by the dialog window
+ */
+ public static void handle(CoreException ce, String title, String message) {
+ handle(ce, EGFCoreUIPlugin.getActiveWorkbenchShell(), title, message);
+ }
+
+ /**
+ * Handles the given <code>IStatus</code>. The workbench shell is used as a
+ * parent for the
+ * dialog window.
+ *
+ * @param status
+ * the <code>IStatus</code> to be handled
+ * @param title
+ * the dialog window's window title
+ * @param message
+ * message to be displayed by the dialog window
+ * @since 3.5
+ */
+ public static void handle(IStatus status, String title, String message) {
+ __exceptionHandler.perform(status, EGFCoreUIPlugin.getActiveWorkbenchShell(), title, message);
+ }
+
+ /**
+ * Handles the given <code>CoreException</code>.
+ *
+ * @param e
+ * the <code>CoreException</code> to be handled
+ * @param parent
+ * the dialog window's parent shell
+ * @param title
+ * the dialog window's window title
+ * @param message
+ * message to be displayed by the dialog window
+ */
+ public static void handle(CoreException ce, Shell parent, String title, String message) {
+ __exceptionHandler.perform(ce, parent, title, message);
+ }
+
+ /**
+ * Handles the given <code>InvocationTargetException</code>. The workbench
+ * shell is used
+ * as a parent for the dialog window.
+ *
+ * @param e
+ * the <code>InvocationTargetException</code> to be handled
+ * @param title
+ * the dialog window's window title
+ * @param message
+ * message to be displayed by the dialog window
+ */
+ public static void handle(InvocationTargetException ce, String title, String message) {
+ handle(ce, EGFCoreUIPlugin.getActiveWorkbenchShell(), title, message);
+ }
+
+ /**
+ * Handles the given <code>InvocationTargetException</code>.
+ *
+ * @param ite
+ * the <code>InvocationTargetException</code> to be handled
+ * @param parent
+ * the dialog window's parent shell
+ * @param title
+ * the dialog window's window title
+ * @param message
+ * message to be displayed by the dialog window
+ */
+ public static void handle(InvocationTargetException ite, Shell parent, String title, String message) {
+ __exceptionHandler.perform(ite, parent, title, message);
+ }
+
+ // ---- Hooks for subclasses to control exception handling
+ // ------------------------------------
+
+ protected void perform(IStatus status, Shell shell, String title, String message) {
+ EGFCoreUIPlugin.getDefault().log(status);
+ ErrorDialog.openError(shell, title, message, status);
+ }
+
+ protected void perform(CoreException e, Shell shell, String title, String message) {
+ EGFCoreUIPlugin.getDefault().logError(e);
+ IStatus status = e.getStatus();
+ if (status != null) {
+ ErrorDialog.openError(shell, title, message, status);
+ } else {
+ displayMessageDialog(e.getMessage(), shell, title, message);
+ }
+ }
+
+ protected void perform(InvocationTargetException e, Shell shell, String title, String message) {
+ Throwable target = e.getTargetException();
+ if (target instanceof CoreException) {
+ perform((CoreException) target, shell, title, message);
+ } else {
+ EGFCoreUIPlugin.getDefault().logError(e);
+ if (e.getMessage() != null && e.getMessage().length() > 0) {
+ displayMessageDialog(e.getMessage(), shell, title, message);
+ } else {
+ displayMessageDialog(target.getMessage(), shell, title, message);
+ }
+ }
+ }
+
+ // ---- Helper methods
+ // -----------------------------------------------------------------------
+
+ private void displayMessageDialog(String exceptionMessage, Shell shell, String title, String message) {
+ StringWriter msg = new StringWriter();
+ if (message != null) {
+ msg.write(message);
+ msg.write("\n\n"); //$NON-NLS-1$
+ }
+ if (exceptionMessage == null || exceptionMessage.length() == 0) {
+ msg.write(CoreUIMessages.ExceptionDialog_seeErrorLogMessage);
+ } else {
+ msg.write(exceptionMessage);
+ }
+ MessageDialog.openError(shell, title, msg.toString());
+ }
+
+}
diff --git a/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/IEGFCoreUIImages.java b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/IEGFCoreUIImages.java
new file mode 100644
index 0000000..3cfdbe1
--- /dev/null
+++ b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/IEGFCoreUIImages.java
@@ -0,0 +1,29 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.ui;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public interface IEGFCoreUIImages {
+
+ /**
+ * Identifies a Fcore resource.
+ */
+ public final String IMG_FACTORY_COMPONENT = "obj16/Fcore.gif"; //$NON-NLS-1$
+
+ /**
+ * Identifies a mandatory field.
+ */
+ public final String IMG_MANDATORY = "ovr/Mandatory.gif"; //$NON-NLS-1$
+
+}
diff --git a/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/actions/OpenFcoreAction.java b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/actions/OpenFcoreAction.java
new file mode 100644
index 0000000..f61ab9a
--- /dev/null
+++ b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/actions/OpenFcoreAction.java
@@ -0,0 +1,126 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.ui.actions;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.egf.common.ui.helper.EditorHelper;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.core.fcore.IPlatformFcore;
+import org.eclipse.egf.core.ui.dialogs.FcoreSelectionDialog;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+
+/**
+ * Standard action for opening an editor on EGF Fcores.
+ * <p>
+ * This class may be instantiated; it is not intended to be subclassed.
+ * </p>
+ */
+public class OpenFcoreAction extends Action implements IWorkbenchWindowActionDelegate {
+
+ private Shell _shell;
+
+ /**
+ * Creates a new action for opening an EGF Fcore
+ */
+ public OpenFcoreAction() {
+ setEnabled(true);
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose()
+ */
+ public void dispose() {
+ _shell = null;
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
+ */
+ public void init(IWorkbenchWindow window) {
+ _shell = window.getShell();
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+ */
+ public void run(IAction action) {
+ run();
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
+ */
+ public void selectionChanged(IAction action, ISelection selection) {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ @Override
+ public void run() {
+ FcoreSelectionDialog dialog = new FcoreSelectionDialog(_shell, true);
+ int result = dialog.open();
+ if (result != IDialogConstants.OK_ID) {
+ return;
+ }
+ Object[] objects = dialog.getResult();
+ if (objects == null) {
+ return;
+ }
+ // Process selected Fcores
+ EditingDomain editingDomain = TransactionalEditingDomain.Registry.INSTANCE.getEditingDomain(EGFCorePlugin.EDITING_DOMAIN_ID);
+ Map<Resource, List<EObject>> resources = new HashMap<Resource, List<EObject>>();
+ for (Object object : objects) {
+ if (object instanceof IPlatformFcore == false) {
+ continue;
+ }
+ IPlatformFcore fcore = (IPlatformFcore) object;
+ Resource resource = editingDomain.getResourceSet().getResource(fcore.getURI(), true);
+ if (resource == null) {
+ continue;
+ }
+ List<EObject> eObjects = resources.get(resource);
+ if (eObjects == null) {
+ eObjects = new ArrayList<EObject>();
+ resources.put(resource, eObjects);
+ }
+ if (resource.getContents().isEmpty() == false) {
+ eObjects.add(resource.getContents().get(0));
+ }
+ }
+ // Open and select
+ EditorHelper.openEditorsAndSelect(resources);
+ }
+}
diff --git a/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/contributor/DefaultPropertyEditorContributor.java b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/contributor/DefaultPropertyEditorContributor.java
new file mode 100644
index 0000000..9f54d20
--- /dev/null
+++ b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/contributor/DefaultPropertyEditorContributor.java
@@ -0,0 +1,52 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.core.ui.contributor;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public abstract class DefaultPropertyEditorContributor implements PropertyEditorContributor {
+
+ protected boolean checkFeature(Object object, IItemPropertyDescriptor descriptor, EStructuralFeature expectedFeature) {
+ Object feature = descriptor.getFeature(object);
+ return feature.equals(expectedFeature);
+ }
+
+ protected ILabelProvider getLabelProvider(Object object, IItemPropertyDescriptor descriptor) {
+ final IItemLabelProvider itemLabelProvider = descriptor.getLabelProvider(object);
+ return new LabelProvider() {
+ @Override
+ public String getText(Object innerObject) {
+ return itemLabelProvider.getText(innerObject);
+ }
+
+ @Override
+ public Image getImage(Object innerObject) {
+ return ExtendedImageRegistry.getInstance().getImage(itemLabelProvider.getImage(innerObject));
+ }
+ };
+ }
+
+}
diff --git a/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/contributor/ListenerContributor.java b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/contributor/ListenerContributor.java
new file mode 100644
index 0000000..a37f9c5
--- /dev/null
+++ b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/contributor/ListenerContributor.java
@@ -0,0 +1,31 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.core.ui.contributor;
+
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.ui.IWorkbenchPage;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public abstract class ListenerContributor {
+
+ public static final String EXTENSION_ID = "org.eclipse.egf.core.ui.editor.listener.contributor"; //$NON-NLS-1$
+
+ public abstract void addListeners(IWorkbenchPage page, StructuredViewer viewer);
+
+}
diff --git a/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/contributor/MenuContributor.java b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/contributor/MenuContributor.java
new file mode 100644
index 0000000..9d5de88
--- /dev/null
+++ b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/contributor/MenuContributor.java
@@ -0,0 +1,50 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.core.ui.contributor;
+
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.part.EditorActionBarContributor;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public abstract class MenuContributor {
+
+ public static final String EXTENSION_ID = "org.eclipse.egf.core.ui.editor.menu.contributor"; //$NON-NLS-1$
+ protected ISelection selection;
+ protected IWorkbenchPage page;
+ protected EditorActionBarContributor parent;
+ protected IEditorPart activeEditorPart;
+
+ public void setParentContributor(EditorActionBarContributor parent) {
+ this.parent = parent;
+ }
+
+ public abstract void menuAboutToShow(IMenuManager menuManager);
+
+ public void setActiveEditor(IEditorPart part) {
+ activeEditorPart = part;
+ }
+
+ public void selectionChanged(SelectionChangedEvent event) {
+ selection = event.getSelection();
+ }
+}
diff --git a/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/contributor/PropertyEditorContributor.java b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/contributor/PropertyEditorContributor.java
new file mode 100644
index 0000000..920eafa
--- /dev/null
+++ b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/contributor/PropertyEditorContributor.java
@@ -0,0 +1,72 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.core.ui.contributor;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.egf.core.ui.EGFCoreUIPlugin;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public interface PropertyEditorContributor {
+
+ public static final String EXTENSION_ID = "org.eclipse.egf.core.ui.editor.property.contributor"; //$NON-NLS-1$
+
+ boolean canApply(Object object, IItemPropertyDescriptor descriptor);
+
+ CellEditor createPropertyEditor(final Composite composite, Object object, IItemPropertyDescriptor descriptor);
+
+ Helper HELPER = new Helper();
+
+ class Helper {
+
+ private final List<PropertyEditorContributor> contributors = new ArrayList<PropertyEditorContributor>();
+
+ // TODO returns only the first one ?
+ public PropertyEditorContributor selectPropertyEditor(Object object, IItemPropertyDescriptor descriptor) {
+ if (!descriptor.canSetProperty(object))
+ return null;
+
+ for (PropertyEditorContributor contributor : contributors) {
+ if (contributor.canApply(object, descriptor))
+ return contributor;
+ }
+ return null;
+ }
+
+ private Helper() {
+ super();
+ for (IConfigurationElement element : Platform.getExtensionRegistry().getConfigurationElementsFor(EXTENSION_ID)) {
+ try {
+ PropertyEditorContributor contributor = (PropertyEditorContributor) element.createExecutableExtension("class"); //$NON-NLS-1$
+ contributors.add(contributor);
+ } catch (CoreException e) {
+ EGFCoreUIPlugin.getDefault().logError(e);
+ }
+ }
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/diagnostic/EGFDiagnosticComposite.java b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/diagnostic/EGFDiagnosticComposite.java
new file mode 100644
index 0000000..6e358b2
--- /dev/null
+++ b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/diagnostic/EGFDiagnosticComposite.java
@@ -0,0 +1,345 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2007 IBM Corporation and others.
+ * 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:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id: DiagnosticComposite.java,v 1.4 2007/06/14 18:32:41 emerks Exp $
+ */
+package org.eclipse.egf.core.ui.diagnostic;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.emf.common.ui.CommonUIPlugin;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * @since 2.3
+ */
+public class EGFDiagnosticComposite extends Composite {
+
+ public static class TextProvider {
+ /**
+ * Returns the text associated to be displayed in the detail text
+ * when a a diagnostic is selected in the tree.
+ *
+ * @param diagnostic
+ * @return a not null String
+ */
+ public String getDetail(Diagnostic diagnostic) {
+ Throwable throwable = diagnostic.getException();
+ if (throwable != null) {
+ StringWriter in = new StringWriter();
+ PrintWriter ps = new PrintWriter(in);
+ throwable.printStackTrace(ps);
+ return in.getBuffer().toString();
+ }
+
+ for (Object datum : diagnostic.getData()) {
+ if (datum instanceof StringBuilder) {
+ return datum.toString();
+ }
+ }
+
+ return ""; //$NON-NLS-1$
+ }
+ }
+
+ public static int ERROR_WARNING_MASK = Diagnostic.ERROR | Diagnostic.WARNING;
+
+ public static boolean severityMatches(Diagnostic diagnostic, int mask) {
+ return (diagnostic.getSeverity() & mask) != 0;
+ }
+
+ protected Diagnostic diagnostic;
+ protected TextProvider textProvider;
+
+ protected boolean showRootDiagnostic = false;
+ protected TreeViewer diagnosticTreeViewer;
+ protected Text detailText;
+
+ protected int severityMask = 0;
+
+ /**
+ * @param parent
+ * @param style
+ */
+ public EGFDiagnosticComposite(Composite parent, int style) {
+ super(parent, style);
+ GridLayout layout = new GridLayout();
+ int spacing = 3;
+ layout.marginTop = -5;
+ layout.marginBottom = -5;
+ layout.marginLeft = -5;
+ layout.marginRight = -5;
+ layout.horizontalSpacing = spacing;
+ layout.verticalSpacing = spacing;
+ setLayout(layout);
+ }
+
+ @Override
+ public void dispose() {
+ diagnostic = null;
+ diagnosticTreeViewer = null;
+ detailText = null;
+
+ super.dispose();
+ }
+
+ public void initialize(Diagnostic innerDiagnostic) {
+ if (!isInitialized()) {
+ setDiagnostic(innerDiagnostic);
+ createControls(this);
+ }
+ }
+
+ public boolean isInitialized() {
+ return diagnosticTreeViewer != null && detailText != null;
+ }
+
+ public void setDiagnostic(Diagnostic diagnostic) {
+ this.diagnostic = diagnostic;
+ if (isInitialized()) {
+ detailText.setText(""); //$NON-NLS-1$
+ if (getDiagnostic() != null) {
+ diagnosticTreeViewer.setInput(getDiagnostic());
+ } else {
+ diagnosticTreeViewer.getTree().removeAll();
+ }
+ }
+ }
+
+ public Diagnostic getDiagnostic() {
+ return diagnostic;
+ }
+
+ public void setTextProvider(TextProvider textProvider) {
+ this.textProvider = textProvider;
+ if (detailText != null) {
+ String detail = getTextProvider().getDetail(getFirstDiagnosticInSelection());
+ setDetailText(detail);
+ }
+ }
+
+ public TextProvider getTextProvider() {
+ if (textProvider == null) {
+ textProvider = new TextProvider();
+ }
+ return textProvider;
+ }
+
+ public void setShowRootDiagnostic(boolean showRootDiagnostic) {
+ this.showRootDiagnostic = showRootDiagnostic;
+ }
+
+ public boolean isShowRootDiagnostic() {
+ return showRootDiagnostic;
+ }
+
+ public void setSeverityMask(int severityMask) {
+ this.severityMask = severityMask;
+ }
+
+ public int getSeverityMask() {
+ return severityMask;
+ }
+
+ protected void createControls(Composite parent) {
+ SashForm sashForm = new SashForm(parent, SWT.VERTICAL);
+ sashForm.setLayoutData(new GridData(GridData.FILL_BOTH | GridData.GRAB_VERTICAL));
+
+ diagnosticTreeViewer = new TreeViewer(sashForm, SWT.BORDER | SWT.MULTI);
+ diagnosticTreeViewer.getTree().setLayoutData(new GridData(GridData.FILL_BOTH | GridData.GRAB_VERTICAL | GridData.VERTICAL_ALIGN_BEGINNING));
+
+ detailText = new Text(sashForm, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.READ_ONLY);
+ GridData gridData = new GridData(GridData.FILL_BOTH);
+ gridData.heightHint = 20;
+ gridData.grabExcessVerticalSpace = true;
+ detailText.setLayoutData(gridData);
+ detailText.setBackground(detailText.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
+
+ sashForm.setWeights(new int[] { 70, 30 });
+ sashForm.setMaximizedControl(diagnosticTreeViewer.getTree());
+
+ diagnosticTreeViewer.setContentProvider(createContentProvider());
+ diagnosticTreeViewer.setLabelProvider(createLabelProvider());
+
+ diagnosticTreeViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ public void selectionChanged(SelectionChangedEvent event) {
+ if (!event.getSelection().isEmpty()) {
+ Diagnostic innerDiagnostic = (Diagnostic) ((IStructuredSelection) event.getSelection()).getFirstElement();
+ diagnosticSelected(innerDiagnostic);
+ } else {
+ detailText.setText(""); //$NON-NLS-1$
+ }
+ }
+ });
+
+ if (getDiagnostic() != null) {
+ diagnosticTreeViewer.setInput(getDiagnostic());
+ }
+ diagnosticTreeViewer.expandToLevel(2);
+ }
+
+ public void setDetailText(String text) {
+ if (text == null) {
+ text = ""; //$NON-NLS-1$
+ }
+
+ if (detailText != null && !text.equals(detailText.getText())) {
+ detailText.setText(text);
+ }
+ }
+
+ public String getDetailText() {
+ return detailText == null ? "" : detailText.getText(); //$NON-NLS-1$
+ }
+
+ public Diagnostic getFirstDiagnosticInSelection() {
+ return diagnosticTreeViewer == null ? null : (Diagnostic) ((IStructuredSelection) diagnosticTreeViewer.getSelection()).getFirstElement();
+ }
+
+ public IStructuredSelection getSelection() {
+ return diagnosticTreeViewer == null ? null : (IStructuredSelection) diagnosticTreeViewer.getSelection();
+ }
+
+ protected void diagnosticSelected(Diagnostic selection) {
+ String detail = getTextProvider().getDetail(selection).trim();
+
+ SashForm sashForm = (SashForm) detailText.getParent();
+ setDetailText(detail);
+ if (detail.length() == 0) {
+ sashForm.setMaximizedControl(diagnosticTreeViewer.getTree());
+ } else {
+ sashForm.setMaximizedControl(null);
+ if (diagnosticTreeViewer != null) {
+ diagnosticTreeViewer.getTree().showSelection();
+ }
+ }
+ }
+
+ protected ITreeContentProvider createContentProvider() {
+ return new ITreeContentProvider() {
+ private boolean isRootElement = isShowRootDiagnostic();
+ private Map<Diagnostic, Diagnostic[]> parentToChildrenMap = new HashMap<Diagnostic, Diagnostic[]>();
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ parentToChildrenMap.clear();
+ }
+
+ public void dispose() {
+ parentToChildrenMap.clear();
+ }
+
+ public Object getParent(Object element) {
+ return null;
+ }
+
+ public Object[] getElements(Object inputElement) {
+ if (isRootElement) {
+ isRootElement = false;
+ Diagnostic innerDiagnostic = (Diagnostic) inputElement;
+ if (severityMatches(innerDiagnostic, severityMask)) {
+ if (innerDiagnostic.getMessage() != null || innerDiagnostic.getException() != null) {
+ return new Object[] { innerDiagnostic };
+ }
+ } else {
+ return new Object[0];
+ }
+ }
+ return getChildren(inputElement);
+ }
+
+ public boolean hasChildren(Object element) {
+ return getChildren(element).length > 0;
+ }
+
+ public Object[] getChildren(Object parentElement) {
+ Diagnostic[] children = parentToChildrenMap.get(parentElement);
+ if (children == null) {
+ Diagnostic innerDiagnostic = (Diagnostic) parentElement;
+ List<Diagnostic> childList = new ArrayList<Diagnostic>(innerDiagnostic.getChildren().size());
+ for (Diagnostic child : innerDiagnostic.getChildren()) {
+ if (severityMatches(child, severityMask)) {
+ childList.add(child);
+ }
+ }
+ children = childList.toArray(new Diagnostic[childList.size()]);
+ parentToChildrenMap.put(innerDiagnostic, children);
+ }
+ return children;
+ }
+ };
+ }
+
+ protected ILabelProvider createLabelProvider() {
+ return new LabelProvider() {
+ @Override
+ public String getText(Object element) {
+ Diagnostic innerDiagnostic = (Diagnostic) element;
+ String message = innerDiagnostic.getMessage();
+ if (message == null) {
+ switch (innerDiagnostic.getSeverity()) {
+ case Diagnostic.ERROR:
+ message = CommonUIPlugin.getPlugin().getString("_UI_DiagnosticError_label"); //$NON-NLS-1$
+ break;
+ case Diagnostic.WARNING:
+ message = CommonUIPlugin.getPlugin().getString("_UI_DiagnosticWarning_label"); //$NON-NLS-1$
+ break;
+ default:
+ message = CommonUIPlugin.getPlugin().getString("_UI_Diagnostic_label"); //$NON-NLS-1$
+ break;
+ }
+ }
+ return message;
+ }
+
+ @Override
+ public Image getImage(Object element) {
+ Diagnostic innerDiagnostic = (Diagnostic) element;
+ ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages();
+ switch (innerDiagnostic.getSeverity()) {
+ case Diagnostic.ERROR:
+ return sharedImages.getImage(ISharedImages.IMG_OBJS_ERROR_TSK);
+ case Diagnostic.CANCEL:
+ case Diagnostic.WARNING:
+ return sharedImages.getImage(ISharedImages.IMG_OBJS_WARN_TSK);
+ case Diagnostic.OK:
+ case Diagnostic.INFO:
+ return sharedImages.getImage(ISharedImages.IMG_OBJS_INFO_TSK);
+ }
+ return null;
+ }
+ };
+ }
+}
diff --git a/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/diagnostic/EGFDiagnosticDialog.java b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/diagnostic/EGFDiagnosticDialog.java
new file mode 100644
index 0000000..bd31d78
--- /dev/null
+++ b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/diagnostic/EGFDiagnosticDialog.java
@@ -0,0 +1,380 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2007 IBM Corporation and others.
+ * 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:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id: DiagnosticDialog.java,v 1.4 2007/06/14 18:32:40 emerks Exp $
+ */
+package org.eclipse.egf.core.ui.diagnostic;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.ui.DiagnosticComposite;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.UniqueEList;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IconAndMessageDialog;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * A dialog to display one <code>Diagnostic</code> object to the user. If a diagnostic
+ * contains additional detailed information then a Details button is automatically
+ * supplied, which shows or hides an details viewer when pressed by the user.
+ *
+ * @see Diagnostic
+ * @since 2.3
+ */
+public class EGFDiagnosticDialog extends IconAndMessageDialog {
+
+ /**
+ * Returns whether the given diagnostic object should be displayed.
+ *
+ * @param diagnostic
+ * a diagnostic object
+ * @param mask
+ * a mask as per <code>DiagnosticComposite.severityMatches(Diagnostic, int)</code>
+ * @return <code>true</code> if the given diagnostic should be displayed, and
+ * <code>false</code> otherwise
+ * @see DiagnosticComposite#severityMatches(Diagnostic, int)
+ */
+ protected static boolean shouldDisplay(Diagnostic diagnostic, int mask) {
+ Collection<Diagnostic> children = diagnostic.getChildren();
+ if (children.isEmpty()) {
+ return DiagnosticComposite.severityMatches(diagnostic, mask);
+ }
+
+ for (Diagnostic child : children) {
+ if (DiagnosticComposite.severityMatches(child, mask)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * The Details button.
+ */
+ private Button detailsButton;
+
+ /**
+ * The title of the dialog.
+ */
+ private String title;
+
+ /**
+ * The diagnostic composite that displays the diagnostic details.
+ */
+ private EGFDiagnosticComposite diagnosticComposite;
+
+ private EGFDiagnosticComposite.TextProvider textProvider;
+
+ /**
+ * Filter mask for determining which diagnostic items to display.
+ */
+ private int severityMask = 0xFFFF;
+
+ /**
+ * The main diagnostic object.
+ */
+ private Diagnostic diagnostic;
+
+ private boolean shouldIncludeTopLevelDiagnostic = false;
+
+ private List<Diagnostic> selection;
+
+ /**
+ * Creates an diagnostic dialog. Note that the dialog will have no visual
+ * representation (no widgets) until it is told to open.
+ * <p>
+ * Normally one should use <code>open</code> to create and open one
+ * of these. This constructor is useful only if the diagnostic object being
+ * displayed contains child items <it>and </it> you need to specify a mask
+ * which will be used to filter the displaying of these children. The diagnostic
+ * dialog will only be displayed if there is at least one child diagnostic
+ * matching the mask.
+ * </p>
+ *
+ * @param parentShell
+ * the shell under which to create this dialog
+ * @param dialogTitle
+ * the title to use for this dialog, or <code>null</code> to
+ * indicate that the default title should be used
+ * @param message
+ * the message to show in this dialog, or <code>null</code> to
+ * indicate that the diagnostic's message should be shown as the
+ * primary message
+ * @param diagnostic
+ * the diagnostic to show to the user
+ * @param severityMask
+ * the mask to use to filter the displaying of child items, as
+ * per <code>DiagnosticComposite.severityMatches(Diagnostic, int)</code>
+ * @see DiagnosticComposite#severityMatches(Diagnostic, int)
+ */
+ public EGFDiagnosticDialog(Shell parentShell, String dialogTitle, String message, Diagnostic diagnostic, int severityMask) {
+ super(parentShell);
+ this.title = dialogTitle == null ? JFaceResources.getString("Problem_Occurred") : dialogTitle; //$NON-NLS-1$
+ this.message = message == null ? diagnostic.getMessage() : JFaceResources.format("Reason", new Object[] { message, diagnostic.getMessage() }); //$NON-NLS-1$
+ this.diagnostic = diagnostic;
+ this.severityMask = severityMask;
+ setShellStyle(getShellStyle() | SWT.RESIZE);
+ }
+
+ public void setTextProvider(EGFDiagnosticComposite.TextProvider textProvider) {
+ this.textProvider = textProvider;
+ if (diagnosticComposite != null) {
+ diagnosticComposite.setTextProvider(getTextProvider());
+ }
+ }
+
+ public EGFDiagnosticComposite.TextProvider getTextProvider() {
+ return textProvider;
+ }
+
+ public List<Diagnostic> getSelection() {
+ return selection;
+ }
+
+ /**
+ * Handles the pressing of the OK
+ * or Details button in this dialog. If the OK button was pressed then close
+ * this dialog. If the Details button was pressed then toggle the displaying
+ * of the diagnostic details area. Note that the Details button will only be
+ * visible if the diagnostic being displayed specifies child details.
+ */
+ @Override
+ protected void buttonPressed(int id) {
+ if (id == IDialogConstants.DETAILS_ID) {
+ // was the details button pressed?
+ toggleDetailsArea();
+ } else {
+ super.buttonPressed(id);
+ }
+ }
+
+ @Override
+ protected void configureShell(Shell shell) {
+ super.configureShell(shell);
+ shell.setText(title);
+ }
+
+ @Override
+ protected void createButtonsForButtonBar(Composite parent) {
+ // create OK and Details buttons
+ createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
+ createDetailsButton(parent);
+ }
+
+ /**
+ * Create the details button if it should be included.
+ *
+ * @param parent
+ * the parent composite
+ */
+ protected void createDetailsButton(Composite parent) {
+ if (shouldShowDetailsButton()) {
+ detailsButton = createButton(parent, IDialogConstants.DETAILS_ID, IDialogConstants.SHOW_DETAILS_LABEL, false);
+ }
+ }
+
+ /**
+ * This implementation of the <code>Dialog</code> framework method creates
+ * and lays out a composite. Subclasses that require a different dialog
+ * area may either override this method, or call the <code>super</code>
+ * implementation and add controls to the created composite.
+ */
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ createMessageArea(parent);
+ // create a composite with standard margins and spacing
+ Composite composite = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
+ layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
+ layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
+ layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
+ layout.numColumns = 2;
+ composite.setLayout(layout);
+ GridData childData = new GridData(GridData.FILL_HORIZONTAL);
+ childData.horizontalSpan = 2;
+ composite.setLayoutData(childData);
+ composite.setFont(parent.getFont());
+ return composite;
+ }
+
+ @Override
+ protected void createDialogAndButtonArea(Composite parent) {
+ super.createDialogAndButtonArea(parent);
+ if (this.dialogArea instanceof Composite) {
+ // Create a label if there are no children to force a smaller layout
+ Composite dialogComposite = (Composite) dialogArea;
+ if (dialogComposite.getChildren().length == 0) {
+ new Label(dialogComposite, SWT.NULL);
+ }
+ }
+ }
+
+ @Override
+ protected Image getImage() {
+ if (diagnostic != null) {
+ if (diagnostic.getSeverity() == Diagnostic.WARNING) {
+ return getWarningImage();
+ }
+ if (diagnostic.getSeverity() == Diagnostic.INFO) {
+ return getInfoImage();
+ }
+ }
+ // If it was not a warning or an diagnostic then return the diagnostic image
+ return getErrorImage();
+ }
+
+ /**
+ * Create the diagnostic composite.
+ *
+ * @param parent
+ * the parent composite
+ * @return the diagnostic composite
+ */
+ @SuppressWarnings("hiding")
+ protected EGFDiagnosticComposite createDiagnosticComposite(Composite parent) {
+ EGFDiagnosticComposite diagnosticComposite = new EGFDiagnosticComposite(parent, SWT.NONE);
+ GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_VERTICAL);
+ data.horizontalSpan = 2;
+ data.heightHint = 200;
+ diagnosticComposite.setLayoutData(data);
+ if (getTextProvider() != null) {
+ diagnosticComposite.setTextProvider(getTextProvider());
+ }
+ diagnosticComposite.initialize(null);
+ populate(diagnosticComposite, diagnostic, shouldIncludeTopLevelDiagnostic);
+ return diagnosticComposite;
+ }
+
+ /**
+ * Extends <code>Window.open()</code>. Opens an diagnostic dialog to display
+ * the diagnostic. If you specified a mask to filter the displaying of these
+ * children, the diagnostic dialog will only be displayed if there is at least
+ * one child diagnostic matching the mask.
+ */
+ @Override
+ public int open() {
+ if (shouldDisplay(diagnostic, severityMask)) {
+ return super.open();
+ }
+ setReturnCode(OK);
+ return OK;
+ }
+
+ /**
+ * Populates the diagnostic composite with the given diagnostic.
+ *
+ * @param diagnosticComposite
+ * the diagnostic composite to populate
+ * @param diagnostic
+ * the diagnostic being displayed
+ * @param includeDiagnostic
+ * whether to include the specified diagnostic in the display or
+ * just its children
+ */
+ @SuppressWarnings("hiding")
+ private void populate(EGFDiagnosticComposite diagnosticComposite, Diagnostic diagnostic, boolean includeDiagnostic) {
+ if (DiagnosticComposite.severityMatches(diagnostic, severityMask)) {
+ diagnosticComposite.setShowRootDiagnostic(includeDiagnostic);
+ diagnosticComposite.setSeverityMask(severityMask);
+ diagnosticComposite.setDiagnostic(diagnostic);
+ }
+ }
+
+ /**
+ * Toggles the unfolding of the details area. This is triggered by the user
+ * pressing the details button.
+ */
+ private void toggleDetailsArea() {
+ Point windowSize = getShell().getSize();
+ if (diagnosticComposite != null) {
+ // Closing the detail area
+ diagnosticComposite.dispose();
+ diagnosticComposite = null;
+ detailsButton.setText(IDialogConstants.SHOW_DETAILS_LABEL);
+ } else {
+ // Opening the detail area
+ diagnosticComposite = createDiagnosticComposite((Composite) getContents());
+ detailsButton.setText(IDialogConstants.HIDE_DETAILS_LABEL);
+ }
+ Point newSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);
+ getShell().setSize(new Point(windowSize.x, newSize.y));
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.window.Window#close()
+ */
+ @Override
+ public boolean close() {
+ if (diagnosticComposite != null && diagnosticComposite.getSelection().isEmpty() == false) {
+ selection = new UniqueEList<Diagnostic>();
+ for (Object object : diagnosticComposite.getSelection().toList()) {
+ if (object instanceof Diagnostic) {
+ selection.add((Diagnostic) object);
+ }
+ }
+ }
+ diagnostic = null;
+ diagnosticComposite = null;
+ return super.close();
+ }
+
+ /**
+ * Return whether the Details button should be included.
+ * This method is invoked once when the dialog is built.
+ * By default, the Details button is only included if
+ * the diagnostic used when creating the dialog was a multi-diagnostic
+ * or if the diagnostic contains an exception.
+ * Subclasses may override.
+ *
+ * @return whether the Details button should be included
+ */
+ protected boolean shouldShowDetailsButton() {
+ return !diagnostic.getChildren().isEmpty() || diagnostic.getException() != null;
+ }
+
+ /**
+ * Set the diagnostic displayed by this diagnostic dialog to the given diagnostic.
+ * This only affects the diagnostic displayed by the diagnostic composite.
+ * The message, image and title should be updated by the subclass,
+ * if desired.
+ *
+ * @param diagnostic
+ * the diagnostic to be displayed in the diagnostic composite
+ */
+ protected final void setDiagnostic(Diagnostic diagnostic) {
+ if (this.diagnostic != diagnostic) {
+ this.diagnostic = diagnostic;
+ }
+ shouldIncludeTopLevelDiagnostic = true;
+ if (diagnosticComposite != null && !diagnosticComposite.isDisposed()) {
+ populate(diagnosticComposite, diagnostic, shouldIncludeTopLevelDiagnostic);
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/diagnostic/EGFValidator.java b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/diagnostic/EGFValidator.java
new file mode 100644
index 0000000..3d8e149
--- /dev/null
+++ b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/diagnostic/EGFValidator.java
@@ -0,0 +1,238 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2004-2008 IBM Corporation and others.
+ * 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:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id: ValidateAction.java,v 1.28 2009/04/30 14:24:52 emerks Exp $
+ */
+package org.eclipse.egf.core.ui.diagnostic;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.common.helper.EMFHelper;
+import org.eclipse.egf.common.ui.helper.EditorHelper;
+import org.eclipse.egf.core.preferences.IEGFModelConstants;
+import org.eclipse.egf.core.session.ProjectBundleSession;
+import org.eclipse.egf.core.ui.EGFCoreUIPlugin;
+import org.eclipse.egf.core.ui.l10n.CoreUIMessages;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.DiagnosticChain;
+import org.eclipse.emf.common.util.UniqueEList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.Diagnostician;
+import org.eclipse.emf.edit.ui.EMFEditUIPlugin;
+import org.eclipse.emf.edit.ui.action.ValidateAction.EclipseResourcesUtil;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.window.Window;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation;
+
+public class EGFValidator {
+
+ private static EclipseResourcesUtil __eclipseResourcesUtil = new EclipseResourcesUtil();
+
+ private Map<Resource, UniqueEList<Diagnostic>> _diagnostics;
+
+ private List<? extends EObject> _eObjects = new ArrayList<EObject>();
+
+ public EGFValidator(List<? extends EObject> eObjects) {
+ _eObjects = eObjects;
+ }
+
+ public Diagnostic validate() {
+
+ // Nothing to do
+ if (_eObjects == null || _eObjects.size() == 0) {
+ return Diagnostic.OK_INSTANCE;
+ }
+ _diagnostics = new HashMap<Resource, UniqueEList<Diagnostic>>();
+ final Diagnostic[] diagnostic = new Diagnostic[1];
+ final Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+
+ IRunnableWithProgress runnableWithProgress = new IRunnableWithProgress() {
+ public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ try {
+ // Validate
+ diagnostic[0] = validate(monitor);
+ shell.getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ if (monitor.isCanceled()) {
+ return;
+ }
+ // Reset Markers
+ for (Resource resource : _diagnostics.keySet()) {
+ __eclipseResourcesUtil.deleteMarkers(resource);
+ }
+ // Handle Diagnostic if applicable
+ int severity = diagnostic[0].getSeverity();
+ if (severity == Diagnostic.ERROR || severity == Diagnostic.WARNING) {
+ handleDiagnostic(EMFEditUIPlugin.INSTANCE.getString("_UI_ValidationProblems_title"), EMFEditUIPlugin.INSTANCE.getString("_UI_ValidationProblems_message"), diagnostic[0]); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ // Put Markers
+ for (Resource resource : _diagnostics.keySet()) {
+ for (Diagnostic childDiagnostic : _diagnostics.get(resource)) {
+ __eclipseResourcesUtil.createMarkers(resource, childDiagnostic);
+ }
+ }
+ }
+ });
+ } finally {
+ monitor.done();
+ }
+ }
+ };
+
+ runnableWithProgress = new WorkspaceModifyDelegatingOperation(runnableWithProgress);
+
+ try {
+ // This runs the operation, and shows progress.
+ // (It appears to be a bad thing to fork this onto another thread.)
+ //
+ new ProgressMonitorDialog(shell).run(true, true, runnableWithProgress);
+ } catch (Exception exception) {
+ EMFEditUIPlugin.INSTANCE.log(exception);
+ }
+
+ return diagnostic[0];
+
+ }
+
+ /**
+ * This simply execute the command.
+ */
+ protected Diagnostic validate(IProgressMonitor monitor) {
+ int selectionSize = _eObjects.size();
+ int count = selectionSize;
+ for (EObject eObject : _eObjects) {
+ for (Iterator<EObject> i = eObject.eAllContents(); i.hasNext();) {
+ // initialize _diagnostics with existing resource, it will be used to reset markers
+ EObject innerEObject = i.next();
+ if (innerEObject.eResource() != null) {
+ if (_diagnostics.get(innerEObject.eResource()) == null) {
+ _diagnostics.put(innerEObject.eResource(), new UniqueEList<Diagnostic>());
+ }
+ }
+ ++count;
+ }
+ }
+ monitor.beginTask("", count); //$NON-NLS-1$
+ Diagnostician diagnostician = createDiagnostician(monitor);
+ String message = NLS.bind(CoreUIMessages._UI_DiagnosisOfNObjects_message, Integer.toString(selectionSize));
+ if (_eObjects.size() == 1) {
+ message = NLS.bind(CoreUIMessages._UI_DiagnosisOfNObject_message, EMFHelper.getText(_eObjects.get(0)));
+ }
+ BasicDiagnostic diagnostic = new BasicDiagnostic(EGFCoreUIPlugin.getDefault().getPluginID(), 0, message, _eObjects.toArray());
+ Map<Object, Object> context = diagnostician.createDefaultContext();
+ // Preferences
+ IPreferenceStore store = EGFCoreUIPlugin.getDefault().getPreferenceStore();
+ if (store.getBoolean(IEGFModelConstants.VALIDATE_TYPES)) {
+ context.put(IEGFModelConstants.VALIDATE_TYPES, Boolean.TRUE);
+ } else {
+ context.put(IEGFModelConstants.VALIDATE_TYPES, Boolean.FALSE);
+ }
+ // Bundle Session
+ ProjectBundleSession session = new ProjectBundleSession(EGFCoreUIPlugin.getDefault().getBundle().getBundleContext());
+ context.put(ProjectBundleSession.PROJECT_BUNDLE_SESSION, session);
+ // Validation
+ for (EObject eObject : _eObjects) {
+ monitor.setTaskName(EMFEditUIPlugin.INSTANCE.getString("_UI_Validating_message", new Object[] { diagnostician.getObjectLabel(eObject) })); //$NON-NLS-1$
+ diagnostician.validate(eObject, diagnostic, context);
+ }
+ // Dispose Session
+ try {
+ session.dispose();
+ } catch (CoreException ce) {
+ EGFCoreUIPlugin.getDefault().logError(ce);
+ }
+ // Populate diagnostics per Resource
+ for (Diagnostic childDiagnostic : diagnostic.getChildren()) {
+ List<?> data = childDiagnostic.getData();
+ if (data.isEmpty() == false && data.get(0) instanceof EObject && ((EObject) data.get(0)).eResource() != null) {
+ EObject eObject = (EObject) data.get(0);
+ UniqueEList<Diagnostic> diagnostics = _diagnostics.get(eObject.eResource());
+ // it shouldn't be null at this stage as we have already initialized the map
+ if (diagnostics == null) {
+ diagnostics = new UniqueEList<Diagnostic>();
+ _diagnostics.put(eObject.eResource(), diagnostics);
+ }
+ diagnostics.add(childDiagnostic);
+ }
+ }
+ return diagnostic;
+ }
+
+ protected Diagnostician createDiagnostician(final IProgressMonitor progressMonitor) {
+ return new Diagnostician() {
+ @Override
+ public String getObjectLabel(EObject eObject) {
+ return EMFHelper.getText(eObject);
+ }
+
+ @Override
+ public boolean validate(EClass eClass, EObject eObject, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ progressMonitor.worked(1);
+ return super.validate(eClass, eObject, diagnostics, context);
+ }
+ };
+ }
+
+ public static void handleDiagnostic(String title, String message, Diagnostic diagnostic) {
+ // Everything is fine
+ if (diagnostic.getSeverity() == Diagnostic.OK) {
+ return;
+ }
+ // Display Dialog
+ int result = 0;
+ EGFDiagnosticDialog dialog = new EGFDiagnosticDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), title, message, diagnostic, Diagnostic.OK | Diagnostic.INFO | Diagnostic.WARNING | Diagnostic.ERROR);
+ result = dialog.open();
+ // Dialog has been canceled
+ if (result != Window.OK) {
+ return;
+ }
+ // Nothing to process
+ if (dialog.getSelection() == null || dialog.getSelection().isEmpty()) {
+ return;
+ }
+ // Select and reveal
+ Map<Resource, List<EObject>> resources = new HashMap<Resource, List<EObject>>();
+ // Process selected Diagnostics
+ for (Diagnostic innerDiagnostic : dialog.getSelection()) {
+ List<?> data = innerDiagnostic.getData();
+ if (data.isEmpty() == false && data.get(0) instanceof EObject && ((EObject) data.get(0)).eResource() != null) {
+ EObject eObject = (EObject) data.get(0);
+ List<EObject> eObjects = resources.get(eObject.eResource());
+ if (eObjects == null) {
+ eObjects = new UniqueEList<EObject>();
+ resources.put(eObject.eResource(), eObjects);
+ }
+ eObjects.add(eObject);
+ }
+ }
+ // Open and select
+ EditorHelper.openEditorsAndSelect(resources);
+ }
+
+}
diff --git a/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/dialogs/AbstractCheckboxSelectionDialog.java b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/dialogs/AbstractCheckboxSelectionDialog.java
new file mode 100644
index 0000000..d10ab19
--- /dev/null
+++ b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/dialogs/AbstractCheckboxSelectionDialog.java
@@ -0,0 +1,181 @@
+/**
+ * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ */
+package org.eclipse.egf.core.ui.dialogs;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.egf.core.ui.internal.SWTFactory;
+import org.eclipse.egf.core.ui.l10n.CoreUIMessages;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.CheckStateChangedEvent;
+import org.eclipse.jface.viewers.CheckboxTableViewer;
+import org.eclipse.jface.viewers.ICheckStateListener;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Table;
+
+/**
+ * This class provides selection dialog using a check box table viewer.
+ *
+ * @since 3.4
+ */
+public abstract class AbstractCheckboxSelectionDialog extends AbstractSelectionDialog {
+
+ /**
+ * Whether to add Select All / De-select All buttons to the custom footer controls.
+ */
+ private boolean fShowSelectButtons = false;
+
+ /**
+ * Constructor
+ *
+ * @param parentShell
+ */
+ public AbstractCheckboxSelectionDialog(Shell parentShell) {
+ super(parentShell);
+ setShellStyle(getShellStyle() | SWT.RESIZE);
+ }
+
+ /**
+ * Returns the viewer cast to the correct instance. Possibly <code>null</code> if
+ * the viewer has not been created yet.
+ *
+ * @return the viewer cast to CheckboxTableViewer
+ */
+ protected CheckboxTableViewer getCheckBoxTableViewer() {
+ return (CheckboxTableViewer) fViewer;
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.egf.core.ui.dialogs.AbstractSelectionDialog#initializeControls()
+ */
+ @Override
+ protected void initializeControls() {
+ List<?> selectedElements = getInitialElementSelections();
+ if (selectedElements != null && !selectedElements.isEmpty()) {
+ getCheckBoxTableViewer().setCheckedElements(selectedElements.toArray());
+ getCheckBoxTableViewer().setSelection(StructuredSelection.EMPTY);
+ }
+ super.initializeControls();
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.egf.core.ui.dialogs.AbstractSelectionDialog#createViewer
+ * (org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected StructuredViewer createViewer(Composite parent) {
+ // by default return a checkbox table viewer
+ Table table = new Table(parent, SWT.BORDER | SWT.SINGLE | SWT.CHECK);
+ table.setLayoutData(new GridData(GridData.FILL_BOTH));
+ return new CheckboxTableViewer(table);
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.egf.core.ui.dialogs.AbstractSelectionDialog#addViewerListeners
+ * (org.eclipse.jface.viewers.StructuredViewer)
+ */
+ @Override
+ protected void addViewerListeners(StructuredViewer viewer) {
+ getCheckBoxTableViewer().addCheckStateListener(new DefaultCheckboxListener());
+ }
+
+ /**
+ * A checkbox state listener that ensures that exactly one element is checked
+ * and enables the OK button when this is the case.
+ *
+ */
+ private class DefaultCheckboxListener implements ICheckStateListener {
+ public void checkStateChanged(CheckStateChangedEvent event) {
+ getButton(IDialogConstants.OK_ID).setEnabled(isValid());
+ }
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.egf.core.ui.dialogs.AbstractSelectionDialog#isValid()
+ */
+ @Override
+ protected boolean isValid() {
+ return getCheckBoxTableViewer().getCheckedElements().length > 0;
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+ */
+ @Override
+ protected void okPressed() {
+ Object[] elements = getCheckBoxTableViewer().getCheckedElements();
+ setResult(Arrays.asList(elements));
+ super.okPressed();
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.egf.core.ui.dialogs.AbstractSelectionDialog#
+ * addCustomFooterControls(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected void addCustomFooterControls(Composite parent) {
+ if (fShowSelectButtons) {
+ Composite comp = SWTFactory.createComposite(parent, 2, 1, GridData.FILL_HORIZONTAL);
+ GridData gd = (GridData) comp.getLayoutData();
+ gd.horizontalAlignment = SWT.END;
+ Button button = SWTFactory.createPushButton(comp, CoreUIMessages.AbstractCheckboxSelectionDialog_Select, null);
+ button.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ getCheckBoxTableViewer().setAllChecked(true);
+ getButton(IDialogConstants.OK_ID).setEnabled(isValid());
+ }
+ });
+ button = SWTFactory.createPushButton(comp, CoreUIMessages.AbstractCheckboxSelectionDialog_Deselect, null);
+ button.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ getCheckBoxTableViewer().setAllChecked(false);
+ getButton(IDialogConstants.OK_ID).setEnabled(isValid());
+ }
+ });
+ }
+ }
+
+ /**
+ * If this setting is set to true before the dialog is opened, a Select All and
+ * a De-select All button will be added to the custom footer controls. The default
+ * setting is false.
+ *
+ * @param setting
+ * whether to show the select all and de-select all buttons
+ */
+ protected void setShowSelectAllButtons(boolean setting) {
+ fShowSelectButtons = setting;
+ }
+
+}
diff --git a/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/dialogs/AbstractSelectionDialog.java b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/dialogs/AbstractSelectionDialog.java
new file mode 100644
index 0000000..bd77887
--- /dev/null
+++ b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/dialogs/AbstractSelectionDialog.java
@@ -0,0 +1,263 @@
+/**
+ * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ */
+package org.eclipse.egf.core.ui.dialogs;
+
+import java.util.List;
+
+import org.eclipse.egf.core.ui.EGFCoreUIPlugin;
+import org.eclipse.egf.core.ui.internal.SWTFactory;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.IContentProvider;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.SelectionDialog;
+
+/**
+ * This class provides the framework for a general selection dialog class.
+ *
+ * @see AbstractDebugListSelectionDialog
+ * @see AbstractDebugCheckboxSelectionDialog
+ *
+ * @since 3.3
+ */
+public abstract class AbstractSelectionDialog extends SelectionDialog {
+
+ protected StructuredViewer fViewer = null;
+
+ /**
+ * Constructor
+ *
+ * @param parentShell
+ */
+ public AbstractSelectionDialog(Shell parentShell) {
+ super(parentShell);
+ }
+
+ /**
+ * returns the dialog settings area id
+ *
+ * @return the id of the dialog settings area
+ */
+ protected abstract String getDialogSettingsId();
+
+ /**
+ * Returns the object to use as input for the viewer
+ *
+ * @return the object to use as input for the viewer
+ */
+ protected abstract Object getViewerInput();
+
+ /**
+ * Create and return a viewer to use in this dialog.
+ *
+ * @param parent
+ * the composite the viewer should be created in
+ * @return the viewer to use in the dialog
+ */
+ protected abstract StructuredViewer createViewer(Composite parent);
+
+ /**
+ * Returns if the dialog and/or current selection is/are valid.
+ * This method is polled when selection changes are made to update the enablement
+ * of the OK button by default
+ *
+ * @return true if the dialog is in a valid state, false otherwise
+ *
+ * @since 3.4
+ */
+ protected abstract boolean isValid();
+
+ /**
+ * Returns the content provider for the viewer
+ *
+ * @return the content provider for the viewer
+ */
+ protected IContentProvider getContentProvider() {
+ // by default return a simple array content provider
+ return new ArrayContentProvider();
+ }
+
+ /**
+ * Returns the label provider used by the viewer
+ *
+ * @return the label provider used in the viewer
+ */
+ protected abstract ILabelProvider getLabelProvider();
+
+ /**
+ * Returns the help context id for this dialog
+ *
+ * @return the help context id for this dialog
+ */
+ protected String getHelpContextId() {
+ return null;
+ }
+
+ /**
+ * This method allows listeners to be added to the viewer after it
+ * is created.
+ */
+ /**
+ * This method allows listeners to be added to the viewer. Called
+ * after the viewer has been created and its input set.
+ *
+ * @param viewer
+ * the viewer returned by createViewer()
+ */
+ protected void addViewerListeners(StructuredViewer viewer) {
+ // do nothing by default
+ }
+
+ /**
+ * This method allows custom controls to be added before the viewer
+ *
+ * @param parent
+ * the parent composite to add these custom controls to
+ */
+ protected void addCustomHeaderControls(Composite parent) {
+ // do nothing by default
+ }
+
+ /**
+ * This method allows custom controls to be added after the viewer
+ *
+ * @param parent
+ * the parent composite to add these controls to
+ */
+ protected void addCustomFooterControls(Composite parent) {
+ // do nothing by default
+ }
+
+ /**
+ * This method allows the newly created controls to be initialized.
+ * This method is called only once all controls have been created from the
+ * <code>createContents</code> method.
+ *
+ * By default this method initializes the OK button control.
+ */
+ protected void initializeControls() {
+ getButton(IDialogConstants.OK_ID).setEnabled(isValid());
+ }
+
+ /**
+ * Returns the viewer used to display information in this dialog.
+ * Can be <code>null</code> if the viewer has not been created.
+ *
+ * @return viewer used in this dialog
+ */
+ protected Viewer getViewer() {
+ return fViewer;
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.dialogs.Dialog#createContents(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected Control createContents(Composite parent) {
+ Composite comp = (Composite) super.createContents(parent);
+ initializeControls();
+ return comp;
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ initializeDialogUnits(parent);
+ Composite comp = (Composite) super.createDialogArea(parent);
+ addCustomHeaderControls(comp);
+ String label = getMessage();
+ if (label != null && label.trim().length() != 0) {
+ SWTFactory.createWrapLabel(comp, label, 1);
+ }
+ label = getViewerLabel();
+ if (label != null && label.trim().length() != 0) {
+ SWTFactory.createLabel(comp, label, 1);
+ }
+ fViewer = createViewer(comp);
+ fViewer.setLabelProvider(getLabelProvider());
+ fViewer.setContentProvider(getContentProvider());
+ fViewer.setInput(getViewerInput());
+ List<?> selectedElements = getInitialElementSelections();
+ if (selectedElements != null && !selectedElements.isEmpty()) {
+ fViewer.setSelection(new StructuredSelection(selectedElements));
+ }
+ addViewerListeners(fViewer);
+ addCustomFooterControls(comp);
+ Dialog.applyDialogFont(comp);
+ String help = getHelpContextId();
+ if (help != null) {
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(comp, help);
+ }
+ return comp;
+ }
+
+ /**
+ * This method returns the label describing what to do with the viewer. Typically this label
+ * will include the key accelerator to get to the viewer via the keyboard
+ *
+ * @return the label for the viewer
+ */
+ abstract protected String getViewerLabel();
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.dialogs.SelectionDialog#getDialogBoundsSettings()
+ */
+ @Override
+ protected IDialogSettings getDialogBoundsSettings() {
+ IDialogSettings settings = EGFCoreUIPlugin.getDefault().getDialogSettings();
+ IDialogSettings section = settings.getSection(getDialogSettingsId());
+ if (section == null) {
+ section = settings.addNewSection(getDialogSettingsId());
+ }
+ return section;
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.dialogs.Dialog#getInitialSize()
+ */
+ @Override
+ protected Point getInitialSize() {
+ IDialogSettings settings = getDialogBoundsSettings();
+ if (settings != null) {
+ try {
+ int width = settings.getInt("DIALOG_WIDTH"); //$NON-NLS-1$
+ int height = settings.getInt("DIALOG_HEIGHT"); //$NON-NLS-1$
+ if (width > 0 & height > 0) {
+ return new Point(width, height);
+ }
+ } catch (NumberFormatException nfe) {
+ return new Point(350, 350);
+ }
+ }
+ return new Point(350, 350);
+ }
+
+}
diff --git a/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/dialogs/FcoreSelectionDialog.java b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/dialogs/FcoreSelectionDialog.java
new file mode 100644
index 0000000..426f427
--- /dev/null
+++ b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/dialogs/FcoreSelectionDialog.java
@@ -0,0 +1,270 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.ui.dialogs;
+
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.core.fcore.IPlatformFcore;
+import org.eclipse.egf.core.ui.EGFCoreUIPlugin;
+import org.eclipse.egf.core.ui.IEGFCoreUIImages;
+import org.eclipse.egf.core.ui.l10n.CoreUIMessages;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.dialogs.FilteredItemsSelectionDialog;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class FcoreSelectionDialog extends FilteredItemsSelectionDialog {
+
+ private static final String DIALOG_SETTINGS = "org.eclipse.egf.core.ui.dialogs.FcoreSelectionDialog"; //$NON-NLS-1$
+
+ /**
+ * <code>FcoreSelectionHistory</code> provides behavior specific to
+ * fcores - storing and restoring <code>IPlatformFcore</code>s state
+ * to/from XML (memento).
+ */
+ private class FcoreSelectionHistory extends SelectionHistory {
+
+ private static final String TAG_URI = "path"; //$NON-NLS-1$
+
+ private IPlatformFcore _previous;
+
+ public FcoreSelectionHistory() {
+ super();
+ }
+
+ @Override
+ protected Object restoreItemFromMemento(IMemento memento) {
+ // Get the IPlatformFcore URI
+ String tag = memento.getString(TAG_URI);
+ if (tag == null) {
+ return null;
+ }
+ URI uri = URI.createURI(tag);
+ // TODO: We should have an index to improve such control
+ for (IPlatformFcore fcore : EGFCorePlugin.getPlatformFcores()) {
+ if (fcore.getURI().equals(uri)) {
+ _previous = fcore;
+ return fcore;
+ }
+ }
+ return null;
+ }
+
+ @Override
+ protected void storeItemToMemento(Object item, IMemento element) {
+ if (getReturnCode() == OK) {
+ Object[] items = getHistoryItems();
+ for (int i = 0; i < items.length; i++) {
+ IPlatformFcore fcore = (IPlatformFcore) items[i];
+ element.putString(TAG_URI, fcore.getURI().toString());
+ }
+ } else if (_previous != null) {
+ element.putString(TAG_URI, _previous.getURI().toString());
+ }
+ }
+
+ }
+
+ private class FcoreSearchItemsFilter extends ItemsFilter {
+
+ @Override
+ public boolean matchItem(Object item) {
+ if (item instanceof IPlatformFcore == false) {
+ return false;
+ }
+ return (matches(((IPlatformFcore) item).getName()));
+ }
+
+ @Override
+ public boolean isConsistentItem(Object item) {
+ if (item instanceof IPlatformFcore) {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean isSubFilter(ItemsFilter filter) {
+ if (super.isSubFilter(filter) == false) {
+ return false;
+ }
+ if (filter instanceof FcoreSearchItemsFilter) {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean equalsFilter(ItemsFilter filter) {
+ if (super.equalsFilter(filter) == false) {
+ return false;
+ }
+ if (filter instanceof FcoreSearchItemsFilter) {
+ return true;
+ }
+ return false;
+ }
+
+ }
+
+ private class FcoreSearchComparator implements Comparator<IPlatformFcore> {
+ public int compare(IPlatformFcore fc1, IPlatformFcore fc2) {
+ if (fc1.getName() == null) {
+ return -1;
+ }
+ if (fc2.getName() == null) {
+ return 1;
+ }
+ return fc1.getName().compareTo(fc2.getName());
+ }
+ }
+
+ private IPlatformFcore[] _fcores;
+
+ private ILabelProvider _labelProvider = new LabelProvider() {
+ @Override
+ public Image getImage(Object element) {
+ return EGFCoreUIPlugin.getDefault().getImage(IEGFCoreUIImages.IMG_FACTORY_COMPONENT);
+ }
+
+ @Override
+ public String getText(Object element) {
+ if (element instanceof IPlatformFcore == false) {
+ return super.getText(element);
+ }
+ return URI.decode(((IPlatformFcore) element).getURI().toString());
+ }
+ };
+
+ private ILabelProvider _detailsLabelProvider = new LabelProvider() {
+ @Override
+ public Image getImage(Object element) {
+ return EGFCoreUIPlugin.getDefault().getImage(IEGFCoreUIImages.IMG_FACTORY_COMPONENT);
+ }
+
+ @Override
+ public String getText(Object element) {
+ if (element instanceof IPlatformFcore == false) {
+ return super.getText(element);
+ }
+ StringBuffer buffer = new StringBuffer();
+ IPlatformFcore fc = (IPlatformFcore) element;
+ if (fc.getPlatformBundle().isTarget()) {
+ buffer.append(" [Target]"); //$NON-NLS-1$
+ } else {
+ buffer.append(" [Workspace]"); //$NON-NLS-1$
+ }
+ buffer.append(" ["); //$NON-NLS-1$
+ buffer.append(fc.getPlatformBundle().getBundleLocation());
+ buffer.append("]"); //$NON-NLS-1$
+ return buffer.toString();
+ }
+ };
+
+ public FcoreSelectionDialog(Shell parentShell, boolean multipleSelection) {
+ this(parentShell, getElements(), multipleSelection);
+ }
+
+ public FcoreSelectionDialog(Shell parentShell, IPlatformFcore[] factoryComponents, boolean multipleSelection) {
+ super(parentShell, multipleSelection);
+ _fcores = factoryComponents;
+ setTitle(CoreUIMessages._UI_FcoreSelection_label);
+ setMessage(CoreUIMessages._UI_SelectRegisteredFcore);
+ setListLabelProvider(_labelProvider);
+ setDetailsLabelProvider(_detailsLabelProvider);
+ setSeparatorLabel(CoreUIMessages._UI_FilteredItemsSelectionDialog_platformSeparatorLabel);
+ setSelectionHistory(new FcoreSelectionHistory());
+ }
+
+ private static IPlatformFcore[] getElements() {
+ return EGFCorePlugin.getPlatformFcores();
+ }
+
+ @Override
+ public Object[] getResult() {
+ Object[] result = super.getResult();
+ if (result == null) {
+ return null;
+ }
+ List<IPlatformFcore> resultToReturn = new ArrayList<IPlatformFcore>();
+ for (int i = 0; i < result.length; i++) {
+ if (result[i] instanceof IPlatformFcore) {
+ resultToReturn.add(((IPlatformFcore) result[i]));
+ }
+ }
+ return resultToReturn.toArray();
+ }
+
+ @Override
+ protected Control createExtendedContentArea(Composite parent) {
+ return null;
+ }
+
+ @Override
+ protected ItemsFilter createFilter() {
+ return new FcoreSearchItemsFilter();
+ }
+
+ @Override
+ protected void fillContentProvider(AbstractContentProvider contentProvider, ItemsFilter itemsFilter, IProgressMonitor progressMonitor) throws CoreException {
+ for (int i = 0; i < _fcores.length; i++) {
+ contentProvider.add(_fcores[i], itemsFilter);
+ progressMonitor.worked(1);
+ }
+ progressMonitor.done();
+ }
+
+ @Override
+ protected IDialogSettings getDialogSettings() {
+ IDialogSettings settings = EGFCoreUIPlugin.getDefault().getDialogSettings().getSection(DIALOG_SETTINGS);
+ if (settings == null) {
+ settings = EGFCoreUIPlugin.getDefault().getDialogSettings().addNewSection(DIALOG_SETTINGS);
+ }
+ return settings;
+ }
+
+ @Override
+ public String getElementName(Object item) {
+ if (item instanceof IPlatformFcore) {
+ IPlatformFcore fc = (IPlatformFcore) item;
+ return fc.getURI().toString();
+ }
+ return null;
+ }
+
+ @Override
+ protected Comparator<IPlatformFcore> getItemsComparator() {
+ return new FcoreSearchComparator();
+ }
+
+ @Override
+ protected IStatus validateItem(Object item) {
+ return new Status(IStatus.OK, EGFCoreUIPlugin.getDefault().getBundle().getSymbolicName(), 0, "", null); //$NON-NLS-1$
+ }
+
+}
diff --git a/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/dialogs/TypeInfoFilter.java b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/dialogs/TypeInfoFilter.java
new file mode 100644
index 0000000..c7b5224
--- /dev/null
+++ b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/dialogs/TypeInfoFilter.java
@@ -0,0 +1,283 @@
+/**
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ */
+package org.eclipse.egf.core.ui.dialogs;
+
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.search.SearchPattern;
+import org.eclipse.jdt.internal.ui.util.StringMatcher;
+import org.eclipse.jdt.ui.dialogs.ITypeInfoFilterExtension;
+
+public class TypeInfoFilter {
+
+ public static boolean startsWithIgnoreCase(String text, String prefix) {
+ int textLength = text.length();
+ int prefixLength = prefix.length();
+ if (textLength < prefixLength)
+ return false;
+ for (int i = prefixLength - 1; i >= 0; i--) {
+ if (Character.toLowerCase(prefix.charAt(i)) != Character.toLowerCase(text.charAt(i)))
+ return false;
+ }
+ return true;
+ }
+
+ public static boolean isCamelCasePattern(String pattern) {
+ return SearchPattern.validateMatchRule(pattern, SearchPattern.R_CAMELCASE_MATCH) == SearchPattern.R_CAMELCASE_MATCH;
+ }
+
+ private static class PatternMatcher {
+
+ private String fPattern;
+
+ private int fMatchKind;
+
+ private StringMatcher fStringMatcher;
+
+ private static final char END_SYMBOL = '<';
+
+ private static final char ANY_STRING = '*';
+
+ private static final char BLANK = ' ';
+
+ public PatternMatcher(String pattern) {
+ this(pattern, SearchPattern.R_EXACT_MATCH | SearchPattern.R_PREFIX_MATCH | SearchPattern.R_PATTERN_MATCH | SearchPattern.R_CAMELCASE_MATCH | SearchPattern.R_CAMELCASE_SAME_PART_COUNT_MATCH);
+ }
+
+ private PatternMatcher(String pattern, int allowedModes) {
+ initializePatternAndMatchKind(pattern);
+ fMatchKind = fMatchKind & allowedModes;
+ if (fMatchKind == SearchPattern.R_PATTERN_MATCH) {
+ fStringMatcher = new StringMatcher(fPattern, true, false);
+ }
+ }
+
+ public String getPattern() {
+ return fPattern;
+ }
+
+ public int getMatchKind() {
+ return fMatchKind;
+ }
+
+ public boolean matches(String text) {
+ switch (fMatchKind) {
+ case SearchPattern.R_PATTERN_MATCH:
+ return fStringMatcher.match(text);
+ case SearchPattern.R_EXACT_MATCH:
+ return fPattern.equalsIgnoreCase(text);
+ case SearchPattern.R_CAMELCASE_SAME_PART_COUNT_MATCH:
+ return SearchPattern.camelCaseMatch(fPattern, text, true);
+ case SearchPattern.R_CAMELCASE_MATCH:
+ if (SearchPattern.camelCaseMatch(fPattern, text)) {
+ return true;
+ }
+ // fall back to prefix match if camel case failed (bug 137244)
+ return startsWithIgnoreCase(text, fPattern);
+ default:
+ return startsWithIgnoreCase(text, fPattern);
+ }
+ }
+
+ private void initializePatternAndMatchKind(String pattern) {
+ int length = pattern.length();
+ if (length == 0) {
+ fMatchKind = SearchPattern.R_EXACT_MATCH;
+ fPattern = pattern;
+ return;
+ }
+ char last = pattern.charAt(length - 1);
+
+ if (pattern.indexOf('*') != -1 || pattern.indexOf('?') != -1) {
+ fMatchKind = SearchPattern.R_PATTERN_MATCH;
+ switch (last) {
+ case END_SYMBOL:
+ case BLANK:
+ fPattern = pattern.substring(0, length - 1);
+ break;
+ case ANY_STRING:
+ fPattern = pattern;
+ break;
+ default:
+ fPattern = pattern + ANY_STRING;
+ }
+ return;
+ }
+
+ if (last == END_SYMBOL || last == BLANK) {
+ fPattern = pattern.substring(0, length - 1);
+ if (SearchPattern.validateMatchRule(fPattern, SearchPattern.R_CAMELCASE_SAME_PART_COUNT_MATCH) == SearchPattern.R_CAMELCASE_SAME_PART_COUNT_MATCH) {
+ fMatchKind = SearchPattern.R_CAMELCASE_SAME_PART_COUNT_MATCH;
+ } else {
+ fMatchKind = SearchPattern.R_EXACT_MATCH;
+ }
+ return;
+ }
+
+ if (isCamelCasePattern(pattern)) {
+ fMatchKind = SearchPattern.R_CAMELCASE_MATCH;
+ fPattern = pattern;
+ return;
+ }
+
+ fMatchKind = SearchPattern.R_PREFIX_MATCH;
+ fPattern = pattern;
+ }
+ }
+
+ private final String fText;
+
+ private final ITypeInfoFilterExtension fFilterExtension;
+
+ private final TypeInfoRequestorAdapter fAdapter = new TypeInfoRequestorAdapter();
+
+ private final PatternMatcher fPackageMatcher;
+
+ private final PatternMatcher fNameMatcher;
+
+ public TypeInfoFilter(String text, ITypeInfoFilterExtension extension) {
+ fText = text;
+ fFilterExtension = extension;
+ int index = text.lastIndexOf("."); //$NON-NLS-1$
+ if (index == -1) {
+ fNameMatcher = new PatternMatcher(text);
+ fPackageMatcher = null;
+ } else {
+ fPackageMatcher = new PatternMatcher(evaluatePackagePattern(text.substring(0, index)));
+ String name = text.substring(index + 1);
+ if (name.length() == 0) {
+ name = "*"; //$NON-NLS-1$
+ }
+ fNameMatcher = new PatternMatcher(name);
+ }
+ }
+
+ /*
+ * Transforms o.e.j to o*.e*.j*
+ */
+ private String evaluatePackagePattern(String s) {
+ StringBuffer buf = new StringBuffer();
+ boolean hasWildCard = false;
+ int len = s.length();
+ for (int i = 0; i < len; i++) {
+ char ch = s.charAt(i);
+ if (ch == '.') {
+ if (hasWildCard == false) {
+ buf.append('*');
+ }
+ hasWildCard = false;
+ } else if (ch == '*' || ch == '?') {
+ hasWildCard = true;
+ }
+ buf.append(ch);
+ }
+ if (hasWildCard == false) {
+ if (len == 0) {
+ buf.append('?');
+ }
+ buf.append('*');
+ }
+ return buf.toString();
+ }
+
+ public String getText() {
+ return fText;
+ }
+
+ /**
+ * Checks whether <code>this</code> filter is a subFilter of the given <code>text</code>.
+ * <p>
+ * <i>WARNING: This is the <b>reverse</b> interpretation compared to
+ * {@link org.eclipse.ui.dialogs.SearchPattern#isSubPattern(org.eclipse.ui.dialogs.SearchPattern)}
+ * and {@link org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.ItemsFilter#isSubFilter}.
+ * </i>
+ * </p>
+ *
+ * @param text
+ * another filter text
+ * @return <code>true</code> if <code>this</code> filter is a subFilter of <code>text</code>
+ * e.g. "List" is a subFilter of "L". In this case, the filters matches a proper subset of
+ * the items matched by <code>text</code>.
+ */
+ public boolean isSubFilter(String text) {
+ if (fText.startsWith(text) == false) {
+ return false;
+ }
+ return fText.indexOf('.', text.length()) == -1;
+ }
+
+ public boolean isCamelCasePattern() {
+ int ccMask = SearchPattern.R_CAMELCASE_MATCH | SearchPattern.R_CAMELCASE_SAME_PART_COUNT_MATCH;
+ return (fNameMatcher.getMatchKind() & ccMask) != 0;
+ }
+
+ public String getPackagePattern() {
+ if (fPackageMatcher == null) {
+ return null;
+ }
+ return fPackageMatcher.getPattern();
+ }
+
+ public String getNamePattern() {
+ return fNameMatcher.getPattern();
+ }
+
+ public int getSearchFlags() {
+ return fNameMatcher.getMatchKind();
+ }
+
+ public int getPackageFlags() {
+ if (fPackageMatcher == null) {
+ return SearchPattern.R_EXACT_MATCH;
+ }
+ return fPackageMatcher.getMatchKind();
+ }
+
+ public boolean matchesRawNamePattern(IType type) {
+ return startsWithIgnoreCase(type.getElementName(), fNameMatcher.getPattern());
+ }
+
+ public boolean matchesCachedResult(IType type) {
+ if ((matchesPackage(type) && matchesFilterExtension(type)) == false) {
+ return false;
+ }
+ return matchesName(type);
+ }
+
+ public boolean matchesHistoryElement(IType type) {
+ if ((matchesPackage(type) && matchesFilterExtension(type)) == false) {
+ return false;
+ }
+ return matchesName(type);
+ }
+
+ public boolean matchesFilterExtension(IType type) {
+ if (fFilterExtension == null) {
+ return true;
+ }
+ fAdapter.setMatch(type);
+ return fFilterExtension.select(fAdapter);
+ }
+
+ private boolean matchesName(IType type) {
+ if (fText.length() == 0) {
+ return true; // empty pattern matches all names
+ }
+ return fNameMatcher.matches(type.getElementName());
+ }
+
+ private boolean matchesPackage(IType type) {
+ if (fPackageMatcher == null) {
+ return true;
+ }
+ return fPackageMatcher.matches(type.getPackageFragment().getElementName());
+ }
+
+}
diff --git a/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/dialogs/TypeInfoRequestorAdapter.java b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/dialogs/TypeInfoRequestorAdapter.java
new file mode 100644
index 0000000..b573b56
--- /dev/null
+++ b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/dialogs/TypeInfoRequestorAdapter.java
@@ -0,0 +1,68 @@
+/**
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ */
+package org.eclipse.egf.core.ui.dialogs;
+
+import org.eclipse.egf.core.ui.EGFCoreUIPlugin;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.Signature;
+import org.eclipse.jdt.ui.dialogs.ITypeInfoRequestor;
+
+public class TypeInfoRequestorAdapter implements ITypeInfoRequestor {
+
+ private IType _type;
+
+ public void setMatch(IType type) {
+ _type = type;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jdt.ui.dialogs.ITypeInfoRequestor#getEnclosingName()
+ */
+ public String getEnclosingName() {
+ return Signature.getQualifier(_type.getTypeQualifiedName('.'));
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jdt.ui.dialogs.ITypeInfoRequestor#getModifiers()
+ */
+ public int getModifiers() {
+ try {
+ return _type.getFlags();
+ } catch (JavaModelException jme) {
+ EGFCoreUIPlugin.getDefault().logError(jme);
+ }
+ return -1;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jdt.ui.dialogs.ITypeInfoRequestor#getPackageName()
+ */
+ public String getPackageName() {
+ return _type.getPackageFragment().getElementName();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jdt.ui.dialogs.ITypeInfoRequestor#getTypeName()
+ */
+ public String getTypeName() {
+ return _type.getElementName();
+ }
+
+}
diff --git a/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/dialogs/TypeNameMatchLabelProvider.java b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/dialogs/TypeNameMatchLabelProvider.java
new file mode 100644
index 0000000..97e20ca
--- /dev/null
+++ b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/dialogs/TypeNameMatchLabelProvider.java
@@ -0,0 +1,179 @@
+/**
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ */
+package org.eclipse.egf.core.ui.dialogs;
+
+import org.eclipse.egf.core.ui.EGFCoreUIPlugin;
+import org.eclipse.jdt.core.Flags;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.internal.ui.JavaPlugin;
+import org.eclipse.jdt.internal.ui.JavaPluginImages;
+import org.eclipse.jdt.internal.ui.JavaUIMessages;
+import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
+import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider;
+import org.eclipse.jdt.ui.JavaElementImageDescriptor;
+import org.eclipse.jdt.ui.JavaElementLabels;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+
+public class TypeNameMatchLabelProvider extends LabelProvider {
+
+ public static final int SHOW_FULLYQUALIFIED = 0x01;
+
+ public static final int SHOW_PACKAGE_POSTFIX = 0x02;
+
+ public static final int SHOW_PACKAGE_ONLY = 0x04;
+
+ public static final int SHOW_ROOT_POSTFIX = 0x08;
+
+ public static final int SHOW_TYPE_ONLY = 0x10;
+
+ public static final int SHOW_TYPE_CONTAINER_ONLY = 0x20;
+
+ public static final int SHOW_POST_QUALIFIED = 0x40;
+
+ public static String getTypeContainerName(IType type) {
+ IType outerType = type.getDeclaringType();
+ if (outerType != null) {
+ return outerType.getFullyQualifiedName('.');
+ }
+ return type.getPackageFragment().getElementName();
+ }
+
+ public static IPackageFragmentRoot getPackageFragmentRoot(IType type) {
+ return (IPackageFragmentRoot) type.getAncestor(IJavaElement.PACKAGE_FRAGMENT_ROOT);
+ }
+
+ private int fFlags;
+
+ public TypeNameMatchLabelProvider(int flags) {
+ fFlags = flags;
+ }
+
+ /**
+ * non java-doc
+ *
+ * @see ILabelProvider#getText
+ */
+ @Override
+ public String getText(Object element) {
+ if (element instanceof IType == false)
+ return super.getText(element);
+
+ return getText((IType) element, fFlags);
+ }
+
+ /*
+ * non java-doc
+ *
+ * @see ILabelProvider#getImage
+ */
+ @Override
+ public Image getImage(Object element) {
+ if (element instanceof IType == false)
+ return super.getImage(element);
+ return getImage((IType) element, fFlags);
+ }
+
+ private static boolean isSet(int flag, int flags) {
+ return (flags & flag) != 0;
+ }
+
+ private static String getPackageName(String packName) {
+ if (packName.length() == 0) {
+ return JavaUIMessages.TypeInfoLabelProvider_default_package;
+ }
+ return packName;
+ }
+
+ public static String getText(IType type, int flags) {
+ StringBuffer buf = new StringBuffer();
+ if (isSet(SHOW_TYPE_ONLY, flags)) {
+ buf.append(type.getElementName());
+ } else if (isSet(SHOW_TYPE_CONTAINER_ONLY, flags)) {
+ String containerName = getTypeContainerName(type);
+ buf.append(getPackageName(containerName));
+ } else if (isSet(SHOW_PACKAGE_ONLY, flags)) {
+ String packName = type.getPackageFragment().getElementName();
+ buf.append(getPackageName(packName));
+ } else {
+ if (isSet(SHOW_FULLYQUALIFIED, flags)) {
+ buf.append(type.getFullyQualifiedName());
+ } else if (isSet(SHOW_POST_QUALIFIED, flags)) {
+ buf.append(type.getElementName());
+ String containerName = getTypeContainerName(type);
+ if (containerName != null && containerName.length() > 0) {
+ buf.append(JavaElementLabels.CONCAT_STRING);
+ buf.append(containerName);
+ }
+ } else {
+ buf.append(type.getTypeQualifiedName());
+ }
+
+ if (isSet(SHOW_PACKAGE_POSTFIX, flags)) {
+ buf.append(JavaElementLabels.CONCAT_STRING);
+ String packName = type.getPackageFragment().getElementName();
+ buf.append(getPackageName(packName));
+ }
+ }
+ if (isSet(SHOW_ROOT_POSTFIX, flags)) {
+ buf.append(JavaElementLabels.CONCAT_STRING);
+ IPackageFragmentRoot root = getPackageFragmentRoot(type);
+ JavaElementLabels.getPackageFragmentRootLabel(root, JavaElementLabels.ROOT_QUALIFIED, buf);
+ }
+ return BasicElementLabels.getJavaElementName(buf.toString());
+ }
+
+ public static ImageDescriptor getImageDescriptor(IType type, int flags) {
+ if (isSet(SHOW_TYPE_CONTAINER_ONLY, flags)) {
+ if (type.getPackageFragment().getElementName().equals(getTypeContainerName(type)))
+ return JavaPluginImages.DESC_OBJS_PACKAGE;
+
+ // XXX cannot check outer type for interface efficiently (5887)
+ return JavaPluginImages.DESC_OBJS_CLASS;
+
+ } else if (isSet(SHOW_PACKAGE_ONLY, flags)) {
+ return JavaPluginImages.DESC_OBJS_PACKAGE;
+ } else {
+ boolean isInner = getTypeContainerName(type).indexOf('.') != -1;
+ int modifiers = -1;
+ try {
+ modifiers = type.getFlags();
+ } catch (JavaModelException jme) {
+ EGFCoreUIPlugin.getDefault().logError(jme);
+ }
+ ImageDescriptor desc = JavaElementImageProvider.getTypeImageDescriptor(isInner, false, modifiers, false);
+ int adornmentFlags = 0;
+ if (Flags.isFinal(modifiers)) {
+ adornmentFlags |= JavaElementImageDescriptor.FINAL;
+ }
+ if (Flags.isAbstract(modifiers) && !Flags.isInterface(modifiers)) {
+ adornmentFlags |= JavaElementImageDescriptor.ABSTRACT;
+ }
+ if (Flags.isStatic(modifiers)) {
+ adornmentFlags |= JavaElementImageDescriptor.STATIC;
+ }
+ if (Flags.isDeprecated(modifiers)) {
+ adornmentFlags |= JavaElementImageDescriptor.DEPRECATED;
+ }
+ return new JavaElementImageDescriptor(desc, adornmentFlags, JavaElementImageProvider.BIG_SIZE);
+ }
+ }
+
+ public static Image getImage(IType type, int flags) {
+ return JavaPlugin.getImageDescriptorRegistry().get(getImageDescriptor(type, flags));
+ }
+
+}
diff --git a/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/dialogs/TypeSelectionDialog.java b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/dialogs/TypeSelectionDialog.java
new file mode 100644
index 0000000..391c907
--- /dev/null
+++ b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/dialogs/TypeSelectionDialog.java
@@ -0,0 +1,987 @@
+/**
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ */
+package org.eclipse.egf.core.ui.dialogs;
+
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.egf.common.helper.BundleHelper;
+import org.eclipse.egf.common.ui.helper.ThrowableHandler;
+import org.eclipse.egf.core.fcore.IPlatformFcore;
+import org.eclipse.egf.core.ui.EGFCoreUIPlugin;
+import org.eclipse.egf.core.ui.l10n.CoreUIMessages;
+import org.eclipse.emf.common.util.UniqueEList;
+import org.eclipse.jdt.core.Flags;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.ITypeHierarchy;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.search.IJavaSearchConstants;
+import org.eclipse.jdt.core.search.IJavaSearchScope;
+import org.eclipse.jdt.core.search.SearchPattern;
+import org.eclipse.jdt.internal.corext.util.TypeFilter;
+import org.eclipse.jdt.internal.ui.JavaUIMessages;
+import org.eclipse.jdt.internal.ui.preferences.TypeFilterPreferencePage;
+import org.eclipse.jdt.internal.ui.search.JavaSearchQuery;
+import org.eclipse.jdt.internal.ui.search.JavaSearchResult;
+import org.eclipse.jdt.internal.ui.search.JavaSearchScopeFactory;
+import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
+import org.eclipse.jdt.launching.IVMInstall;
+import org.eclipse.jdt.launching.IVMInstallType;
+import org.eclipse.jdt.launching.JavaRuntime;
+import org.eclipse.jdt.launching.LibraryLocation;
+import org.eclipse.jdt.ui.JavaElementLabels;
+import org.eclipse.jdt.ui.dialogs.ITypeInfoFilterExtension;
+import org.eclipse.jdt.ui.dialogs.ITypeInfoImageProvider;
+import org.eclipse.jdt.ui.dialogs.TypeSelectionExtension;
+import org.eclipse.jdt.ui.search.PatternQuerySpecification;
+import org.eclipse.jdt.ui.search.QuerySpecification;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.resource.LocalResourceManager;
+import org.eclipse.jface.viewers.ILabelDecorator;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.StyledString;
+import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider;
+import org.eclipse.jface.viewers.StyledString.Styler;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.TextStyle;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.dialogs.FilteredItemsSelectionDialog;
+import org.eclipse.ui.dialogs.PreferencesUtil;
+
+public class TypeSelectionDialog extends FilteredItemsSelectionDialog {
+
+ private static final String DIALOG_SETTINGS = "org.eclipse.egf.core.ui.dialogs.TypeSelectionDialog"; //$NON-NLS-1$
+
+ private IProject _project;
+
+ private Class<?> _clazz;
+
+ private final TypeInfoUtil _infoUtil;
+
+ private int _filterVersion = 0;
+
+ private TypeItemsFilter _filter;
+
+ private final ITypeInfoFilterExtension _filterExtension;
+
+ public static boolean isLowerCase(char ch) {
+ return Character.toLowerCase(ch) == ch;
+ }
+
+ private class TypeSelectionHistory extends SelectionHistory {
+ public TypeSelectionHistory() {
+ super();
+ }
+
+ @Override
+ protected Object restoreItemFromMemento(IMemento memento) {
+ return null;
+ }
+
+ @Override
+ protected void storeItemToMemento(Object item, IMemento element) {
+ // Nothing to do
+ }
+
+ }
+
+ /**
+ * Replaces functionality of {@link org.eclipse.ui.dialogs.SearchPattern} with an
+ * adapter implementation that delegates to {@link TypeInfoFilter}.
+ */
+ private static class TypeSearchPattern extends org.eclipse.ui.dialogs.SearchPattern {
+
+ private String fPattern;
+
+ @Override
+ public void setPattern(String stringPattern) {
+ fPattern = stringPattern;
+ }
+
+ @Override
+ public String getPattern() {
+ return fPattern;
+ }
+ }
+
+ private class TypeFiltersPreferencesAction extends Action {
+
+ public TypeFiltersPreferencesAction() {
+ super(JavaUIMessages.FilteredTypesSelectionDialog_TypeFiltersPreferencesAction_label);
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ @Override
+ public void run() {
+ String typeFilterID = TypeFilterPreferencePage.TYPE_FILTER_PREF_PAGE_ID;
+ PreferencesUtil.createPreferenceDialogOn(getShell(), typeFilterID, new String[] { typeFilterID }, null).open();
+ triggerSearch();
+ }
+ }
+
+ private class TypeItemsFilter extends ItemsFilter {
+
+ private final int _MyFilterVersion = _filterVersion;
+
+ private final TypeInfoFilter _infoFilter;
+
+ public TypeItemsFilter(ITypeInfoFilterExtension extension) {
+ super(new TypeSearchPattern());
+ _infoFilter = new TypeInfoFilter(patternMatcher.getPattern(), extension);
+ }
+
+ @Override
+ public boolean matchItem(Object item) {
+ IType type = (IType) item;
+ return _infoFilter.matchesHistoryElement(type);
+ }
+
+ @Override
+ public boolean isConsistentItem(Object item) {
+ return true;
+ }
+
+ public int getMyFilterVersion() {
+ return _MyFilterVersion;
+ }
+
+ @Override
+ public boolean isSubFilter(ItemsFilter filter) {
+ if (filter instanceof TypeItemsFilter == false) {
+ return false;
+ }
+ TypeItemsFilter typeItemsFilter = (TypeItemsFilter) filter;
+ if (_MyFilterVersion != typeItemsFilter.getMyFilterVersion()) {
+ return false;
+ }
+ // Caveat: This method is defined the wrong way 'round in FilteredItemsSelectionDialog!
+ // WRONG (has reverse meaning!): return fTypeInfoFilter.isSubFilter(filter.getPattern());
+ return typeItemsFilter._infoFilter.isSubFilter(_infoFilter.getText());
+ }
+
+ @Override
+ public boolean equalsFilter(ItemsFilter iFilter) {
+ if (iFilter instanceof TypeItemsFilter == false) {
+ return false;
+ }
+ TypeItemsFilter typeItemsFilter = (TypeItemsFilter) iFilter;
+ if (getPattern().equals(typeItemsFilter.getPattern()) == false) {
+ return false;
+ }
+ if (_MyFilterVersion != typeItemsFilter.getMyFilterVersion()) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public boolean matchesRawNamePattern(Object item) {
+ return matchesRawNamePattern((IType) item);
+ }
+
+ public String getNamePattern() {
+ return _infoFilter.getNamePattern();
+ }
+
+ public String getPackagePattern() {
+ return _infoFilter.getPackagePattern();
+ }
+
+ public int getPackageFlags() {
+ return _infoFilter.getPackageFlags();
+ }
+
+ public boolean matchesRawNamePattern(IType type) {
+ return _infoFilter.matchesRawNamePattern(type);
+ }
+
+ public boolean matchesFilterExtension(IType type) {
+ return _infoFilter.matchesFilterExtension(type);
+ }
+
+ @Override
+ public int getMatchRule() {
+ return _infoFilter.getSearchFlags();
+ }
+
+ @Override
+ public String getPattern() {
+ return _infoFilter.getText();
+ }
+
+ @Override
+ public boolean isCamelCasePattern() {
+ return _infoFilter.isCamelCasePattern();
+ }
+
+ }
+
+ /**
+ * A <code>LabelProvider</code> for (the table of) types.
+ */
+ private class TypeItemLabelProvider extends LabelProvider implements ILabelDecorator, IStyledLabelProvider {
+
+ private boolean fContainerInfo = false;
+
+ private LocalResourceManager fImageManager;
+
+ private Font fBoldFont;
+
+ private Styler fBoldStyler;
+
+ private Styler fBoldQualifierStyler;
+
+ public TypeItemLabelProvider() {
+ fImageManager = new LocalResourceManager(JFaceResources.getResources());
+ fBoldStyler = createBoldStyler();
+ fBoldQualifierStyler = createBoldQualifierStyler();
+ }
+
+ /**
+ * @see org.eclipse.jface.viewers.BaseLabelProvider#dispose()
+ */
+ @Override
+ public void dispose() {
+ super.dispose();
+ fImageManager.dispose();
+ if (fBoldFont != null) {
+ fBoldFont.dispose();
+ fBoldFont = null;
+ }
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
+ */
+ @Override
+ public Image getImage(Object element) {
+ if (element instanceof IType == false) {
+ return super.getImage(element);
+ }
+ ImageDescriptor contributedImageDescriptor = _infoUtil.getContributedImageDescriptor(element);
+ if (contributedImageDescriptor == null) {
+ return TypeNameMatchLabelProvider.getImage((IType) element, TypeNameMatchLabelProvider.SHOW_TYPE_ONLY);
+ }
+ return fImageManager.createImage(contributedImageDescriptor);
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+ */
+ @Override
+ public String getText(Object element) {
+ if (element instanceof IType == false) {
+ return super.getText(element);
+ }
+ IType type = (IType) element;
+ if (fContainerInfo && isDuplicateElement(element)) {
+ return BasicElementLabels.getJavaElementName(_infoUtil.getFullyQualifiedText(type));
+ }
+
+ if (!fContainerInfo && isDuplicateElement(element)) {
+ return BasicElementLabels.getJavaElementName(_infoUtil.getQualifiedText(type));
+ }
+
+ return BasicElementLabels.getJavaElementName(type.getElementName());
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.ILabelDecorator#decorateImage(org.eclipse.swt.graphics.Image,
+ * java.lang.Object)
+ */
+ public Image decorateImage(Image image, Object element) {
+ return image;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.ILabelDecorator#decorateText(java.lang.String,
+ * java.lang.Object)
+ */
+ public String decorateText(String text, Object element) {
+ if (element instanceof IType == false) {
+ return null;
+ }
+ if (isDuplicateElement(element)) {
+ return BasicElementLabels.getJavaElementName(_infoUtil.getFullyQualifiedText((IType) element));
+ }
+ return BasicElementLabels.getJavaElementName(_infoUtil.getQualifiedText((IType) element));
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider#getStyledText
+ * (java.lang.Object)
+ */
+ public StyledString getStyledText(Object element) {
+ String text = getText(element);
+ StyledString string = new StyledString(text);
+ int index = text.indexOf(JavaElementLabels.CONCAT_STRING);
+ final String namePattern = _filter != null ? _filter.getNamePattern() : null;
+ if (namePattern != null && "*".equals(namePattern) == false) { //$NON-NLS-1$
+ String typeName = index == -1 ? text : text.substring(0, index);
+ int[] matchingRegions = SearchPattern.getMatchingRegions(namePattern, typeName, _filter.getMatchRule());
+ markMatchingRegions(string, 0, matchingRegions, fBoldStyler);
+ }
+ if (index != -1) {
+ string.setStyle(index, text.length() - index, StyledString.QUALIFIER_STYLER);
+ final String packagePattern = _filter != null ? _filter.getPackagePattern() : null;
+ if (packagePattern != null && "*".equals(packagePattern) == false) { //$NON-NLS-1$
+ index = index + JavaElementLabels.CONCAT_STRING.length();
+ int endIndex = text.indexOf(JavaElementLabels.CONCAT_STRING, index);
+ String packageName;
+ if (endIndex == -1) {
+ packageName = text.substring(index);
+ } else {
+ packageName = text.substring(index, endIndex);
+ }
+ int[] matchingRegions = SearchPattern.getMatchingRegions(packagePattern, packageName, _filter.getPackageFlags());
+ markMatchingRegions(string, index, matchingRegions, fBoldQualifierStyler);
+ }
+ }
+ return string;
+ }
+
+ private void markMatchingRegions(StyledString string, int index, int[] matchingRegions, Styler styler) {
+ if (matchingRegions != null) {
+ int offset = -1;
+ int length = 0;
+ for (int i = 0; i + 1 < matchingRegions.length; i = i + 2) {
+ if (offset == -1) {
+ offset = index + matchingRegions[i];
+ }
+ // Concatenate adjacent regions
+ if (i + 2 < matchingRegions.length && matchingRegions[i] + matchingRegions[i + 1] == matchingRegions[i + 2]) {
+ length = length + matchingRegions[i + 1];
+ } else {
+ string.setStyle(offset, length + matchingRegions[i + 1], styler);
+ offset = -1;
+ length = 0;
+ }
+ }
+ }
+ }
+
+ /**
+ * Create the bold variant of the currently used font.
+ *
+ * @return the bold font
+ * @since 3.5
+ */
+ private Font getBoldFont() {
+ if (fBoldFont == null) {
+ Font font = getDialogArea().getFont();
+ FontData[] data = font.getFontData();
+ for (int i = 0; i < data.length; i++) {
+ data[i].setStyle(SWT.BOLD);
+ }
+ fBoldFont = new Font(font.getDevice(), data);
+ }
+ return fBoldFont;
+ }
+
+ private Styler createBoldStyler() {
+ return new Styler() {
+ @Override
+ public void applyStyles(TextStyle textStyle) {
+ textStyle.font = getBoldFont();
+ }
+ };
+ }
+
+ private Styler createBoldQualifierStyler() {
+ return new Styler() {
+ @Override
+ public void applyStyles(TextStyle textStyle) {
+ StyledString.QUALIFIER_STYLER.applyStyles(textStyle);
+ textStyle.font = getBoldFont();
+ }
+ };
+ }
+
+ }
+
+ private static class TypeInfoUtil {
+
+ private final ITypeInfoImageProvider fProviderExtension;
+
+ private final TypeInfoRequestorAdapter fAdapter = new TypeInfoRequestorAdapter();
+
+ private final Map<String, String> fLib2Name = new HashMap<String, String>();
+
+ private final String[] fInstallLocations;
+
+ private final String[] fVMNames;
+
+ public TypeInfoUtil(ITypeInfoImageProvider extension) {
+ fProviderExtension = extension;
+ List<String> locations = new ArrayList<String>();
+ List<String> labels = new ArrayList<String>();
+ IVMInstallType[] installs = JavaRuntime.getVMInstallTypes();
+ for (int i = 0; i < installs.length; i++) {
+ processVMInstallType(installs[i], locations, labels);
+ }
+ fInstallLocations = locations.toArray(new String[locations.size()]);
+ fVMNames = labels.toArray(new String[labels.size()]);
+ }
+
+ private void processVMInstallType(IVMInstallType installType, List<String> locations, List<String> labels) {
+ if (installType != null) {
+ IVMInstall[] installs = installType.getVMInstalls();
+ boolean isMac = Platform.OS_MACOSX.equals(Platform.getOS());
+ final String HOME_SUFFIX = "/Home"; //$NON-NLS-1$
+ for (int i = 0; i < installs.length; i++) {
+ String label = getFormattedLabel(installs[i].getName());
+ LibraryLocation[] libLocations = installs[i].getLibraryLocations();
+ if (libLocations != null) {
+ processLibraryLocation(libLocations, label);
+ } else {
+ String filePath = installs[i].getInstallLocation().getAbsolutePath();
+ // on MacOS X install locations end in an additional
+ // "/Home" segment; remove it
+ if (isMac && filePath.endsWith(HOME_SUFFIX))
+ filePath = filePath.substring(0, filePath.length() - HOME_SUFFIX.length() + 1);
+ locations.add(filePath);
+ labels.add(label);
+ }
+ }
+ }
+ }
+
+ private void processLibraryLocation(LibraryLocation[] libLocations, String label) {
+ for (int l = 0; l < libLocations.length; l++) {
+ LibraryLocation location = libLocations[l];
+ fLib2Name.put(location.getSystemLibraryPath().toOSString(), label);
+ }
+ }
+
+ private String getFormattedLabel(String name) {
+ return NLS.bind(CoreUIMessages._UI_FilteredTypesSelectionDialog_library_name_format, name);
+ }
+
+ public String getQualifiedText(IType type) {
+ StringBuffer result = new StringBuffer();
+ result.append(type.getElementName());
+ String containerName = TypeNameMatchLabelProvider.getTypeContainerName(type);
+ result.append(JavaElementLabels.CONCAT_STRING);
+ if (containerName.length() > 0) {
+ result.append(containerName);
+ } else {
+ result.append(JavaUIMessages.FilteredTypesSelectionDialog_default_package);
+ }
+ return result.toString();
+ }
+
+ public String getFullyQualifiedText(IType type) {
+ StringBuffer result = new StringBuffer();
+ result.append(type.getElementName());
+ String containerName = TypeNameMatchLabelProvider.getTypeContainerName(type);
+ if (containerName.length() > 0) {
+ result.append(JavaElementLabels.CONCAT_STRING);
+ result.append(containerName);
+ }
+ result.append(JavaElementLabels.CONCAT_STRING);
+ result.append(getContainerName(type));
+ return result.toString();
+ }
+
+ public String getQualificationText(IType type) {
+ StringBuffer result = new StringBuffer();
+ String containerName = TypeNameMatchLabelProvider.getTypeContainerName(type);
+ if (containerName.length() > 0) {
+ result.append(containerName);
+ result.append(JavaElementLabels.CONCAT_STRING);
+ }
+ result.append(getContainerName(type));
+ return result.toString();
+ }
+
+ public ImageDescriptor getContributedImageDescriptor(Object element) {
+ IType type = (IType) element;
+ if (fProviderExtension != null) {
+ fAdapter.setMatch(type);
+ return fProviderExtension.getImageDescriptor(fAdapter);
+ }
+ return null;
+ }
+
+ private String getContainerName(IType type) {
+ IPackageFragmentRoot root = TypeNameMatchLabelProvider.getPackageFragmentRoot(type);
+ if (root.isExternal()) {
+ String name = root.getPath().toOSString();
+ for (int i = 0; i < fInstallLocations.length; i++) {
+ if (name.startsWith(fInstallLocations[i])) {
+ return fVMNames[i];
+ }
+ }
+ String lib = fLib2Name.get(name);
+ if (lib != null) {
+ return lib;
+ }
+ }
+ StringBuffer buf = new StringBuffer();
+ JavaElementLabels.getPackageFragmentRootLabel(root, JavaElementLabels.ROOT_QUALIFIED | JavaElementLabels.ROOT_VARIABLE, buf);
+ return buf.toString();
+ }
+ }
+
+ /**
+ * A <code>LabelProvider</code> for the label showing type details.
+ */
+ private static class TypeItemDetailsLabelProvider extends LabelProvider {
+
+ private final TypeInfoUtil fTypeInfoUtil;
+
+ public TypeItemDetailsLabelProvider(TypeInfoUtil typeInfoUtil) {
+ fTypeInfoUtil = typeInfoUtil;
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
+ */
+ @Override
+ public Image getImage(Object element) {
+ if (element instanceof IType) {
+ return TypeNameMatchLabelProvider.getImage((IType) element, TypeNameMatchLabelProvider.SHOW_TYPE_CONTAINER_ONLY);
+ }
+ return super.getImage(element);
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+ */
+ @Override
+ public String getText(Object element) {
+ if (element instanceof IType) {
+ return BasicElementLabels.getJavaElementName(fTypeInfoUtil.getQualificationText((IType) element));
+ }
+
+ return super.getText(element);
+ }
+ }
+
+ /**
+ * Compares TypeItems is used during sorting
+ */
+ private static class TypeItemsComparator implements Comparator<IType> {
+
+ private final Map<String, String> fLib2Name = new HashMap<String, String>();
+
+ private final String[] fInstallLocations;
+
+ private final String[] fVMNames;
+
+ /**
+ * Creates new instance of TypeItemsComparator
+ */
+ public TypeItemsComparator() {
+ List<String> locations = new ArrayList<String>();
+ List<String> labels = new ArrayList<String>();
+ IVMInstallType[] installs = JavaRuntime.getVMInstallTypes();
+ for (int i = 0; i < installs.length; i++) {
+ processVMInstallType(installs[i], locations, labels);
+ }
+ fInstallLocations = locations.toArray(new String[locations.size()]);
+ fVMNames = labels.toArray(new String[labels.size()]);
+ }
+
+ private void processVMInstallType(IVMInstallType installType, List<String> locations, List<String> labels) {
+ if (installType != null) {
+ IVMInstall[] installs = installType.getVMInstalls();
+ boolean isMac = Platform.OS_MACOSX.equals(Platform.getOS());
+ final String HOME_SUFFIX = "/Home"; //$NON-NLS-1$
+ for (int i = 0; i < installs.length; i++) {
+ String label = getFormattedLabel(installs[i].getName());
+ LibraryLocation[] libLocations = installs[i].getLibraryLocations();
+ if (libLocations != null) {
+ processLibraryLocation(libLocations, label);
+ } else {
+ String filePath = installs[i].getInstallLocation().getAbsolutePath();
+ // on MacOS X install locations end in an additional
+ // "/Home" segment; remove it
+ if (isMac && filePath.endsWith(HOME_SUFFIX))
+ filePath = filePath.substring(0, filePath.length() - HOME_SUFFIX.length() + 1);
+ locations.add(filePath);
+ labels.add(label);
+ }
+ }
+ }
+ }
+
+ private void processLibraryLocation(LibraryLocation[] libLocations, String label) {
+ for (int l = 0; l < libLocations.length; l++) {
+ LibraryLocation location = libLocations[l];
+ fLib2Name.put(location.getSystemLibraryPath().toString(), label);
+ }
+ }
+
+ private String getFormattedLabel(String name) {
+ return MessageFormat.format(JavaUIMessages.FilteredTypesSelectionDialog_library_name_format, new Object[] { name });
+ }
+
+ public int compare(IType left, IType right) {
+ int result = compareName(left.getElementName(), right.getElementName());
+ if (result != 0) {
+ return result;
+ }
+ result = compareTypeContainerName(TypeNameMatchLabelProvider.getTypeContainerName(left), TypeNameMatchLabelProvider.getTypeContainerName(right));
+ if (result != 0) {
+ return result;
+ }
+ int leftCategory = getElementTypeCategory(left);
+ int rightCategory = getElementTypeCategory(right);
+ if (leftCategory < rightCategory) {
+ return -1;
+ }
+ if (leftCategory > rightCategory) {
+ return +1;
+ }
+ return compareContainerName(left, right);
+ }
+
+ private int compareName(String leftString, String rightString) {
+ int result = leftString.compareToIgnoreCase(rightString);
+ if (result != 0 || rightString.length() == 0) {
+ return result;
+ } else if (isLowerCase(leftString.charAt(0)) && isLowerCase(rightString.charAt(0)) == false) {
+ return +1;
+ } else if (isLowerCase(rightString.charAt(0)) && isLowerCase(leftString.charAt(0)) == false) {
+ return -1;
+ } else {
+ return leftString.compareTo(rightString);
+ }
+ }
+
+ private int compareTypeContainerName(String leftString, String rightString) {
+ int leftLength = leftString.length();
+ int rightLength = rightString.length();
+ if (leftLength == 0 && rightLength > 0) {
+ return -1;
+ }
+ if (leftLength == 0 && rightLength == 0) {
+ return 0;
+ }
+ if (leftLength > 0 && rightLength == 0) {
+ return +1;
+ }
+ return compareName(leftString, rightString);
+ }
+
+ private int compareContainerName(IType leftType, IType rightType) {
+ return getContainerName(leftType).compareTo(getContainerName(rightType));
+ }
+
+ private String getContainerName(IType type) {
+ IPackageFragmentRoot root = TypeNameMatchLabelProvider.getPackageFragmentRoot(type);
+ if (root.isExternal()) {
+ String name = root.getPath().toOSString();
+ for (int i = 0; i < fInstallLocations.length; i++) {
+ if (name.startsWith(fInstallLocations[i])) {
+ return fVMNames[i];
+ }
+ }
+ String lib = fLib2Name.get(name);
+ if (lib != null) {
+ return lib;
+ }
+ }
+ StringBuffer buf = new StringBuffer();
+ JavaElementLabels.getPackageFragmentRootLabel(root, JavaElementLabels.ROOT_QUALIFIED | JavaElementLabels.ROOT_VARIABLE, buf);
+ return buf.toString();
+ }
+
+ private int getElementTypeCategory(IType type) {
+ try {
+ if (TypeNameMatchLabelProvider.getPackageFragmentRoot(type).getKind() == IPackageFragmentRoot.K_SOURCE)
+ return 0;
+ } catch (JavaModelException jme) {
+ EGFCoreUIPlugin.getDefault().logError(jme);
+ }
+ return 1;
+ }
+ }
+
+ public TypeSelectionDialog(Shell parentShell, IProject project, Class<?> clazz, String current, TypeSelectionExtension extension, boolean multipleSelection) {
+ super(parentShell, multipleSelection);
+ Assert.isNotNull(project);
+ Assert.isNotNull(clazz);
+ _project = project;
+ _clazz = clazz;
+ _infoUtil = new TypeInfoUtil(null);
+ _filterExtension = (extension == null) ? null : extension.getFilterExtension();
+ setTitle(CoreUIMessages._UI_TypeSelection_label);
+ setMessage(NLS.bind(CoreUIMessages._UI_SelectType, _clazz.getName()));
+ setListLabelProvider(new TypeItemLabelProvider());
+ setDetailsLabelProvider(new TypeItemDetailsLabelProvider(_infoUtil));
+ setSelectionHistory(current);
+ setSeparatorLabel(NLS.bind(CoreUIMessages._UI_FilteredItemsSelectionDialog_separatorLabel, BundleHelper.getBundleId(_project)));
+ }
+
+ private void setSelectionHistory(String current) {
+ if (current == null || current.trim().length() == 0) {
+ return;
+ }
+ IJavaProject javaProject = null;
+ try {
+ // IProject should be a JavaProject
+ try {
+ if (_project.isAccessible() && _project.hasNature(JavaCore.NATURE_ID)) {
+ javaProject = JavaCore.create(_project);
+ }
+ } catch (CoreException e) {
+ EGFCoreUIPlugin.getDefault().logError(e);
+ }
+ if (javaProject != null) {
+ SelectionHistory history = new TypeSelectionHistory();
+ IType type = javaProject.findType(current.trim());
+ if (type != null) {
+ history.accessed(type);
+ }
+ setSelectionHistory(history);
+ }
+ } catch (JavaModelException jme) {
+ EGFCoreUIPlugin.getDefault().logError(jme);
+ } finally {
+ try {
+ if (javaProject != null) {
+ javaProject.close();
+ }
+ } catch (JavaModelException jme) {
+ EGFCoreUIPlugin.getDefault().logError(jme);
+ }
+ }
+ }
+
+ @Override
+ protected Control createExtendedContentArea(Composite parent) {
+ return null;
+ }
+
+ @Override
+ protected ItemsFilter createFilter() {
+ _filter = new TypeItemsFilter(_filterExtension);
+ return _filter;
+ }
+
+ @Override
+ protected void fillContentProvider(AbstractContentProvider contentProvider, ItemsFilter itemsFilter, IProgressMonitor monitor) throws CoreException {
+ // Invoke
+ SubMonitor subMonitor = SubMonitor.convert(monitor, NLS.bind(CoreUIMessages.TypeSelectionDialog_findTypeHierarchy, _clazz.getName()), 1000);
+ final List<IType> types = new UniqueEList<IType>();
+ final TypeItemsFilter typeSearchFilter = (TypeItemsFilter) itemsFilter;
+ IJavaProject javaProject = null;
+ try {
+ // IProject should be a JavaProject
+ try {
+ if (_project.isAccessible() && _project.hasNature(JavaCore.NATURE_ID)) {
+ javaProject = JavaCore.create(_project);
+ }
+ } catch (CoreException e) {
+ EGFCoreUIPlugin.getDefault().logError(e);
+ }
+ if (javaProject != null) {
+ // Retrieve IType
+ IType classType = javaProject.findType(_clazz.getName(), subMonitor.newChild(200, SubMonitor.SUPPRESS_NONE));
+ if (classType == null) {
+ return;
+ }
+ // Filter and public, non interface and non abstract are processed
+ if (TypeFilter.isFiltered(classType) == false && Flags.isPublic(classType.getFlags()) && Flags.isInterface(classType.getFlags()) == false && Flags.isAbstract(classType.getFlags()) == false) {
+ String bundleId = BundleHelper.getBundleId(classType.getJavaProject().getProject());
+ // type should be contained in a bundle
+ if (bundleId != null && typeSearchFilter.matchesFilterExtension(classType)) {
+ types.add(classType);
+ }
+ }
+ // Hierarchy Lookup
+ ITypeHierarchy typeHierarchy = classType.newTypeHierarchy(javaProject, subMonitor.newChild(300, SubMonitor.SUPPRESS_NONE));
+ if (typeHierarchy == null) {
+ return;
+ }
+ for (IType type : typeHierarchy.getAllSubtypes(classType)) {
+ // Filter and public, non interface and non abstract are processed
+ if (TypeFilter.isFiltered(type) == false && Flags.isPublic(type.getFlags()) && Flags.isInterface(type.getFlags()) == false && Flags.isAbstract(type.getFlags()) == false) {
+ String bundleId = BundleHelper.getBundleId(type.getJavaProject().getProject());
+ // type should be contained in a bundle
+ if (bundleId != null && typeSearchFilter.matchesFilterExtension(type)) {
+ types.add(type);
+ }
+ }
+ }
+ // Java Search Lookup
+ IJavaElement[] javaElements = new IJavaElement[] { javaProject };
+ JavaSearchScopeFactory factory = JavaSearchScopeFactory.getInstance();
+ IJavaSearchScope scope = factory.createJavaSearchScope(javaElements, JavaSearchScopeFactory.ALL);
+ String scopeDescription = factory.getSelectionScopeDescription(javaElements, JavaSearchScopeFactory.ALL);
+ QuerySpecification querySpec = new PatternQuerySpecification(classType.getElementName(), IJavaSearchConstants.TYPE, true, IJavaSearchConstants.CLASS | IJavaSearchConstants.IMPLEMENTORS, scope, scopeDescription);
+ JavaSearchQuery searchJob = new JavaSearchQuery(querySpec);
+ searchJob.run(subMonitor.newChild(300, SubMonitor.SUPPRESS_NONE));
+ JavaSearchResult result = (JavaSearchResult) searchJob.getSearchResult();
+ for (Object object : result.getElements()) {
+ if (object instanceof IType == false) {
+ continue;
+ }
+ IType type = (IType) object;
+ // Filter and public, non interface and non abstract are processed
+ if (TypeFilter.isFiltered(type) == false && Flags.isPublic(type.getFlags()) && Flags.isInterface(type.getFlags()) == false && Flags.isAbstract(type.getFlags()) == false) {
+ String bundleId = BundleHelper.getBundleId(type.getJavaProject().getProject());
+ // type should be contained in a bundle
+ if (bundleId != null && typeSearchFilter.matchesFilterExtension(type)) {
+ types.add(type);
+ }
+ }
+ }
+ // Feed Content Provider
+ for (IType type : types) {
+ contentProvider.add(type, typeSearchFilter);
+ }
+ }
+ } catch (OperationCanceledException e) {
+ return;
+ } catch (Throwable t) {
+ ThrowableHandler.handleThrowable(EGFCoreUIPlugin.getDefault().getPluginID(), t);
+ return;
+ } finally {
+ try {
+ if (javaProject != null) {
+ javaProject.close();
+ }
+ } catch (JavaModelException jme) {
+ EGFCoreUIPlugin.getDefault().logError(jme);
+ }
+ monitor.done();
+ }
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.dialogs.AbstractSearchDialog#fillViewMenu(org.eclipse.jface.action.IMenuManager)
+ */
+ @Override
+ protected void fillViewMenu(IMenuManager menuManager) {
+ super.fillViewMenu(menuManager);
+ menuManager.add(new Separator());
+ menuManager.add(new TypeFiltersPreferencesAction());
+ }
+
+ @Override
+ protected IDialogSettings getDialogSettings() {
+ IDialogSettings settings = EGFCoreUIPlugin.getDefault().getDialogSettings().getSection(DIALOG_SETTINGS);
+ if (settings == null) {
+ settings = EGFCoreUIPlugin.getDefault().getDialogSettings().addNewSection(DIALOG_SETTINGS);
+ }
+ return settings;
+ }
+
+ @Override
+ public String getElementName(Object item) {
+ if (item instanceof IPlatformFcore) {
+ IPlatformFcore fc = (IPlatformFcore) item;
+ return fc.getURI().toString();
+ }
+ return null;
+ }
+
+ @Override
+ protected Comparator<IType> getItemsComparator() {
+ return new TypeItemsComparator();
+ }
+
+ @Override
+ protected IStatus validateItem(Object item) {
+ return new Status(IStatus.OK, EGFCoreUIPlugin.getDefault().getBundle().getSymbolicName(), 0, "", null); //$NON-NLS-1$
+ }
+
+ /**
+ * @see org.eclipse.jdt.ui.dialogs.ITypeSelectionComponent#triggerSearch()
+ */
+ public void triggerSearch() {
+ _filterVersion++;
+ applyFilter();
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.dialogs.SelectionDialog#setResult(java.util.List)
+ */
+ @Override
+ @SuppressWarnings("unchecked")
+ protected void setResult(List newResult) {
+ List resultToReturn = new ArrayList();
+ for (int i = 0; i < newResult.size(); i++) {
+ if (newResult.get(i) instanceof IType) {
+ IType type = (IType) newResult.get(i);
+ if (type.exists()) {
+ // items are added to history in the
+ // org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#computeResult()
+ // method
+ resultToReturn.add(type);
+ } else {
+ IPackageFragmentRoot root = TypeNameMatchLabelProvider.getPackageFragmentRoot(type);
+ String containerName = JavaElementLabels.getElementLabel(root, JavaElementLabels.ROOT_QUALIFIED);
+ String message = NLS.bind(CoreUIMessages._UI_FilteredTypesSelectionDialog_dialogMessage, new String[] { TypeNameMatchLabelProvider.getText(type, TypeNameMatchLabelProvider.SHOW_FULLYQUALIFIED), containerName });
+ MessageDialog.openError(getShell(), CoreUIMessages._UI_TypeSelection_label, message);
+ getSelectionHistory().remove(type);
+ }
+ }
+ }
+ super.setResult(resultToReturn);
+ }
+
+}
diff --git a/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/internal/SWTFactory.java b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/internal/SWTFactory.java
new file mode 100644
index 0000000..dafd935
--- /dev/null
+++ b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/internal/SWTFactory.java
@@ -0,0 +1,626 @@
+/**
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ */
+package org.eclipse.egf.core.ui.internal;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.egf.core.ui.EGFCoreUIPlugin;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.layout.PixelConverter;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Layout;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.dialogs.PreferencesUtil;
+
+/**
+ * Factory class to create some SWT resources.
+ */
+public class SWTFactory {
+
+ /**
+ * Returns a width hint for a button control.
+ */
+ public static int getButtonWidthHint(Button button) {
+ button.setFont(JFaceResources.getDialogFont());
+ PixelConverter converter = new PixelConverter(button);
+ int widthHint = converter.convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
+ return Math.max(widthHint, button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
+ }
+
+ /**
+ * Sets width and height hint for the button control.
+ * <b>Note:</b> This is a NOP if the button's layout data is not
+ * an instance of <code>GridData</code>.
+ *
+ * @param the
+ * button for which to set the dimension hint
+ */
+ public static void setButtonDimensionHint(Button button) {
+ Assert.isNotNull(button);
+ Object gd = button.getLayoutData();
+ if (gd instanceof GridData) {
+ ((GridData) gd).widthHint = getButtonWidthHint(button);
+ ((GridData) gd).horizontalAlignment = GridData.FILL;
+ }
+ }
+
+ /**
+ * Creates a check box button using the parents' font
+ *
+ * @param parent
+ * the parent to add the button to
+ * @param label
+ * the label for the button
+ * @param image
+ * the image for the button
+ * @param checked
+ * the initial checked state of the button
+ * @param hspan
+ * the horizontal span to take up in the parent composite
+ * @return a new checked button set to the initial checked state
+ * @since 3.3
+ */
+ public static Button createCheckButton(Composite parent, String label, Image image, boolean checked, int hspan) {
+ Button button = new Button(parent, SWT.CHECK);
+ button.setFont(parent.getFont());
+ button.setSelection(checked);
+ if (image != null) {
+ button.setImage(image);
+ }
+ if (label != null) {
+ button.setText(label);
+ }
+ GridData gd = new GridData();
+ gd.horizontalSpan = hspan;
+ button.setLayoutData(gd);
+ setButtonDimensionHint(button);
+ return button;
+ }
+
+ /**
+ * Creates and returns a new push button with the given
+ * label and/or image.
+ *
+ * @param parent
+ * parent control
+ * @param label
+ * button label or <code>null</code>
+ * @param image
+ * image of <code>null</code>
+ *
+ * @return a new push button
+ */
+ public static Button createPushButton(Composite parent, String label, Image image) {
+ Button button = new Button(parent, SWT.PUSH);
+ button.setFont(parent.getFont());
+ if (image != null) {
+ button.setImage(image);
+ }
+ if (label != null) {
+ button.setText(label);
+ }
+ GridData gd = new GridData();
+ button.setLayoutData(gd);
+ SWTFactory.setButtonDimensionHint(button);
+ return button;
+ }
+
+ /**
+ * Creates and returns a new push button with the given
+ * label and/or image.
+ *
+ * @param parent
+ * parent control
+ * @param label
+ * button label or <code>null</code>
+ * @param image
+ * image of <code>null</code>
+ * @param fill
+ * the alignment for the new button
+ *
+ * @return a new push button
+ * @since 3.4
+ */
+ public static Button createPushButton(Composite parent, String label, Image image, int fill) {
+ Button button = new Button(parent, SWT.PUSH);
+ button.setFont(parent.getFont());
+ if (image != null) {
+ button.setImage(image);
+ }
+ if (label != null) {
+ button.setText(label);
+ }
+ GridData gd = new GridData(fill);
+ button.setLayoutData(gd);
+ SWTFactory.setButtonDimensionHint(button);
+ return button;
+ }
+
+ /**
+ * Creates and returns a new radio button with the given
+ * label.
+ *
+ * @param parent
+ * parent control
+ * @param label
+ * button label or <code>null</code>
+ *
+ * @return a new radio button
+ */
+ public static Button createRadioButton(Composite parent, String label) {
+ Button button = new Button(parent, SWT.RADIO);
+ button.setFont(parent.getFont());
+ if (label != null) {
+ button.setText(label);
+ }
+ GridData gd = new GridData();
+ button.setLayoutData(gd);
+ SWTFactory.setButtonDimensionHint(button);
+ return button;
+ }
+
+ /**
+ * Creates a new label widget
+ *
+ * @param parent
+ * the parent composite to add this label widget to
+ * @param text
+ * the text for the label
+ * @param hspan
+ * the horizontal span to take up in the parent composite
+ * @return the new label
+ * @since 3.2
+ *
+ */
+ public static Label createLabel(Composite parent, String text, int hspan) {
+ Label l = new Label(parent, SWT.NONE);
+ l.setFont(parent.getFont());
+ l.setText(text);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = hspan;
+ gd.grabExcessHorizontalSpace = false;
+ l.setLayoutData(gd);
+ return l;
+ }
+
+ /**
+ * Creates a new label widget
+ *
+ * @param parent
+ * the parent composite to add this label widget to
+ * @param text
+ * the text for the label
+ * @param font
+ * the font for the label
+ * @param hspan
+ * the horizontal span to take up in the parent composite
+ * @return the new label
+ * @since 3.3
+ */
+ public static Label createLabel(Composite parent, String text, Font font, int hspan) {
+ Label l = new Label(parent, SWT.NONE);
+ l.setFont(font);
+ l.setText(text);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = hspan;
+ l.setLayoutData(gd);
+ return l;
+ }
+
+ /**
+ * Creates a wrapping label
+ *
+ * @param parent
+ * the parent composite to add this label to
+ * @param text
+ * the text to be displayed in the label
+ * @param hspan
+ * the horizontal span that label should take up in the parent composite
+ * @param wrapwidth
+ * the width hint that the label should wrap at
+ * @return a new label that wraps at a specified width
+ * @since 3.3
+ */
+ public static Label createWrapLabel(Composite parent, String text, int hspan, int wrapwidth) {
+ Label l = new Label(parent, SWT.NONE | SWT.WRAP);
+ l.setFont(parent.getFont());
+ l.setText(text);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = hspan;
+ gd.widthHint = wrapwidth;
+ l.setLayoutData(gd);
+ return l;
+ }
+
+ /**
+ * Creates a new <code>CLabel</code> that will wrap at the specified width and has the specified
+ * image
+ *
+ * @param parent
+ * the parent to add this label to
+ * @param text
+ * the text for the label
+ * @param image
+ * the image for the label
+ * @param hspan
+ * the h span to take up in the parent
+ * @param wrapwidth
+ * the with to wrap at
+ * @return a new <code>CLabel</code>
+ * @since 3.3
+ */
+ public static CLabel createWrapCLabel(Composite parent, String text, Image image, int hspan, int wrapwidth) {
+ CLabel label = new CLabel(parent, SWT.NONE | SWT.WRAP);
+ label.setFont(parent.getFont());
+ if (text != null) {
+ label.setText(text);
+ }
+ if (image != null) {
+ label.setImage(image);
+ }
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = hspan;
+ gd.widthHint = wrapwidth;
+ label.setLayoutData(gd);
+ return label;
+ }
+
+ /**
+ * Creates a wrapping label
+ *
+ * @param parent
+ * the parent composite to add this label to
+ * @param text
+ * the text to be displayed in the label
+ * @param hspan
+ * the horizontal span that label should take up in the parent composite
+ * @return a new label that wraps at a specified width
+ * @since 3.3
+ */
+ public static Label createWrapLabel(Composite parent, String text, int hspan) {
+ Label l = new Label(parent, SWT.NONE | SWT.WRAP);
+ l.setFont(parent.getFont());
+ l.setText(text);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = hspan;
+ l.setLayoutData(gd);
+ return l;
+ }
+
+ /**
+ * Creates a new text widget
+ *
+ * @param parent
+ * the parent composite to add this text widget to
+ * @param hspan
+ * the horizontal span to take up on the parent composite
+ * @return the new text widget
+ * @since 3.2
+ *
+ */
+ public static Text createSingleText(Composite parent, int hspan) {
+ Text t = new Text(parent, SWT.SINGLE | SWT.BORDER);
+ t.setFont(parent.getFont());
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = hspan;
+ t.setLayoutData(gd);
+ return t;
+ }
+
+ /**
+ * Creates a new text widget
+ *
+ * @param parent
+ * the parent composite to add this text widget to
+ * @param style
+ * the style bits for the text widget
+ * @param hspan
+ * the horizontal span to take up on the parent composite
+ * @param fill
+ * the fill for the grid layout
+ * @return the new text widget
+ * @since 3.3
+ */
+ public static Text createText(Composite parent, int style, int hspan, int fill) {
+ Text t = new Text(parent, style);
+ t.setFont(parent.getFont());
+ GridData gd = new GridData(fill);
+ gd.horizontalSpan = hspan;
+ t.setLayoutData(gd);
+ return t;
+ }
+
+ /**
+ * Creates a new text widget
+ *
+ * @param parent
+ * the parent composite to add this text widget to
+ * @param style
+ * the style bits for the text widget
+ * @param hspan
+ * the horizontal span to take up on the parent composite
+ * @return the new text widget
+ * @since 3.3
+ */
+ public static Text createText(Composite parent, int style, int hspan) {
+ Text t = new Text(parent, style);
+ t.setFont(parent.getFont());
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = hspan;
+ t.setLayoutData(gd);
+ return t;
+ }
+
+ /**
+ * Creates a new text widget
+ *
+ * @param parent
+ * the parent composite to add this text widget to
+ * @param style
+ * the style bits for the text widget
+ * @param hspan
+ * the horizontal span to take up on the parent composite
+ * @param width
+ * the desired width of the text widget
+ * @param height
+ * the desired height of the text widget
+ * @param fill
+ * the fill style for the widget
+ * @return the new text widget
+ * @since 3.3
+ */
+ public static Text createText(Composite parent, int style, int hspan, int width, int height, int fill) {
+ Text t = new Text(parent, style);
+ t.setFont(parent.getFont());
+ GridData gd = new GridData(fill);
+ gd.horizontalSpan = hspan;
+ gd.widthHint = width;
+ gd.heightHint = height;
+ t.setLayoutData(gd);
+ return t;
+ }
+
+ /**
+ * Creates a Group widget
+ *
+ * @param parent
+ * the parent composite to add this group to
+ * @param text
+ * the text for the heading of the group
+ * @param columns
+ * the number of columns within the group
+ * @param hspan
+ * the horizontal span the group should take up on the parent
+ * @param fill
+ * the style for how this composite should fill into its parent
+ * @return the new group
+ * @since 3.2
+ *
+ */
+ public static Group createGroup(Composite parent, String text, int columns, int hspan, int fill) {
+ Group g = new Group(parent, SWT.NONE);
+ g.setLayout(new GridLayout(columns, false));
+ g.setText(text);
+ g.setFont(parent.getFont());
+ GridData gd = new GridData(fill);
+ gd.horizontalSpan = hspan;
+ g.setLayoutData(gd);
+ return g;
+ }
+
+ /**
+ * Creates a Composite widget
+ *
+ * @param parent
+ * the parent composite to add this composite to
+ * @param font
+ * the font to set on the control
+ * @param columns
+ * the number of columns within the composite
+ * @param hspan
+ * the horizontal span the composite should take up on the parent
+ * @param fill
+ * the style for how this composite should fill into its parent
+ * @return the new group
+ * @since 3.3
+ */
+ public static Composite createComposite(Composite parent, Font font, int columns, int hspan, int fill) {
+ Composite g = new Composite(parent, SWT.NONE);
+ g.setLayout(new GridLayout(columns, false));
+ g.setFont(font);
+ GridData gd = new GridData(fill);
+ gd.horizontalSpan = hspan;
+ g.setLayoutData(gd);
+ return g;
+ }
+
+ /**
+ * Creates a composite that uses the parent's font and has a grid layout
+ *
+ * @param parent
+ * the parent to add the composite to
+ * @param columns
+ * the number of columns the composite should have
+ * @param hspan
+ * the horizontal span the new composite should take up in the parent
+ * @param fill
+ * the fill style of the composite {@link GridData}
+ * @return a new composite with a grid layout
+ *
+ * @since 3.3
+ */
+ public static Composite createComposite(Composite parent, int columns, int hspan, int fill) {
+ Composite g = new Composite(parent, SWT.NONE);
+ g.setLayout(new GridLayout(columns, false));
+ g.setFont(parent.getFont());
+ GridData gd = new GridData(fill);
+ gd.horizontalSpan = hspan;
+ g.setLayoutData(gd);
+ return g;
+ }
+
+ /**
+ * Creates a vertical spacer for separating components. If applied to a
+ * <code>GridLayout</code>, this method will automatically span all of the columns of the parent
+ * to make vertical space
+ *
+ * @param parent
+ * the parent composite to add this spacer to
+ * @param numlines
+ * the number of vertical lines to make as space
+ * @since 3.3
+ */
+ public static void createVerticalSpacer(Composite parent, int numlines) {
+ Label lbl = new Label(parent, SWT.NONE);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ Layout layout = parent.getLayout();
+ if (layout instanceof GridLayout) {
+ gd.horizontalSpan = ((GridLayout) parent.getLayout()).numColumns;
+ }
+ gd.heightHint = numlines;
+ lbl.setLayoutData(gd);
+ }
+
+ /**
+ * creates a horizontal spacer for separating components
+ *
+ * @param comp
+ * @param numlines
+ * @since 3.3
+ */
+ public static void createHorizontalSpacer(Composite comp, int numlines) {
+ Label lbl = new Label(comp, SWT.NONE);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = numlines;
+ lbl.setLayoutData(gd);
+ }
+
+ /**
+ * Creates a Composite widget
+ *
+ * @param parent
+ * the parent composite to add this composite to
+ * @param font
+ * the font to set on the control
+ * @param columns
+ * the number of columns within the composite
+ * @param hspan
+ * the horizontal span the composite should take up on the parent
+ * @param fill
+ * the style for how this composite should fill into its parent
+ * @param marginwidth
+ * the width of the margin to place on the sides of the composite (default is 5,
+ * specified by GridLayout)
+ * @param marginheight
+ * the height of the margin to place o the top and bottom of the composite
+ * @return the new composite
+ * @since 3.3
+ */
+ public static Composite createComposite(Composite parent, Font font, int columns, int hspan, int fill, int marginwidth, int marginheight) {
+ Composite g = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout(columns, false);
+ layout.marginWidth = marginwidth;
+ layout.marginHeight = marginheight;
+ g.setLayout(layout);
+ g.setFont(font);
+ GridData gd = new GridData(fill);
+ gd.horizontalSpan = hspan;
+ g.setLayoutData(gd);
+ return g;
+ }
+
+ /**
+ * This method is used to make a combo box
+ *
+ * @param parent
+ * the parent composite to add the new combo to
+ * @param style
+ * the style for the Combo
+ * @param hspan
+ * the horizontal span to take up on the parent composite
+ * @param fill
+ * how the combo will fill into the composite
+ * Can be one of <code>GridData.FILL_HORIZONAL</code>, <code>GridData.FILL_BOTH</code> or
+ * <code>GridData.FILL_VERTICAL</code>
+ * @param items
+ * the item to put into the combo
+ * @return a new Combo instance
+ * @since 3.3
+ */
+ public static Combo createCombo(Composite parent, int style, int hspan, int fill, String[] items) {
+ Combo c = new Combo(parent, style);
+ c.setFont(parent.getFont());
+ GridData gd = new GridData(fill);
+ gd.horizontalSpan = hspan;
+ c.setLayoutData(gd);
+ if (items != null) {
+ c.setItems(items);
+ }
+ // Some platforms open up combos in bad sizes without this, see bug 245569
+ c.setVisibleItemCount(30);
+ c.select(0);
+ return c;
+ }
+
+ /**
+ * This method is used to make a combo box with a default fill style of GridData.FILL_HORIZONTAL
+ *
+ * @param parent
+ * the parent composite to add the new combo to
+ * @param style
+ * the style for the Combo
+ * @param hspan
+ * the horizontal span to take up on the parent composite
+ * @param items
+ * the item to put into the combo
+ * @return a new Combo instance
+ * @since 3.3
+ */
+ public static Combo createCombo(Composite parent, int style, int hspan, String[] items) {
+ Combo c = new Combo(parent, style);
+ c.setFont(parent.getFont());
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = hspan;
+ c.setLayoutData(gd);
+ if (items != null) {
+ c.setItems(items);
+ }
+ // Some platforms open up combos in bad sizes without this, see bug 245569
+ c.setVisibleItemCount(30);
+ c.select(0);
+ return c;
+ }
+
+ /**
+ * This method allows us to open the preference dialog on the specific page, in this case the
+ * perspective page
+ *
+ * @param id
+ * the id of preference page to show
+ * @param page
+ * the actual page to show
+ * @since 3.2
+ */
+ public static void showPreferencePage(String id) {
+ PreferencesUtil.createPreferenceDialogOn(EGFCoreUIPlugin.getActiveWorkbenchShell(), id, new String[] { id }, null).open();
+ }
+
+}
diff --git a/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/internal/preferences/EGFGeneralPreferencePage.java b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/internal/preferences/EGFGeneralPreferencePage.java
new file mode 100644
index 0000000..d320674
--- /dev/null
+++ b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/internal/preferences/EGFGeneralPreferencePage.java
@@ -0,0 +1,48 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.ui.internal.preferences;
+
+import org.eclipse.egf.core.ui.EGFCoreUIPlugin;
+import org.eclipse.egf.core.ui.l10n.CoreUIMessages;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+/**
+ * Implement the EGF general preference page.
+ *
+ * @author Xavier Maysonnave
+ */
+public class EGFGeneralPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
+
+ /**
+ * The default constructor
+ */
+ public EGFGeneralPreferencePage() {
+ super();
+ setPreferenceStore(EGFCoreUIPlugin.getDefault().getPreferenceStore());
+ setTitle(CoreUIMessages.EGFGeneralPreferencePage_Title);
+ setDescription(CoreUIMessages.EGFGeneralPreferencePage_Description);
+ }
+
+ /**
+ * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+ */
+ public void init(IWorkbench workbench_p) {
+ // Nothing to do.
+ }
+
+ @Override
+ protected void createFieldEditors() {
+ // Nothing to do
+ }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/internal/preferences/EGFModelPreferencePage.java b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/internal/preferences/EGFModelPreferencePage.java
new file mode 100644
index 0000000..c649d2b
--- /dev/null
+++ b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/internal/preferences/EGFModelPreferencePage.java
@@ -0,0 +1,94 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.ui.internal.preferences;
+
+import org.eclipse.egf.common.ui.fields.BooleanFieldEditor2;
+import org.eclipse.egf.core.preferences.IEGFModelConstants;
+import org.eclipse.egf.core.ui.EGFCoreUIPlugin;
+import org.eclipse.egf.core.ui.l10n.CoreUIMessages;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class EGFModelPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
+
+ private BooleanFieldEditor2 _validateTypes = null;
+
+ public EGFModelPreferencePage() {
+ setTitle(CoreUIMessages.EGFModelPreferencePage_Title);
+ setDescription(CoreUIMessages.EGFModelPreferencePage_Description);
+ setPreferenceStore(EGFCoreUIPlugin.getDefault().getPreferenceStore());
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+ */
+ public void init(IWorkbench workbench) {
+ // Nothing to do
+ }
+
+ /**
+ * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
+ */
+ @Override
+ protected void createFieldEditors() {
+ // do nothing we overload the create contents method
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected Control createContents(Composite parent) {
+
+ Composite composite = new Composite(parent, SWT.NONE);
+ composite.setLayout(new GridLayout(1, false));
+ composite.setFont(parent.getFont());
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 1;
+ composite.setLayoutData(gd);
+
+ Group group = new Group(composite, SWT.NONE);
+ group.setLayout(new GridLayout(1, false));
+ group.setText(CoreUIMessages.EGFModelPreferencePage_Validate);
+ group.setFont(parent.getFont());
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 1;
+ group.setLayoutData(gd);
+
+ _validateTypes = new BooleanFieldEditor2(IEGFModelConstants.VALIDATE_TYPES, CoreUIMessages.EGFModelPreferencePage_Validate_Types, SWT.NONE, group);
+ _validateTypes.setPreferenceStore(EGFCoreUIPlugin.getDefault().getPreferenceStore());
+ addField(_validateTypes);
+
+ initialize();
+ checkState();
+
+ return composite;
+
+ }
+
+}
diff --git a/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/internal/preferences/EGFProductionPreferencePage.java b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/internal/preferences/EGFProductionPreferencePage.java
new file mode 100644
index 0000000..854340a
--- /dev/null
+++ b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/internal/preferences/EGFProductionPreferencePage.java
@@ -0,0 +1,84 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.ui.internal.preferences;
+
+import org.eclipse.egf.core.preferences.IEGFModelConstants;
+import org.eclipse.egf.core.ui.EGFCoreUIPlugin;
+import org.eclipse.egf.core.ui.l10n.CoreUIMessages;
+import org.eclipse.jface.dialogs.MessageDialogWithToggle;
+import org.eclipse.jface.preference.FieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.jface.preference.RadioGroupFieldEditor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+/**
+ * Implement the EGF general preference page.
+ *
+ * @author Xavier Maysonnave
+ */
+public class EGFProductionPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
+
+ /**
+ * The default constructor
+ */
+ public EGFProductionPreferencePage() {
+ super();
+ setPreferenceStore(EGFCoreUIPlugin.getDefault().getPreferenceStore());
+ setTitle(CoreUIMessages.EGFProductionPreferencePage_Title);
+ setDescription(CoreUIMessages.EGFProductionPreferencePage_Description);
+ }
+
+ /**
+ * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+ */
+ public void init(IWorkbench workbench_p) {
+ // Nothing to do.
+ }
+
+ @Override
+ protected void createFieldEditors() {
+ // Nothing to do
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected Control createContents(Composite parent) {
+
+ Composite composite = new Composite(parent, SWT.NONE);
+ composite.setLayout(new GridLayout(1, false));
+ composite.setFont(parent.getFont());
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 1;
+ composite.setLayoutData(gd);
+
+ // save dirty editors
+ FieldEditor edit = new RadioGroupFieldEditor(IEGFModelConstants.VALIDATE_MODEL_INSTANCES_BEFORE_LAUNCH, CoreUIMessages.EGFProductionPreferencePage_Validate, 3, new String[][] { { CoreUIMessages.EGFProductionPreferencePage_Validate_Always, MessageDialogWithToggle.ALWAYS }, { CoreUIMessages.EGFProductionPreferencePage_Validate_Never, MessageDialogWithToggle.NEVER }, { CoreUIMessages.EGFProductionPreferencePage_Validate_Prompt, MessageDialogWithToggle.PROMPT } }, composite, true);
+ addField(edit);
+
+ initialize();
+ checkState();
+
+ return composite;
+
+ }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/internal/preferences/ModelPreferenceInitializer.java b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/internal/preferences/ModelPreferenceInitializer.java
new file mode 100644
index 0000000..1f6b055
--- /dev/null
+++ b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/internal/preferences/ModelPreferenceInitializer.java
@@ -0,0 +1,40 @@
+/**
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ * Thales Corporate Services S.A.S
+ */
+package org.eclipse.egf.core.ui.internal.preferences;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.egf.core.preferences.IEGFModelConstants;
+import org.eclipse.egf.core.ui.EGFCoreUIPlugin;
+import org.eclipse.jface.dialogs.MessageDialogWithToggle;
+import org.eclipse.jface.preference.IPreferenceStore;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class ModelPreferenceInitializer extends AbstractPreferenceInitializer {
+
+ public ModelPreferenceInitializer() {
+ super();
+ }
+
+ /**
+ * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
+ */
+ @Override
+ public void initializeDefaultPreferences() {
+ final IPreferenceStore prefs = EGFCoreUIPlugin.getDefault().getPreferenceStore();
+ prefs.setDefault(IEGFModelConstants.VALIDATE_TYPES, true);
+ prefs.setDefault(IEGFModelConstants.VALIDATE_MODEL_INSTANCES_BEFORE_LAUNCH, MessageDialogWithToggle.PROMPT);
+ }
+
+}
diff --git a/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/l10n/CoreUIMessages.java b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/l10n/CoreUIMessages.java
new file mode 100644
index 0000000..15d5761
--- /dev/null
+++ b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/l10n/CoreUIMessages.java
@@ -0,0 +1,69 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.core.ui.l10n;
+
+import org.eclipse.osgi.util.NLS;
+
+public class CoreUIMessages {
+
+ private static final String BUNDLE_NAME = "org.eclipse.egf.core.ui.l10n.messages"; //$NON-NLS-1$
+
+ private CoreUIMessages() {
+ // Do not instantiate
+ }
+
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, CoreUIMessages.class);
+ }
+
+ public static String ExceptionDialog_seeErrorLogMessage;
+
+ public static String _UI_FcoreSelection_label;
+ public static String _UI_SelectRegisteredFcore;
+
+ public static String _UI_TypeSelection_label;
+ public static String _UI_SelectType;
+ public static String _UI_FilteredTypesSelectionDialog_library_name_format;
+ public static String _UI_FilteredTypesSelectionDialog_dialogMessage;
+ public static String _UI_FilteredItemsSelectionDialog_separatorLabel;
+ public static String _UI_FilteredItemsSelectionDialog_platformSeparatorLabel;
+ public static String _UI_Reset_Label;
+
+ public static String EGFGeneralPreferencePage_Title;
+ public static String EGFGeneralPreferencePage_Description;
+
+ public static String EGFModelPreferencePage_Title;
+ public static String EGFModelPreferencePage_Description;
+ public static String EGFModelPreferencePage_Validate;
+ public static String EGFModelPreferencePage_Validate_Types;
+
+ public static String EGFProductionPreferencePage_Title;
+ public static String EGFProductionPreferencePage_Description;
+ public static String EGFProductionPreferencePage_Validate;
+ public static String EGFProductionPreferencePage_Validate_Always;
+ public static String EGFProductionPreferencePage_Validate_Never;
+ public static String EGFProductionPreferencePage_Validate_Prompt;
+
+ public static String AbstractCheckboxSelectionDialog_Select;
+ public static String AbstractCheckboxSelectionDialog_Deselect;
+
+ public static String TypeSelectionDialog_findTypeHierarchy;
+
+ public static String _UI_DiagnosisOfNObject_message;
+ public static String _UI_DiagnosisOfNObjects_message;
+
+ public static String MenuContributor_newChildGroup_label;
+ public static String MenuContributor_siblingChildGroup_label;
+
+}
diff --git a/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/l10n/messages.properties b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/l10n/messages.properties
new file mode 100644
index 0000000..024b3fc
--- /dev/null
+++ b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/l10n/messages.properties
@@ -0,0 +1,53 @@
+##
+# 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
+##
+
+ExceptionDialog_seeErrorLogMessage= See error log for more details.
+
+_UI_FcoreSelection_label= EGF Fcore Selection
+_UI_SelectRegisteredFcore= &Select a registered EGF Fcore:
+
+_UI_TypeSelection_label= Type Selection
+_UI_SelectType= &Select an existing ''{0}'' Type subclass
+_UI_FilteredTypesSelectionDialog_library_name_format= [{0}]
+_UI_FilteredTypesSelectionDialog_dialogMessage= Type ''{0}'' could not be found in ''{1}''. Make sure all workspace resources are refreshed.
+_UI_FilteredItemsSelectionDialog_separatorLabel= ''{0}'' matches
+_UI_FilteredItemsSelectionDialog_platformSeparatorLabel= 'Platform' matches
+_UI_Reset_Label= Reset
+
+# EGF General preference page.
+EGFGeneralPreferencePage_Title= EGF
+EGFGeneralPreferencePage_Description= Preferences related to Eclipse Generation Factories.
+
+# EGF Model preference page.
+EGFModelPreferencePage_Title= Model
+EGFModelPreferencePage_Description= EGF Model Settings.
+EGFModelPreferencePage_Validate= Validate
+EGFModelPreferencePage_Validate_Types= Always load and instantiate Types
+
+# EGF Production preference page.
+EGFProductionPreferencePage_Title= Production
+EGFProductionPreferencePage_Description= EGF Production Settings.
+EGFProductionPreferencePage_Validate= Validate Model instances before launching
+EGFProductionPreferencePage_Validate_Always= Always
+EGFProductionPreferencePage_Validate_Never= Never
+EGFProductionPreferencePage_Validate_Prompt= Prompt
+
+AbstractCheckboxSelectionDialog_Select= &Select All
+AbstractCheckboxSelectionDialog_Deselect= &Deselect All
+
+TypeSelectionDialog_findTypeHierarchy= Find Type Hierarchy ''{0}''
+
+_UI_DiagnosisOfNObject_message= Diagnosis of ''{0}''
+_UI_DiagnosisOfNObjects_message= Diagnosis of {0} objects
+
+MenuContributor_newChildGroup_label = &New Child
+MenuContributor_siblingChildGroup_label = &New Sibling
+
diff --git a/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/wizard/ContainerContentProvider.java b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/wizard/ContainerContentProvider.java
new file mode 100644
index 0000000..b712b01
--- /dev/null
+++ b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/wizard/ContainerContentProvider.java
@@ -0,0 +1,130 @@
+/**
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ */
+package org.eclipse.egf.core.ui.wizard;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.egf.common.helper.JavaHelper;
+import org.eclipse.egf.core.ui.EGFCoreUIPlugin;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+
+/**
+ * Provides content for a tree viewer that shows only containers.
+ */
+public class ContainerContentProvider implements ITreeContentProvider {
+
+ private Map<IProject, List<IFolder>> _sourceOrOutputFolders = new HashMap<IProject, List<IFolder>>();
+
+ /**
+ * Creates a new ContainerContentProvider.
+ */
+ public ContainerContentProvider() {
+ }
+
+ /**
+ * The visual part that is using this content provider is about
+ * to be disposed. Deallocate all allocated SWT resources.
+ */
+ public void dispose() {
+ }
+
+ /*
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
+ */
+ public Object[] getChildren(Object element) {
+ if (element instanceof IWorkspace) {
+ // check if closed projects should be shown
+ List<IProject> accessibleProjects = new ArrayList<IProject>();
+ for (IProject project : ((IWorkspace) element).getRoot().getProjects()) {
+ if (project.isOpen()) {
+ try {
+ _sourceOrOutputFolders.put(project, JavaHelper.getSourceAndOutputFolders(JavaCore.create(project)));
+ accessibleProjects.add(project);
+ } catch (CoreException ce) {
+ EGFCoreUIPlugin.getDefault().logError(ce);
+ }
+ }
+ }
+ return accessibleProjects.toArray();
+ } else if (element instanceof IContainer) {
+ IContainer container = (IContainer) element;
+ List<IFolder> folders = _sourceOrOutputFolders.get(container.getProject());
+ if (container.isAccessible() && belongToFolders(folders, container) == false) {
+ try {
+ List<IResource> children = new ArrayList<IResource>();
+ for (IResource member : container.members()) {
+ if (member.getType() != IResource.FILE && belongToFolders(folders, member) == false) {
+ children.add(member);
+ }
+ }
+ return children.toArray();
+ } catch (CoreException e) {
+ // this should never happen because we call #isAccessible before invoking #members
+ }
+ }
+ }
+ return new Object[0];
+ }
+
+ private boolean belongToFolders(List<IFolder> folders, IResource resource) {
+ if (folders == null || folders.size() == 0) {
+ return false;
+ }
+ for (IFolder folder : folders) {
+ if (resource.getFullPath().toOSString().startsWith(folder.getFullPath().toOSString())) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /*
+ * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+ */
+ public Object[] getElements(Object element) {
+ return getChildren(element);
+ }
+
+ /*
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
+ */
+ public Object getParent(Object element) {
+ if (element instanceof IResource) {
+ return ((IResource) element).getParent();
+ }
+ return null;
+ }
+
+ /*
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
+ */
+ public boolean hasChildren(Object element) {
+ return getChildren(element).length > 0;
+ }
+
+ /*
+ * @see org.eclipse.jface.viewers.IContentProvider#inputChanged
+ */
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+
+}
diff --git a/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/wizard/ContainerSelectionGroup.java b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/wizard/ContainerSelectionGroup.java
new file mode 100644
index 0000000..ca70bd3
--- /dev/null
+++ b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/wizard/ContainerSelectionGroup.java
@@ -0,0 +1,313 @@
+/**
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ * Igor Fedorenko <igorfie@yahoo.com> -
+ * Fix for Bug 136921 [IDE] New File dialog locks for 20 seconds
+ */
+package org.eclipse.egf.core.ui.wizard;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.ViewerComparator;
+import org.eclipse.osgi.util.TextProcessor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
+import org.eclipse.ui.model.WorkbenchLabelProvider;
+import org.eclipse.ui.part.DrillDownComposite;
+
+/**
+ * Workbench-level composite for choosing a container.
+ */
+public class ContainerSelectionGroup extends Composite {
+ // The listener to notify of events
+ private Listener listener;
+
+ // Enable user to type in new container name
+ private boolean allowNewContainerName = true;
+
+ // Last selection made by user
+ private IContainer selectedContainer;
+
+ // handle on parts
+ private Text containerNameField;
+
+ TreeViewer treeViewer;
+
+ // the message to display at the top of this dialog
+ private static final String DEFAULT_MSG_NEW_ALLOWED = IDEWorkbenchMessages.ContainerGroup_message;
+
+ private static final String DEFAULT_MSG_SELECT_ONLY = IDEWorkbenchMessages.ContainerGroup_selectFolder;
+
+ // sizing constants
+ private static final int SIZING_SELECTION_PANE_WIDTH = 320;
+
+ private static final int SIZING_SELECTION_PANE_HEIGHT = 300;
+
+ /**
+ * Creates a new instance of the widget.
+ *
+ * @param parent
+ * The parent widget of the group.
+ * @param listener
+ * A listener to forward events to. Can be null if no listener is
+ * required.
+ * @param allowNewContainerName
+ * Enable the user to type in a new container name instead of
+ * just selecting from the existing ones.
+ */
+ public ContainerSelectionGroup(Composite parent, Listener listener, boolean allowNewContainerName) {
+ this(parent, listener, allowNewContainerName, null);
+ }
+
+ /**
+ * Creates a new instance of the widget.
+ *
+ * @param parent
+ * The parent widget of the group.
+ * @param listener
+ * A listener to forward events to. Can be null if no listener is
+ * required.
+ * @param allowNewContainerName
+ * Enable the user to type in a new container name instead of
+ * just selecting from the existing ones.
+ * @param message
+ * The text to present to the user.
+ */
+ public ContainerSelectionGroup(Composite parent, Listener listener, boolean allowNewContainerName, String message) {
+ this(parent, listener, allowNewContainerName, message, SIZING_SELECTION_PANE_HEIGHT, SIZING_SELECTION_PANE_WIDTH);
+ }
+
+ /**
+ * Creates a new instance of the widget.
+ *
+ * @param parent
+ * The parent widget of the group.
+ * @param listener
+ * A listener to forward events to. Can be null if no listener is
+ * required.
+ * @param allowNewContainerName
+ * Enable the user to type in a new container name instead of
+ * just selecting from the existing ones.
+ * @param message
+ * The text to present to the user.
+ * @param showClosedProjects
+ * Whether or not to show closed projects.
+ * @param heightHint
+ * height hint for the drill down composite
+ * @param widthHint
+ * width hint for the drill down composite
+ */
+ public ContainerSelectionGroup(Composite parent, Listener listener, boolean allowNewContainerName, String message, int heightHint, int widthHint) {
+ super(parent, SWT.NONE);
+ this.listener = listener;
+ this.allowNewContainerName = allowNewContainerName;
+ if (message != null) {
+ createContents(message, heightHint, widthHint);
+ } else if (allowNewContainerName) {
+ createContents(DEFAULT_MSG_NEW_ALLOWED, heightHint, widthHint);
+ } else {
+ createContents(DEFAULT_MSG_SELECT_ONLY, heightHint, widthHint);
+ }
+ }
+
+ /**
+ * The container selection has changed in the tree view. Update the
+ * container name field value and notify all listeners.
+ *
+ * @param container
+ * The container that changed
+ */
+ public void containerSelectionChanged(IContainer container) {
+ selectedContainer = container;
+
+ if (allowNewContainerName) {
+ if (container == null) {
+ containerNameField.setText("");//$NON-NLS-1$
+ } else {
+ String text = TextProcessor.process(container.getFullPath().makeRelative().toString());
+ containerNameField.setText(text);
+ containerNameField.setToolTipText(text);
+ }
+ }
+
+ // fire an event so the parent can update its controls
+ if (listener != null) {
+ Event changeEvent = new Event();
+ changeEvent.type = SWT.Selection;
+ changeEvent.widget = this;
+ listener.handleEvent(changeEvent);
+ }
+ }
+
+ /**
+ * Creates the contents of the composite.
+ *
+ * @param message
+ */
+ public void createContents(String message) {
+ createContents(message, SIZING_SELECTION_PANE_HEIGHT, SIZING_SELECTION_PANE_WIDTH);
+ }
+
+ /**
+ * Creates the contents of the composite.
+ *
+ * @param message
+ * @param heightHint
+ * @param widthHint
+ */
+ public void createContents(String message, int heightHint, int widthHint) {
+ GridLayout layout = new GridLayout();
+ layout.marginWidth = 0;
+ setLayout(layout);
+ setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+ Label label = new Label(this, SWT.WRAP);
+ label.setText(message);
+ label.setFont(this.getFont());
+
+ if (allowNewContainerName) {
+ containerNameField = new Text(this, SWT.SINGLE | SWT.BORDER);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.widthHint = widthHint;
+ containerNameField.setLayoutData(gd);
+ containerNameField.addListener(SWT.Modify, listener);
+ containerNameField.setFont(this.getFont());
+ } else {
+ // filler...
+ new Label(this, SWT.NONE);
+ }
+
+ createTreeViewer(heightHint);
+ Dialog.applyDialogFont(this);
+ }
+
+ /**
+ * Returns a new drill down viewer for this dialog.
+ *
+ * @param heightHint
+ * height hint for the drill down composite
+ */
+ protected void createTreeViewer(int heightHint) {
+ // Create drill down.
+ DrillDownComposite drillDown = new DrillDownComposite(this, SWT.BORDER);
+ GridData spec = new GridData(SWT.FILL, SWT.FILL, true, true);
+ spec.widthHint = SIZING_SELECTION_PANE_WIDTH;
+ spec.heightHint = heightHint;
+ drillDown.setLayoutData(spec);
+
+ // Create tree viewer inside drill down.
+ treeViewer = new TreeViewer(drillDown, SWT.NONE);
+ drillDown.setChildTree(treeViewer);
+ ContainerContentProvider cp = new ContainerContentProvider();
+ treeViewer.setContentProvider(cp);
+ treeViewer.setLabelProvider(WorkbenchLabelProvider.getDecoratingWorkbenchLabelProvider());
+ treeViewer.setComparator(new ViewerComparator());
+ treeViewer.setUseHashlookup(true);
+ treeViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ public void selectionChanged(SelectionChangedEvent event) {
+ IStructuredSelection selection = (IStructuredSelection) event.getSelection();
+ containerSelectionChanged((IContainer) selection.getFirstElement()); // allow null
+ }
+ });
+ treeViewer.addDoubleClickListener(new IDoubleClickListener() {
+ public void doubleClick(DoubleClickEvent event) {
+ ISelection selection = event.getSelection();
+ if (selection instanceof IStructuredSelection) {
+ Object item = ((IStructuredSelection) selection).getFirstElement();
+ if (item == null) {
+ return;
+ }
+ if (treeViewer.getExpandedState(item)) {
+ treeViewer.collapseToLevel(item, 1);
+ } else {
+ treeViewer.expandToLevel(item, 1);
+ }
+ }
+ }
+ });
+
+ // This has to be done after the viewer has been laid out
+ treeViewer.setInput(ResourcesPlugin.getWorkspace());
+ }
+
+ /**
+ * Returns the currently entered container name. Null if the field is empty.
+ * Note that the container may not exist yet if the user entered a new
+ * container name in the field.
+ *
+ * @return IPath
+ */
+ public IPath getContainerFullPath() {
+ if (allowNewContainerName) {
+ String pathName = containerNameField.getText();
+ if (pathName == null || pathName.length() < 1) {
+ return null;
+ }
+ // The user may not have made this absolute so do it for them
+ return (new Path(TextProcessor.deprocess(pathName))).makeAbsolute();
+
+ }
+ if (selectedContainer == null)
+ return null;
+ return selectedContainer.getFullPath();
+
+ }
+
+ /**
+ * Gives focus to one of the widgets in the group, as determined by the
+ * group.
+ */
+ public void setInitialFocus() {
+ if (allowNewContainerName) {
+ containerNameField.setFocus();
+ } else {
+ treeViewer.getTree().setFocus();
+ }
+ }
+
+ /**
+ * Sets the selected existing container.
+ *
+ * @param container
+ */
+ public void setSelectedContainer(IContainer container) {
+ selectedContainer = container;
+
+ // expand to and select the specified container
+ List<IContainer> itemsToExpand = new ArrayList<IContainer>();
+ IContainer parent = container.getParent();
+ while (parent != null) {
+ itemsToExpand.add(0, parent);
+ parent = parent.getParent();
+ }
+ treeViewer.setExpandedElements(itemsToExpand.toArray());
+ treeViewer.setSelection(new StructuredSelection(container), true);
+ }
+}
diff --git a/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/wizard/FilteredItemsSelectionWizardPage.java b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/wizard/FilteredItemsSelectionWizardPage.java
new file mode 100644
index 0000000..7fdddc2
--- /dev/null
+++ b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/wizard/FilteredItemsSelectionWizardPage.java
@@ -0,0 +1,3250 @@
+/**
+ * Copyright (c) 2009 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
+ */
+package org.eclipse.egf.core.ui.wizard;
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.ProgressMonitorWrapper;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.ActionContributionItem;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.LegacyActionTools;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.viewers.ContentViewer;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IColorProvider;
+import org.eclipse.jface.viewers.IContentProvider;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.IFontProvider;
+import org.eclipse.jface.viewers.ILabelDecorator;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ILazyContentProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.LabelProviderChangedEvent;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.StyledCellLabelProvider;
+import org.eclipse.jface.viewers.StyledString;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerCell;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.ACC;
+import org.eclipse.swt.accessibility.AccessibleAdapter;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.custom.ViewForm;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.TraverseEvent;
+import org.eclipse.swt.events.TraverseListener;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.ToolBar;
+import org.eclipse.swt.widgets.ToolItem;
+import org.eclipse.ui.ActiveShellExpression;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.IWorkbenchCommandConstants;
+import org.eclipse.ui.IWorkbenchPreferenceConstants;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.WorkbenchException;
+import org.eclipse.ui.XMLMemento;
+import org.eclipse.ui.dialogs.FilteredItemsSelectionDialog;
+import org.eclipse.ui.dialogs.SearchPattern;
+import org.eclipse.ui.handlers.IHandlerActivation;
+import org.eclipse.ui.handlers.IHandlerService;
+import org.eclipse.ui.internal.IWorkbenchGraphicConstants;
+import org.eclipse.ui.internal.WorkbenchImages;
+import org.eclipse.ui.internal.WorkbenchMessages;
+import org.eclipse.ui.internal.WorkbenchPlugin;
+import org.eclipse.ui.progress.UIJob;
+import org.eclipse.ui.statushandlers.StatusManager;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public abstract class FilteredItemsSelectionWizardPage extends WizardPage {
+
+ private static final String DIALOG_BOUNDS_SETTINGS = "DialogBoundsSettings"; //$NON-NLS-1$
+
+ private static final String SHOW_STATUS_LINE = "ShowStatusLine"; //$NON-NLS-1$
+
+ private static final String HISTORY_SETTINGS = "History"; //$NON-NLS-1$
+
+ private static final String DIALOG_HEIGHT = "DIALOG_HEIGHT"; //$NON-NLS-1$
+
+ private static final String DIALOG_WIDTH = "DIALOG_WIDTH"; //$NON-NLS-1$
+
+ /**
+ * Represents an empty selection in the pattern input field (used only for
+ * initial pattern).
+ */
+ public static final int NONE = 0;
+
+ /**
+ * Pattern input field selection where caret is at the beginning (used only
+ * for initial pattern).
+ */
+ public static final int CARET_BEGINNING = 1;
+
+ /**
+ * Represents a full selection in the pattern input field (used only for
+ * initial pattern).
+ */
+ public static final int FULL_SELECTION = 2;
+
+ // the final collection of selected elements, or null if this dialog was
+ // canceled
+ private Object[] result;
+
+ private Text pattern;
+
+ private TableViewer list;
+
+ private DetailsContentViewer details;
+
+ /**
+ * It is a duplicate of a field in the CLabel class in DetailsContentViewer.
+ * It is maintained, because the <code>setDetailsLabelProvider()</code>
+ * could be called before content area is created.
+ */
+ private ILabelProvider detailsLabelProvider;
+
+ private ItemsListLabelProvider itemsListLabelProvider;
+
+ private MenuManager menuManager;
+
+ private boolean multi;
+
+ private ToolBar toolBar;
+
+ private ToolItem toolItem;
+
+ private Label progressLabel;
+
+ private ToggleStatusLineAction toggleStatusLineAction;
+
+ private RemoveHistoryItemAction removeHistoryItemAction;
+
+ private ActionContributionItem removeHistoryActionContributionItem;
+
+ private RefreshCacheJob refreshCacheJob;
+
+ private RefreshProgressMessageJob refreshProgressMessageJob;
+
+ private Object[] currentSelection;
+
+ private ContentProvider contentProvider;
+
+ private FilterHistoryJob filterHistoryJob;
+
+ private FilterJob filterJob;
+
+ private ItemsFilter filter;
+
+ private List lastCompletedResult;
+
+ private ItemsFilter lastCompletedFilter;
+
+ private String initialPatternText;
+
+ private int selectionMode;
+
+ private ItemsListSeparator itemsListSeparator;
+
+ private static final String EMPTY_STRING = ""; //$NON-NLS-1$
+
+ private boolean refreshWithLastSelection = false;
+
+ private IHandlerActivation showViewHandler;
+
+ /**
+ * Applies the dialog font to all controls that currently have the default
+ * font.
+ *
+ * @param control
+ * the control to apply the font to. Font will also be applied to
+ * its children. If the control is <code>null</code> nothing
+ * happens.
+ */
+ public static void applyDialogFont(Control control) {
+ if (control == null || dialogFontIsDefault()) {
+ return;
+ }
+ Font dialogFont = JFaceResources.getDialogFont();
+ applyDialogFont(control, dialogFont);
+ }
+
+ /**
+ * Return whether or not the dialog font is currently the same as the
+ * default font.
+ *
+ * @return boolean if the two are the same
+ */
+ protected static boolean dialogFontIsDefault() {
+ FontData[] dialogFontData = JFaceResources.getFontRegistry().getFontData(JFaceResources.DIALOG_FONT);
+ FontData[] defaultFontData = JFaceResources.getFontRegistry().getFontData(JFaceResources.DEFAULT_FONT);
+ return Arrays.equals(dialogFontData, defaultFontData);
+ }
+
+ /**
+ * Sets the dialog font on the control and any of its children if their font
+ * is not otherwise set.
+ *
+ * @param control
+ * the control to apply the font to. Font will also be applied to
+ * its children.
+ * @param dialogFont
+ * the dialog font to set
+ */
+ private static void applyDialogFont(Control control, Font dialogFont) {
+ if (hasDefaultFont(control)) {
+ control.setFont(dialogFont);
+ }
+ if (control instanceof Composite) {
+ Control[] children = ((Composite) control).getChildren();
+ for (int i = 0; i < children.length; i++) {
+ applyDialogFont(children[i], dialogFont);
+ }
+ }
+ }
+
+ /**
+ * Return whether or not this control has the same font as it's default.
+ *
+ * @param control
+ * Control
+ * @return boolean
+ */
+ private static boolean hasDefaultFont(Control control) {
+ FontData[] controlFontData = control.getFont().getFontData();
+ FontData[] defaultFontData = getDefaultFont(control).getFontData();
+ if (controlFontData.length == defaultFontData.length) {
+ for (int i = 0; i < controlFontData.length; i++) {
+ if (controlFontData[i].equals(defaultFontData[i])) {
+ continue;
+ }
+ return false;
+ }
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Get the default font for this type of control.
+ *
+ * @param control
+ * @return the default font
+ */
+ private static Font getDefaultFont(Control control) {
+ String fontName = "DEFAULT_FONT_" + control.getClass().getName(); //$NON-NLS-1$
+ if (JFaceResources.getFontRegistry().hasValueFor(fontName)) {
+ return JFaceResources.getFontRegistry().get(fontName);
+ }
+ Font cached = control.getFont();
+ control.setFont(null);
+ Font defaultFont = control.getFont();
+ control.setFont(cached);
+ JFaceResources.getFontRegistry().put(fontName, defaultFont.getFontData());
+ return defaultFont;
+ }
+
+ /**
+ * An interface to content providers for
+ * <code>FilterItemsSelectionDialog</code>.
+ */
+ protected abstract class AbstractContentProvider {
+ /**
+ * Adds the item to the content provider iff the filter matches the
+ * item. Otherwise does nothing.
+ *
+ * @param item
+ * the item to add
+ * @param itemsFilter
+ * the filter
+ *
+ * @see FilteredItemsSelectionDialog.ItemsFilter#matchItem(Object)
+ */
+ public abstract void add(Object item, ItemsFilter itemsFilter);
+ }
+
+ /**
+ * Compares items using camel case method.
+ */
+ private class CamelCaseComparator implements Comparator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
+ */
+ public int compare(Object o1, Object o2) {
+
+ int leftCategory = getCamelCaseCategory(o1);
+ int rightCategory = getCamelCaseCategory(o2);
+ if (leftCategory < rightCategory)
+ return -1;
+ if (leftCategory > rightCategory)
+ return +1;
+
+ return getItemsComparator().compare(o1, o2);
+ }
+
+ private int getCamelCaseCategory(Object item) {
+ if (filter == null)
+ return 0;
+ if (!filter.isCamelCasePattern())
+ return 0;
+ return filter.matchesRawNamePattern(item) ? 0 : 1;
+ }
+ }
+
+ /**
+ * Collects filtered elements. Contains one synchronized, sorted set for
+ * collecting filtered elements. All collected elements are sorted using
+ * comparator. Comparator is returned by getElementComparator() method.
+ * Implementation of <code>ItemsFilter</code> is used to filter elements.
+ * The key function of filter used in to filtering is
+ * <code>matchElement(Object item)</code>.
+ * <p>
+ * The <code>ContentProvider</code> class also provides item filtering
+ * methods. The filtering has been moved from the standard TableView
+ * <code>getFilteredItems()</code> method to content provider, because
+ * <code>ILazyContentProvider</code> and virtual tables are used. This
+ * class is responsible for adding a separator below history items and
+ * marking each items as duplicate if its name repeats more than once on the
+ * filtered list.
+ */
+ private class ContentProvider extends AbstractContentProvider implements IStructuredContentProvider, ILazyContentProvider {
+
+ private SelectionHistory selectionHistory;
+
+ /**
+ * Raw result of the searching (unsorted, unfiltered).
+ * <p>
+ * Standard object flow:
+ * <code>items -> lastSortedItems -> lastFilteredItems</code>
+ */
+ private Set items;
+
+ /**
+ * Items that are duplicates.
+ */
+ private Set duplicates;
+
+ /**
+ * List of <code>ViewerFilter</code>s to be used during filtering
+ */
+ private List filters;
+
+ /**
+ * Result of the last filtering.
+ * <p>
+ * Standard object flow:
+ * <code>items -> lastSortedItems -> lastFilteredItems</code>
+ */
+ private List lastFilteredItems;
+
+ /**
+ * Result of the last sorting.
+ * <p>
+ * Standard object flow:
+ * <code>items -> lastSortedItems -> lastFilteredItems</code>
+ */
+ private List lastSortedItems;
+
+ /**
+ * Used for <code>getFilteredItems()</code> method canceling (when the
+ * job that invoked the method was canceled).
+ * <p>
+ * Method canceling could be based (only) on monitor canceling
+ * unfortunately sometimes the method <code>getFilteredElements()</code>
+ * could be run with a null monitor, the <code>reset</code> flag have
+ * to be left intact.
+ */
+ private boolean reset;
+
+ /**
+ * Creates new instance of <code>ContentProvider</code>.
+ */
+ public ContentProvider() {
+ this.items = Collections.synchronizedSet(new HashSet(2048));
+ this.duplicates = Collections.synchronizedSet(new HashSet(256));
+ this.lastFilteredItems = new ArrayList();
+ this.lastSortedItems = Collections.synchronizedList(new ArrayList(2048));
+ }
+
+ /**
+ * Sets selection history.
+ *
+ * @param selectionHistory
+ * The selectionHistory to set.
+ */
+ public void setSelectionHistory(SelectionHistory selectionHistory) {
+ this.selectionHistory = selectionHistory;
+ }
+
+ /**
+ * @return Returns the selectionHistory.
+ */
+ public SelectionHistory getSelectionHistory() {
+ return selectionHistory;
+ }
+
+ /**
+ * Removes all content items and resets progress message.
+ */
+ public void reset() {
+ reset = true;
+ this.items.clear();
+ this.duplicates.clear();
+ this.lastSortedItems.clear();
+ }
+
+ /**
+ * Stops reloading cache - <code>getFilteredItems()</code> method.
+ */
+ public void stopReloadingCache() {
+ reset = true;
+ }
+
+ /**
+ * Adds filtered item.
+ *
+ * @param item
+ * @param itemsFilter
+ */
+ public void add(Object item, ItemsFilter itemsFilter) {
+ if (itemsFilter == filter) {
+ if (itemsFilter != null) {
+ if (itemsFilter.matchItem(item)) {
+ this.items.add(item);
+ }
+ } else {
+ this.items.add(item);
+ }
+ }
+ }
+
+ /**
+ * Add all history items to <code>contentProvider</code>.
+ *
+ * @param itemsFilter
+ */
+ public void addHistoryItems(ItemsFilter itemsFilter) {
+ if (this.selectionHistory != null) {
+ Object[] items = this.selectionHistory.getHistoryItems();
+ for (int i = 0; i < items.length; i++) {
+ Object item = items[i];
+ if (itemsFilter == filter) {
+ if (itemsFilter != null) {
+ if (itemsFilter.matchItem(item)) {
+ if (itemsFilter.isConsistentItem(item)) {
+ this.items.add(item);
+ } else {
+ this.selectionHistory.remove(item);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Refresh dialog.
+ */
+ public void refresh() {
+ scheduleRefresh();
+ }
+
+ /**
+ * Removes items from history and refreshes the view.
+ *
+ * @param item
+ * to remove
+ *
+ * @return removed item
+ */
+ public Object removeHistoryElement(Object item) {
+ if (this.selectionHistory != null)
+ this.selectionHistory.remove(item);
+ if (filter == null || filter.getPattern().length() == 0) {
+ items.remove(item);
+ duplicates.remove(item);
+ this.lastSortedItems.remove(item);
+ }
+
+ synchronized (lastSortedItems) {
+ Collections.sort(lastSortedItems, getHistoryComparator());
+ }
+ return item;
+ }
+
+ /**
+ * Adds item to history and refresh view.
+ *
+ * @param item
+ * to add
+ */
+ public void addHistoryElement(Object item) {
+ if (this.selectionHistory != null)
+ this.selectionHistory.accessed(item);
+ if (filter == null || !filter.matchItem(item)) {
+ this.items.remove(item);
+ this.duplicates.remove(item);
+ this.lastSortedItems.remove(item);
+ }
+ synchronized (lastSortedItems) {
+ Collections.sort(lastSortedItems, getHistoryComparator());
+ }
+ this.refresh();
+ }
+
+ /**
+ * @param item
+ * @return <code>true</code> if given item is part of the history
+ */
+ public boolean isHistoryElement(Object item) {
+ if (this.selectionHistory != null) {
+ return this.selectionHistory.contains(item);
+ }
+ return false;
+ }
+
+ /**
+ * Sets/unsets given item as duplicate.
+ *
+ * @param item
+ * item to change
+ *
+ * @param isDuplicate
+ * duplicate flag
+ */
+ public void setDuplicateElement(Object item, boolean isDuplicate) {
+ if (this.items.contains(item)) {
+ if (isDuplicate)
+ this.duplicates.add(item);
+ else
+ this.duplicates.remove(item);
+ }
+ }
+
+ /**
+ * Indicates whether given item is a duplicate.
+ *
+ * @param item
+ * item to check
+ * @return <code>true</code> if item is duplicate
+ */
+ public boolean isDuplicateElement(Object item) {
+ return duplicates.contains(item);
+ }
+
+ /**
+ * Load history from memento.
+ *
+ * @param memento
+ * memento from which the history will be retrieved
+ */
+ public void loadHistory(IMemento memento) {
+ if (this.selectionHistory != null)
+ this.selectionHistory.load(memento);
+ }
+
+ /**
+ * Save history to memento.
+ *
+ * @param memento
+ * memento to which the history will be added
+ */
+ public void saveHistory(IMemento memento) {
+ if (this.selectionHistory != null)
+ this.selectionHistory.save(memento);
+ }
+
+ /**
+ * Gets sorted items.
+ *
+ * @return sorted items
+ */
+ private Object[] getSortedItems() {
+ if (lastSortedItems.size() != items.size()) {
+ synchronized (lastSortedItems) {
+ lastSortedItems.clear();
+ lastSortedItems.addAll(items);
+ Collections.sort(lastSortedItems, getHistoryComparator());
+ }
+ }
+ return lastSortedItems.toArray();
+ }
+
+ /**
+ * Remember result of filtering.
+ *
+ * @param itemsFilter
+ */
+ public void rememberResult(ItemsFilter itemsFilter) {
+ List itemsList = Collections.synchronizedList(Arrays.asList(getSortedItems()));
+ // synchronization
+ if (itemsFilter == filter) {
+ lastCompletedFilter = itemsFilter;
+ lastCompletedResult = itemsList;
+ }
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+ */
+ public Object[] getElements(Object inputElement) {
+ return lastFilteredItems.toArray();
+ }
+
+ public int getNumberOfElements() {
+ return lastFilteredItems.size();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+ */
+ public void dispose() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer,
+ * java.lang.Object, java.lang.Object)
+ */
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.ILazyContentProvider#updateElement(int)
+ */
+ public void updateElement(int index) {
+ FilteredItemsSelectionWizardPage.this.list.replace((lastFilteredItems.size() > index) ? lastFilteredItems.get(index) : null, index);
+ }
+
+ /**
+ * Main method responsible for getting the filtered items and checking
+ * for duplicates. It is based on the {@link FilteredItemsSelectionDialog.ContentProvider#getFilteredItems(Object, IProgressMonitor)}.
+ *
+ * @param checkDuplicates
+ * <code>true</code> if data concerning elements
+ * duplication should be computed - it takes much more time
+ * than standard filtering
+ *
+ * @param monitor
+ * progress monitor
+ */
+ public void reloadCache(boolean checkDuplicates, IProgressMonitor monitor) {
+
+ reset = false;
+
+ if (monitor != null) {
+ // the work is divided into two actions of the same length
+ int totalWork = checkDuplicates ? 200 : 100;
+
+ monitor.beginTask(WorkbenchMessages.FilteredItemsSelectionDialog_cacheRefreshJob, totalWork);
+ }
+
+ // the TableViewer's root (the input) is treated as parent
+
+ lastFilteredItems = Arrays.asList(getFilteredItems(list.getInput(), monitor != null ? new SubProgressMonitor(monitor, 100) : null));
+
+ if (reset || (monitor != null && monitor.isCanceled())) {
+ if (monitor != null)
+ monitor.done();
+ return;
+ }
+
+ if (checkDuplicates) {
+ checkDuplicates(monitor);
+ }
+ if (monitor != null)
+ monitor.done();
+ }
+
+ private void checkDuplicates(IProgressMonitor monitor) {
+ synchronized (lastFilteredItems) {
+ IProgressMonitor subMonitor = null;
+ int reportEvery = lastFilteredItems.size() / 20;
+ if (monitor != null) {
+ subMonitor = new SubProgressMonitor(monitor, 100);
+ subMonitor.beginTask(WorkbenchMessages.FilteredItemsSelectionDialog_cacheRefreshJob_checkDuplicates, 5);
+ }
+ HashMap helperMap = new HashMap();
+ for (int i = 0; i < lastFilteredItems.size(); i++) {
+ if (reset || (subMonitor != null && subMonitor.isCanceled()))
+ return;
+ Object item = lastFilteredItems.get(i);
+
+ if (!(item instanceof ItemsListSeparator)) {
+ Object previousItem = helperMap.put(getElementName(item), item);
+ if (previousItem != null) {
+ setDuplicateElement(previousItem, true);
+ setDuplicateElement(item, true);
+ } else {
+ setDuplicateElement(item, false);
+ }
+ }
+
+ if (subMonitor != null && reportEvery != 0 && (i + 1) % reportEvery == 0)
+ subMonitor.worked(1);
+ }
+ helperMap.clear();
+ }
+ }
+
+ /**
+ * Returns an array of items filtered using the provided
+ * <code>ViewerFilter</code>s with a separator added.
+ *
+ * @param parent
+ * the parent
+ * @param monitor
+ * progress monitor, can be <code>null</code>
+ * @return an array of filtered items
+ */
+ protected Object[] getFilteredItems(Object parent, IProgressMonitor monitor) {
+ int ticks = 100;
+ if (monitor == null) {
+ monitor = new NullProgressMonitor();
+ }
+
+ monitor.beginTask(WorkbenchMessages.FilteredItemsSelectionDialog_cacheRefreshJob_getFilteredElements, ticks);
+ if (filters != null) {
+ ticks /= (filters.size() + 2);
+ } else {
+ ticks /= 2;
+ }
+
+ // get already sorted array
+ Object[] filteredElements = getSortedItems();
+
+ monitor.worked(ticks);
+
+ // filter the elements using provided ViewerFilters
+ if (filters != null && filteredElements != null) {
+ for (Iterator iter = filters.iterator(); iter.hasNext();) {
+ ViewerFilter f = (ViewerFilter) iter.next();
+ filteredElements = f.filter(list, parent, filteredElements);
+ monitor.worked(ticks);
+ }
+ }
+
+ if (filteredElements == null || monitor.isCanceled()) {
+ monitor.done();
+ return new Object[0];
+ }
+
+ ArrayList preparedElements = new ArrayList();
+ boolean hasHistory = false;
+
+ if (filteredElements.length > 0) {
+ if (isHistoryElement(filteredElements[0])) {
+ hasHistory = true;
+ }
+ }
+
+ int reportEvery = filteredElements.length / ticks;
+
+ // add separator
+ for (int i = 0; i < filteredElements.length; i++) {
+ Object item = filteredElements[i];
+
+ if (hasHistory && !isHistoryElement(item)) {
+ preparedElements.add(itemsListSeparator);
+ hasHistory = false;
+ }
+
+ preparedElements.add(item);
+
+ if (reportEvery != 0 && ((i + 1) % reportEvery == 0)) {
+ monitor.worked(1);
+ }
+ }
+
+ monitor.done();
+
+ return preparedElements.toArray();
+ }
+
+ /**
+ * Adds a filter to this content provider. For an example usage of such
+ * filters look at the project <code>org.eclipse.ui.ide</code>, class
+ * <code>org.eclipse.ui.dialogs.FilteredResourcesSelectionDialog.CustomWorkingSetFilter</code>.
+ *
+ *
+ * @param filter
+ * the filter to be added
+ */
+ public void addFilter(ViewerFilter filter) {
+ if (filters == null) {
+ filters = new ArrayList();
+ }
+ filters.add(filter);
+ // currently filters are only added when dialog is restored
+ // if it is changed, refreshing the whole TableViewer should be
+ // added
+ }
+
+ }
+
+ /**
+ * DetailsContentViewer objects are wrappers for labels.
+ * DetailsContentViewer provides means to change label's image and text when
+ * the attached LabelProvider is updated.
+ */
+ private class DetailsContentViewer extends ContentViewer {
+
+ private CLabel label;
+
+ /**
+ * Unfortunately, it was impossible to delegate displaying border to
+ * label. The <code>ViewForm</code> is used because
+ * <code>CLabel</code> displays shadow when border is present.
+ */
+ private ViewForm viewForm;
+
+ /**
+ * Constructs a new instance of this class given its parent and a style
+ * value describing its behavior and appearance.
+ *
+ * @param parent
+ * the parent component
+ * @param style
+ * SWT style bits
+ */
+ public DetailsContentViewer(Composite parent, int style) {
+ viewForm = new ViewForm(parent, style);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ viewForm.setLayoutData(gd);
+ label = new CLabel(viewForm, SWT.FLAT);
+ label.setFont(parent.getFont());
+ viewForm.setContent(label);
+ hookControl(label);
+ }
+
+ /**
+ * Shows/hides the content viewer.
+ *
+ * @param visible
+ * if the content viewer should be visible.
+ */
+ public void setVisible(boolean visible) {
+ GridData gd = (GridData) viewForm.getLayoutData();
+ gd.exclude = !visible;
+ viewForm.getParent().layout();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.Viewer#inputChanged(java.lang.Object,
+ * java.lang.Object)
+ */
+ protected void inputChanged(Object input, Object oldInput) {
+ if (oldInput == null) {
+ if (input == null) {
+ return;
+ }
+ refresh();
+ return;
+ }
+
+ refresh();
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.ContentViewer#handleLabelProviderChanged(org.eclipse.jface.viewers.LabelProviderChangedEvent)
+ */
+ protected void handleLabelProviderChanged(LabelProviderChangedEvent event) {
+ if (event != null) {
+ refresh(event.getElements());
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.Viewer#getControl()
+ */
+ public Control getControl() {
+ return label;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.Viewer#getSelection()
+ */
+ public ISelection getSelection() {
+ // not supported
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.Viewer#refresh()
+ */
+ public void refresh() {
+ Object input = this.getInput();
+ if (input != null) {
+ ILabelProvider labelProvider = (ILabelProvider) getLabelProvider();
+ doRefresh(labelProvider.getText(input), labelProvider.getImage(input));
+ } else {
+ doRefresh(null, null);
+ }
+ }
+
+ /**
+ * Sets the given text and image to the label.
+ *
+ * @param text
+ * the new text or null
+ * @param image
+ * the new image
+ */
+ private void doRefresh(String text, Image image) {
+ label.setText(text);
+ label.setImage(image);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.Viewer#setSelection(org.eclipse.jface.viewers.ISelection,
+ * boolean)
+ */
+ public void setSelection(ISelection selection, boolean reveal) {
+ // not supported
+ }
+
+ /**
+ * Refreshes the label if currently chosen element is on the list.
+ *
+ * @param objs
+ * list of changed object
+ */
+ private void refresh(Object[] objs) {
+ if (objs == null || getInput() == null) {
+ return;
+ }
+ Object input = getInput();
+ for (int i = 0; i < objs.length; i++) {
+ if (objs[i].equals(input)) {
+ refresh();
+ break;
+ }
+ }
+ }
+ }
+
+ private static boolean showColoredLabels() {
+ return PlatformUI.getPreferenceStore().getBoolean(IWorkbenchPreferenceConstants.USE_COLORED_LABELS);
+ }
+
+ private class ItemsListLabelProvider extends StyledCellLabelProvider implements ILabelProviderListener {
+ private ILabelProvider provider;
+
+ private ILabelDecorator selectionDecorator;
+
+ // Need to keep our own list of listeners
+ private ListenerList listeners = new ListenerList();
+
+ /**
+ * Creates a new instance of the class.
+ *
+ * @param provider
+ * the label provider for all items, not <code>null</code>
+ * @param selectionDecorator
+ * the decorator for selected items, can be <code>null</code>
+ */
+ public ItemsListLabelProvider(ILabelProvider provider, ILabelDecorator selectionDecorator) {
+ Assert.isNotNull(provider);
+ this.provider = provider;
+ this.selectionDecorator = selectionDecorator;
+
+ setOwnerDrawEnabled(showColoredLabels() && provider instanceof IStyledLabelProvider);
+
+ provider.addListener(this);
+
+ if (selectionDecorator != null) {
+ selectionDecorator.addListener(this);
+ }
+ }
+
+ /**
+ * Sets new selection decorator.
+ *
+ * @param newSelectionDecorator
+ * new label decorator for selected items in the list
+ */
+ public void setSelectionDecorator(ILabelDecorator newSelectionDecorator) {
+ if (selectionDecorator != null) {
+ selectionDecorator.removeListener(this);
+ selectionDecorator.dispose();
+ }
+
+ selectionDecorator = newSelectionDecorator;
+
+ if (selectionDecorator != null) {
+ selectionDecorator.addListener(this);
+ }
+ }
+
+ /**
+ * Gets selection decorator.
+ *
+ * @return the label decorator for selected items in the list
+ */
+ public ILabelDecorator getSelectionDecorator() {
+ return selectionDecorator;
+ }
+
+ /**
+ * Sets new label provider.
+ *
+ * @param newProvider
+ * new label provider for items in the list, not
+ * <code>null</code>
+ */
+ public void setProvider(ILabelProvider newProvider) {
+ Assert.isNotNull(newProvider);
+ provider.removeListener(this);
+ provider.dispose();
+
+ provider = newProvider;
+
+ if (provider != null) {
+ provider.addListener(this);
+ }
+
+ setOwnerDrawEnabled(showColoredLabels() && provider instanceof IStyledLabelProvider);
+ }
+
+ private Image getImage(Object element) {
+ if (element instanceof ItemsListSeparator) {
+ return WorkbenchImages.getImage(IWorkbenchGraphicConstants.IMG_OBJ_SEPARATOR);
+ }
+
+ return provider.getImage(element);
+ }
+
+ private boolean isSelected(Object element) {
+ if (element != null && currentSelection != null) {
+ for (int i = 0; i < currentSelection.length; i++) {
+ if (element.equals(currentSelection[i]))
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
+ */
+ private String getText(Object element) {
+ if (element instanceof ItemsListSeparator) {
+ return getSeparatorLabel(((ItemsListSeparator) element).getName());
+ }
+
+ String str = provider.getText(element);
+ if (selectionDecorator != null && isSelected(element)) {
+ return selectionDecorator.decorateText(str.toString(), element);
+ }
+
+ return str;
+ }
+
+ private StyledString getStyledText(Object element, IStyledLabelProvider provider) {
+ StyledString string = provider.getStyledText(element);
+
+ if (selectionDecorator != null && isSelected(element)) {
+ String decorated = selectionDecorator.decorateText(string.getString(), element);
+ return StyledCellLabelProvider.styleDecoratedString(decorated, null, string);
+ // no need to add colors when element is selected
+ }
+ return string;
+ }
+
+ public void update(ViewerCell cell) {
+ Object element = cell.getElement();
+
+ if (!(element instanceof ItemsListSeparator) && provider instanceof IStyledLabelProvider) {
+ IStyledLabelProvider styledLabelProvider = (IStyledLabelProvider) provider;
+ StyledString styledString = getStyledText(element, styledLabelProvider);
+
+ cell.setText(styledString.getString());
+ cell.setStyleRanges(styledString.getStyleRanges());
+ cell.setImage(styledLabelProvider.getImage(element));
+ } else {
+ cell.setText(getText(element));
+ cell.setImage(getImage(element));
+ }
+ cell.setFont(getFont(element));
+ cell.setForeground(getForeground(element));
+ cell.setBackground(getBackground(element));
+
+ super.update(cell);
+ }
+
+ private String getSeparatorLabel(String separatorLabel) {
+ Rectangle rect = list.getTable().getBounds();
+
+ int borderWidth = list.getTable().computeTrim(0, 0, 0, 0).width;
+
+ int imageWidth = WorkbenchImages.getImage(IWorkbenchGraphicConstants.IMG_OBJ_SEPARATOR).getBounds().width;
+
+ int width = rect.width - borderWidth - imageWidth;
+
+ GC gc = new GC(list.getTable());
+ gc.setFont(list.getTable().getFont());
+
+ int fSeparatorWidth = gc.getAdvanceWidth('-');
+ int fMessageLength = gc.textExtent(separatorLabel).x;
+
+ gc.dispose();
+
+ StringBuffer dashes = new StringBuffer();
+ int chars = (((width - fMessageLength) / fSeparatorWidth) / 2) - 2;
+ for (int i = 0; i < chars; i++) {
+ dashes.append('-');
+ }
+
+ StringBuffer result = new StringBuffer();
+ result.append(dashes);
+ result.append(" " + separatorLabel + " "); //$NON-NLS-1$//$NON-NLS-2$
+ result.append(dashes);
+ return result.toString().trim();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
+ */
+ public void addListener(ILabelProviderListener listener) {
+ listeners.add(listener);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
+ */
+ public void dispose() {
+ provider.removeListener(this);
+ provider.dispose();
+
+ if (selectionDecorator != null) {
+ selectionDecorator.removeListener(this);
+ selectionDecorator.dispose();
+ }
+
+ super.dispose();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object,
+ * java.lang.String)
+ */
+ public boolean isLabelProperty(Object element, String property) {
+ if (provider.isLabelProperty(element, property)) {
+ return true;
+ }
+ if (selectionDecorator != null && selectionDecorator.isLabelProperty(element, property)) {
+ return true;
+ }
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
+ */
+ public void removeListener(ILabelProviderListener listener) {
+ listeners.remove(listener);
+ }
+
+ private Color getBackground(Object element) {
+ if (element instanceof ItemsListSeparator) {
+ return null;
+ }
+ if (provider instanceof IColorProvider) {
+ return ((IColorProvider) provider).getBackground(element);
+ }
+ return null;
+ }
+
+ private Color getForeground(Object element) {
+ if (element instanceof ItemsListSeparator) {
+ return Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW);
+ }
+ if (provider instanceof IColorProvider) {
+ return ((IColorProvider) provider).getForeground(element);
+ }
+ return null;
+ }
+
+ private Font getFont(Object element) {
+ if (element instanceof ItemsListSeparator) {
+ return null;
+ }
+ if (provider instanceof IFontProvider) {
+ return ((IFontProvider) provider).getFont(element);
+ }
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.ILabelProviderListener#labelProviderChanged(org.eclipse.jface.viewers.LabelProviderChangedEvent)
+ */
+ public void labelProviderChanged(LabelProviderChangedEvent event) {
+ Object[] l = listeners.getListeners();
+ for (int i = 0; i < listeners.size(); i++) {
+ ((ILabelProviderListener) l[i]).labelProviderChanged(event);
+ }
+ }
+ }
+
+ /**
+ * Only refreshes UI on the basis of an already sorted and filtered set of
+ * items.
+ * <p>
+ * Standard invocation scenario:
+ * <ol>
+ * <li>filtering job (<code>FilterJob</code> class extending
+ * <code>Job</code> class)</li>
+ * <li>cache refresh without checking for duplicates (<code>RefreshCacheJob</code>
+ * class extending <code>Job</code> class)</li>
+ * <li>UI refresh (<code>RefreshJob</code> class extending
+ * <code>UIJob</code> class)</li>
+ * <li>cache refresh with checking for duplicates (<cod>CacheRefreshJob</code>
+ * class extending <code>Job</code> class)</li>
+ * <li>UI refresh (<code>RefreshJob</code> class extending <code>UIJob</code>
+ * class)</li>
+ * </ol>
+ * The scenario is rather complicated, but it had to be applied, because:
+ * <ul>
+ * <li> refreshing cache is rather a long action and cannot be run in the UI -
+ * cannot be run in a UIJob</li>
+ * <li> refreshing cache checking for duplicates is twice as long as
+ * refreshing cache without checking for duplicates; results of the search
+ * could be displayed earlier</li>
+ * <li> refreshing the UI have to be run in a UIJob</li>
+ * </ul>
+ *
+ * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.FilterJob
+ * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.RefreshJob
+ * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.RefreshCacheJob
+ */
+ private class RefreshJob extends UIJob {
+
+ /**
+ * Creates a new instance of the class.
+ */
+ public RefreshJob() {
+ super(FilteredItemsSelectionWizardPage.this.getShell().getDisplay(), WorkbenchMessages.FilteredItemsSelectionDialog_refreshJob);
+ setSystem(true);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.progress.UIJob#runInUIThread(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+ if (monitor.isCanceled())
+ return new Status(IStatus.OK, WorkbenchPlugin.PI_WORKBENCH, IStatus.OK, EMPTY_STRING, null);
+
+ if (FilteredItemsSelectionWizardPage.this != null) {
+ FilteredItemsSelectionWizardPage.this.refresh();
+ }
+
+ return new Status(IStatus.OK, PlatformUI.PLUGIN_ID, IStatus.OK, EMPTY_STRING, null);
+ }
+
+ }
+
+ /**
+ * Refreshes the progress message cyclically with 500 milliseconds delay.
+ * <code>RefreshProgressMessageJob</code> is strictly connected with
+ * <code>GranualProgressMonitor</code> and use it to to get progress
+ * message and to decide about break of cyclical refresh.
+ */
+ private class RefreshProgressMessageJob extends UIJob {
+
+ private GranualProgressMonitor progressMonitor;
+
+ /**
+ * Creates a new instance of the class.
+ */
+ public RefreshProgressMessageJob() {
+ super(FilteredItemsSelectionWizardPage.this.getShell().getDisplay(), WorkbenchMessages.FilteredItemsSelectionDialog_progressRefreshJob);
+ setSystem(true);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.progress.UIJob#runInUIThread(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+
+ if (!progressLabel.isDisposed())
+ progressLabel.setText(progressMonitor != null ? progressMonitor.getMessage() : EMPTY_STRING);
+
+ if (progressMonitor == null || progressMonitor.isDone()) {
+ return new Status(IStatus.CANCEL, PlatformUI.PLUGIN_ID, IStatus.CANCEL, EMPTY_STRING, null);
+ }
+
+ // Schedule cyclical with 500 milliseconds delay
+ schedule(500);
+
+ return new Status(IStatus.OK, PlatformUI.PLUGIN_ID, IStatus.OK, EMPTY_STRING, null);
+ }
+
+ /**
+ * Schedule progress refresh job.
+ *
+ * @param progressMonitor
+ * used during refresh progress label
+ */
+ public void scheduleProgressRefresh(GranualProgressMonitor progressMonitor) {
+ this.progressMonitor = progressMonitor;
+ // Schedule with initial delay to avoid flickering when the user
+ // types quickly
+ schedule(200);
+ }
+
+ }
+
+ /**
+ * A job responsible for computing filtered items list presented using
+ * <code>RefreshJob</code>.
+ *
+ * @see FilteredItemsSelectionDialog.RefreshJob
+ *
+ */
+ private class RefreshCacheJob extends Job {
+
+ private RefreshJob refreshJob = new RefreshJob();
+
+ /**
+ * Creates a new instance of the class.
+ */
+ public RefreshCacheJob() {
+ super(WorkbenchMessages.FilteredItemsSelectionDialog_cacheRefreshJob);
+ setSystem(true);
+ }
+
+ /**
+ * Stops the job and all sub-jobs.
+ */
+ public void cancelAll() {
+ cancel();
+ refreshJob.cancel();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ protected IStatus run(IProgressMonitor monitor) {
+ if (monitor.isCanceled()) {
+ return new Status(IStatus.CANCEL, WorkbenchPlugin.PI_WORKBENCH, IStatus.CANCEL, EMPTY_STRING, null);
+ }
+
+ if (FilteredItemsSelectionWizardPage.this != null) {
+ GranualProgressMonitor wrappedMonitor = new GranualProgressMonitor(monitor);
+ FilteredItemsSelectionWizardPage.this.reloadCache(true, wrappedMonitor);
+ }
+
+ if (!monitor.isCanceled()) {
+ refreshJob.schedule();
+ }
+
+ return new Status(IStatus.OK, PlatformUI.PLUGIN_ID, IStatus.OK, EMPTY_STRING, null);
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.jobs.Job#canceling()
+ */
+ protected void canceling() {
+ super.canceling();
+ contentProvider.stopReloadingCache();
+ }
+
+ }
+
+ private class ToggleStatusLineAction extends Action {
+ /**
+ * Creates a new instance of the class.
+ */
+ public ToggleStatusLineAction() {
+ super(WorkbenchMessages.FilteredItemsSelectionDialog_toggleStatusAction, IAction.AS_CHECK_BOX);
+ }
+
+ public void run() {
+ details.setVisible(isChecked());
+ }
+ }
+
+ private class RemoveHistoryItemAction extends Action {
+
+ /**
+ * Creates a new instance of the class.
+ */
+ public RemoveHistoryItemAction() {
+ super(WorkbenchMessages.FilteredItemsSelectionDialog_removeItemsFromHistoryAction);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ public void run() {
+ List selectedElements = ((StructuredSelection) list.getSelection()).toList();
+ removeSelectedItems(selectedElements);
+ }
+ }
+
+ /**
+ * A content provider that does nothing.
+ */
+ private class NullContentProvider implements IContentProvider {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+ */
+ public void dispose() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer,
+ * java.lang.Object, java.lang.Object)
+ */
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+
+ }
+
+ /**
+ * Used in ItemsListContentProvider, separates history and non-history
+ * items.
+ */
+ private class ItemsListSeparator {
+
+ private String name;
+
+ /**
+ * Creates a new instance of the class.
+ *
+ * @param name
+ * the name of the separator
+ */
+ public ItemsListSeparator(String name) {
+ this.name = name;
+ }
+
+ /**
+ * Returns the name of this separator.
+ *
+ * @return the name of the separator
+ */
+ public String getName() {
+ return name;
+ }
+ }
+
+ /**
+ * Compares items according to the history.
+ */
+ private class HistoryComparator implements Comparator {
+
+ private CamelCaseComparator camelCaseComparator;
+
+ /**
+ *
+ */
+ public HistoryComparator() {
+ this.camelCaseComparator = new CamelCaseComparator();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
+ */
+ public int compare(Object o1, Object o2) {
+ if ((isHistoryElement(o1) && isHistoryElement(o2)) || (!isHistoryElement(o1) && !isHistoryElement(o2)))
+ return this.camelCaseComparator.compare(o1, o2);
+
+ if (isHistoryElement(o1))
+ return -2;
+ if (isHistoryElement(o2))
+ return +2;
+
+ return 0;
+ }
+
+ }
+
+ /**
+ * GranualProgressMonitor is used for monitoring progress of filtering
+ * process. It is used by <code>RefreshProgressMessageJob</code> to
+ * refresh progress message. State of this monitor illustrates state of
+ * filtering or cache refreshing process.
+ *
+ */
+ private class GranualProgressMonitor extends ProgressMonitorWrapper {
+
+ private String name;
+
+ private String subName;
+
+ private int totalWork;
+
+ private double worked;
+
+ private boolean done;
+
+ /**
+ * Creates instance of <code>GranualProgressMonitor</code>.
+ *
+ * @param monitor
+ * progress to be wrapped
+ */
+ public GranualProgressMonitor(IProgressMonitor monitor) {
+ super(monitor);
+ }
+
+ /**
+ * Checks if filtering has been done
+ *
+ * @return true if filtering work has been done false in other way
+ */
+ public boolean isDone() {
+ return done;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.ProgressMonitorWrapper#setTaskName(java.lang.String)
+ */
+ public void setTaskName(String name) {
+ super.setTaskName(name);
+ this.name = name;
+ this.subName = null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.ProgressMonitorWrapper#subTask(java.lang.String)
+ */
+ public void subTask(String name) {
+ super.subTask(name);
+ this.subName = name;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.ProgressMonitorWrapper#beginTask(java.lang.String,
+ * int)
+ */
+ public void beginTask(String name, int totalWork) {
+ super.beginTask(name, totalWork);
+ if (this.name == null)
+ this.name = name;
+ this.totalWork = totalWork;
+ refreshProgressMessageJob.scheduleProgressRefresh(this);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.ProgressMonitorWrapper#worked(int)
+ */
+ public void worked(int work) {
+ super.worked(work);
+ internalWorked(work);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.ProgressMonitorWrapper#done()
+ */
+ public void done() {
+ done = true;
+ super.done();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.ProgressMonitorWrapper#setCanceled(boolean)
+ */
+ public void setCanceled(boolean b) {
+ done = b;
+ super.setCanceled(b);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.ProgressMonitorWrapper#internalWorked(double)
+ */
+ public void internalWorked(double work) {
+ worked = worked + work;
+ }
+
+ private String getMessage() {
+ if (done)
+ return ""; //$NON-NLS-1$
+
+ String message;
+
+ if (name == null) {
+ message = subName == null ? "" : subName; //$NON-NLS-1$
+ } else {
+ message = subName == null ? name : NLS.bind(WorkbenchMessages.FilteredItemsSelectionDialog_subtaskProgressMessage, new Object[] { name, subName });
+ }
+ if (totalWork == 0)
+ return message;
+
+ return NLS.bind(WorkbenchMessages.FilteredItemsSelectionDialog_taskProgressMessage, new Object[] { message, new Integer((int) ((worked * 100) / totalWork)) });
+
+ }
+
+ }
+
+ /**
+ * Filters items history and schedule filter job.
+ */
+ private class FilterHistoryJob extends Job {
+
+ /**
+ * Filter used during the filtering process.
+ */
+ private ItemsFilter itemsFilter;
+
+ /**
+ * Creates new instance of receiver.
+ */
+ public FilterHistoryJob() {
+ super(WorkbenchMessages.FilteredItemsSelectionDialog_jobLabel);
+ setSystem(true);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ protected IStatus run(IProgressMonitor monitor) {
+
+ this.itemsFilter = filter;
+
+ contentProvider.reset();
+
+ refreshWithLastSelection = false;
+
+ contentProvider.addHistoryItems(itemsFilter);
+
+ if (!(lastCompletedFilter != null && lastCompletedFilter.isSubFilter(this.itemsFilter)))
+ contentProvider.refresh();
+
+ filterJob.schedule();
+
+ return Status.OK_STATUS;
+ }
+
+ }
+
+ /**
+ * Filters items in indicated set and history. During filtering, it
+ * refreshes the dialog (progress monitor and elements list).
+ *
+ * Depending on the filter, <code>FilterJob</code> decides which kind of
+ * search will be run inside <code>filterContent</code>. If the last
+ * filtering is done (last completed filter), is not null, and the new
+ * filter is a sub-filter ({@link FilteredItemsSelectionDialog.ItemsFilter#isSubFilter(FilteredItemsSelectionDialog.ItemsFilter)})
+ * of the last, then <code>FilterJob</code> only filters in the cache. If
+ * it is the first filtering or the new filter isn't a sub-filter of the
+ * last one, a full search is run.
+ */
+ private class FilterJob extends Job {
+
+ /**
+ * Filter used during the filtering process.
+ */
+ protected ItemsFilter itemsFilter;
+
+ /**
+ * Creates new instance of FilterJob
+ */
+ public FilterJob() {
+ super(WorkbenchMessages.FilteredItemsSelectionDialog_jobLabel);
+ setSystem(true);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ protected final IStatus run(IProgressMonitor parent) {
+ GranualProgressMonitor monitor = new GranualProgressMonitor(parent);
+ return doRun(monitor);
+ }
+
+ /**
+ * Executes job using the given filtering progress monitor. A hook for
+ * subclasses.
+ *
+ * @param monitor
+ * progress monitor
+ * @return result of the execution
+ */
+ protected IStatus doRun(GranualProgressMonitor monitor) {
+ try {
+ internalRun(monitor);
+ } catch (CoreException e) {
+ cancel();
+ return new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, IStatus.ERROR, WorkbenchMessages.FilteredItemsSelectionDialog_jobError, e);
+ }
+ return Status.OK_STATUS;
+ }
+
+ /**
+ * Main method for the job.
+ *
+ * @param monitor
+ * @throws CoreException
+ */
+ private void internalRun(GranualProgressMonitor monitor) throws CoreException {
+ try {
+ if (monitor.isCanceled())
+ return;
+
+ this.itemsFilter = filter;
+
+ if (filter.getPattern().length() != 0) {
+ filterContent(monitor);
+ }
+
+ if (monitor.isCanceled())
+ return;
+
+ contentProvider.refresh();
+ } finally {
+ monitor.done();
+ }
+ }
+
+ /**
+ * Filters items.
+ *
+ * @param monitor
+ * for monitoring progress
+ * @throws CoreException
+ */
+ protected void filterContent(GranualProgressMonitor monitor) throws CoreException {
+
+ if (lastCompletedFilter != null && lastCompletedFilter.isSubFilter(this.itemsFilter)) {
+
+ int length = lastCompletedResult.size() / 500;
+ monitor.beginTask(WorkbenchMessages.FilteredItemsSelectionDialog_cacheSearchJob_taskName, length);
+
+ for (int pos = 0; pos < lastCompletedResult.size(); pos++) {
+
+ Object item = lastCompletedResult.get(pos);
+ if (monitor.isCanceled())
+ break;
+ contentProvider.add(item, itemsFilter);
+
+ if ((pos % 500) == 0) {
+ monitor.worked(1);
+ }
+ }
+
+ } else {
+
+ lastCompletedFilter = null;
+ lastCompletedResult = null;
+
+ SubProgressMonitor subMonitor = null;
+ if (monitor != null) {
+ monitor.beginTask(WorkbenchMessages.FilteredItemsSelectionDialog_searchJob_taskName, 100);
+ subMonitor = new SubProgressMonitor(monitor, 95);
+
+ }
+
+ fillContentProvider(contentProvider, itemsFilter, subMonitor);
+
+ if (monitor != null && !monitor.isCanceled()) {
+ monitor.worked(2);
+ contentProvider.rememberResult(itemsFilter);
+ monitor.worked(3);
+ }
+ }
+
+ }
+
+ }
+
+ /**
+ * History stores a list of key, object pairs. The list is bounded at a
+ * certain size. If the list exceeds this size the oldest element is removed
+ * from the list. An element can be added/renewed with a call to
+ * <code>accessed(Object)</code>.
+ * <p>
+ * The history can be stored to/loaded from an XML file.
+ */
+ protected static abstract class SelectionHistory {
+
+ private static final String DEFAULT_ROOT_NODE_NAME = "historyRootNode"; //$NON-NLS-1$
+
+ private static final String DEFAULT_INFO_NODE_NAME = "infoNode"; //$NON-NLS-1$
+
+ private static final int MAX_HISTORY_SIZE = 60;
+
+ private final List historyList;
+
+ private final String rootNodeName;
+
+ private final String infoNodeName;
+
+ private SelectionHistory(String rootNodeName, String infoNodeName) {
+
+ historyList = Collections.synchronizedList(new LinkedList() {
+
+ private static final long serialVersionUID = 0L;
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.util.LinkedList#add(java.lang.Object)
+ */
+ public boolean add(Object arg0) {
+ if (this.size() >= MAX_HISTORY_SIZE)
+ this.removeFirst();
+ if (!this.contains(arg0))
+ return super.add(arg0);
+ return false;
+ }
+
+ });
+
+ this.rootNodeName = rootNodeName;
+ this.infoNodeName = infoNodeName;
+ }
+
+ /**
+ * Creates new instance of <code>SelectionHistory</code>.
+ */
+ public SelectionHistory() {
+ this(DEFAULT_ROOT_NODE_NAME, DEFAULT_INFO_NODE_NAME);
+ }
+
+ /**
+ * Adds object to history.
+ *
+ * @param object
+ * the item to be added to the history
+ */
+ public synchronized void accessed(Object object) {
+ historyList.add(object);
+ }
+
+ /**
+ * Returns <code>true</code> if history contains object.
+ *
+ * @param object
+ * the item for which check will be executed
+ * @return <code>true</code> if history contains object
+ * <code>false</code> in other way
+ */
+ public synchronized boolean contains(Object object) {
+ return historyList.contains(object);
+ }
+
+ /**
+ * Returns <code>true</code> if history is empty.
+ *
+ * @return <code>true</code> if history is empty
+ */
+ public synchronized boolean isEmpty() {
+ return historyList.isEmpty();
+ }
+
+ /**
+ * Remove element from history.
+ *
+ * @param element
+ * to remove form the history
+ * @return <code>true</code> if this list contained the specified
+ * element
+ */
+ public synchronized boolean remove(Object element) {
+ return historyList.remove(element);
+ }
+
+ /**
+ * Load history elements from memento.
+ *
+ * @param memento
+ * memento from which the history will be retrieved
+ */
+ public void load(IMemento memento) {
+
+ XMLMemento historyMemento = (XMLMemento) memento.getChild(rootNodeName);
+
+ if (historyMemento == null) {
+ return;
+ }
+
+ IMemento[] mementoElements = historyMemento.getChildren(infoNodeName);
+ for (int i = 0; i < mementoElements.length; ++i) {
+ IMemento mementoElement = mementoElements[i];
+ Object object = restoreItemFromMemento(mementoElement);
+ if (object != null) {
+ historyList.add(object);
+ }
+ }
+ }
+
+ /**
+ * Save history elements to memento.
+ *
+ * @param memento
+ * memento to which the history will be added
+ */
+ public void save(IMemento memento) {
+
+ IMemento historyMemento = memento.createChild(rootNodeName);
+
+ Object[] items = getHistoryItems();
+ for (int i = 0; i < items.length; i++) {
+ Object item = items[i];
+ IMemento elementMemento = historyMemento.createChild(infoNodeName);
+ storeItemToMemento(item, elementMemento);
+ }
+
+ }
+
+ /**
+ * Gets array of history items.
+ *
+ * @return array of history elements
+ */
+ public synchronized Object[] getHistoryItems() {
+ return historyList.toArray();
+ }
+
+ /**
+ * Creates an object using given memento.
+ *
+ * @param memento
+ * memento used for creating new object
+ *
+ * @return the restored object
+ */
+ protected abstract Object restoreItemFromMemento(IMemento memento);
+
+ /**
+ * Store object in <code>IMemento</code>.
+ *
+ * @param item
+ * the item to store
+ * @param memento
+ * the memento to store to
+ */
+ protected abstract void storeItemToMemento(Object item, IMemento memento);
+
+ }
+
+ /**
+ * Filters elements using SearchPattern by comparing the names of items with
+ * the filter pattern.
+ */
+ protected abstract class ItemsFilter {
+
+ protected SearchPattern patternMatcher;
+
+ /**
+ * Creates new instance of ItemsFilter.
+ */
+ public ItemsFilter() {
+ this(new SearchPattern());
+ }
+
+ /**
+ * Creates new instance of ItemsFilter.
+ *
+ * @param searchPattern
+ * the pattern to be used when filtering
+ */
+ public ItemsFilter(SearchPattern searchPattern) {
+ patternMatcher = searchPattern;
+ String stringPattern = ""; //$NON-NLS-1$
+ if (pattern != null && !pattern.getText().equals("*")) { //$NON-NLS-1$
+ stringPattern = pattern.getText();
+ }
+ patternMatcher.setPattern(stringPattern);
+ }
+
+ /**
+ * Check if the given filter is a sub-filter of this filter. The default
+ * implementation checks if the <code>SearchPattern</code> from the
+ * given filter is a sub-pattern of the one from this filter.
+ * <p>
+ * <i>WARNING: This method is <b>not</b> defined in reading order, i.e.
+ * <code>a.isSubFilter(b)</code> is <code>true</code> iff
+ * <code>b</code> is a sub-filter of <code>a</code>, and not
+ * vice-versa. </i>
+ * </p>
+ *
+ * @param filter
+ * the filter to be checked, or <code>null</code>
+ * @return <code>true</code> if the given filter is sub-filter of this
+ * filter, <code>false</code> if the given filter isn't a
+ * sub-filter or is <code>null</code>
+ *
+ * @see org.eclipse.ui.dialogs.SearchPattern#isSubPattern(org.eclipse.ui.dialogs.SearchPattern)
+ */
+ public boolean isSubFilter(ItemsFilter filter) {
+ if (filter != null) {
+ return this.patternMatcher.isSubPattern(filter.patternMatcher);
+ }
+ return false;
+ }
+
+ /**
+ * Checks whether the provided filter is equal to the current filter.
+ * The default implementation checks if <code>SearchPattern</code>
+ * from current filter is equal to the one from provided filter.
+ *
+ * @param filter
+ * filter to be checked, or <code>null</code>
+ * @return <code>true</code> if the given filter is equal to current
+ * filter, <code>false</code> if given filter isn't equal to
+ * current one or if it is <code>null</code>
+ *
+ * @see org.eclipse.ui.dialogs.SearchPattern#equalsPattern(org.eclipse.ui.dialogs.SearchPattern)
+ */
+ public boolean equalsFilter(ItemsFilter filter) {
+ if (filter != null && filter.patternMatcher.equalsPattern(this.patternMatcher)) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Checks whether the pattern's match rule is camel case.
+ *
+ * @return <code>true</code> if pattern's match rule is camel case,
+ * <code>false</code> otherwise
+ */
+ public boolean isCamelCasePattern() {
+ return patternMatcher.getMatchRule() == SearchPattern.RULE_CAMELCASE_MATCH;
+ }
+
+ /**
+ * Returns the pattern string.
+ *
+ * @return pattern for this filter
+ *
+ * @see SearchPattern#getPattern()
+ */
+ public String getPattern() {
+ return patternMatcher.getPattern();
+ }
+
+ /**
+ * Returns the rule to apply for matching keys.
+ *
+ * @return an implementation-specific match rule
+ *
+ * @see SearchPattern#getMatchRule() for match rules returned by the
+ * default implementation
+ */
+ public int getMatchRule() {
+ return patternMatcher.getMatchRule();
+ }
+
+ /**
+ * Matches text with filter.
+ *
+ * @param text
+ * the text to match with the filter
+ * @return <code>true</code> if text matches with filter pattern,
+ * <code>false</code> otherwise
+ */
+ protected boolean matches(String text) {
+ return patternMatcher.matches(text);
+ }
+
+ /**
+ * General method for matching raw name pattern. Checks whether current
+ * pattern is prefix of name provided item.
+ *
+ * @param item
+ * item to check
+ * @return <code>true</code> if current pattern is a prefix of name
+ * provided item, <code>false</code> if item's name is shorter
+ * than prefix or sequences of characters don't match.
+ */
+ public boolean matchesRawNamePattern(Object item) {
+ String prefix = patternMatcher.getPattern();
+ String text = getElementName(item);
+
+ if (text == null)
+ return false;
+
+ int textLength = text.length();
+ int prefixLength = prefix.length();
+ if (textLength < prefixLength) {
+ return false;
+ }
+ for (int i = prefixLength - 1; i >= 0; i--) {
+ if (Character.toLowerCase(prefix.charAt(i)) != Character.toLowerCase(text.charAt(i)))
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Matches an item against filter conditions.
+ *
+ * @param item
+ * @return <code>true<code> if item matches against filter conditions, <code>false</code>
+ * otherwise
+ */
+ public abstract boolean matchItem(Object item);
+
+ /**
+ * Checks consistency of an item. Item is inconsistent if was changed or
+ * removed.
+ *
+ * @param item
+ * @return <code>true</code> if item is consistent, <code>false</code>
+ * if item is inconsistent
+ */
+ public abstract boolean isConsistentItem(Object item);
+
+ }
+
+ /**
+ * Creates a new wizard page with the given name, and
+ * with no title or image.
+ *
+ * @param pageName
+ * the name of the page
+ */
+ protected FilteredItemsSelectionWizardPage(String pageId, boolean multi) {
+ super(pageId);
+ this.multi = multi;
+ contentProvider = new ContentProvider();
+ itemsListSeparator = new ItemsListSeparator(WorkbenchMessages.FilteredItemsSelectionDialog_separatorLabel);
+ selectionMode = NONE;
+ }
+
+ /**
+ * Returns the list of selections made by the user, or <code>null</code>
+ * if the selection was canceled.
+ *
+ * @return the array of selected elements, or <code>null</code> if Cancel
+ * was pressed
+ */
+ public Object[] getResult() {
+ return result;
+ }
+
+ /**
+ * Set the selections made by the user, or <code>null</code> if the
+ * selection was canceled.
+ *
+ * @param newResult
+ * list of selected elements, or <code>null</code> if Cancel
+ * was pressed
+ */
+ protected void setResult(List newResult) {
+ if (newResult == null) {
+ result = null;
+ } else {
+ result = new Object[newResult.size()];
+ newResult.toArray(result);
+ }
+ }
+
+ /**
+ * Adds viewer filter to the dialog items list.
+ *
+ * @param filter
+ * the new filter
+ */
+ protected void addListFilter(ViewerFilter filter) {
+ contentProvider.addFilter(filter);
+ }
+
+ /**
+ * Sets a new label provider for items in the list. If the label provider
+ * also implements {@link org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider .IStyledLabelProvider}, the style text labels provided by it will be used
+ * provided that the corresponding preference is set.
+ *
+ * @see IWorkbenchPreferenceConstants#USE_COLORED_LABELS
+ *
+ * @param listLabelProvider
+ * the label provider for items in the list
+ */
+ public void setListLabelProvider(ILabelProvider listLabelProvider) {
+ getItemsListLabelProvider().setProvider(listLabelProvider);
+ }
+
+ /**
+ * Returns the label decorator for selected items in the list.
+ *
+ * @return the label decorator for selected items in the list
+ */
+ private ILabelDecorator getListSelectionLabelDecorator() {
+ return getItemsListLabelProvider().getSelectionDecorator();
+ }
+
+ /**
+ * Sets the label decorator for selected items in the list.
+ *
+ * @param listSelectionLabelDecorator
+ * the label decorator for selected items in the list
+ */
+ public void setListSelectionLabelDecorator(ILabelDecorator listSelectionLabelDecorator) {
+ getItemsListLabelProvider().setSelectionDecorator(listSelectionLabelDecorator);
+ }
+
+ /**
+ * Returns the item list label provider.
+ *
+ * @return the item list label provider
+ */
+ private ItemsListLabelProvider getItemsListLabelProvider() {
+ if (itemsListLabelProvider == null) {
+ itemsListLabelProvider = new ItemsListLabelProvider(new LabelProvider(), null);
+ }
+ return itemsListLabelProvider;
+ }
+
+ /**
+ * Sets label provider for the details field.
+ *
+ * For a single selection, the element sent to {@link ILabelProvider#getImage(Object)} and {@link ILabelProvider#getText(Object)} is the selected object, for
+ * multiple selection a {@link String} with amount of selected items is the
+ * element.
+ *
+ * @see #getSelectedItems() getSelectedItems() can be used to retrieve
+ * selected items and get the items count.
+ *
+ * @param detailsLabelProvider
+ * the label provider for the details field
+ */
+ public void setDetailsLabelProvider(ILabelProvider detailsLabelProvider) {
+ this.detailsLabelProvider = detailsLabelProvider;
+ if (details != null) {
+ details.setLabelProvider(detailsLabelProvider);
+ }
+ }
+
+ private ILabelProvider getDetailsLabelProvider() {
+ if (detailsLabelProvider == null) {
+ detailsLabelProvider = new LabelProvider();
+ }
+ return detailsLabelProvider;
+ }
+
+ /**
+ * Restores dialog using persisted settings. The default implementation
+ * restores the status of the details line and the selection history.
+ *
+ * @param settings
+ * settings used to restore dialog
+ */
+ protected void restoreDialog(IDialogSettings settings) {
+
+ boolean toggleStatusLine = true;
+
+ if (settings.get(SHOW_STATUS_LINE) != null) {
+ toggleStatusLine = settings.getBoolean(SHOW_STATUS_LINE);
+ }
+
+ toggleStatusLineAction.setChecked(toggleStatusLine);
+
+ details.setVisible(toggleStatusLine);
+
+ String setting = settings.get(HISTORY_SETTINGS);
+ if (setting != null) {
+ try {
+ IMemento memento = XMLMemento.createReadRoot(new StringReader(setting));
+ this.contentProvider.loadHistory(memento);
+ } catch (WorkbenchException e) {
+ // Simply don't restore the settings
+ StatusManager.getManager().handle(new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, IStatus.ERROR, WorkbenchMessages.FilteredItemsSelectionDialog_restoreError, e));
+ }
+ }
+ }
+
+ @Override
+ public void dispose() {
+ filterJob.cancel();
+ refreshCacheJob.cancel();
+ refreshProgressMessageJob.cancel();
+ if (showViewHandler != null) {
+ IHandlerService service = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class);
+ service.deactivateHandler(showViewHandler);
+ showViewHandler.getHandler().dispose();
+ showViewHandler = null;
+ }
+ storeDialog(getDialogSettings());
+ super.dispose();
+ }
+
+ /**
+ * Stores dialog settings.
+ *
+ * @param settings
+ * settings used to store dialog
+ */
+ protected void storeDialog(IDialogSettings settings) {
+ settings.put(SHOW_STATUS_LINE, toggleStatusLineAction.isChecked());
+ XMLMemento memento = XMLMemento.createWriteRoot(HISTORY_SETTINGS);
+ this.contentProvider.saveHistory(memento);
+ StringWriter writer = new StringWriter();
+ try {
+ memento.save(writer);
+ settings.put(HISTORY_SETTINGS, writer.getBuffer().toString());
+ } catch (IOException e) {
+ // Simply don't store the settings
+ StatusManager.getManager().handle(new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, IStatus.ERROR, WorkbenchMessages.FilteredItemsSelectionDialog_storeError, e));
+ }
+ }
+
+ protected String getHeaderMessage() {
+ return WorkbenchMessages.FilteredItemsSelectionDialog_patternLabel;
+ }
+
+ /**
+ * Create a new header which is labelled by headerLabel.
+ *
+ * @param parent
+ * @return Label the label of the header
+ */
+ private Label createHeader(Composite parent) {
+ Composite header = new Composite(parent, SWT.NONE);
+
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ layout.marginWidth = 0;
+ layout.marginHeight = 0;
+ header.setLayout(layout);
+
+ Label headerLabel = new Label(header, SWT.NONE);
+ headerLabel.setText(getHeaderMessage());
+ headerLabel.addTraverseListener(new TraverseListener() {
+ public void keyTraversed(TraverseEvent e) {
+ if (e.detail == SWT.TRAVERSE_MNEMONIC && e.doit) {
+ e.detail = SWT.TRAVERSE_NONE;
+ pattern.setFocus();
+ }
+ }
+ });
+
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ headerLabel.setLayoutData(gd);
+
+ createViewMenu(header);
+ header.setLayoutData(gd);
+ return headerLabel;
+ }
+
+ /**
+ * Create the labels for the list and the progress. Return the list label.
+ *
+ * @param parent
+ * @return Label
+ */
+ private Label createLabels(Composite parent) {
+ Composite labels = new Composite(parent, SWT.NONE);
+
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ layout.marginWidth = 0;
+ layout.marginHeight = 0;
+ labels.setLayout(layout);
+
+ Label listLabel = new Label(labels, SWT.NONE);
+ listLabel.setText(WorkbenchMessages.FilteredItemsSelectionDialog_listLabel);
+
+ listLabel.addTraverseListener(new TraverseListener() {
+ public void keyTraversed(TraverseEvent e) {
+ if (e.detail == SWT.TRAVERSE_MNEMONIC && e.doit) {
+ e.detail = SWT.TRAVERSE_NONE;
+ list.getTable().setFocus();
+ }
+ }
+ });
+
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ listLabel.setLayoutData(gd);
+
+ progressLabel = new Label(labels, SWT.RIGHT);
+ progressLabel.setLayoutData(gd);
+
+ labels.setLayoutData(gd);
+ return listLabel;
+ }
+
+ private void createViewMenu(Composite parent) {
+ toolBar = new ToolBar(parent, SWT.FLAT);
+ toolItem = new ToolItem(toolBar, SWT.PUSH, 0);
+
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.END;
+ toolBar.setLayoutData(data);
+
+ toolBar.addMouseListener(new MouseAdapter() {
+ public void mouseDown(MouseEvent e) {
+ showViewMenu();
+ }
+ });
+
+ toolItem.setImage(WorkbenchImages.getImage(IWorkbenchGraphicConstants.IMG_LCL_VIEW_MENU));
+ toolItem.setToolTipText(WorkbenchMessages.FilteredItemsSelectionDialog_menu);
+ toolItem.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ showViewMenu();
+ }
+ });
+
+ menuManager = new MenuManager();
+
+ fillViewMenu(menuManager);
+
+ IHandlerService service = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class);
+ IHandler handler = new AbstractHandler() {
+ public Object execute(ExecutionEvent event) {
+ showViewMenu();
+ return null;
+ }
+ };
+ showViewHandler = service.activateHandler(IWorkbenchCommandConstants.WINDOW_SHOW_VIEW_MENU, handler, new ActiveShellExpression(FilteredItemsSelectionWizardPage.this.getShell()));
+ }
+
+ /**
+ * Fills the menu of the dialog.
+ *
+ * @param menuManager
+ * the menu manager
+ */
+ protected void fillViewMenu(IMenuManager menuManager) {
+ toggleStatusLineAction = new ToggleStatusLineAction();
+ menuManager.add(toggleStatusLineAction);
+ }
+
+ private void showViewMenu() {
+ Menu menu = menuManager.createContextMenu(FilteredItemsSelectionWizardPage.this.getShell());
+ Rectangle bounds = toolItem.getBounds();
+ Point topLeft = new Point(bounds.x, bounds.y + bounds.height);
+ topLeft = toolBar.toDisplay(topLeft);
+ menu.setLocation(topLeft.x, topLeft.y);
+ menu.setVisible(true);
+ }
+
+ /**
+ * Hook that allows to add actions to the context menu.
+ * <p>
+ * Subclasses may extend in order to add other actions.</p>
+ *
+ * @param menuManager
+ * the context menu manager
+ * @since 3.5
+ */
+ protected void fillContextMenu(IMenuManager menuManager) {
+ List selectedElements = ((StructuredSelection) list.getSelection()).toList();
+
+ Object item = null;
+
+ for (Iterator it = selectedElements.iterator(); it.hasNext();) {
+ item = it.next();
+ if (item instanceof ItemsListSeparator || !isHistoryElement(item)) {
+ return;
+ }
+ }
+
+ if (selectedElements.size() > 0) {
+ removeHistoryItemAction.setText(WorkbenchMessages.FilteredItemsSelectionDialog_removeItemsFromHistoryAction);
+
+ menuManager.add(removeHistoryActionContributionItem);
+
+ }
+ }
+
+ private void createPopupMenu() {
+ removeHistoryItemAction = new RemoveHistoryItemAction();
+ removeHistoryActionContributionItem = new ActionContributionItem(removeHistoryItemAction);
+
+ MenuManager manager = new MenuManager();
+ manager.setRemoveAllWhenShown(true);
+ manager.addMenuListener(new IMenuListener() {
+ public void menuAboutToShow(IMenuManager manager) {
+ fillContextMenu(manager);
+ }
+ });
+
+ final Table table = list.getTable();
+ Menu menu = manager.createContextMenu(table);
+ table.setMenu(menu);
+ }
+
+ /**
+ * Creates an extra content area, which will be located above the details.
+ *
+ * @param parent
+ * parent to create the dialog widgets in
+ * @return an extra content area
+ */
+ protected abstract Control createExtendedContentArea(Composite parent);
+
+ public void createControl(Composite parent) {
+
+ refreshProgressMessageJob = new RefreshProgressMessageJob();
+ filterHistoryJob = new FilterHistoryJob();
+ filterJob = new FilterJob();
+ refreshCacheJob = new RefreshCacheJob();
+
+ Composite content = new Composite(parent, SWT.NONE);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ content.setLayoutData(gd);
+
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 1;
+ layout.marginWidth = 0;
+ layout.marginHeight = 0;
+ content.setLayout(layout);
+
+ final Label headerLabel = createHeader(content);
+
+ pattern = new Text(content, SWT.SINGLE | SWT.BORDER | SWT.SEARCH | SWT.ICON_CANCEL);
+ pattern.getAccessible().addAccessibleListener(new AccessibleAdapter() {
+ public void getName(AccessibleEvent e) {
+ e.result = LegacyActionTools.removeMnemonics(headerLabel.getText());
+ }
+ });
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ pattern.setLayoutData(gd);
+
+ final Label listLabel = createLabels(content);
+
+ list = new TableViewer(content, (multi ? SWT.MULTI : SWT.SINGLE) | SWT.BORDER | SWT.V_SCROLL | SWT.VIRTUAL);
+ list.getTable().getAccessible().addAccessibleListener(new AccessibleAdapter() {
+ public void getName(AccessibleEvent e) {
+ if (e.childID == ACC.CHILDID_SELF) {
+ e.result = LegacyActionTools.removeMnemonics(listLabel.getText());
+ }
+ }
+ });
+ list.setContentProvider(contentProvider);
+ list.setLabelProvider(getItemsListLabelProvider());
+ list.setInput(new Object[0]);
+ list.setItemCount(contentProvider.getNumberOfElements());
+ list.addSelectionChangedListener(new ISelectionChangedListener() {
+ public void selectionChanged(SelectionChangedEvent event) {
+ setPageComplete(validatePage());
+ }
+ });
+ gd = new GridData(GridData.FILL_BOTH);
+ applyDialogFont(list.getTable());
+ gd.heightHint = list.getTable().getItemHeight() * 15;
+ list.getTable().setLayoutData(gd);
+
+ createPopupMenu();
+
+ pattern.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ applyFilter();
+ }
+ });
+
+ pattern.addKeyListener(new KeyAdapter() {
+ public void keyPressed(KeyEvent e) {
+ if (e.keyCode == SWT.ARROW_DOWN) {
+ if (list.getTable().getItemCount() > 0) {
+ list.getTable().setFocus();
+ }
+ }
+ }
+ });
+
+ list.addSelectionChangedListener(new ISelectionChangedListener() {
+ public void selectionChanged(SelectionChangedEvent event) {
+ StructuredSelection selection = (StructuredSelection) event.getSelection();
+ handleSelected(selection);
+ }
+ });
+
+ list.addDoubleClickListener(new IDoubleClickListener() {
+ public void doubleClick(DoubleClickEvent event) {
+ handleDoubleClick();
+ }
+ });
+
+ list.getTable().addKeyListener(new KeyAdapter() {
+ public void keyPressed(KeyEvent e) {
+
+ if (e.keyCode == SWT.DEL) {
+
+ List selectedElements = ((StructuredSelection) list.getSelection()).toList();
+
+ Object item = null;
+ boolean isSelectedHistory = true;
+
+ for (Iterator it = selectedElements.iterator(); it.hasNext();) {
+ item = it.next();
+ if (item instanceof ItemsListSeparator || !isHistoryElement(item)) {
+ isSelectedHistory = false;
+ break;
+ }
+ }
+ if (isSelectedHistory)
+ removeSelectedItems(selectedElements);
+
+ }
+
+ if (e.keyCode == SWT.ARROW_UP && (e.stateMask & SWT.SHIFT) != 0 && (e.stateMask & SWT.CTRL) != 0) {
+ StructuredSelection selection = (StructuredSelection) list.getSelection();
+
+ if (selection.size() == 1) {
+ Object element = selection.getFirstElement();
+ if (element.equals(list.getElementAt(0))) {
+ pattern.setFocus();
+ }
+ if (list.getElementAt(list.getTable().getSelectionIndex() - 1) instanceof ItemsListSeparator)
+ list.getTable().setSelection(list.getTable().getSelectionIndex() - 1);
+ list.getTable().notifyListeners(SWT.Selection, new Event());
+
+ }
+ }
+
+ if (e.keyCode == SWT.ARROW_DOWN && (e.stateMask & SWT.SHIFT) != 0 && (e.stateMask & SWT.CTRL) != 0) {
+
+ if (list.getElementAt(list.getTable().getSelectionIndex() + 1) instanceof ItemsListSeparator)
+ list.getTable().setSelection(list.getTable().getSelectionIndex() + 1);
+ list.getTable().notifyListeners(SWT.Selection, new Event());
+ }
+
+ }
+ });
+
+ createExtendedContentArea(content);
+
+ details = new DetailsContentViewer(content, SWT.BORDER | SWT.FLAT);
+ details.setVisible(toggleStatusLineAction.isChecked());
+ details.setContentProvider(new NullContentProvider());
+ details.setLabelProvider(getDetailsLabelProvider());
+
+ applyDialogFont(content);
+
+ restoreDialog(getDialogSettings());
+
+ if (initialPatternText != null) {
+ pattern.setText(initialPatternText);
+ }
+
+ switch (selectionMode) {
+ case CARET_BEGINNING:
+ pattern.setSelection(0, 0);
+ break;
+ case FULL_SELECTION:
+ pattern.setSelection(0, initialPatternText.length());
+ break;
+ }
+
+ // apply filter even if pattern is empty (display history)
+ applyFilter();
+
+ setPageComplete(validatePage());
+ setControl(content);
+
+ }
+
+ protected boolean validatePage() {
+ List selectedElements = ((StructuredSelection) list.getSelection()).toList();
+ return selectedElements != null && selectedElements.size() > 0;
+ }
+
+ /**
+ * This method is a hook for subclasses to override default dialog behavior.
+ * The <code>handleDoubleClick()</code> method handles double clicks on
+ * the list of filtered elements.
+ * <p>
+ */
+ protected void handleDoubleClick() {
+ // DO nothing
+ }
+
+ /**
+ * Refreshes the details field according to the current selection in the
+ * items list.
+ */
+ private void refreshDetails() {
+ StructuredSelection selection = getSelectedItems();
+
+ switch (selection.size()) {
+ case 0:
+ details.setInput(null);
+ break;
+ case 1:
+ details.setInput(selection.getFirstElement());
+ break;
+ default:
+ details.setInput(NLS.bind(WorkbenchMessages.FilteredItemsSelectionDialog_nItemsSelected, new Integer(selection.size())));
+ break;
+ }
+
+ }
+
+ /**
+ * Handle selection in the items list by updating labels of selected and
+ * unselected items and refresh the details field using the selection.
+ *
+ * @param selection
+ * the new selection
+ */
+ protected void handleSelected(StructuredSelection selection) {
+ IStatus status = new Status(IStatus.OK, PlatformUI.PLUGIN_ID, IStatus.OK, EMPTY_STRING, null);
+
+ Object[] lastSelection = currentSelection;
+
+ currentSelection = selection.toArray();
+
+ if (selection.size() == 0) {
+ status = new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, IStatus.ERROR, EMPTY_STRING, null);
+
+ if (lastSelection != null && getListSelectionLabelDecorator() != null) {
+ list.update(lastSelection, null);
+ }
+
+ currentSelection = null;
+
+ } else {
+ status = new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, IStatus.ERROR, EMPTY_STRING, null);
+
+ List items = selection.toList();
+
+ Object item = null;
+ IStatus tempStatus = null;
+
+ for (Iterator it = items.iterator(); it.hasNext();) {
+ Object o = it.next();
+
+ if (o instanceof ItemsListSeparator) {
+ continue;
+ }
+
+ item = o;
+ tempStatus = validateItem(item);
+
+ if (tempStatus.isOK()) {
+ status = new Status(IStatus.OK, PlatformUI.PLUGIN_ID, IStatus.OK, EMPTY_STRING, null);
+ } else {
+ status = tempStatus;
+ // if any selected element is not valid status is set to
+ // ERROR
+ break;
+ }
+ }
+
+ if (lastSelection != null && getListSelectionLabelDecorator() != null) {
+ list.update(lastSelection, null);
+ }
+
+ if (getListSelectionLabelDecorator() != null) {
+ list.update(currentSelection, null);
+ }
+ }
+
+ refreshDetails();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.window.Dialog#getDialogBoundsSettings()
+ */
+ protected IDialogSettings getDialogBoundsSettings() {
+ IDialogSettings settings = getDialogSettings();
+ IDialogSettings section = settings.getSection(DIALOG_BOUNDS_SETTINGS);
+ if (section == null) {
+ section = settings.addNewSection(DIALOG_BOUNDS_SETTINGS);
+ section.put(DIALOG_HEIGHT, 500);
+ section.put(DIALOG_WIDTH, 600);
+ }
+ return section;
+ }
+
+ /**
+ * Returns the dialog settings. Returned object can't be null.
+ *
+ * @return return dialog settings for this dialog
+ */
+ protected abstract IDialogSettings getDialogSettings();
+
+ /**
+ * Refreshes the dialog - has to be called in UI thread.
+ */
+ public void refresh() {
+ if (list != null && !list.getTable().isDisposed()) {
+
+ List lastRefreshSelection = ((StructuredSelection) list.getSelection()).toList();
+ list.getTable().deselectAll();
+
+ list.setItemCount(contentProvider.getNumberOfElements());
+ list.refresh();
+
+ if (list.getTable().getItemCount() > 0) {
+ // preserve previous selection
+ if (refreshWithLastSelection && lastRefreshSelection != null && lastRefreshSelection.size() > 0) {
+ list.setSelection(new StructuredSelection(lastRefreshSelection));
+ } else {
+ refreshWithLastSelection = true;
+ list.getTable().setSelection(0);
+ list.getTable().notifyListeners(SWT.Selection, new Event());
+ }
+ } else {
+ list.setSelection(StructuredSelection.EMPTY);
+ }
+
+ }
+
+ scheduleProgressMessageRefresh();
+ }
+
+ /**
+ * Updates the progress label.
+ *
+ * @deprecated
+ */
+ public void updateProgressLabel() {
+ scheduleProgressMessageRefresh();
+ }
+
+ /**
+ * Notifies the content provider - fires filtering of content provider
+ * elements. During the filtering, a separator between history and workspace
+ * matches is added.
+ * <p>
+ * This is a long running operation and should be called in a job.
+ *
+ * @param checkDuplicates
+ * <code>true</code> if data concerning elements duplication
+ * should be computed - it takes much more time than the standard
+ * filtering
+ * @param monitor
+ * a progress monitor or <code>null</code> if no monitor is
+ * available
+ */
+ public void reloadCache(boolean checkDuplicates, IProgressMonitor monitor) {
+ if (list != null && !list.getTable().isDisposed() && contentProvider != null) {
+ contentProvider.reloadCache(checkDuplicates, monitor);
+ }
+ }
+
+ /**
+ * Schedule refresh job.
+ */
+ public void scheduleRefresh() {
+ refreshCacheJob.cancelAll();
+ refreshCacheJob.schedule();
+ }
+
+ /**
+ * Schedules progress message refresh.
+ */
+ public void scheduleProgressMessageRefresh() {
+ if (filterJob.getState() != Job.RUNNING && refreshProgressMessageJob.getState() != Job.RUNNING)
+ refreshProgressMessageJob.scheduleProgressRefresh(null);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.dialogs.SelectionStatusDialog#computeResult()
+ */
+ protected void computeResult() {
+
+ List selectedElements = ((StructuredSelection) list.getSelection()).toList();
+
+ List objectsToReturn = new ArrayList();
+
+ Object item = null;
+
+ for (Iterator it = selectedElements.iterator(); it.hasNext();) {
+ item = it.next();
+
+ if (!(item instanceof ItemsListSeparator)) {
+ accessedHistoryItem(item);
+ objectsToReturn.add(item);
+ }
+ }
+ setResult(objectsToReturn);
+ }
+
+ /**
+ * Sets the initial pattern used by the filter. This text is copied into the
+ * selection input on the dialog. A full selection is used in the pattern
+ * input field.
+ *
+ * @param text
+ * initial pattern for the filter
+ * @see FilteredItemsSelectionDialog#FULL_SELECTION
+ */
+ public void setInitialPattern(String text) {
+ setInitialPattern(text, FULL_SELECTION);
+ }
+
+ /**
+ * Sets the initial pattern used by the filter. This text is copied into the
+ * selection input on the dialog. The <code>selectionMode</code> is used
+ * to choose selection type for the input field.
+ *
+ * @param text
+ * initial pattern for the filter
+ * @param selectionMode
+ * one of: {@link FilteredItemsSelectionDialog#NONE}, {@link FilteredItemsSelectionDialog#CARET_BEGINNING}, {@link FilteredItemsSelectionDialog#FULL_SELECTION}
+ */
+ public void setInitialPattern(String text, int selectionMode) {
+ this.initialPatternText = text;
+ this.selectionMode = selectionMode;
+ }
+
+ /**
+ * Gets initial pattern.
+ *
+ * @return initial pattern, or <code>null</code> if initial pattern is not
+ * set
+ */
+ protected String getInitialPattern() {
+ return this.initialPatternText;
+ }
+
+ /**
+ * Returns the current selection.
+ *
+ * @return the current selection
+ */
+ protected StructuredSelection getSelectedItems() {
+
+ StructuredSelection selection = (StructuredSelection) list.getSelection();
+
+ List selectedItems = selection.toList();
+ Object itemToRemove = null;
+
+ for (Iterator it = selection.iterator(); it.hasNext();) {
+ Object item = it.next();
+ if (item instanceof ItemsListSeparator) {
+ itemToRemove = item;
+ break;
+ }
+ }
+
+ if (itemToRemove == null)
+ return new StructuredSelection(selectedItems);
+ // Create a new selection without the collision
+ List newItems = new ArrayList(selectedItems);
+ newItems.remove(itemToRemove);
+ return new StructuredSelection(newItems);
+
+ }
+
+ /**
+ * Validates the item. When items on the items list are selected or
+ * deselected, it validates each item in the selection and the dialog status
+ * depends on all validations.
+ *
+ * @param item
+ * an item to be checked
+ * @return status of the dialog to be set
+ */
+ protected abstract IStatus validateItem(Object item);
+
+ /**
+ * Creates an instance of a filter.
+ *
+ * @return a filter for items on the items list. Can be <code>null</code>,
+ * no filtering will be applied then, causing no item to be shown in
+ * the list.
+ */
+ protected abstract ItemsFilter createFilter();
+
+ /**
+ * Applies the filter created by <code>createFilter()</code> method to the
+ * items list. When new filter is different than previous one it will cause
+ * refiltering.
+ */
+ protected void applyFilter() {
+
+ ItemsFilter newFilter = createFilter();
+
+ // don't apply filtering for patterns which mean the same, for example:
+ // *a**b and ***a*b
+ if (filter != null && filter.equalsFilter(newFilter)) {
+ return;
+ }
+
+ filterHistoryJob.cancel();
+ filterJob.cancel();
+
+ this.filter = newFilter;
+
+ if (this.filter != null) {
+ filterHistoryJob.schedule();
+ }
+ }
+
+ /**
+ * Returns comparator to sort items inside content provider. Returned object
+ * will be probably created as an anonymous class. Parameters passed to the
+ * <code>compare(java.lang.Object, java.lang.Object)</code> are going to
+ * be the same type as the one used in the content provider.
+ *
+ * @return comparator to sort items content provider
+ */
+ protected abstract Comparator getItemsComparator();
+
+ /**
+ * Fills the content provider with matching items.
+ *
+ * @param contentProvider
+ * collector to add items to. {@link FilteredItemsSelectionDialog.AbstractContentProvider#add(Object, FilteredItemsSelectionDialog.ItemsFilter)} only adds items that pass the given <code>itemsFilter</code>.
+ * @param itemsFilter
+ * the items filter
+ * @param progressMonitor
+ * must be used to report search progress. The state of this
+ * progress monitor reflects the state of the filtering process.
+ * @throws CoreException
+ */
+ protected abstract void fillContentProvider(AbstractContentProvider contentProvider, ItemsFilter itemsFilter, IProgressMonitor progressMonitor) throws CoreException;
+
+ /**
+ * Removes selected items from history.
+ *
+ * @param items
+ * items to be removed
+ */
+ private void removeSelectedItems(List items) {
+ for (Iterator iter = items.iterator(); iter.hasNext();) {
+ Object item = iter.next();
+ removeHistoryItem(item);
+ }
+ refreshWithLastSelection = false;
+ contentProvider.refresh();
+ }
+
+ /**
+ * Removes an item from history.
+ *
+ * @param item
+ * an item to remove
+ * @return removed item
+ */
+ protected Object removeHistoryItem(Object item) {
+ return contentProvider.removeHistoryElement(item);
+ }
+
+ /**
+ * Adds item to history.
+ *
+ * @param item
+ * the item to be added
+ */
+ protected void accessedHistoryItem(Object item) {
+ contentProvider.addHistoryElement(item);
+ }
+
+ /**
+ * Returns a history comparator.
+ *
+ * @return decorated comparator
+ */
+ private Comparator getHistoryComparator() {
+ return new HistoryComparator();
+ }
+
+ /**
+ * Returns the history of selected elements.
+ *
+ * @return history of selected elements, or <code>null</code> if it is not
+ * set
+ */
+ protected SelectionHistory getSelectionHistory() {
+ return this.contentProvider.getSelectionHistory();
+ }
+
+ /**
+ * Sets new history.
+ *
+ * @param selectionHistory
+ * the history
+ */
+ protected void setSelectionHistory(SelectionHistory selectionHistory) {
+ if (this.contentProvider != null)
+ this.contentProvider.setSelectionHistory(selectionHistory);
+ }
+
+ /**
+ * Indicates whether the given item is a history item.
+ *
+ * @param item
+ * the item to be investigated
+ * @return <code>true</code> if the given item exists in history,
+ * <code>false</code> otherwise
+ */
+ public boolean isHistoryElement(Object item) {
+ return this.contentProvider.isHistoryElement(item);
+ }
+
+ /**
+ * Indicates whether the given item is a duplicate.
+ *
+ * @param item
+ * the item to be investigated
+ * @return <code>true</code> if the item is duplicate, <code>false</code>
+ * otherwise
+ */
+ public boolean isDuplicateElement(Object item) {
+ return this.contentProvider.isDuplicateElement(item);
+ }
+
+ /**
+ * Sets separator label
+ *
+ * @param separatorLabel
+ * the label showed on separator
+ */
+ public void setSeparatorLabel(String separatorLabel) {
+ this.itemsListSeparator = new ItemsListSeparator(separatorLabel);
+ }
+
+ /**
+ * Returns name for then given object.
+ *
+ * @param item
+ * an object from the content provider. Subclasses should pay
+ * attention to the passed argument. They should either only pass
+ * objects of a known type (one used in content provider) or make
+ * sure that passed parameter is the expected one (by type
+ * checking like <code>instanceof</code> inside the method).
+ * @return name of the given item
+ */
+ public abstract String getElementName(Object item);
+
+}
diff --git a/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/wizard/ResourceAndContainerGroup.java b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/wizard/ResourceAndContainerGroup.java
new file mode 100644
index 0000000..cc89fd0
--- /dev/null
+++ b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/wizard/ResourceAndContainerGroup.java
@@ -0,0 +1,524 @@
+/**
+ * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ * Alexander Fedorov <Alexander.Fedorov@borland.com>
+ * - Bug 172000 [Wizards] WizardNewFileCreationPage should support overwriting existing resources
+ */
+package org.eclipse.egf.core.ui.wizard;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
+
+/**
+ * Workbench-level composite for resource and container specification by the
+ * user. Services such as field validation are performed by the group. The group
+ * can be configured to accept existing resources, or only new resources.
+ */
+public class ResourceAndContainerGroup implements Listener {
+ // problem identifiers
+
+ /**
+ * Constant for no problem.
+ */
+ public static final int PROBLEM_NONE = 0;
+ /**
+ * Constant for empty resource.
+ */
+ public static final int PROBLEM_RESOURCE_EMPTY = 1;
+
+ /**
+ * Constant for resource already exists.
+ */
+ public static final int PROBLEM_RESOURCE_EXIST = 2;
+
+ /**
+ * Constant for invalid path.
+ */
+ public static final int PROBLEM_PATH_INVALID = 4;
+
+ /**
+ * Constant for empty container.
+ */
+ public static final int PROBLEM_CONTAINER_EMPTY = 5;
+
+ /**
+ * Constant for project does not exist.
+ */
+ public static final int PROBLEM_PROJECT_DOES_NOT_EXIST = 6;
+
+ /**
+ * Constant for invalid name.
+ */
+ public static final int PROBLEM_NAME_INVALID = 7;
+
+ /**
+ * Constant for path already occupied.
+ */
+ public static final int PROBLEM_PATH_OCCUPIED = 8;
+
+ // the client to notify of changes
+ private Listener client;
+
+ // whether to allow existing resources
+ private boolean allowExistingResources = false;
+
+ // resource type (file, folder, project)
+ private String resourceType = IDEWorkbenchMessages.ResourceGroup_resource;
+
+ // problem indicator
+ private String problemMessage = "";//$NON-NLS-1$
+
+ private int problemType = PROBLEM_NONE;
+
+ // widgets
+ private ContainerSelectionGroup containerGroup;
+
+ private Text resourceNameField;
+
+ /**
+ * The resource extension for the resource name field.
+ *
+ * @see ResourceAndContainerGroup#setResourceExtension(String)
+ * @since 3.3
+ */
+ private String resourceExtension;
+
+ // constants
+ private static final int SIZING_TEXT_FIELD_WIDTH = 250;
+
+ /**
+ * Create an instance of the group to allow the user to enter/select a
+ * container and specify a resource name.
+ *
+ * @param parent
+ * composite widget to parent the group
+ * @param client
+ * object interested in changes to the group's fields value
+ * @param resourceFieldLabel
+ * label to use in front of the resource name field
+ * @param resourceType
+ * one word, in lowercase, to describe the resource to the user
+ * (file, folder, project)
+ * @param showClosedProjects
+ * whether or not to show closed projects
+ */
+ public ResourceAndContainerGroup(Composite parent, Listener client, String resourceFieldLabel, String resourceType) {
+ this(parent, client, resourceFieldLabel, resourceType, SWT.DEFAULT);
+ }
+
+ /**
+ * Create an instance of the group to allow the user to enter/select a
+ * container and specify a resource name.
+ *
+ * @param parent
+ * composite widget to parent the group
+ * @param client
+ * object interested in changes to the group's fields value
+ * @param resourceFieldLabel
+ * label to use in front of the resource name field
+ * @param resourceType
+ * one word, in lowercase, to describe the resource to the user
+ * (file, folder, project)
+ * @param showClosedProjects
+ * whether or not to show closed projects
+ * @param heightHint
+ * height hint for the container selection widget group
+ */
+ public ResourceAndContainerGroup(Composite parent, Listener client, String resourceFieldLabel, String resourceType, int heightHint) {
+ super();
+ this.resourceType = resourceType;
+ createContents(parent, resourceFieldLabel, heightHint);
+ this.client = client;
+ }
+
+ /**
+ * Returns a boolean indicating whether all controls in this group contain
+ * valid values.
+ *
+ * @return boolean
+ */
+ public boolean areAllValuesValid() {
+ return problemType == PROBLEM_NONE;
+ }
+
+ /**
+ * Creates this object's visual components.
+ *
+ * @param parent
+ * org.eclipse.swt.widgets.Composite
+ * @param heightHint
+ * height hint for the container selection widget group
+ */
+ protected void createContents(Composite parent, String resourceLabelString, int heightHint) {
+
+ Font font = parent.getFont();
+ // server name group
+ Composite composite = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.marginWidth = 0;
+ layout.marginHeight = 0;
+ composite.setLayout(layout);
+ composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ composite.setFont(font);
+
+ // container group
+ if (heightHint == SWT.DEFAULT) {
+ containerGroup = new ContainerSelectionGroup(composite, this, true, null);
+ } else {
+ containerGroup = new ContainerSelectionGroup(composite, this, true, null, heightHint, SIZING_TEXT_FIELD_WIDTH);
+ }
+
+ // resource name group
+ Composite nameGroup = new Composite(composite, SWT.NONE);
+ layout = new GridLayout();
+ layout.numColumns = 2;
+ layout.marginWidth = 0;
+ nameGroup.setLayout(layout);
+ nameGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));
+ nameGroup.setFont(font);
+
+ Label label = new Label(nameGroup, SWT.NONE);
+ label.setText(resourceLabelString);
+ label.setFont(font);
+
+ // resource name entry field
+ resourceNameField = new Text(nameGroup, SWT.BORDER);
+ resourceNameField.addListener(SWT.Modify, this);
+ resourceNameField.addFocusListener(new FocusAdapter() {
+ @Override
+ public void focusLost(FocusEvent e) {
+ handleResourceNameFocusLostEvent();
+ }
+ });
+ GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
+ data.widthHint = SIZING_TEXT_FIELD_WIDTH;
+ resourceNameField.setLayoutData(data);
+ resourceNameField.setFont(font);
+ validateControls();
+ }
+
+ /**
+ * Returns the path of the currently selected container or null if no
+ * container has been selected. Note that the container may not exist yet if
+ * the user entered a new container name in the field.
+ *
+ * @return The path of the container, or <code>null</code>
+ */
+ public IPath getContainerFullPath() {
+ return containerGroup.getContainerFullPath();
+ }
+
+ /**
+ * Returns an error message indicating the current problem with the value of
+ * a control in the group, or an empty message if all controls in the group
+ * contain valid values.
+ *
+ * @return java.lang.String
+ */
+ public String getProblemMessage() {
+ return problemMessage;
+ }
+
+ /**
+ * Returns the type of problem with the value of a control in the group.
+ *
+ * @return one of the PROBLEM_* constants
+ */
+ public int getProblemType() {
+ return problemType;
+ }
+
+ /**
+ * Returns a string that is the name of the chosen resource, or an empty
+ * string if no resource has been entered. <br>
+ * <br>
+ * The name will include the resource extension if the preconditions are
+ * met.
+ *
+ * @see ResourceAndContainerGroup#setResourceExtension(String)
+ *
+ * @return The resource name
+ * @since 3.3
+ */
+ public String getResource() {
+ String resource = resourceNameField.getText();
+ if (useResourceExtension()) {
+ return resource + '.' + resourceExtension;
+ }
+ return resource;
+ }
+
+ /**
+ * Returns the resource extension.
+ *
+ * @return The resource extension or <code>null</code>.
+ * @see ResourceAndContainerGroup#setResourceExtension(String)
+ * @since 3.3
+ */
+ public String getResourceExtension() {
+ return resourceExtension;
+ }
+
+ /**
+ * Determines whether the resource extension should be added to the resource
+ * name field. <br>
+ * <br>
+ *
+ * @see ResourceAndContainerGroup#setResourceExtension(String)
+ * @return <code>true</code> if the preconditions are met; otherwise,
+ * <code>false</code>.
+ * @since 3.3
+ */
+ private boolean useResourceExtension() {
+ String resource = resourceNameField.getText();
+ if ((resourceExtension != null) && (resourceExtension.length() > 0) && (resource.length() > 0) && (resource.endsWith('.' + resourceExtension) == false)) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Handle the focus lost event from the resource name field. <br>
+ * Adds the resource extension to the resource name field when it loses
+ * focus (if the preconditions are met).
+ *
+ * @see ResourceAndContainerGroup#setResourceExtension(String)
+ * @since 3.3
+ */
+ private void handleResourceNameFocusLostEvent() {
+ if (useResourceExtension()) {
+ setResource(resourceNameField.getText() + '.' + resourceExtension);
+ }
+ }
+
+ /**
+ * Handles events for all controls in the group.
+ *
+ * @param e
+ * org.eclipse.swt.widgets.Event
+ */
+ public void handleEvent(Event e) {
+ validateControls();
+ if (client != null) {
+ client.handleEvent(e);
+ }
+ }
+
+ /**
+ * Sets the flag indicating whether existing resources are permitted.
+ *
+ * @param value
+ */
+ public void setAllowExistingResources(boolean value) {
+ allowExistingResources = value;
+ }
+
+ /**
+ * Sets the value of this page's container.
+ *
+ * @param path
+ * Full path to the container.
+ */
+ public void setContainerFullPath(IPath path) {
+ IResource initial = ResourcesPlugin.getWorkspace().getRoot().findMember(path);
+ if (initial != null) {
+ if (!(initial instanceof IContainer)) {
+ initial = initial.getParent();
+ }
+ containerGroup.setSelectedContainer((IContainer) initial);
+ }
+ validateControls();
+ }
+
+ /**
+ * Gives focus to the resource name field and selects its contents
+ */
+ public void setFocus() {
+ // select the whole resource name.
+ resourceNameField.setSelection(0, resourceNameField.getText().length());
+ resourceNameField.setFocus();
+ }
+
+ /**
+ * Sets the value of this page's resource name.
+ *
+ * @param value
+ * new value
+ */
+ public void setResource(String value) {
+ resourceNameField.setText(value);
+ validateControls();
+ }
+
+ /**
+ * Set the only file extension allowed for the resource name field. <br>
+ * <br>
+ * If a resource extension is specified, then it will always be appended
+ * with a '.' to the text from the resource name field for validation when
+ * the following conditions are met: <br>
+ * <br>
+ * (1) Resource extension length is greater than 0 <br>
+ * (2) Resource name field text length is greater than 0 <br>
+ * (3) Resource name field text does not already end with a '.' and the
+ * resource extension specified (case sensitive) <br>
+ * <br>
+ * The resource extension will not be reflected in the actual resource name
+ * field until the resource name field loses focus.
+ *
+ * @param value
+ * The resource extension without the '.' prefix (e.g. 'java',
+ * 'xml')
+ * @since 3.3
+ */
+ public void setResourceExtension(String value) {
+ resourceExtension = value;
+ validateControls();
+ }
+
+ /**
+ * Returns a <code>boolean</code> indicating whether a container name
+ * represents a valid container resource in the workbench. An error message
+ * is stored for future reference if the name does not represent a valid
+ * container.
+ *
+ * @return <code>boolean</code> indicating validity of the container name
+ */
+ protected boolean validateContainer() {
+ IPath path = containerGroup.getContainerFullPath();
+ if (path == null) {
+ problemType = PROBLEM_CONTAINER_EMPTY;
+ problemMessage = IDEWorkbenchMessages.ResourceGroup_folderEmpty;
+ return false;
+ }
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ String projectName = path.segment(0);
+ if (projectName == null || !workspace.getRoot().getProject(projectName).exists()) {
+ problemType = PROBLEM_PROJECT_DOES_NOT_EXIST;
+ problemMessage = IDEWorkbenchMessages.ResourceGroup_noProject;
+ return false;
+ }
+ // path is invalid if any prefix is occupied by a file
+ IWorkspaceRoot root = workspace.getRoot();
+ while (path.segmentCount() > 1) {
+ if (root.getFile(path).exists()) {
+ problemType = PROBLEM_PATH_OCCUPIED;
+ problemMessage = NLS.bind(IDEWorkbenchMessages.ResourceGroup_pathOccupied, path.makeRelative());
+ return false;
+ }
+ path = path.removeLastSegments(1);
+ }
+ return true;
+ }
+
+ /**
+ * Validates the values for each of the group's controls. If an invalid
+ * value is found then a descriptive error message is stored for later
+ * reference. Returns a boolean indicating the validity of all of the
+ * controls in the group.
+ */
+ protected boolean validateControls() {
+ // don't attempt to validate controls until they have been created
+ if (containerGroup == null) {
+ return false;
+ }
+ problemType = PROBLEM_NONE;
+ problemMessage = "";//$NON-NLS-1$
+
+ if (!validateContainer() || !validateResourceName()) {
+ return false;
+ }
+
+ IPath path = containerGroup.getContainerFullPath().append(getResource());
+ return validateFullResourcePath(path);
+ }
+
+ /**
+ * Returns a <code>boolean</code> indicating whether the specified
+ * resource path represents a valid new resource in the workbench. An error
+ * message is stored for future reference if the path does not represent a
+ * valid new resource path.
+ *
+ * @param resourcePath
+ * the path to validate
+ * @return <code>boolean</code> indicating validity of the resource path
+ */
+ protected boolean validateFullResourcePath(IPath resourcePath) {
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+
+ IStatus result = workspace.validatePath(resourcePath.toString(), IResource.FOLDER);
+ if (!result.isOK()) {
+ problemType = PROBLEM_PATH_INVALID;
+ problemMessage = result.getMessage();
+ return false;
+ }
+
+ if (!allowExistingResources && (workspace.getRoot().getFolder(resourcePath).exists() || workspace.getRoot().getFile(resourcePath).exists())) {
+ problemType = PROBLEM_RESOURCE_EXIST;
+ problemMessage = NLS.bind(IDEWorkbenchMessages.ResourceGroup_nameExists, getResource());
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Returns a <code>boolean</code> indicating whether the resource name
+ * rep- resents a valid resource name in the workbench. An error message is
+ * stored for future reference if the name does not represent a valid
+ * resource name.
+ *
+ * @return <code>boolean</code> indicating validity of the resource name
+ */
+ protected boolean validateResourceName() {
+ String resourceName = getResource();
+
+ if (resourceName.length() == 0) {
+ problemType = PROBLEM_RESOURCE_EMPTY;
+ problemMessage = NLS.bind(IDEWorkbenchMessages.ResourceGroup_emptyName, resourceType);
+ return false;
+ }
+
+ if (!Path.ROOT.isValidPath(resourceName)) {
+ problemType = PROBLEM_NAME_INVALID;
+ problemMessage = NLS.bind(IDEWorkbenchMessages.ResourceGroup_invalidFilename, resourceName);
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Returns the flag indicating whether existing resources are permitted.
+ *
+ * @return The allow existing resources flag.
+ * @see ResourceAndContainerGroup#setAllowExistingResources(boolean)
+ * @since 3.4
+ */
+ public boolean getAllowExistingResources() {
+ return allowExistingResources;
+ }
+
+}
diff --git a/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/wizard/WizardNewFileCreationPage.java b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/wizard/WizardNewFileCreationPage.java
new file mode 100644
index 0000000..99d80c0
--- /dev/null
+++ b/org.eclipse.egf.core.ui/src/org/eclipse/egf/core/ui/wizard/WizardNewFileCreationPage.java
@@ -0,0 +1,711 @@
+/**
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ * Alexander Fedorov <Alexander.Fedorov@borland.com>
+ * - Bug 172000 [Wizards] WizardNewFileCreationPage should support overwriting existing resources
+ */
+package org.eclipse.egf.core.ui.wizard;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.lang.reflect.InvocationTargetException;
+import java.net.URI;
+import java.util.Iterator;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceStatus;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Preferences;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.dialogs.IMessageProvider;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.undo.CreateFileOperation;
+import org.eclipse.ui.ide.undo.WorkspaceUndoUtil;
+import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
+import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
+import org.eclipse.ui.internal.ide.IIDEHelpContextIds;
+import org.eclipse.ui.internal.ide.dialogs.CreateLinkedResourceGroup;
+
+/**
+ * Standard main page for a wizard that creates a file resource.
+ * <p>
+ * This page may be used by clients as-is; it may be also be subclassed to suit.
+ * </p>
+ * <p>
+ * Subclasses may override
+ * <ul>
+ * <li><code>getInitialContents</code></li>
+ * <li><code>getNewFileLabel</code></li>
+ * </ul>
+ * </p>
+ * <p>
+ * Subclasses may extend
+ * <ul>
+ * <li><code>handleEvent</code></li>
+ * </ul>
+ * </p>
+ */
+public class WizardNewFileCreationPage extends WizardPage implements Listener {
+
+ private static final int SIZING_CONTAINER_GROUP_HEIGHT = 250;
+
+ // the current resource selection
+ private IStructuredSelection currentSelection;
+
+ // cache of newly-created file
+ private IFile newFile;
+
+ private URI linkTargetPath;
+
+ // widgets
+ private ResourceAndContainerGroup resourceGroup;
+
+ private Button advancedButton;
+
+ private CreateLinkedResourceGroup linkedResourceGroup;
+
+ private Composite linkedResourceParent;
+
+ private Composite linkedResourceComposite;
+
+ // initial value stores
+ private String initialFileName;
+
+ /**
+ * The file extension to use for this page's file name field when it does
+ * not exist yet.
+ *
+ * @see WizardNewFileCreationPage#setFileExtension(String)
+ * @since 3.3
+ */
+ private String initialFileExtension;
+
+ private IPath initialContainerFullPath;
+
+ private boolean initialAllowExistingResources = false;
+
+ /**
+ * Height of the "advanced" linked resource group. Set when the advanced
+ * group is first made visible.
+ */
+ private int linkedResourceGroupHeight = -1;
+
+ /**
+ * First time the advanced group is validated.
+ */
+ private boolean firstLinkCheck = true;
+
+ /**
+ * Creates a new file creation wizard page. If the initial resource
+ * selection contains exactly one container resource then it will be used as
+ * the default container resource.
+ *
+ * @param pageName
+ * the name of the page
+ * @param selection
+ * the current resource selection
+ */
+ public WizardNewFileCreationPage(String pageName, IStructuredSelection selection) {
+ super(pageName);
+ setPageComplete(false);
+ this.currentSelection = selection;
+ }
+
+ /**
+ * Creates the widget for advanced options.
+ *
+ * @param parent
+ * the parent composite
+ */
+ protected void createAdvancedControls(Composite parent) {
+ Preferences preferences = ResourcesPlugin.getPlugin().getPluginPreferences();
+
+ if (preferences.getBoolean(ResourcesPlugin.PREF_DISABLE_LINKING) == false) {
+ linkedResourceParent = new Composite(parent, SWT.NONE);
+ linkedResourceParent.setFont(parent.getFont());
+ linkedResourceParent.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ GridLayout layout = new GridLayout();
+ layout.marginHeight = 0;
+ layout.marginWidth = 0;
+ linkedResourceParent.setLayout(layout);
+
+ advancedButton = new Button(linkedResourceParent, SWT.PUSH);
+ advancedButton.setFont(linkedResourceParent.getFont());
+ advancedButton.setText(IDEWorkbenchMessages.showAdvanced);
+ GridData data = setButtonLayoutData(advancedButton);
+ data.horizontalAlignment = GridData.BEGINNING;
+ advancedButton.setLayoutData(data);
+ advancedButton.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ handleAdvancedButtonSelect();
+ }
+ });
+ }
+ linkedResourceGroup = new CreateLinkedResourceGroup(IResource.FILE, new Listener() {
+ public void handleEvent(Event e) {
+ setPageComplete(validatePage());
+ firstLinkCheck = false;
+ }
+ }, new CreateLinkedResourceGroup.IStringValue() {
+ public void setValue(String string) {
+ resourceGroup.setResource(string);
+ }
+
+ public String getValue() {
+ return resourceGroup.getResource();
+ }
+ });
+ }
+
+ /**
+ * (non-Javadoc) Method declared on IDialogPage.
+ */
+ public void createControl(Composite parent) {
+ initializeDialogUnits(parent);
+ // top level group
+ Composite topLevel = new Composite(parent, SWT.NONE);
+ topLevel.setLayout(new GridLayout());
+ topLevel.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL));
+ topLevel.setFont(parent.getFont());
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(topLevel, IIDEHelpContextIds.NEW_FILE_WIZARD_PAGE);
+
+ // resource and container group
+ resourceGroup = new ResourceAndContainerGroup(topLevel, this, getNewFileLabel(), IDEWorkbenchMessages.WizardNewFileCreationPage_file, SIZING_CONTAINER_GROUP_HEIGHT);
+ resourceGroup.setAllowExistingResources(initialAllowExistingResources);
+ initialPopulateContainerNameField();
+ createAdvancedControls(topLevel);
+ if (initialFileName != null) {
+ resourceGroup.setResource(initialFileName);
+ }
+ if (initialFileExtension != null) {
+ resourceGroup.setResourceExtension(initialFileExtension);
+ }
+ validatePage();
+ // Show description on opening
+ setErrorMessage(null);
+ setMessage(null);
+ setControl(topLevel);
+ }
+
+ /**
+ * Creates a file resource given the file handle and contents.
+ *
+ * @param fileHandle
+ * the file handle to create a file resource with
+ * @param contents
+ * the initial contents of the new file resource, or
+ * <code>null</code> if none (equivalent to an empty stream)
+ * @param monitor
+ * the progress monitor to show visual progress with
+ * @exception CoreException
+ * if the operation fails
+ * @exception OperationCanceledException
+ * if the operation is canceled
+ *
+ * @deprecated As of 3.3, use or override {@link #createNewFile()} which
+ * uses the undoable operation support. To supply customized
+ * file content for a subclass, use {@link #getInitialContents()}.
+ */
+ protected void createFile(IFile fileHandle, InputStream contents, IProgressMonitor monitor) throws CoreException {
+ if (contents == null) {
+ contents = new ByteArrayInputStream(new byte[0]);
+ }
+
+ try {
+ // Create a new file resource in the workspace
+ if (linkTargetPath != null) {
+ fileHandle.createLink(linkTargetPath, IResource.ALLOW_MISSING_LOCAL, monitor);
+ } else {
+ IPath path = fileHandle.getFullPath();
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ int numSegments = path.segmentCount();
+ if (numSegments > 2 && !root.getFolder(path.removeLastSegments(1)).exists()) {
+ // If the direct parent of the path doesn't exist, try to
+ // create the
+ // necessary directories.
+ for (int i = numSegments - 2; i > 0; i--) {
+ IFolder folder = root.getFolder(path.removeLastSegments(i));
+ if (!folder.exists()) {
+ folder.create(false, true, monitor);
+ }
+ }
+ }
+ fileHandle.create(contents, false, monitor);
+ }
+ } catch (CoreException e) {
+ // If the file already existed locally, just refresh to get contents
+ if (e.getStatus().getCode() == IResourceStatus.PATH_OCCUPIED) {
+ fileHandle.refreshLocal(IResource.DEPTH_ZERO, null);
+ } else {
+ throw e;
+ }
+ }
+
+ if (monitor.isCanceled()) {
+ throw new OperationCanceledException();
+ }
+ }
+
+ /**
+ * Creates a file resource handle for the file with the given workspace
+ * path. This method does not create the file resource; this is the
+ * responsibility of <code>createFile</code>.
+ *
+ * @param filePath
+ * the path of the file resource to create a handle for
+ * @return the new file resource handle
+ * @see #createFile
+ */
+ protected IFile createFileHandle(IPath filePath) {
+ return IDEWorkbenchPlugin.getPluginWorkspace().getRoot().getFile(filePath);
+ }
+
+ /**
+ * Creates the link target path if a link target has been specified.
+ */
+ protected void createLinkTarget() {
+ linkTargetPath = linkedResourceGroup.getLinkTargetURI();
+ }
+
+ /**
+ * Creates a new file resource in the selected container and with the
+ * selected name. Creates any missing resource containers along the path;
+ * does nothing if the container resources already exist.
+ * <p>
+ * In normal usage, this method is invoked after the user has pressed Finish
+ * on the wizard; the enablement of the Finish button implies that all
+ * controls on on this page currently contain valid values.
+ * </p>
+ * <p>
+ * Note that this page caches the new file once it has been successfully
+ * created; subsequent invocations of this method will answer the same file
+ * resource without attempting to create it again.
+ * </p>
+ * <p>
+ * This method should be called within a workspace modify operation since it
+ * creates resources.
+ * </p>
+ *
+ * @return the created file resource, or <code>null</code> if the file was
+ * not created
+ */
+ public IFile createNewFile() {
+ if (newFile != null) {
+ return newFile;
+ }
+
+ // create the new file and cache it if successful
+
+ final IPath containerPath = resourceGroup.getContainerFullPath();
+ IPath newFilePath = containerPath.append(resourceGroup.getResource());
+ final IFile newFileHandle = createFileHandle(newFilePath);
+ final InputStream initialContents = getInitialContents();
+
+ createLinkTarget();
+ IRunnableWithProgress op = new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) {
+ CreateFileOperation op = new CreateFileOperation(newFileHandle, linkTargetPath, initialContents, IDEWorkbenchMessages.WizardNewFileCreationPage_title);
+ try {
+ // see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=219901
+ // directly execute the operation so that the undo state is
+ // not preserved. Making this undoable resulted in too many
+ // accidental file deletions.
+ op.execute(monitor, WorkspaceUndoUtil.getUIInfoAdapter(getShell()));
+ } catch (final ExecutionException e) {
+ getContainer().getShell().getDisplay().syncExec(new Runnable() {
+ public void run() {
+ if (e.getCause() instanceof CoreException) {
+ ErrorDialog.openError(getContainer().getShell(), // Was
+ // Utilities.getFocusShell()
+ IDEWorkbenchMessages.WizardNewFileCreationPage_errorTitle, null, // no special
+ // message
+ ((CoreException) e.getCause()).getStatus());
+ } else {
+ IDEWorkbenchPlugin.log(getClass(), "createNewFile()", e.getCause()); //$NON-NLS-1$
+ MessageDialog.openError(getContainer().getShell(), IDEWorkbenchMessages.WizardNewFileCreationPage_internalErrorTitle, NLS.bind(IDEWorkbenchMessages.WizardNewFileCreationPage_internalErrorMessage, e.getCause().getMessage()));
+ }
+ }
+ });
+ }
+ }
+ };
+ try {
+ getContainer().run(true, true, op);
+ } catch (InterruptedException e) {
+ return null;
+ } catch (InvocationTargetException e) {
+ // Execution Exceptions are handled above but we may still get
+ // unexpected runtime errors.
+ IDEWorkbenchPlugin.log(getClass(), "createNewFile()", e.getTargetException()); //$NON-NLS-1$
+ MessageDialog.open(MessageDialog.ERROR, getContainer().getShell(), IDEWorkbenchMessages.WizardNewFileCreationPage_internalErrorTitle, NLS.bind(IDEWorkbenchMessages.WizardNewFileCreationPage_internalErrorMessage, e.getTargetException().getMessage()), SWT.SHEET);
+
+ return null;
+ }
+
+ newFile = newFileHandle;
+
+ return newFile;
+ }
+
+ /**
+ * Returns the scheduling rule to use when creating the resource at the
+ * given container path. The rule should be the creation rule for the
+ * top-most non-existing parent.
+ *
+ * @param resource
+ * The resource being created
+ * @return The scheduling rule for creating the given resource
+ * @since 3.1
+ * @deprecated As of 3.3, scheduling rules are provided by the undoable
+ * operation that this page creates and executes.
+ */
+ protected ISchedulingRule createRule(IResource resource) {
+ IResource parent = resource.getParent();
+ while (parent != null) {
+ if (parent.exists()) {
+ return resource.getWorkspace().getRuleFactory().createRule(resource);
+ }
+ resource = parent;
+ parent = parent.getParent();
+ }
+ return resource.getWorkspace().getRoot();
+ }
+
+ /**
+ * Returns the current full path of the containing resource as entered or
+ * selected by the user, or its anticipated initial value.
+ *
+ * @return the container's full path, anticipated initial value, or
+ * <code>null</code> if no path is known
+ */
+ public IPath getContainerFullPath() {
+ return resourceGroup.getContainerFullPath();
+ }
+
+ /**
+ * Returns the current file name as entered by the user, or its anticipated
+ * initial value. <br>
+ * <br>
+ * The current file name will include the file extension if the
+ * preconditions are met.
+ *
+ * @see WizardNewFileCreationPage#setFileExtension(String)
+ *
+ * @return the file name, its anticipated initial value, or
+ * <code>null</code> if no file name is known
+ */
+ public String getFileName() {
+ if (resourceGroup == null) {
+ return initialFileName;
+ }
+
+ return resourceGroup.getResource();
+ }
+
+ /**
+ * Returns the file extension to use when creating the new file.
+ *
+ * @return the file extension or <code>null</code>.
+ * @see WizardNewFileCreationPage#setFileExtension(String)
+ * @since 3.3
+ */
+ public String getFileExtension() {
+ if (resourceGroup == null) {
+ return initialFileExtension;
+ }
+ return resourceGroup.getResourceExtension();
+ }
+
+ /**
+ * Returns a stream containing the initial contents to be given to new file
+ * resource instances. <b>Subclasses</b> may wish to override. This default
+ * implementation provides no initial contents.
+ *
+ * @return initial contents to be given to new file resource instances
+ */
+ protected InputStream getInitialContents() {
+ return null;
+ }
+
+ /**
+ * Returns the label to display in the file name specification visual
+ * component group.
+ * <p>
+ * Subclasses may reimplement.
+ * </p>
+ *
+ * @return the label to display in the file name specification visual
+ * component group
+ */
+ protected String getNewFileLabel() {
+ return IDEWorkbenchMessages.WizardNewFileCreationPage_fileLabel;
+ }
+
+ /**
+ * Shows/hides the advanced option widgets.
+ */
+ protected void handleAdvancedButtonSelect() {
+ Shell shell = getShell();
+ Point shellSize = shell.getSize();
+ Composite composite = (Composite) getControl();
+
+ if (linkedResourceComposite != null) {
+ linkedResourceComposite.dispose();
+ linkedResourceComposite = null;
+ composite.layout();
+ shell.setSize(shellSize.x, shellSize.y - linkedResourceGroupHeight);
+ advancedButton.setText(IDEWorkbenchMessages.showAdvanced);
+ } else {
+ linkedResourceComposite = linkedResourceGroup.createContents(linkedResourceParent);
+ if (linkedResourceGroupHeight == -1) {
+ Point groupSize = linkedResourceComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
+ linkedResourceGroupHeight = groupSize.y;
+ }
+ shell.setSize(shellSize.x, shellSize.y + linkedResourceGroupHeight);
+ composite.layout();
+ advancedButton.setText(IDEWorkbenchMessages.hideAdvanced);
+ }
+ }
+
+ /**
+ * The <code>WizardNewFileCreationPage</code> implementation of this
+ * <code>Listener</code> method handles all events and enablements for
+ * controls on this page. Subclasses may extend.
+ */
+ public void handleEvent(Event event) {
+ setPageComplete(validatePage());
+ }
+
+ /**
+ * Sets the initial contents of the container name entry field, based upon
+ * either a previously-specified initial value or the ability to determine
+ * such a value.
+ */
+ protected void initialPopulateContainerNameField() {
+ if (initialContainerFullPath != null) {
+ resourceGroup.setContainerFullPath(initialContainerFullPath);
+ } else {
+ Iterator it = currentSelection.iterator();
+ if (it.hasNext()) {
+ Object object = it.next();
+ IResource selectedResource = null;
+ if (object instanceof IResource) {
+ selectedResource = (IResource) object;
+ } else if (object instanceof IAdaptable) {
+ selectedResource = (IResource) ((IAdaptable) object).getAdapter(IResource.class);
+ }
+ if (selectedResource != null) {
+ if (selectedResource.getType() == IResource.FILE) {
+ selectedResource = selectedResource.getParent();
+ }
+ if (selectedResource.isAccessible()) {
+ resourceGroup.setContainerFullPath(selectedResource.getFullPath());
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Sets the flag indicating whether existing resources are permitted to be
+ * specified on this page.
+ *
+ * @param value
+ * <code>true</code> if existing resources are permitted, and
+ * <code>false</code> otherwise
+ * @since 3.4
+ */
+ public void setAllowExistingResources(boolean value) {
+ if (resourceGroup == null) {
+ initialAllowExistingResources = value;
+ } else {
+ resourceGroup.setAllowExistingResources(value);
+ }
+ }
+
+ /**
+ * Sets the value of this page's container name field, or stores it for
+ * future use if this page's controls do not exist yet.
+ *
+ * @param path
+ * the full path to the container
+ */
+ public void setContainerFullPath(IPath path) {
+ if (resourceGroup == null) {
+ initialContainerFullPath = path;
+ } else {
+ resourceGroup.setContainerFullPath(path);
+ }
+ }
+
+ /**
+ * Sets the value of this page's file name field, or stores it for future
+ * use if this page's controls do not exist yet.
+ *
+ * @param value
+ * new file name
+ */
+ public void setFileName(String value) {
+ if (resourceGroup == null) {
+ initialFileName = value;
+ } else {
+ resourceGroup.setResource(value);
+ }
+ }
+
+ /**
+ * Set the only file extension allowed for this page's file name field. If
+ * this page's controls do not exist yet, store it for future use. <br>
+ * <br>
+ * If a file extension is specified, then it will always be appended with a
+ * '.' to the text from the file name field for validation when the
+ * following conditions are met: <br>
+ * <br>
+ * (1) File extension length is greater than 0 <br>
+ * (2) File name field text length is greater than 0 <br>
+ * (3) File name field text does not already end with a '.' and the file
+ * extension specified (case sensitive) <br>
+ * <br>
+ * The file extension will not be reflected in the actual file name field
+ * until the file name field loses focus.
+ *
+ * @param value
+ * The file extension without the '.' prefix (e.g. 'java', 'xml')
+ * @since 3.3
+ */
+ public void setFileExtension(String value) {
+ if (resourceGroup == null) {
+ initialFileExtension = value;
+ } else {
+ resourceGroup.setResourceExtension(value);
+ }
+ }
+
+ /**
+ * Checks whether the linked resource target is valid. Sets the error
+ * message accordingly and returns the status.
+ *
+ * @return IStatus validation result from the CreateLinkedResourceGroup
+ */
+ protected IStatus validateLinkedResource() {
+ IPath containerPath = resourceGroup.getContainerFullPath();
+ IPath newFilePath = containerPath.append(resourceGroup.getResource());
+ IFile newFileHandle = createFileHandle(newFilePath);
+ IStatus status = linkedResourceGroup.validateLinkLocation(newFileHandle);
+
+ if (status.getSeverity() == IStatus.ERROR) {
+ if (firstLinkCheck) {
+ setMessage(status.getMessage());
+ } else {
+ setErrorMessage(status.getMessage());
+ }
+ } else if (status.getSeverity() == IStatus.WARNING) {
+ setMessage(status.getMessage(), WARNING);
+ setErrorMessage(null);
+ }
+ return status;
+ }
+
+ /**
+ * Returns whether this page's controls currently all contain valid values.
+ *
+ * @return <code>true</code> if all controls are valid, and
+ * <code>false</code> if at least one is invalid
+ */
+ protected boolean validatePage() {
+ boolean valid = true;
+
+ if (!resourceGroup.areAllValuesValid()) {
+ // if blank name then fail silently
+ if (resourceGroup.getProblemType() == ResourceAndContainerGroup.PROBLEM_RESOURCE_EMPTY || resourceGroup.getProblemType() == ResourceAndContainerGroup.PROBLEM_CONTAINER_EMPTY) {
+ setMessage(resourceGroup.getProblemMessage());
+ setErrorMessage(null);
+ } else {
+ setErrorMessage(resourceGroup.getProblemMessage());
+ }
+ valid = false;
+ }
+
+ String resourceName = resourceGroup.getResource();
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ IStatus result = workspace.validateName(resourceName, IResource.FILE);
+ if (!result.isOK()) {
+ setErrorMessage(result.getMessage());
+ return false;
+ }
+
+ IStatus linkedResourceStatus = null;
+ if (valid) {
+ linkedResourceStatus = validateLinkedResource();
+ if (linkedResourceStatus.getSeverity() == IStatus.ERROR) {
+ valid = false;
+ }
+ }
+ // validateLinkedResource sets messages itself
+ if (valid && (linkedResourceStatus == null || linkedResourceStatus.isOK())) {
+ setMessage(null);
+ setErrorMessage(null);
+
+ // perform "resource exists" check if it was skipped in
+ // ResourceAndContainerGroup
+ if (resourceGroup.getAllowExistingResources()) {
+ String problemMessage = NLS.bind(IDEWorkbenchMessages.ResourceGroup_nameExists, getFileName());
+ IPath resourcePath = getContainerFullPath().append(getFileName());
+ if (workspace.getRoot().getFolder(resourcePath).exists()) {
+ setErrorMessage(problemMessage);
+ valid = false;
+ }
+ if (workspace.getRoot().getFile(resourcePath).exists()) {
+ setMessage(problemMessage, IMessageProvider.WARNING);
+ }
+ }
+ }
+ return valid;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.dialogs.DialogPage#setVisible(boolean)
+ */
+ public void setVisible(boolean visible) {
+ super.setVisible(visible);
+ if (visible) {
+ resourceGroup.setFocus();
+ }
+ }
+}
diff --git a/org.eclipse.egf.core/.classpath b/org.eclipse.egf.core/.classpath
new file mode 100644
index 0000000..ccfec2d
--- /dev/null
+++ b/org.eclipse.egf.core/.classpath
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
+ <accessrules>
+ <accessrule kind="accessible" pattern="org/eclipse/osgi/baseadaptor/*"/>
+ <accessrule kind="accessible" pattern="org/eclipse/osgi/framework/internal/core/*"/>
+ </accessrules>
+ </classpathentry>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.egf.core/.options b/org.eclipse.egf.core/.options
new file mode 100644
index 0000000..4e38271
--- /dev/null
+++ b/org.eclipse.egf.core/.options
@@ -0,0 +1,2 @@
+# Prints debug information
+org.eclipse.egf.core/debug=true
diff --git a/org.eclipse.egf.core/.project b/org.eclipse.egf.core/.project
new file mode 100644
index 0000000..cba0f22
--- /dev/null
+++ b/org.eclipse.egf.core/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.core</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.core/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egf.core/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..7b35d65
--- /dev/null
+++ b/org.eclipse.egf.core/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:49:08 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.egf.core/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egf.core/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..08dff53
--- /dev/null
+++ b/org.eclipse.egf.core/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Mon Mar 09 16:03:57 CET 2009
+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/org.eclipse.egf.core/META-INF/MANIFEST.MF b/org.eclipse.egf.core/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..617ae44
--- /dev/null
+++ b/org.eclipse.egf.core/META-INF/MANIFEST.MF
@@ -0,0 +1,29 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.core; singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.egf.core.EGFCorePlugin
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle:
+ org.eclipse.emf.edit,
+ org.eclipse.pde.core;visibility:=reexport,
+ org.eclipse.emf.transaction;visibility:=reexport,
+ org.eclipse.emf.workspace;visibility:=reexport,
+ org.eclipse.egf.common;visibility:=reexport,
+ org.eclipse.egf.core.platform;visibility:=reexport
+Export-Package:
+ org.eclipse.egf.core,
+ org.eclipse.egf.core.context,
+ org.eclipse.egf.core.domain,
+ org.eclipse.egf.core.fcore,
+ org.eclipse.egf.core.helper,
+ org.eclipse.egf.core.l10n,
+ org.eclipse.egf.core.natures,
+ org.eclipse.egf.core.preferences,
+ org.eclipse.egf.core.session,
+ org.eclipse.egf.core.workspace
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.egf.core/about.html b/org.eclipse.egf.core/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/org.eclipse.egf.core/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/org.eclipse.egf.core/build.properties b/org.eclipse.egf.core/build.properties
new file mode 100644
index 0000000..29fa1a7
--- /dev/null
+++ b/org.eclipse.egf.core/build.properties
@@ -0,0 +1,20 @@
+##
+# 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
+##
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ schema/,\
+ .,\
+ .options,\
+ about.html,\
+ plugin.xml,\
+ plugin.properties
+src.includes = about.html
diff --git a/org.eclipse.egf.core/plugin.properties b/org.eclipse.egf.core/plugin.properties
new file mode 100644
index 0000000..6061bbf
--- /dev/null
+++ b/org.eclipse.egf.core/plugin.properties
@@ -0,0 +1,17 @@
+##
+# 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 Core (Incubation)
+providerName=Eclipse Modeling Project
+
+EGFFcoreExtensionPoint=EGF Fcore
+
+EGFNature= EGF Project Nature
diff --git a/org.eclipse.egf.core/plugin.xml b/org.eclipse.egf.core/plugin.xml
new file mode 100644
index 0000000..7251e80
--- /dev/null
+++ b/org.eclipse.egf.core/plugin.xml
Binary files differ
diff --git a/org.eclipse.egf.core/schema/fcore.exsd b/org.eclipse.egf.core/schema/fcore.exsd
new file mode 100644
index 0000000..a9eac72
--- /dev/null
+++ b/org.eclipse.egf.core/schema/fcore.exsd
@@ -0,0 +1,116 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.egf.core" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.eclipse.egf.core" id="fcore" name="EGF Factory Core"/>
+ </appInfo>
+ <documentation>
+ Exposes EGF Factory Core.
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appInfo>
+ <meta.element />
+ </appInfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="fcore" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="identifier"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="fcore">
+ <complexType>
+ <sequence minOccurs="1" maxOccurs="unbounded">
+ </sequence>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+ Fcore resource path.
+It should be a relative path to its container.
+It's type is string rather than a resource as PDE doesn't handle move refactoring between Bundle project.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ 0.1.0
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiInfo"/>
+ </appInfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="copyright"/>
+ </appInfo>
+ <documentation>
+ Copyright (c) 2009-2010 Thales Corporate Services S.A.S.<br>
+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 <a
+href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/EGFCorePlugin.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/EGFCorePlugin.java
new file mode 100644
index 0000000..0e20053
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/EGFCorePlugin.java
@@ -0,0 +1,259 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.jobs.IJobManager;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.egf.common.activator.EGFAbstractPlugin;
+import org.eclipse.egf.common.helper.BundleHelper;
+import org.eclipse.egf.core.context.ContextFactory;
+import org.eclipse.egf.core.context.IContextFactory;
+import org.eclipse.egf.core.fcore.IPlatformFcore;
+import org.eclipse.egf.core.platform.EGFPlatformPlugin;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle.
+ *
+ * @author Xavier Maysonnave
+ */
+public class EGFCorePlugin extends EGFAbstractPlugin {
+
+ public static String EDITING_DOMAIN_ID = "org.eclipse.egf.core.editing.domain"; //$NON-NLS-1$
+
+ public static String FCORE_EDITOR_ID = "org.eclipse.egf.model.fcore.tree.editor"; //$NON-NLS-1$
+
+ /**
+ * Plug-in unique instance.
+ */
+ private static EGFCorePlugin __plugin;
+
+ /**
+ * IContextFactory singleton.
+ */
+ private static final IContextFactory __contextFactory = new ContextFactory();
+
+ /**
+ * Constant identifying the job family identifier for a background build job.
+ * All clients
+ * that schedule background jobs for performing builds should include this job
+ * family in their implementation of <code>belongsTo</code>.
+ *
+ * @see IJobManager#join(Object, IProgressMonitor)
+ * @see Job#belongsTo(Object)
+ * @since 3.0
+ */
+ public static final Object FAMILY_MANUAL_BUILD = new Object();
+
+ /**
+ * Get activator shared instance.
+ *
+ * @return
+ */
+ public static EGFCorePlugin getDefault() {
+ return __plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the IContextFactory.
+ *
+ * @return the singleton production context factory.
+ */
+ public static IContextFactory getContextFactory() {
+ return __contextFactory;
+ }
+
+ /**
+ * Computes a map so that plugins in the workspace will override those in
+ * the environment and so that plugins with Ecore and GenModels will look
+ * like projects in the workspace. It's implemented like this:
+ *
+ * <pre>
+ * Map result = new HashMap();
+ * result.putAll(computePlatformPluginToPlatformResourceMap());
+ * result.putAll(computePlatformResourceToPlatformPluginMap(new
+ * HashSet(EcorePlugin.getEPackageNsURIToGenModelLocationMap().values())));
+ * return result;
+ *</pre>
+ *
+ * @return computes a map so that plugins in the workspace will override
+ * those in the environment and so that plugins with Ecore and
+ * GenModels will look like projects in the workspace.
+ * @see org.eclipse.emf.ecore.resource.URIConverter#getURIMap()
+ * @see URI
+ * @see #computePlatformPluginToPlatformResourceMap()
+ * @see #computePlatformResourceToPlatformPluginMap(Collection)
+ */
+ public static Map<URI, URI> computePlatformURIMap() {
+ Map<URI, URI> result = new HashMap<URI, URI>();
+ result.putAll(EcorePlugin.computePlatformURIMap());
+ result.putAll(computePlatformPluginToPlatformResourceMap());
+ result.putAll(computePlatformResourceToTargetPluginMap(getTargetPlatformFcores()));
+ return result;
+ }
+
+ /**
+ * Computes a map from <code>platform:/plugin/<plugin-id>/</code> {@link URI} to
+ * <code>platform:/resource/<plugin-location>/</code> URI
+ * for each plugin project in the workspace. This allows each plugin from
+ * the runtime to be {@link org.eclipse.emf.ecore.resource.URIConverter#getURIMap()
+ * redirected} to its active version in the workspace.
+ *
+ * @return a map from plugin URIs to resource URIs.
+ * @see org.eclipse.emf.ecore.resource.URIConverter#getURIMap()
+ * @see URI
+ */
+ public static Map<URI, URI> computePlatformPluginToPlatformResourceMap() {
+ Map<URI, URI> result = new HashMap<URI, URI>();
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ for (IPlatformFcore fcore : getWorkspacePlatformFcores()) {
+ String pluginID = fcore.getURI().segment(1);
+ IProject project = root.getProject(pluginID);
+ // Don't ask the project if its exists or opened. while closing a project is still opened
+ // While its according model base is already reset to null
+ IPluginModelBase base = BundleHelper.getPluginModelBase(project);
+ if (base != null) {
+ URI platformPluginURI = URI.createPlatformPluginURI(fcore.getPlatformBundle().getBundleId() + "/", false); //$NON-NLS-1$
+ URI platformResourceURI = URI.createPlatformResourceURI(fcore.getPlatformBundle().getProject().getName() + "/", true); //$NON-NLS-1$
+ result.put(platformPluginURI, platformResourceURI);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Computes a map from <code>platform:/resource/<plugin-location>/</code> {@link URI} to
+ * <code>platform:/plugin/<plugin-id>/</code> URI for each
+ * URI in the collection of the form
+ * <code>platform:/plugin/<plugin-id>/...</code>. This allows each plugin
+ * to be {@link org.eclipse.emf.ecore.resource.URIConverter#getURIMap()
+ * treated} as if it were a project in the workspace. If the workspace
+ * already contains a project for the plugin location, no mapping is
+ * produced.
+ *
+ * @param fcores
+ * a collections of {@link IPlatformFcore}s.
+ * @return a map from platform resource URI to platform plugin URI.
+ */
+ public static Map<URI, URI> computePlatformResourceToTargetPluginMap(IPlatformFcore[] fcores) {
+ Map<URI, URI> result = new HashMap<URI, URI>();
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ if (root != null) {
+ for (IPlatformFcore fcore : fcores) {
+ String pluginID = fcore.getURI().segment(1);
+ IProject project = root.getProject(pluginID);
+ // Don't ask the project if its exists or opened. while closing a project is still opened
+ // While its according model base is already reset to null
+ IPluginModelBase base = BundleHelper.getPluginModelBase(project);
+ if (project.exists() && base == null) {
+ result.put(URI.createPlatformPluginURI(pluginID + "/", false), URI.createPlatformPluginURI(pluginID + "/", false)); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Get the IPlatformFcore for given EMF Resource.
+ *
+ * @param resource
+ * @return an {@link IPlatformFcore} instance or null if the
+ * resource is null or not associated with an
+ * IPlatformFcore
+ */
+ public static IPlatformFcore getPlatformFcore(Resource resource) {
+ // a URI should be absolute, otherwise we are unable to analyse its
+ // first segment
+ if (resource == null || resource.getURI() == null || resource.getURI().isRelative()) {
+ return null;
+ }
+ // Project Name
+ String firstSegment = resource.getURI().segment(1);
+ if (firstSegment == null || firstSegment.trim().length() == 0) {
+ return null;
+ }
+ firstSegment = firstSegment.trim();
+ // locate and return the first associated IPlatformFcore
+ for (IPlatformFcore fcore : EGFPlatformPlugin.getPlatformManager().getPlatformExtensionPoints(firstSegment, IPlatformFcore.class)) {
+ if (fcore.getURI().equals(resource.getURI())) {
+ return fcore;
+ }
+ }
+ // Nothing to retrieve
+ return null;
+ }
+
+ /**
+ * Get the IPlatformFcore[] for given project.
+ *
+ */
+ public static IPlatformFcore[] getPlatformFcores(IProject project) {
+ return EGFPlatformPlugin.getPlatformManager().getPlatformExtensionPoints(project, IPlatformFcore.class);
+ }
+
+ /**
+ * Returns a snapshot of known workspace IPlatformFcore
+ *
+ * @return an array of IPlatformFcore
+ */
+ public static IPlatformFcore[] getWorkspacePlatformFcores() {
+ return EGFPlatformPlugin.getPlatformManager().getWorkspacePlatformExtensionPoints(IPlatformFcore.class);
+ }
+
+ /**
+ * Returns a snapshot of known target IPlatformFcore
+ *
+ * @return an array of IPlatformFcore
+ */
+ public static IPlatformFcore[] getTargetPlatformFcores() {
+ return EGFPlatformPlugin.getPlatformManager().getTargetPlatformExtensionPoints(IPlatformFcore.class);
+ }
+
+ /**
+ * Returns a snapshot of known IPlatformFcore
+ *
+ * @return an array of IPlatformFcore
+ */
+ public static IPlatformFcore[] getPlatformFcores() {
+ return EGFPlatformPlugin.getPlatformManager().getPlatformExtensionPoints(IPlatformFcore.class);
+ }
+
+ /**
+ * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ __plugin = this;
+ }
+
+ /**
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ __plugin = null;
+ super.stop(context);
+ }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/context/Context.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/context/Context.java
new file mode 100644
index 0000000..f1213ed
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/context/Context.java
@@ -0,0 +1,64 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.core.context;
+
+import java.util.HashMap;
+import java.util.Map;
+
+
+/**
+ * TODO Ici on ne devrait avoir qu'une pauvre map avec name-valeur. Son
+ * initialisation étant à la charge de l'orchestrateur. TODO il faudrait
+ * ajoueter un peu de control pour savoir les noms en lecture et ceux en
+ * écriture.
+ *
+ * @author Guiu
+ *
+ */
+public class Context implements IContext {
+
+ private IContext _parent;
+
+ private final Map<String, Object> _data = new HashMap<String, Object>();
+
+ public Context() {
+ // Nothing to do
+ }
+
+ public Context(IContext parent) {
+ _parent = parent;
+ }
+
+ public IContext getParent() {
+ return _parent;
+ }
+
+ public void setValue(String name, Object value) {
+ if (name == null) {
+ throw new IllegalArgumentException();
+ }
+ _data.put(name, value);
+ // TODO how to deal with parent ctx ?
+ }
+
+ public Object getValue(String name) {
+ if (name == null) {
+ throw new IllegalArgumentException();
+ }
+ if (_data.containsKey(name)) {
+ return _data.get(name);
+ }
+ return _parent == null ? null : _parent.getValue(name);
+ }
+
+}
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/context/ContextFactory.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/context/ContextFactory.java
new file mode 100644
index 0000000..4b4afa3
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/context/ContextFactory.java
@@ -0,0 +1,28 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.context;
+
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class ContextFactory implements IContextFactory {
+
+ public IContext createContext(IContext parent) {
+ return new Context(parent);
+ }
+
+ public IContext createContext() {
+ return new Context();
+ }
+
+}
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/context/IContext.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/context/IContext.java
new file mode 100644
index 0000000..82f2ae1
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/context/IContext.java
@@ -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
+ */
+package org.eclipse.egf.core.context;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public interface IContext {
+
+ public void setValue(String name, Object value);
+
+ public Object getValue(String name);
+
+}
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/context/IContextFactory.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/context/IContextFactory.java
new file mode 100644
index 0000000..0a37f13
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/context/IContextFactory.java
@@ -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
+ */
+package org.eclipse.egf.core.context;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public interface IContextFactory {
+
+ public IContext createContext(IContext parent);
+
+ public IContext createContext();
+
+}
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/domain/DiagnosticResourceException.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/domain/DiagnosticResourceException.java
new file mode 100644
index 0000000..6e95968
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/domain/DiagnosticResourceException.java
@@ -0,0 +1,43 @@
+/**
+ * Copyright (c) 2009 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
+ */
+package org.eclipse.egf.core.domain;
+
+import org.eclipse.emf.common.util.WrappedException;
+import org.eclipse.emf.ecore.resource.Resource;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class DiagnosticResourceException extends WrappedException implements Resource.Diagnostic {
+
+ private Resource _resource;
+
+ private static final long serialVersionUID = 1L;
+
+ public DiagnosticResourceException(Resource resource, Exception exception) {
+ super(exception);
+ _resource = resource;
+ }
+
+ public String getLocation() {
+ return _resource.getURI() == null ? null : _resource.getURI().toString();
+ }
+
+ public int getColumn() {
+ return 0;
+ }
+
+ public int getLine() {
+ return 0;
+ }
+
+}
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/domain/EGFEditingDomainFactory.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/domain/EGFEditingDomainFactory.java
new file mode 100644
index 0000000..d67293e
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/domain/EGFEditingDomainFactory.java
@@ -0,0 +1,109 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.core.domain;
+
+import org.eclipse.core.commands.operations.IOperationHistory;
+import org.eclipse.egf.core.workspace.EGFWorkspaceSynchronizer;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.workspace.WorkspaceEditingDomainFactory;
+import org.eclipse.emf.workspace.impl.WorkspaceCommandStackImpl;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class EGFEditingDomainFactory extends WorkspaceEditingDomainFactory {
+
+ @Override
+ public TransactionalEditingDomain createEditingDomain() {
+ TransactionalEditingDomain result = super.createEditingDomain();
+ configure(result);
+ return result;
+ }
+
+ @Override
+ public TransactionalEditingDomain createEditingDomain(ResourceSet rset) {
+ TransactionalEditingDomain result = super.createEditingDomain(rset);
+ configure(result);
+ return result;
+ }
+
+ /**
+ * Creates a new editing domain on a default resource set implementation and
+ * the specified operation history.
+ *
+ * @param history
+ * the operation history to which I delegate the command stack
+ *
+ * @return the new editing domain
+ */
+ @Override
+ public synchronized TransactionalEditingDomain createEditingDomain(IOperationHistory history) {
+ WorkspaceCommandStackImpl stack = new WorkspaceCommandStackImpl(history);
+ stack.setResourceUndoContextPolicy(getResourceUndoContextPolicy());
+ TransactionalEditingDomain result = new EGFTransactionalEditingDomain(new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE), stack);
+ mapResourceSet(result);
+ return result;
+ }
+
+ /**
+ * Creates a new editing domain on the given resource set and
+ * the specified operation history.
+ *
+ * @param rset
+ * the resource set to use
+ * @param history
+ * the operation history to which I delegate the command stack
+ *
+ * @return the new editing domain
+ */
+ @Override
+ public synchronized TransactionalEditingDomain createEditingDomain(ResourceSet rset, IOperationHistory history) {
+ WorkspaceCommandStackImpl stack = new WorkspaceCommandStackImpl(history);
+ stack.setResourceUndoContextPolicy(getResourceUndoContextPolicy());
+ TransactionalEditingDomain result = new EGFTransactionalEditingDomain(new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE), stack, rset);
+ mapResourceSet(result);
+ return result;
+ }
+
+ /**
+ * Configures the specified editing domain for correct functioning in the EGF environment.
+ *
+ * @param domain
+ * the new editing domain
+ */
+ protected void configure(final TransactionalEditingDomain domain) {
+ // the listener depends on UI to ask the user to solve conflict
+ new EGFWorkspaceSynchronizer(domain, new EGFResourceLoadedListener());
+ // configure domain management
+ configureResourceModificationManagement(domain);
+ }
+
+ /**
+ * Configures <code>domain</code> so that the modified state
+ * of resources in the <code>domain</code> is managed as operations are
+ * executed, undone and redone on the operation history.
+ *
+ * @param domain
+ * the editing domain to be configured
+ */
+ protected void configureResourceModificationManagement(TransactionalEditingDomain domain) {
+ ResourceModificationManager.manage(domain);
+ }
+
+}
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/domain/EGFResourceLoadedListener.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/domain/EGFResourceLoadedListener.java
new file mode 100644
index 0000000..7ffb2c3
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/domain/EGFResourceLoadedListener.java
@@ -0,0 +1,454 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.domain;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.commands.operations.IOperationHistory;
+import org.eclipse.core.commands.operations.IUndoableOperation;
+import org.eclipse.core.commands.operations.ObjectUndoContext;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.core.fcore.IPlatformFcore;
+import org.eclipse.egf.core.platform.EGFPlatformPlugin;
+import org.eclipse.egf.core.platform.pde.IPlatformExtensionPointDelta;
+import org.eclipse.egf.core.platform.pde.IPlatformExtensionPointListener;
+import org.eclipse.egf.core.workspace.EGFWorkspaceSynchronizer;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.common.util.UniqueEList;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public final class EGFResourceLoadedListener implements EGFWorkspaceSynchronizer.Delegate {
+
+ public static final ResourceEventManager RESOURCE_MANAGER = new ResourceEventManager();
+
+ public static interface ResourceUser {
+
+ public Resource getResource();
+
+ public ResourceListener getListener();
+
+ public boolean isDirty();
+
+ public boolean userHasSavedResource();
+
+ public boolean resourceHasBeenExternallyChanged();
+
+ public IOperationHistory getOperationHistory();
+
+ public ObjectUndoContext getUndoContext();
+
+ }
+
+ public static interface ResourceListener {
+
+ public void resourceDeleted(Resource resource);
+
+ public void resourceMoved(Resource resource, URI oldURI);
+
+ public void resourceReloaded(Resource resource);
+
+ public void externalUpdate(Resource resource);
+
+ public void internalUpdate(Resource resource);
+
+ }
+
+ public static class ResourceEventManager {
+
+ final List<ResourceListener> _listeners = new ArrayList<ResourceListener>();
+
+ final Map<Resource, List<ResourceUser>> _observers = new HashMap<Resource, List<ResourceUser>>();
+
+ // Due to PDE bug notification we need to handle
+ // notification in a weird way
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=267954
+ // See PlatformManager for more informations
+ final Map<Resource, IPlatformFcore> _fcores = new HashMap<Resource, IPlatformFcore>();
+
+ public void addObserver(ResourceUser resourceUser) {
+ Resource resource = resourceUser.getResource();
+ List<ResourceUser> list = _observers.get(resource);
+ if (list == null) {
+ list = new ArrayList<ResourceUser>();
+ _observers.put(resource, list);
+ // Start Workaround PDE Bug 267954
+ IPlatformFcore fcore = EGFCorePlugin.getPlatformFcore(resource);
+ if (fcore != null) {
+ _fcores.put(resource, fcore);
+ }
+ // End Workaround PDE Bug 267954
+ }
+ list.add(resourceUser);
+ _listeners.add(resourceUser.getListener());
+ }
+
+ public void removeObserver(ResourceUser resourceUser) {
+ Resource resource = resourceUser.getResource();
+ List<ResourceUser> list = _observers.get(resource);
+ if (list == null) {
+ return;
+ }
+ list.remove(resourceUser);
+ if (list.isEmpty()) {
+ try {
+ resource.unload();
+ _observers.remove(resource);
+ // Start Workaround PDE Bug 267954
+ _fcores.remove(resource);
+ // End Workaround PDE Bug 267954
+ if (noMoreObserver() == false) {
+ resource.load(Collections.EMPTY_MAP);
+ }
+ } catch (IOException ioe) {
+ resource.getErrors().add(new DiagnosticResourceException(resource, ioe));
+ }
+ }
+ _listeners.remove(resourceUser.getListener());
+ if (noMoreObserver()) {
+ clearResourceSet();
+ }
+ }
+
+ private void clearResourceSet() {
+ // no editor is actually open, so let's unload all the resources
+ final TransactionalEditingDomain editingDomain = TransactionalEditingDomain.Registry.INSTANCE.getEditingDomain(EGFCorePlugin.EDITING_DOMAIN_ID);
+ try {
+ editingDomain.runExclusive(new Runnable() {
+ public void run() {
+ for (Iterator<Resource> it = editingDomain.getResourceSet().getResources().iterator(); it.hasNext();) {
+ Resource resource = it.next();
+ resource.unload();
+ it.remove();
+ }
+ }
+ });
+ if (EGFCorePlugin.getDefault().isDebugging()) {
+ EGFPlatformPlugin.getDefault().logInfo("EGFResourceLoadedListener.clearResourceSet()"); //$NON-NLS-1$
+ }
+ } catch (InterruptedException e) {
+ EGFCorePlugin.getDefault().logError(e);
+ }
+ _fcores.clear();
+ }
+
+ private boolean noMoreObserver() {
+ for (List<ResourceUser> users : _observers.values()) {
+ if (users.isEmpty() == false) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public void removeResource(EditingDomain editingDomain, Resource resource) {
+ if (resource == null) {
+ throw new IllegalArgumentException();
+ }
+ boolean isDirty = false;
+ // Check whether or not we are editing the current resource
+ List<ResourceUser> users = _observers.get(resource);
+ if (users != null) {
+ for (ResourceUser user : users) {
+ // This state is propagated, the first user is enough to check this state
+ isDirty = user.isDirty();
+ break;
+ }
+ }
+ // Notify, use an iterator as a closing editor always remove its listener
+ // This we avoid any concurrent modification exception
+ for (Iterator<ResourceListener> iterator = _listeners.iterator(); iterator.hasNext();) {
+ ResourceListener resourceListener = iterator.next();
+ resourceListener.resourceDeleted(resource);
+ }
+ // Non dirty editors should close themselves while editing a deleted resource if any
+ if (isDirty == false) {
+ resource.unload();
+ // Start Workaround PDE Bug 267954
+ _fcores.remove(resource);
+ // End Workaround PDE Bug 267954
+ }
+ }
+
+ public void reloadResource(Resource resource) {
+ if (resource == null) {
+ throw new IllegalArgumentException();
+ }
+ try {
+ resource.unload();
+ resource.load(Collections.EMPTY_MAP);
+ } catch (IOException ioe) {
+ resource.getErrors().add(new DiagnosticResourceException(resource, ioe));
+ }
+ for (Iterator<ResourceListener> iterator = _listeners.iterator(); iterator.hasNext();) {
+ ResourceListener resourceListener = iterator.next();
+ resourceListener.resourceReloaded(resource);
+ }
+ }
+
+ public void movedResource(TransactionalEditingDomain editingDomain, Resource movedResource, URI newURI) {
+ if (movedResource == null) {
+ throw new IllegalArgumentException();
+ }
+ URI oldURI = movedResource.getURI();
+ Resource resource = movedResource.getResourceSet().getResource(newURI, false);
+ // Resource who can't open a physical resource raise exception but are loaded
+ // in the resource set, its flag is also set to isLoaded
+ // we need to unload otherwise our resource set will be messy (two resources with the same URI)
+ if (resource != null && resource.getContents().size() == 0 && resource.getErrors().isEmpty() == false) {
+ resource.unload();
+ resource.getResourceSet().getResources().remove(resource);
+ if (EGFCorePlugin.getDefault().isDebugging()) {
+ EGFPlatformPlugin.getDefault().logInfo(NLS.bind("EGFResourceLoadedListener.movedResource(...) - discard loaded empty resource with errors ''{0}''", resource.getURI())); //$NON-NLS-1$
+ }
+ _fcores.remove(resource);
+ // Load it in our resource set
+ movedResource = editingDomain.getResourceSet().getResource(newURI, true);
+ }
+ _fcores.remove(movedResource);
+ movedResource.setURI(newURI);
+ for (Iterator<ResourceListener> iterator = _listeners.iterator(); iterator.hasNext();) {
+ ResourceListener resourceListener = iterator.next();
+ resourceListener.resourceMoved(movedResource, oldURI);
+ }
+ }
+
+ public boolean resourceHasBeenExternallyChanged(Resource resource) {
+ if (resource == null) {
+ throw new IllegalArgumentException();
+ }
+ List<ResourceUser> users = _observers.get(resource);
+ if (users == null) {
+ return false;
+ }
+ boolean resourceHasBeenExternallyChanged = false;
+ // This state is propagated, the first user is enough to check this state
+ for (ResourceUser user : users) {
+ resourceHasBeenExternallyChanged = user.resourceHasBeenExternallyChanged();
+ break;
+ }
+ return resourceHasBeenExternallyChanged;
+ }
+
+ public void populateUndoContext(IOperationHistory operationHistory, ObjectUndoContext undoContext, Resource resource) {
+ if (resource == null || undoContext == null) {
+ throw new IllegalArgumentException();
+ }
+ List<ResourceUser> users = _observers.get(resource);
+ if (users == null) {
+ return;
+ }
+ // Operation History is propagated, the first user is enough to retrieve it
+ ObjectUndoContext innerUndoContext = null;
+ for (ResourceUser user : users) {
+ if (user.getUndoContext() != undoContext) {
+ innerUndoContext = user.getUndoContext();
+ break;
+ }
+ }
+ // Populate
+ if (innerUndoContext != null) {
+ for (IUndoableOperation operation : operationHistory.getUndoHistory(innerUndoContext)) {
+ operation.addContext(undoContext);
+ }
+ for (IUndoableOperation operation : operationHistory.getRedoHistory(innerUndoContext)) {
+ operation.addContext(undoContext);
+ }
+ }
+ }
+
+ }
+
+ /**
+ * This listens for platform changes.
+ */
+ protected IPlatformExtensionPointListener _platformListener = new IPlatformExtensionPointListener() {
+
+ public void platformExtensionPointChanged(IPlatformExtensionPointDelta delta) {
+
+ TransactionalEditingDomain editingDomain = TransactionalEditingDomain.Registry.INSTANCE.getEditingDomain(EGFCorePlugin.EDITING_DOMAIN_ID);
+
+ List<Resource> deltaChangedFcores = new UniqueEList<Resource>();
+
+ Map<Resource, IPlatformFcore> deltaRemovedFcores = new HashMap<Resource, IPlatformFcore>();
+
+ // Check if a removed platform fcore is applicable
+ for (IPlatformFcore fcore : delta.getRemovedPlatformExtensionPoints(IPlatformFcore.class)) {
+ Resource resource = editingDomain.getResourceSet().getResource(fcore.getURI(), false);
+ if (resource == null) {
+ continue;
+ }
+ deltaRemovedFcores.put(resource, fcore);
+ }
+
+ // Check if an added platform fcore is applicable
+ // if a removed platform fcore is also detected it means a changed resource
+ // eg: changed means target versus workspace fcore
+ for (IPlatformFcore fcore : delta.getAddedPlatformExtensionPoints(IPlatformFcore.class)) {
+ Resource resource = editingDomain.getResourceSet().getResource(fcore.getURI(), false);
+ if (resource == null) {
+ continue;
+ }
+ // Resource who can't open a physical resource raise exception but are loaded
+ // in the resource set, its flag is also set to isLoaded
+ // we need to unload it to get a chance to load it again
+ if (resource.getContents().size() == 0 && resource.getErrors().isEmpty() == false) {
+ // start substitution removed resource if applicable
+ IPlatformFcore deletedFcore = deltaRemovedFcores.get(resource);
+ if (deletedFcore != null) {
+ deltaRemovedFcores.remove(resource);
+ }
+ resource.unload();
+ resource.getResourceSet().getResources().remove(resource);
+ if (EGFCorePlugin.getDefault().isDebugging()) {
+ EGFPlatformPlugin.getDefault().logInfo(NLS.bind("EGFResourceLoadedListener.platformExtensionPointChanged(...) - discard loaded empty resource with errors ''{0}''", resource.getURI())); //$NON-NLS-1$
+ }
+ RESOURCE_MANAGER._fcores.remove(resource);
+ // Load it in our resource set
+ resource = editingDomain.getResourceSet().getResource(fcore.getURI(), true);
+ if (resource == null) {
+ continue;
+ }
+ // end substitution removed resource if applicable
+ if (deletedFcore != null) {
+ deltaRemovedFcores.put(resource, deletedFcore);
+ }
+ }
+ // Start Workaround PDE Bug 267954
+ IPlatformFcore deletedFcore = deltaRemovedFcores.get(resource);
+ if (deltaRemovedFcores.remove(resource) != null) {
+ if (deletedFcore.equals(fcore) == false) {
+ deltaChangedFcores.add(resource); // <- this statement is not a workaround
+ }
+ }
+ RESOURCE_MANAGER._fcores.put(resource, fcore);
+ // End Workaround PDE Bug 267954
+ }
+
+ // Process Removed Fcores
+ if (deltaRemovedFcores.isEmpty() == false) {
+ for (Resource resource : deltaRemovedFcores.keySet()) {
+ RESOURCE_MANAGER.removeResource(editingDomain, resource);
+ }
+ }
+
+ // Target and workspace update, this is not detected by other listeners
+ // This is safe to do it here
+ if (deltaChangedFcores.isEmpty() == false) {
+ for (Resource resource : deltaChangedFcores) {
+ RESOURCE_MANAGER.reloadResource(resource);
+ }
+ }
+
+ }
+
+ };
+
+ private TransactionalEditingDomain _editingDomain;
+
+ public EGFResourceLoadedListener() {
+ EGFPlatformPlugin.getPlatformManager().addPlatformExtensionPointListener(_platformListener);
+ }
+
+ public TransactionalEditingDomain getEditingDomain() {
+ if (_editingDomain == null) {
+ _editingDomain = TransactionalEditingDomain.Registry.INSTANCE.getEditingDomain(EGFCorePlugin.EDITING_DOMAIN_ID);
+ }
+ return _editingDomain;
+ }
+
+ public boolean handleResourcePersisted(Resource resource) {
+ for (Iterator<ResourceListener> iterator = RESOURCE_MANAGER._listeners.iterator(); iterator.hasNext();) {
+ ResourceListener resourceListener = iterator.next();
+ resourceListener.internalUpdate(resource);
+ }
+ return true;
+ }
+
+ public boolean handleResourceMoved(Resource movedResource, URI newURI) {
+ // Moved resource are always in non dirty editors
+ // when moving a dirty resource the platform request to save the resource
+ // if not saved the resource is not moved
+ Resource resource = getEditingDomain().getResourceSet().getResource(movedResource.getURI(), false);
+ if (resource == null) {
+ resource = getEditingDomain().getResourceSet().getResource(newURI, false);
+ }
+ if (resource != null) {
+ // Notify moved resource
+ RESOURCE_MANAGER.movedResource(getEditingDomain(), resource, newURI);
+ }
+ return true;
+ }
+
+ public boolean handleResourceDeleted(Resource deletedResource) {
+ IPlatformFcore fcore = EGFCorePlugin.getPlatformFcore(deletedResource);
+ // Either a non Fcore resource or an already processed deleted fcore from _platformListener
+ if (fcore == null) {
+ // _platformListener has been called first, Process workspace removed fcores detected in _platformListener
+ RESOURCE_MANAGER.removeResource(getEditingDomain(), deletedResource);
+ }
+ return true;
+ }
+
+ public boolean handleResourceChanged(final Resource changedResource) {
+ List<ResourceUser> users = RESOURCE_MANAGER._observers.get(changedResource);
+ // No one edit this resource, process a standard reload
+ if (users == null) {
+ RESOURCE_MANAGER.reloadResource(changedResource);
+ return true;
+ }
+ // Check the state of this edited resource
+ boolean hasSavedResource = false;
+ boolean isDirty = false;
+ for (ResourceUser user : users) {
+ // We need to deeply analyze users as anyone could have saved this resource if any
+ hasSavedResource |= user.userHasSavedResource();
+ // This state is propagated, the first user is enough to check this state
+ isDirty |= user.isDirty();
+ }
+ // Nothing to do, we just reload the resource
+ if (hasSavedResource == false && isDirty == false) {
+ RESOURCE_MANAGER.reloadResource(changedResource);
+ return true;
+ }
+ // Dirty resource
+ if (hasSavedResource == false && isDirty) { // Give a chance to cancel dirty editors while reloading external changed resource
+ for (Iterator<ResourceListener> iterator = RESOURCE_MANAGER._listeners.iterator(); iterator.hasNext();) {
+ ResourceListener resourceListener = iterator.next();
+ resourceListener.externalUpdate(changedResource);
+ }
+ return true;
+ }
+ // Non dirty resource
+ for (Iterator<ResourceListener> iterator = RESOURCE_MANAGER._listeners.iterator(); iterator.hasNext();) {
+ ResourceListener resourceListener = iterator.next();
+ resourceListener.internalUpdate(changedResource);
+ }
+ return true;
+ }
+
+ public void dispose() {
+ EGFPlatformPlugin.getPlatformManager().removePlatformExtensionPointListener(_platformListener);
+ }
+
+}
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/domain/EGFTransactionalEditingDomain.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/domain/EGFTransactionalEditingDomain.java
new file mode 100644
index 0000000..6529b0d
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/domain/EGFTransactionalEditingDomain.java
@@ -0,0 +1,96 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.domain;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.transaction.TransactionalCommandStack;
+import org.eclipse.emf.transaction.impl.TransactionalCommandStackImpl;
+import org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class EGFTransactionalEditingDomain extends TransactionalEditingDomainImpl {
+
+ private EGFURIConverter _uriConverter;
+
+ /**
+ * Initializes me with my adapter factory, command stack, and resource set.
+ *
+ * @param adapterFactory
+ * my adapter factory
+ * @param stack
+ * my command stack
+ * @param resourceSet
+ * my resource set
+ */
+ public EGFTransactionalEditingDomain(AdapterFactory adapterFactory, TransactionalCommandStack stack, ResourceSet resourceSet) {
+ super(adapterFactory, stack, resourceSet);
+ initialize();
+ }
+
+ /**
+ * Initializes me with my adapter factory and a command stack, and a
+ * default resource set implementation.
+ *
+ * @param adapterFactory
+ * my adapter factory
+ * @param stack
+ * my command stack
+ */
+ public EGFTransactionalEditingDomain(AdapterFactory adapterFactory, TransactionalCommandStack stack) {
+ super(adapterFactory, stack);
+ initialize();
+ }
+
+ /**
+ * Initializes me with my adapter factory and a resource set, and a default
+ * command stack implementation.
+ *
+ * @param adapterFactory
+ * my adapter factory
+ * @param resourceSet
+ * my resource set
+ */
+ public EGFTransactionalEditingDomain(AdapterFactory adapterFactory, ResourceSet resourceSet) {
+ super(adapterFactory, new TransactionalCommandStackImpl(), resourceSet);
+ initialize();
+ }
+
+ /**
+ * Initializes me with my adapter factory and default implementations of
+ * a resource set and a command stack.
+ *
+ * @param adapterFactory
+ * my adapter factory
+ */
+ public EGFTransactionalEditingDomain(AdapterFactory adapterFactory) {
+ super(adapterFactory, new TransactionalCommandStackImpl());
+ initialize();
+ }
+
+ /**
+ * Initializes my state.
+ */
+ private void initialize() {
+ _uriConverter = new EGFURIConverter();
+ getResourceSet().setURIConverter(_uriConverter);
+ }
+
+ @Override
+ public void dispose() {
+ super.dispose();
+ _uriConverter.dispose();
+ }
+
+}
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/domain/EGFURIConverter.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/domain/EGFURIConverter.java
new file mode 100644
index 0000000..6e3d8b9
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/domain/EGFURIConverter.java
@@ -0,0 +1,71 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.domain;
+
+import java.util.Collection;
+
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.core.platform.EGFPlatformPlugin;
+import org.eclipse.egf.core.platform.pde.IPlatformExtensionPointDelta;
+import org.eclipse.egf.core.platform.pde.IPlatformExtensionPointListener;
+import org.eclipse.emf.ecore.resource.ContentHandler;
+import org.eclipse.emf.ecore.resource.URIHandler;
+import org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class EGFURIConverter extends ExtensibleURIConverterImpl {
+
+ /**
+ * This listens for platform changes.
+ */
+ protected IPlatformExtensionPointListener _platformListener = new IPlatformExtensionPointListener() {
+ public void platformExtensionPointChanged(IPlatformExtensionPointDelta delta) {
+ loadURIMap();
+ }
+ };
+
+ /**
+ * Creates an instance.
+ */
+ public EGFURIConverter() {
+ super();
+ EGFPlatformPlugin.getPlatformManager().addInFrontPlatformExtensionPointListener(_platformListener);
+ loadURIMap();
+ }
+
+ /**
+ * Creates an instance.
+ */
+ public EGFURIConverter(Collection<URIHandler> uriHandlers, Collection<ContentHandler> contentHandlers) {
+ super(uriHandlers, contentHandlers);
+ EGFPlatformPlugin.getPlatformManager().addInFrontPlatformExtensionPointListener(_platformListener);
+ loadURIMap();
+ }
+
+ /**
+ * Dispose.
+ */
+ public void dispose() {
+ EGFPlatformPlugin.getPlatformManager().removePlatformExtensionPointListener(_platformListener);
+ loadURIMap();
+ }
+
+ private void loadURIMap() {
+ // Clear the previous URIMap content
+ getURIMap().clear();
+ // Assign a fresh URIMap content
+ getURIMap().putAll(EGFCorePlugin.computePlatformURIMap());
+ }
+
+}
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/domain/ResourceModificationManager.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/domain/ResourceModificationManager.java
new file mode 100644
index 0000000..ece4074
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/domain/ResourceModificationManager.java
@@ -0,0 +1,394 @@
+/**
+ * Copyright (c) 2008 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ */
+package org.eclipse.egf.core.domain;
+
+import java.lang.ref.WeakReference;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import java.util.WeakHashMap;
+
+import org.eclipse.core.commands.operations.IOperationHistory;
+import org.eclipse.core.commands.operations.IOperationHistoryListener;
+import org.eclipse.core.commands.operations.IUndoContext;
+import org.eclipse.core.commands.operations.IUndoableOperation;
+import org.eclipse.core.commands.operations.OperationHistoryEvent;
+import org.eclipse.core.commands.operations.UndoContext;
+import org.eclipse.egf.core.l10n.EGFCoreMessages;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.transaction.NotificationFilter;
+import org.eclipse.emf.transaction.ResourceSetChangeEvent;
+import org.eclipse.emf.transaction.ResourceSetListener;
+import org.eclipse.emf.transaction.ResourceSetListenerImpl;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.TransactionalEditingDomainEvent;
+import org.eclipse.emf.transaction.TransactionalEditingDomainListenerImpl;
+import org.eclipse.emf.transaction.TransactionalEditingDomain.Lifecycle;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.emf.workspace.IWorkspaceCommandStack;
+import org.eclipse.emf.workspace.ResourceUndoContext;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Manages the <code>isModified</code> state of resources in a given editing
+ * domain as operations are executed, undone and redone on the operation
+ * history.
+ * <P>
+ * This allows clients to use the <code>isModified</code> state of a resource to
+ * determine whether or not the resource is dirty and can be saved.
+ *
+ * @author ldamus
+ * @since 1.2
+ * comes from org.eclipse.gmf.runtime.emf.core.resources.GMFResourceModificationManager
+ */
+public class ResourceModificationManager {
+
+ /**
+ * Keeps track of the modification manager for each editing domain. Only one
+ * modification manager can ever be created for a given editing domain. Keys
+ * are WeakReferences because the modification manager has a reference back
+ * to its editing domain key.
+ */
+ private static Map<TransactionalEditingDomain, WeakReference<ResourceModificationManager>> managerRegistry = new WeakHashMap<TransactionalEditingDomain, WeakReference<ResourceModificationManager>>();
+
+ /**
+ * Creates a new resource modification manager for <code>domain</code>, if
+ * the <code>domain</code>'s command stack is integrated with an
+ * <code>IOperationHistory</code>. The <code>isModified</code> state of a
+ * resource in <code>domain</code> will be set to <code>false</code> when
+ * the last operation affecting that resource is undone on the history.
+ *
+ * @param domain
+ * the editing domain
+ * @return the resource modification manager, or <code>null</code> if
+ * <code>domain</code> is not integrated with an operation history
+ */
+ public static synchronized ResourceModificationManager manage(TransactionalEditingDomain domain) {
+
+ // make sure we only instantiate one manager per editing domain
+ WeakReference<ResourceModificationManager> reference = managerRegistry.get(domain);
+ ResourceModificationManager result = reference != null ? reference.get() : null;
+
+ if (result == null) {
+ CommandStack stack = domain.getCommandStack();
+
+ if (stack instanceof IWorkspaceCommandStack) {
+ IOperationHistory history = ((IWorkspaceCommandStack) stack).getOperationHistory();
+
+ if (history != null) {
+ final ResourceModificationManager manager = new ResourceModificationManager(domain, history);
+ managerRegistry.put(domain, new WeakReference<ResourceModificationManager>(manager));
+ result = manager;
+
+ // dispose the modification manager when the domain is
+ // disposed
+ Lifecycle lifecycle = TransactionUtil.getAdapter(domain, Lifecycle.class);
+
+ if (lifecycle != null) {
+ lifecycle.addTransactionalEditingDomainListener(new TransactionalEditingDomainListenerImpl() {
+ @Override
+ public void editingDomainDisposing(TransactionalEditingDomainEvent event) {
+ manager.dispose();
+ }
+ });
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * A filter matching "resource is no longer modified" events.
+ */
+ private static final NotificationFilter RESOURCE_UNMODIFIED = new NotificationFilter.Custom() {
+ @Override
+ public boolean matches(Notification notification) {
+ return (notification.getNotifier() instanceof Resource) && (notification.getFeatureID(Resource.class) == Resource.RESOURCE__IS_MODIFIED) && notification.getOldBooleanValue() && !notification.getNewBooleanValue();
+ }
+ };
+
+ private TransactionalEditingDomain domain;
+ private IOperationHistory history;
+ private ResourceSetListener domainListener;
+ private IOperationHistoryListener historyListener;
+ private Map<Resource, IUndoContext> saveContexts;
+ private IUndoableOperation currentOperation;
+
+ /**
+ * Private constructor to prevent instantiation by clients. Clients must use {@link #manage(TransactionalEditingDomain)} to construct a new instance.
+ *
+ * @param domain
+ * the editing domain
+ * @param history
+ * the operation history
+ */
+ private ResourceModificationManager(TransactionalEditingDomain domain, IOperationHistory history) {
+
+ this.domain = domain;
+ this.history = history;
+
+ domain.addResourceSetListener(getDomainListener());
+ history.addOperationHistoryListener(getHistoryListener());
+ }
+
+ /**
+ * Gets the resource set listener listener, which manages the save-point
+ * context for operations executed on the history when the resource is saved
+ * or unloaded.
+ *
+ * @return the resource set listener
+ */
+ private ResourceSetListener getDomainListener() {
+
+ if (domainListener == null) {
+ domainListener = new ResourceSetListenerImpl(RESOURCE_UNMODIFIED.or(NotificationFilter.RESOURCE_UNLOADED)) {
+
+ @Override
+ public void resourceSetChanged(ResourceSetChangeEvent event) {
+
+ for (Notification n : event.getNotifications()) {
+ Resource resource = (Resource) n.getNotifier();
+
+ switch (n.getFeatureID(Resource.class)) {
+
+ case Resource.RESOURCE__IS_MODIFIED:
+ applySaveContext(resource);
+ break;
+
+ case Resource.RESOURCE__IS_LOADED:
+ disposeSaveContext(resource);
+ break;
+ }
+ }
+ }
+
+ @Override
+ public boolean isPostcommitOnly() {
+ return true;
+ }
+ };
+ }
+ return domainListener;
+ }
+
+ /**
+ * Gets the operation history listener, which manages the
+ * <code>isModified</code> state of the resources.
+ *
+ * @return the operation history listener
+ */
+ private IOperationHistoryListener getHistoryListener() {
+
+ if (historyListener == null) {
+ historyListener = new IOperationHistoryListener() {
+
+ public void historyNotification(OperationHistoryEvent event) {
+ int type = event.getEventType();
+
+ switch (type) {
+
+ case OperationHistoryEvent.ABOUT_TO_EXECUTE:
+ case OperationHistoryEvent.ABOUT_TO_UNDO:
+ case OperationHistoryEvent.ABOUT_TO_REDO:
+ // Remember the operation in order to apply the
+ // save context to it if the isModified is set to false
+ // during execute, undo or redo. For undo, the save
+ // context goes on next undoable operation on the
+ // history.
+ currentOperation = event.getOperation();
+ break;
+
+ case OperationHistoryEvent.OPERATION_NOT_OK:
+ currentOperation = null;
+ break;
+
+ case OperationHistoryEvent.DONE: {
+ currentOperation = null;
+
+ IUndoableOperation operation = event.getOperation();
+ Set<Resource> affectedResources = getAffectedResourcesInDomain(operation);
+
+ for (Resource r : affectedResources) {
+ ResourceUndoContext context = new ResourceUndoContext(domain, r);
+ IUndoableOperation[] undoHistory = history.getUndoHistory(context);
+
+ if (undoHistory.length >= history.getLimit(context)) {
+ // We've reached the limit for this context;
+ // initialize the save context to indicate that
+ // we can't undo to the last saved state
+ getSaveContext(r);
+ }
+ }
+ break;
+ }
+
+ case OperationHistoryEvent.UNDONE:
+ case OperationHistoryEvent.REDONE: {
+ currentOperation = null;
+
+ IUndoableOperation operation = event.getOperation();
+ Set<Resource> affectedResources = getAffectedResourcesInDomain(operation);
+
+ for (Resource r : affectedResources) {
+ IUndoContext saveContext = getSaveContexts().get(r);
+ IUndoableOperation nextUndoableOperation = getNextUndoableOperation(r);
+
+ boolean atStart = saveContext == null && nextUndoableOperation == null;
+
+ boolean atSaveContext = saveContext != null && nextUndoableOperation != null && nextUndoableOperation.hasContext(saveContext);
+
+ if (atStart || atSaveContext) {
+ r.setModified(false);
+ }
+ }
+ }
+ }
+ }
+ };
+ }
+ return historyListener;
+ }
+
+ private Map<Resource, IUndoContext> getSaveContexts() {
+ if (saveContexts == null) {
+ saveContexts = new HashMap<Resource, IUndoContext>();
+ }
+ return saveContexts;
+ }
+
+ private IUndoableOperation getNextUndoableOperation(Resource resource) {
+ return history.getUndoOperation(new ResourceUndoContext(domain, resource));
+ }
+
+ private IUndoContext getSaveContext(final Resource resource) {
+ IUndoContext saveContext = getSaveContexts().get(resource);
+
+ if (saveContext == null) {
+ saveContext = new UndoContext() {
+ @Override
+ public String getLabel() {
+ return NLS.bind(EGFCoreMessages.saveContextLabel, resource.getURI());
+ }
+
+ @Override
+ public String toString() {
+ return getLabel();
+ }
+ };
+
+ getSaveContexts().put(resource, saveContext);
+ }
+ return saveContext;
+ }
+
+ private Set<Resource> getAffectedResourcesInDomain(IUndoableOperation operation) {
+
+ Set<Resource> result = new HashSet<Resource>();
+ Set<Resource> affectedResources = ResourceUndoContext.getAffectedResources(operation);
+
+ for (Resource resource : affectedResources) {
+ ResourceSet resourceSet = resource.getResourceSet();
+
+ if (domain.getResourceSet().equals(resourceSet)) {
+ result.add(resource);
+ }
+ }
+ return result;
+ }
+
+ private void applySaveContext(Resource resource) {
+ IUndoContext saveContext = getSaveContexts().get(resource);
+
+ if (saveContext != null) {
+ // Remove the save context from existing operations
+ IUndoableOperation[] undoableOperations = history.getUndoHistory(saveContext);
+ for (IUndoableOperation op : undoableOperations) {
+ op.removeContext(saveContext);
+ }
+
+ IUndoableOperation[] redoableOperations = history.getRedoHistory(saveContext);
+ for (IUndoableOperation op : redoableOperations) {
+ op.removeContext(saveContext);
+ }
+ }
+
+ IUndoableOperation operation = null;
+ IUndoableOperation nextUndoable = getNextUndoableOperation(resource);
+
+ if (currentOperation != null) {
+
+ if (currentOperation == nextUndoable) {
+ // we're undoing; get the previous operation on the history
+ IUndoableOperation[] undoableOperations = history.getUndoHistory(new ResourceUndoContext(domain, resource));
+
+ for (int i = undoableOperations.length - 1; i >= 0; i--) {
+ if (currentOperation != undoableOperations[i]) {
+ operation = undoableOperations[i];
+ break;
+ }
+ }
+ } else {
+ operation = currentOperation;
+ }
+ } else {
+ operation = nextUndoable;
+ }
+
+ if (operation != null) {
+ // apply the save context
+ operation.addContext(getSaveContext(resource));
+
+ } else {
+ // clear the save context; required if we save after undoing the
+ // last thing on the stack
+ getSaveContexts().remove(resource);
+ }
+ }
+
+ private void disposeSaveContext(Resource resource) {
+ IUndoContext saveContext = getSaveContexts().get(resource);
+
+ if (saveContext != null) {
+ history.dispose(saveContext, true, true, true);
+ getSaveContexts().remove(resource);
+ }
+ }
+
+ private void dispose() {
+
+ managerRegistry.remove(domain);
+
+ if (saveContexts != null) {
+ for (Resource r : saveContexts.keySet()) {
+ disposeSaveContext(r);
+ }
+ }
+ if (domainListener != null) {
+ domain.removeResourceSetListener(domainListener);
+ }
+ if (historyListener != null) {
+ history.removeOperationHistoryListener(historyListener);
+ }
+
+ currentOperation = null;
+ domain = null;
+ domainListener = null;
+ history = null;
+ historyListener = null;
+ saveContexts = null;
+ }
+
+}
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/fcore/IPlatformFcore.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/fcore/IPlatformFcore.java
new file mode 100644
index 0000000..3d3ddba
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/fcore/IPlatformFcore.java
@@ -0,0 +1,24 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ *
+ */
+package org.eclipse.egf.core.fcore;
+
+import org.eclipse.egf.core.platform.pde.IPlatformExtensionPointURI;
+
+public interface IPlatformFcore extends IPlatformExtensionPointURI {
+
+ public String getName();
+
+}
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/fcore/IPlatformFcoreConstants.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/fcore/IPlatformFcoreConstants.java
new file mode 100644
index 0000000..277eed2
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/fcore/IPlatformFcoreConstants.java
@@ -0,0 +1,48 @@
+/**
+ * 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
+ **/
+package org.eclipse.egf.core.fcore;
+
+import org.eclipse.egf.common.helper.ExtensionPointHelper;
+import org.eclipse.egf.core.EGFCorePlugin;
+
+/**
+ * Defines all constants related to a Fcore into extension point
+ * declaration.
+ */
+public interface IPlatformFcoreConstants {
+
+ /**
+ * Define a constant for the Fcore extension-point id.
+ */
+ public static final String FCORE_EXTENSION_POINT_ID = "fcore"; //$NON-NLS-1$
+
+ /**
+ * Define a constant for the Fcore extension-point id as a fully
+ * qualified id.
+ */
+ public static final String FULLY_QUALIFIED_EXTENSION_POINT_ID = ExtensionPointHelper.getExtensionPointId(EGFCorePlugin.getDefault().getPluginID(), FCORE_EXTENSION_POINT_ID);
+
+ /**
+ * Define a constant for the Fcore extension-point child.
+ */
+ static final String FCORE_EXTENSION_CHILD = FCORE_EXTENSION_POINT_ID;
+
+ /**
+ * Define a constant for the 'id' attribute.
+ */
+ public static final String FCORE_ATT_ID = "id"; //$NON-NLS-1$
+
+ /**
+ * Define a constant for the Fcore file extension.
+ */
+ public static final String FCORE_FILE_EXTENSION = "fcore"; //$NON-NLS-1$
+
+}
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/fcore/IResourceFcoreDelta.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/fcore/IResourceFcoreDelta.java
new file mode 100644
index 0000000..e28129e
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/fcore/IResourceFcoreDelta.java
@@ -0,0 +1,33 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ *
+ */
+package org.eclipse.egf.core.fcore;
+
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.emf.common.util.URI;
+
+public interface IResourceFcoreDelta {
+
+ public List<URI> getNewFcores();
+
+ public List<URI> getRemovedFcores();
+
+ public Map<URI, URI> getMovedFcores();
+
+ public List<URI> getUpdatedFcores();
+
+}
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/fcore/IResourceFcoreListener.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/fcore/IResourceFcoreListener.java
new file mode 100644
index 0000000..6124c9e
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/fcore/IResourceFcoreListener.java
@@ -0,0 +1,7 @@
+package org.eclipse.egf.core.fcore;
+
+public interface IResourceFcoreListener {
+
+ public void fcoreChanged(IResourceFcoreDelta delta);
+
+}
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/helper/BundleSessionHelper.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/helper/BundleSessionHelper.java
new file mode 100644
index 0000000..5803f53
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/helper/BundleSessionHelper.java
@@ -0,0 +1,43 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.helper;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.egf.core.platform.pde.IPlatformExtensionPoint;
+import org.eclipse.egf.core.session.ProjectBundleSession;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class BundleSessionHelper {
+
+ private BundleSessionHelper() {
+ // Prevent Instantiation
+ }
+
+ public static Bundle getBundle(ProjectBundleSession projectBundleSession, IPlatformExtensionPoint platformExtensionPoint) throws CoreException {
+ // Usual Tests
+ if (projectBundleSession == null || platformExtensionPoint == null) {
+ return null;
+ }
+ // Locate Bundle
+ Bundle bundle = null;
+ if (platformExtensionPoint.getPlatformBundle().isTarget()) {
+ bundle = platformExtensionPoint.getPlatformBundle().getBundle();
+ } else {
+ bundle = projectBundleSession.getBundle(platformExtensionPoint.getPlatformBundle().getProject());
+ }
+ return bundle;
+ }
+
+}
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/helper/EObjectHelper.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/helper/EObjectHelper.java
new file mode 100644
index 0000000..f8c299d
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/helper/EObjectHelper.java
@@ -0,0 +1,48 @@
+/**
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ */
+package org.eclipse.egf.core.helper;
+
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class EObjectHelper {
+
+ private EObjectHelper() {
+ // Prevent instantiation
+ }
+
+ public static EObject loadEObject(ResourceSet resourceSet, EObject eObject) {
+ if (resourceSet == null || eObject == null) {
+ return null;
+ }
+ return loadEObject(resourceSet, EcoreUtil.getURI(eObject));
+ }
+
+ public static EObject loadEObject(ResourceSet resourceSet, URI uri) {
+ if (resourceSet == null || uri == null) {
+ return null;
+ }
+ // Clear the previous URIConverter content
+ resourceSet.getURIConverter().getURIMap().clear();
+ // Assign a fresh platform aware URIConverter
+ resourceSet.getURIConverter().getURIMap().putAll(EGFCorePlugin.computePlatformURIMap());
+ // Load
+ return resourceSet.getEObject(uri, true);
+ }
+
+}
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/helper/EclipseBuilderHelper.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/helper/EclipseBuilderHelper.java
new file mode 100644
index 0000000..8863d11
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/helper/EclipseBuilderHelper.java
@@ -0,0 +1,158 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ *
+ */
+package org.eclipse.egf.core.helper;
+
+import org.eclipse.core.resources.ICommand;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.egf.core.l10n.EGFCoreMessages;
+
+public class EclipseBuilderHelper {
+
+ private EclipseBuilderHelper() {
+ // Prevent Instantiation
+ }
+
+ public static void addNature(IProjectDescription description, String nature, IProgressMonitor monitor) {
+ SubMonitor.convert(monitor, EGFCoreMessages.EclipseBuilderHelper_addNature, 100);
+ Assert.isNotNull(description);
+ Assert.isNotNull(nature);
+ Assert.isLegal(nature.trim().length() > 0);
+ Assert.isNotNull(monitor);
+ String[] prevNatures = description.getNatureIds();
+ String[] newNatures = new String[prevNatures.length + 1];
+ System.arraycopy(prevNatures, 0, newNatures, 0, prevNatures.length);
+ newNatures[prevNatures.length] = nature.trim();
+ description.setNatureIds(newNatures);
+ }
+
+ public static void addToFrontOfBuildSpec(IProjectDescription description, String builder, IProgressMonitor monitor) {
+ SubMonitor subMonitor = SubMonitor.convert(monitor, EGFCoreMessages.EclipseBuilderHelper_addBuilder, 300);
+ Assert.isNotNull(description);
+ Assert.isNotNull(builder);
+ Assert.isLegal(builder.trim().length() > 0);
+ Assert.isNotNull(monitor);
+ ICommand builderCommand = getBuilderCommand(description, builder, subMonitor.newChild(100, SubMonitor.SUPPRESS_NONE));
+ if (builderCommand == null) {
+ // Add a new build spec
+ ICommand command = description.newCommand();
+ command.setBuilderName(builder.trim());
+ setFrontBuilderCommand(description, command, subMonitor.newChild(100, SubMonitor.SUPPRESS_NONE));
+ }
+ }
+
+ public static void addToBuildSpec(IProjectDescription description, String builder, IProgressMonitor monitor) {
+ SubMonitor subMonitor = SubMonitor.convert(monitor, EGFCoreMessages.EclipseBuilderHelper_addBuilder, 300);
+ Assert.isNotNull(description);
+ Assert.isNotNull(builder);
+ Assert.isLegal(builder.trim().length() > 0);
+ Assert.isNotNull(monitor);
+ ICommand builderCommand = getBuilderCommand(description, builder, subMonitor.newChild(100, SubMonitor.SUPPRESS_NONE));
+ if (builderCommand == null) {
+ // Add a new build spec
+ ICommand command = description.newCommand();
+ command.setBuilderName(builder.trim());
+ setBuilderCommand(description, command, subMonitor.newChild(100, SubMonitor.SUPPRESS_NONE));
+ }
+ }
+
+ public static ICommand getBuilderCommand(IProjectDescription description, String builder, IProgressMonitor monitor) {
+ SubMonitor.convert(monitor, EGFCoreMessages.EclipseBuilderHelper_getBuilder, 100);
+ Assert.isNotNull(description);
+ Assert.isNotNull(builder);
+ Assert.isLegal(builder.trim().length() > 0);
+ Assert.isNotNull(monitor);
+ ICommand[] commands = description.getBuildSpec();
+ for (int i = 0; i < commands.length; ++i) {
+ if (commands[i].getBuilderName().equals(builder)) {
+ return commands[i];
+ }
+ }
+ return null;
+ }
+
+ public static void removeFromBuildSpec(IProjectDescription description, String builder, IProgressMonitor monitor) {
+ SubMonitor.convert(monitor, EGFCoreMessages.EclipseBuilderHelper_removeBuilder, 100);
+ Assert.isNotNull(description);
+ Assert.isNotNull(builder);
+ Assert.isLegal(builder.trim().length() > 0);
+ Assert.isNotNull(monitor);
+ ICommand[] commands = description.getBuildSpec();
+ for (int i = 0; i < commands.length; ++i) {
+ if (commands[i].getBuilderName().equals(builder.trim())) {
+ ICommand[] newCommands = new ICommand[commands.length - 1];
+ System.arraycopy(commands, 0, newCommands, 0, i);
+ System.arraycopy(commands, i + 1, newCommands, i, commands.length - i - 1);
+ description.setBuildSpec(newCommands);
+ break;
+ }
+ }
+ return;
+ }
+
+ public static void setBuilderCommand(IProjectDescription description, ICommand command, IProgressMonitor monitor) {
+ SubMonitor subMonitor = SubMonitor.convert(monitor, EGFCoreMessages.EclipseBuilderHelper_setBuilder, 200);
+ Assert.isNotNull(description);
+ Assert.isNotNull(command);
+ Assert.isNotNull(monitor);
+ ICommand[] oldCommands = description.getBuildSpec();
+ ICommand oldBuilderCommand = getBuilderCommand(description, command.getBuilderName(), subMonitor.newChild(100, SubMonitor.SUPPRESS_NONE));
+ ICommand[] newCommands;
+ if (oldBuilderCommand == null) {
+ // Add a build spec after other builders
+ newCommands = new ICommand[oldCommands.length + 1];
+ System.arraycopy(oldCommands, 0, newCommands, 0, oldCommands.length);
+ newCommands[oldCommands.length] = command;
+ } else {
+ for (int i = 0, max = oldCommands.length; i < max; i++) {
+ if (oldCommands[i] == oldBuilderCommand) {
+ oldCommands[i] = command;
+ break;
+ }
+ }
+ newCommands = oldCommands;
+ }
+ description.setBuildSpec(newCommands);
+ }
+
+ public static void setFrontBuilderCommand(IProjectDescription description, ICommand command, IProgressMonitor monitor) {
+ SubMonitor subMonitor = SubMonitor.convert(monitor, EGFCoreMessages.EclipseBuilderHelper_setBuilder, 200);
+ Assert.isNotNull(description);
+ Assert.isNotNull(command);
+ Assert.isNotNull(monitor);
+ ICommand[] oldCommands = description.getBuildSpec();
+ ICommand oldBuilderCommand = getBuilderCommand(description, command.getBuilderName(), subMonitor.newChild(100, SubMonitor.SUPPRESS_NONE));
+ ICommand[] newCommands;
+ if (oldBuilderCommand == null) {
+ // Add a build spec in front of other builders
+ newCommands = new ICommand[oldCommands.length + 1];
+ System.arraycopy(oldCommands, 0, newCommands, 1, oldCommands.length);
+ newCommands[0] = command;
+ } else {
+ for (int i = 0, max = oldCommands.length; i < max; i++) {
+ if (oldCommands[i] == oldBuilderCommand) {
+ oldCommands[i] = command;
+ break;
+ }
+ }
+ newCommands = oldCommands;
+ }
+ description.setBuildSpec(newCommands);
+ }
+
+}
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/helper/ReadOnlyURIConverter.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/helper/ReadOnlyURIConverter.java
new file mode 100644
index 0000000..8fa7c57
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/helper/ReadOnlyURIConverter.java
@@ -0,0 +1,41 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.helper;
+
+import java.util.Map;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.URIConverter;
+import org.eclipse.emf.ecore.resource.URIHandler;
+import org.eclipse.emf.ecore.resource.impl.EFSURIHandlerImpl;
+import org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class ReadOnlyURIConverter extends ExtensibleURIConverterImpl {
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public Map<String, ?> getAttributes(URI uri, Map<?, ?> options) {
+ URI normalizedURI = normalize(uri);
+ URIHandler uriHandler = getURIHandler(normalizedURI);
+ if (uriHandler instanceof EFSURIHandlerImpl) {
+ Map<String, Object> attributes = (Map<String, Object>) super.getAttributes(uri, options);
+ if (attributes.get(URIConverter.ATTRIBUTE_READ_ONLY) != null) {
+ attributes.put(URIConverter.ATTRIBUTE_READ_ONLY, Boolean.TRUE);
+ }
+ }
+ return super.getAttributes(uri, options);
+ }
+
+}
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/helper/ResourceHelper.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/helper/ResourceHelper.java
new file mode 100644
index 0000000..3139bd5
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/helper/ResourceHelper.java
@@ -0,0 +1,236 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.helper;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.egf.common.helper.EMFHelper;
+import org.eclipse.egf.common.helper.URIHelper;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.core.l10n.EGFCoreMessages;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.common.util.UniqueEList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class ResourceHelper {
+
+ private ResourceHelper() {
+ // Prevent instantiation
+ }
+
+ /**
+ * Returns a diagnostic describing the errors and warnings listed in the resource
+ * and the specified exception (if any).
+ */
+ public static Diagnostic analyzeResourceProblems(Resource resource, Exception exception, String message) {
+ if (resource.getErrors().isEmpty() == false || resource.getWarnings().isEmpty() == false) {
+ BasicDiagnostic basicDiagnostic = new BasicDiagnostic(Diagnostic.ERROR, message, 0, NLS.bind(EGFCoreMessages.DiagnosticResourceProblems_message, resource.getURI()), new Object[] { exception == null ? (Object) resource : exception });
+ basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true));
+ return basicDiagnostic;
+ } else if (exception != null) {
+ return new BasicDiagnostic(Diagnostic.ERROR, message, 0, NLS.bind(EGFCoreMessages.DiagnosticResourceProblems_message, resource.getURI()), new Object[] { exception });
+ } else {
+ return Diagnostic.OK_INSTANCE;
+ }
+ }
+
+ public static Resource createResource(ResourceSet resourceSet, IResource resource) {
+ return createResource(resourceSet, URIHelper.getPlatformURI(resource));
+ }
+
+ public static Resource createResource(ResourceSet resourceSet, URI uri) {
+ if (resourceSet == null || uri == null) {
+ return null;
+ }
+ // Clear the previous URIConverter content
+ resourceSet.getURIConverter().getURIMap().clear();
+ // Assign a fresh platform aware URIConverter
+ resourceSet.getURIConverter().getURIMap().putAll(EGFCorePlugin.computePlatformURIMap());
+ // Create
+ return resourceSet.createResource(uri);
+ }
+
+ public static Resource loadResource(ResourceSet resourceSet, IResource resource) {
+ return loadResource(resourceSet, URIHelper.getPlatformURI(resource));
+ }
+
+ public static Resource loadResource(ResourceSet resourceSet, URI uri) {
+ if (resourceSet == null || uri == null) {
+ return null;
+ }
+ // Clear the previous URIConverter content
+ resourceSet.getURIConverter().getURIMap().clear();
+ // Assign a fresh platform aware URIConverter
+ resourceSet.getURIConverter().getURIMap().putAll(EGFCorePlugin.computePlatformURIMap());
+ // Load or create
+ return resourceSet.getResource(uri, true);
+ }
+
+ public static void loadResource(Resource resource) throws IOException {
+ if (resource == null) {
+ return;
+ }
+ if (resource.getResourceSet() != null) {
+ // Clear the previous URIConverter content
+ resource.getResourceSet().getURIConverter().getURIMap().clear();
+ // Assign a fresh platform aware URIConverter
+ resource.getResourceSet().getURIConverter().getURIMap().putAll(EGFCorePlugin.computePlatformURIMap());
+ }
+ // Load
+ resource.load(Collections.EMPTY_MAP);
+ }
+
+ public static void reloadResources(Collection<Resource> resources) throws IOException {
+ if (resources == null) {
+ return;
+ }
+ // Track resourceSets as this been method could work with multiple resourceSets
+ List<ResourceSet> resourceSets = new UniqueEList<ResourceSet>();
+ // Unload resources
+ for (Resource resource : resources) {
+ resource.unload();
+ if (resource.getResourceSet() != null) {
+ resourceSets.add(resource.getResourceSet());
+ }
+ }
+ // Update URI Converter
+ for (ResourceSet resourceSet : resourceSets) {
+ // Clear the previous URIConverter content
+ resourceSet.getURIConverter().getURIMap().clear();
+ // Assign a fresh platform aware URIConverter
+ resourceSet.getURIConverter().getURIMap().putAll(EGFCorePlugin.computePlatformURIMap());
+ }
+ // Load Resource
+ for (Resource resource : resources) {
+ resource.load(Collections.EMPTY_MAP);
+ }
+ }
+
+ /**
+ * is there any unresolved proxy against this resource ?
+ * This method doesn't resolve proxies while analysed
+ */
+ public static boolean hasProxyReferences(Resource resource, URI uri) {
+ Assert.isNotNull(resource);
+ if (uri == null) {
+ return false;
+ }
+ Map<EObject, Collection<EStructuralFeature.Setting>> proxies = EcoreUtil.ProxyCrossReferencer.find(resource);
+ for (EObject reference : proxies.keySet()) {
+ URI innerURI = EcoreUtil.getURI(reference);
+ if (innerURI == null) {
+ continue;
+ }
+ if (innerURI.trimFragment().equals(uri)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * return unresolved proxies for this resource ?
+ * This method doesn't resolve proxies while analysed
+ */
+ public static List<EObject> getProxyReferences(Resource resource, URI uri) {
+ Assert.isNotNull(resource);
+ List<EObject> references = new UniqueEList<EObject>();
+ if (uri == null) {
+ return references;
+ }
+ Map<EObject, Collection<EStructuralFeature.Setting>> proxies = EcoreUtil.ProxyCrossReferencer.find(resource);
+ for (EObject reference : proxies.keySet()) {
+ URI innerURI = EcoreUtil.getURI(reference);
+ if (innerURI == null) {
+ continue;
+ }
+ if (innerURI.trimFragment().equals(uri)) {
+ references.add(reference);
+ }
+ }
+ return references;
+ }
+
+ /**
+ * is there any unresolved proxy against this resource ?
+ * This method doesn't resolve proxies while analysed
+ */
+ public static boolean hasURIProxyReferences(Resource resource, URI uri) {
+ Assert.isNotNull(resource);
+ if (uri == null) {
+ return false;
+ }
+ Map<EObject, Collection<EStructuralFeature.Setting>> proxies = EMFHelper.URIProxyCrossReferencer.find(resource, uri);
+ return proxies != null && proxies.size() > 0;
+ }
+
+ /**
+ * return unresolved proxies for this resource ?
+ * This method doesn't resolve proxies while analysed
+ */
+ public static Map<EObject, Collection<EStructuralFeature.Setting>> getURIProxyReferences(Resource resource, URI uri) {
+ Assert.isNotNull(resource);
+ Map<EObject, Collection<EStructuralFeature.Setting>> references = new HashMap<EObject, Collection<EStructuralFeature.Setting>>();
+ if (uri == null) {
+ return references;
+ }
+ return EMFHelper.URIProxyCrossReferencer.find(resource, uri);
+ }
+
+ /**
+ * return owners of proxies who qualify a resource URI
+ * This method doesn't resolve proxies while analysed
+ */
+ public static List<EObject> getURIProxyReferenceOwners(Resource resource, URI uri) {
+ Assert.isNotNull(resource);
+ List<EObject> owners = new UniqueEList<EObject>();
+ if (uri == null) {
+ return owners;
+ }
+ // Build proxies list
+ Map<EObject, Collection<EStructuralFeature.Setting>> proxies = getURIProxyReferences(resource, uri);
+ for (EObject reference : proxies.keySet()) {
+ // Build holders list
+ for (EStructuralFeature.Setting setting : proxies.get(reference)) {
+ URI holderURI = EcoreUtil.getURI(setting.getEObject());
+ if (holderURI == null) {
+ continue;
+ }
+ // Looking for an holder who match our current resource uri
+ // Since the first one we found we iterate
+ if (resource.getURI().equals(holderURI.trimFragment())) {
+ owners.add(setting.getEObject());
+ break;
+ }
+ }
+ }
+ return owners;
+ }
+
+}
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/internal/fcore/PlatformFcore.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/internal/fcore/PlatformFcore.java
new file mode 100644
index 0000000..d87175f
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/internal/fcore/PlatformFcore.java
@@ -0,0 +1,33 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ *
+ */
+package org.eclipse.egf.core.internal.fcore;
+
+import org.eclipse.egf.core.fcore.IPlatformFcore;
+import org.eclipse.egf.core.platform.pde.IPlatformBundle;
+import org.eclipse.egf.core.platform.pde.PlatformExtensionPointURI;
+import org.eclipse.pde.core.plugin.IPluginElement;
+
+public final class PlatformFcore extends PlatformExtensionPointURI implements IPlatformFcore {
+
+ public PlatformFcore(IPlatformBundle bundle, IPluginElement element, String id) {
+ super(bundle, element, id);
+ }
+
+ public String getName() {
+ return getPreviousURI().toString();
+ }
+
+}
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/internal/fcore/PlatformFcoreFactory.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/internal/fcore/PlatformFcoreFactory.java
new file mode 100644
index 0000000..2db3076
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/internal/fcore/PlatformFcoreFactory.java
@@ -0,0 +1,40 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.internal.fcore;
+
+import org.eclipse.egf.core.fcore.IPlatformFcoreConstants;
+import org.eclipse.egf.core.fcore.IPlatformFcore;
+import org.eclipse.egf.core.platform.pde.IPlatformBundle;
+import org.eclipse.egf.core.platform.pde.IPlatformExtensionPointFactory;
+import org.eclipse.pde.core.plugin.IPluginAttribute;
+import org.eclipse.pde.core.plugin.IPluginElement;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public final class PlatformFcoreFactory implements IPlatformExtensionPointFactory<IPlatformFcore> {
+
+ public IPlatformFcore createExtensionPoint(IPlatformBundle platformBundle, IPluginElement pluginElement) {
+ if (pluginElement == null) {
+ return null;
+ }
+ if (IPlatformFcoreConstants.FCORE_EXTENSION_CHILD.equals(pluginElement.getName()) == false) {
+ return null;
+ }
+ IPluginAttribute id = pluginElement.getAttribute(IPlatformFcoreConstants.FCORE_ATT_ID);
+ if (id == null || id.getValue() == null || id.getValue().trim().length() == 0) {
+ return null;
+ }
+ return new PlatformFcore(platformBundle, pluginElement, id.getValue());
+ }
+
+}
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/internal/natures/BaseProject.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/internal/natures/BaseProject.java
new file mode 100644
index 0000000..5b9f889
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/internal/natures/BaseProject.java
@@ -0,0 +1,37 @@
+/**
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ */
+
+package org.eclipse.egf.core.internal.natures;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectNature;
+import org.eclipse.core.runtime.PlatformObject;
+
+
+/**
+ */
+public abstract class BaseProject extends PlatformObject implements IProjectNature {
+
+ private IProject _project;
+
+ public BaseProject() {
+ super();
+ }
+
+ public IProject getProject() {
+ return _project;
+ }
+
+ public void setProject(IProject project_p) {
+ _project = project_p;
+ }
+
+}
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/internal/natures/FcoreProject.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/internal/natures/FcoreProject.java
new file mode 100644
index 0000000..6b778cb
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/internal/natures/FcoreProject.java
@@ -0,0 +1,46 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ *
+ */
+
+package org.eclipse.egf.core.internal.natures;
+
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.egf.core.helper.EclipseBuilderHelper;
+import org.eclipse.egf.core.natures.EGFNatures;
+
+public class FcoreProject extends BaseProject {
+
+ /**
+ * FcoreNature constructor comment.
+ */
+ public FcoreProject() {
+ super();
+ }
+
+ public void configure() throws CoreException {
+ IProjectDescription description = getProject().getDescription();
+ EclipseBuilderHelper.addToFrontOfBuildSpec(description, EGFNatures.PATTERN_BUILDER_ID, new NullProgressMonitor());
+ getProject().setDescription(description, new NullProgressMonitor());
+ }
+
+ public void deconfigure() throws CoreException {
+ IProjectDescription description = getProject().getDescription();
+ EclipseBuilderHelper.removeFromBuildSpec(description, EGFNatures.PATTERN_BUILDER_ID, new NullProgressMonitor());
+ getProject().setDescription(description, new NullProgressMonitor());
+ }
+
+}
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/l10n/EGFCoreMessages.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/l10n/EGFCoreMessages.java
new file mode 100644
index 0000000..c887369
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/l10n/EGFCoreMessages.java
@@ -0,0 +1,69 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.core.l10n;
+
+import org.eclipse.osgi.util.NLS;
+
+public class EGFCoreMessages {
+
+ private static final String BUNDLE_NAME = "org.eclipse.egf.core.l10n.messages"; //$NON-NLS-1$
+
+ private EGFCoreMessages() {
+ // Do not instantiate
+ }
+
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, EGFCoreMessages.class);
+ }
+
+ public static String Production_Invoke;
+ public static String Production_Invoked;
+ public static String Production_Dispose;
+ public static String Production_Instantiate;
+
+ public static String AbstractTask_postExecute;
+ public static String AbstractTask_doExecute;
+ public static String AbstractTask_preExecute;
+ public static String AbstractTask_errorTaskInstance;
+
+ public static String ProjectBundleSession_IllegalBundleState;
+ public static String ProjectBundleSession_InstallationFailure;
+ public static String ProjectBundleSession_BundleClassInstantiationFailure;
+ public static String ProjectBundleSession_UninstallationFailure;
+ public static String ProjectBundleSession_PackageRefreshFailure;
+ public static String ProjectBundleSession_LoadFailure;
+ public static String ProjectBundleSession_URLFailure;
+ public static String ProjectBundleSession_StoppingFailure;
+
+ public static String Production_Unknown_Bundle;
+
+ public static String ConvertProjectOperation_converter;
+ public static String ConvertProjectOperation_setupClasspath;
+ public static String ConvertProjectOperation_organizeExport;
+ public static String ConvertProjectOperation_setupBuildfile;
+ public static String ConvertProjectOperation_setupManifestfile;
+
+ public static String EclipseBuilderHelper_addBuilder;
+ public static String EclipseBuilderHelper_addNature;
+ public static String EclipseBuilderHelper_getBuilder;
+ public static String EclipseBuilderHelper_removeBuilder;
+ public static String EclipseBuilderHelper_setBuilder;
+
+ public static String synchJobName;
+
+ public static String DiagnosticResourceProblems_message;
+
+ public static String saveContextLabel;
+
+}
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/l10n/messages.properties b/org.eclipse.egf.core/src/org/eclipse/egf/core/l10n/messages.properties
new file mode 100644
index 0000000..413d640
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/l10n/messages.properties
@@ -0,0 +1,49 @@
+##
+# 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
+##
+
+Production_Invoke= Invoke ''{0}''
+Production_Invoked= Invoked ''{0}''
+Production_Dispose= Dispose ''{0}''
+Production_Instantiate= Instantiate ''{0}''
+
+AbstractTask_preExecute= PreExecute ''{0}''
+AbstractTask_doExecute= DoExecute ''{0}''
+AbstractTask_postExecute= PostExecute ''{0}''
+AbstractTask_errorTaskInstance= Error while instantiating a Task implementation ''{0}''.
+
+ProjectBundleSession_IllegalBundleState= Bundle ''{0}'' is in a wrong state : ''{1}''.
+ProjectBundleSession_InstallationFailure= Unexpected exception while trying to install workspace bundle ''{0}''.
+ProjectBundleSession_BundleClassInstantiationFailure= Unexpected exception while instantiating class ''{0}'' in bundle ''{1}''.
+ProjectBundleSession_UninstallationFailure= Unexpected exception while trying to uninstall bundle ''{0}''.
+ProjectBundleSession_PackageRefreshFailure= Unexpected exception while trying to refresh packages.
+ProjectBundleSession_LoadFailure= Couldn''t load class ''{0}'' in bundle ''{1}''.
+ProjectBundleSession_URLFailure= Unexpected exception while building a project URL ''{0}''.
+ProjectBundleSession_StoppingFailure= Unexpected exception while trying to stop bundle ''{0}''.
+
+Production_Unknown_Bundle=Unknown Bundle ''{0}''
+
+ConvertProjectOperation_converter= EGF Project Converter
+ConvertProjectOperation_setupClasspath= Setup Classpath
+ConvertProjectOperation_organizeExport= Organize Manifest Export
+ConvertProjectOperation_setupBuildfile= Setup Build file
+ConvertProjectOperation_setupManifestfile= Setup Manifest file
+
+EclipseBuilderHelper_addNature= Add Nature
+EclipseBuilderHelper_addBuilder= Add Builder
+EclipseBuilderHelper_getBuilder= Get Builder
+EclipseBuilderHelper_removeBuilder= Remove Builder
+EclipseBuilderHelper_setBuilder= Set Builder
+
+synchJobName=Synchronizing EGF resources
+
+DiagnosticResourceProblems_message= Problems encountered in file ''{0}''
+
+saveContextLabel= Savepoint undo context for resource ''{0}''
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/natures/EGFNatures.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/natures/EGFNatures.java
new file mode 100644
index 0000000..b0f91f1
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/natures/EGFNatures.java
@@ -0,0 +1,34 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.core.natures;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.egf.core.EGFCorePlugin;
+
+public class EGFNatures {
+
+ public static final String EGF_NATURE = "org.eclipse.egf.core.EGFNature"; //$NON-NLS-1$
+
+ public static final String PATTERN_BUILDER_ID = "org.eclipse.egf.pattern.ui.PatternBuilder"; //$NON-NLS-1$
+
+ public static boolean hasFactoryComponentNature(IProject project) {
+ try {
+ return project.hasNature(EGF_NATURE);
+ } catch (CoreException ce) {
+ EGFCorePlugin.getDefault().logError(ce);
+ return false;
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/preferences/IEGFModelConstants.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/preferences/IEGFModelConstants.java
new file mode 100644
index 0000000..13169e1
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/preferences/IEGFModelConstants.java
@@ -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
+ */
+package org.eclipse.egf.core.preferences;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public interface IEGFModelConstants {
+
+ public static final String VALIDATE_TYPES = "org.eclipse.egf.core.model.validate.types"; //$NON-NLS-1$
+
+ public static final String VALIDATE_MODEL_INSTANCES_BEFORE_LAUNCH = "org.eclipse.egf.core.validate.model.instances.before.launch"; //$NON-NLS-1$
+
+}
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/session/ProjectBundleSession.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/session/ProjectBundleSession.java
new file mode 100644
index 0000000..53706e7
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/session/ProjectBundleSession.java
@@ -0,0 +1,395 @@
+/**
+ * Copyright (c) 2008 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ */
+package org.eclipse.egf.core.session;
+
+import java.net.URLDecoder;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.egf.common.helper.BundleHelper;
+import org.eclipse.egf.common.helper.JavaHelper;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.core.l10n.EGFCoreMessages;
+import org.eclipse.emf.common.util.UniqueEList;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.osgi.baseadaptor.BaseData;
+import org.eclipse.osgi.framework.internal.core.AbstractBundle;
+import org.eclipse.osgi.service.resolver.BundleDescription;
+import org.eclipse.osgi.service.resolver.BundleSpecification;
+import org.eclipse.osgi.service.resolver.ExportPackageDescription;
+import org.eclipse.osgi.service.resolver.ImportPackageSpecification;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.core.plugin.PluginRegistry;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.FrameworkEvent;
+import org.osgi.framework.FrameworkListener;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.packageadmin.PackageAdmin;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public final class ProjectBundleSession {
+
+ public static String PROJECT_BUNDLE_SESSION = "org.eclipse.egf.core.project.bundle.session"; //$NON-NLS-1$
+
+ private BundleContext _context;
+
+ private Map<String, Bundle> _projectBundles = new HashMap<String, Bundle>();
+
+ private List<String> _uninstalled = new UniqueEList<String>();
+
+ public static String getLocation(IPluginModelBase base) throws CoreException {
+ IResource resource = base.getUnderlyingResource();
+ if (resource == null) {
+ return null;
+ }
+ String location = null;
+ try {
+ location = "reference:" //$NON-NLS-1$
+ + URLDecoder.decode(resource.getProject().getLocationURI().toURL().toExternalForm(), System.getProperty("file.encoding")); //$NON-NLS-1$
+ } catch (Throwable t) {
+ throw new CoreException(EGFCorePlugin.getDefault().newStatus(IStatus.ERROR, NLS.bind(EGFCoreMessages.ProjectBundleSession_URLFailure, resource.getProject().getName()), t));
+ }
+ return location;
+ }
+
+ public ProjectBundleSession(BundleContext context) {
+ Assert.isNotNull(context);
+ _context = context;
+ }
+
+ /**
+ * Installs the bundle corresponding to the model.
+ *
+ * @param model
+ * Model of the bundle to be installed.
+ */
+ private Bundle installBundle(IPluginModelBase base) throws CoreException {
+ // In case we face a target bundle, we do nothing
+ if (getLocation(base) == null) {
+ return null;
+ }
+ // Gather target bundles to uninstall including base
+ List<IPluginModelBase> workspaceModels = getWorkspaceModelDependencies(base);
+ // Uninstall target bundles if any
+ uninstallTargetBundle(workspaceModels);
+ // Install workspace bundle
+ List<Bundle> bundles = new UniqueEList<Bundle>();
+ for (IPluginModelBase workspaceModel : workspaceModels) {
+ // Retrieve base location
+ String location = getLocation(workspaceModel);
+ // Install the bundle
+ Bundle bundle = installBundle(location);
+ // Add output folders if any
+ IProject project = workspaceModel.getUnderlyingResource().getProject();
+ addOutputFoldersToBundleClasspath(project, bundle);
+ // Store
+ bundles.add(bundle);
+ _projectBundles.put(location, bundle);
+ if (EGFCorePlugin.getDefault().isDebugging()) {
+ EGFCorePlugin.getDefault().logInfo(NLS.bind("Workspace Bundle ''{0}'' is installed.", bundle.getSymbolicName())); //$NON-NLS-1$
+ }
+ }
+ // Refresh installed workspace bundles if any
+ if (bundles.isEmpty() == false) {
+ refreshPackages(bundles.toArray(new Bundle[bundles.size()]));
+ }
+ // Return our base bundle
+ return Platform.getBundle(BundleHelper.getBundleId(base));
+ }
+
+ private void uninstallTargetBundle(List<IPluginModelBase> workspaceModels) throws CoreException {
+ List<Bundle> bundles = new UniqueEList<Bundle>();
+ // Uninstall Target Bundle
+ for (IPluginModelBase workspaceModel : workspaceModels) {
+ Bundle bundle = Platform.getBundle(BundleHelper.getBundleId(workspaceModel));
+ if (bundle == null) {
+ continue;
+ }
+ if (bundle.getState() == Bundle.INSTALLED || bundle.getState() == Bundle.RESOLVED || bundle.getState() == Bundle.STARTING || bundle.getState() == Bundle.STOPPING || bundle.getState() == Bundle.ACTIVE) {
+ uninstallBundle(bundle);
+ }
+ // Store
+ bundles.add(bundle);
+ _uninstalled.add(bundle.getLocation());
+ if (EGFCorePlugin.getDefault().isDebugging()) {
+ EGFCorePlugin.getDefault().logInfo(NLS.bind("Target Bundle ''{0}'' is uninstalled.", bundle.getSymbolicName())); //$NON-NLS-1$
+ }
+ }
+ // Refresh uninstalled target bundles if any
+ if (bundles.isEmpty() == false) {
+ refreshPackages(bundles.toArray(new Bundle[bundles.size()]));
+ }
+ return;
+ }
+
+ private List<IPluginModelBase> getWorkspaceModelDependencies(IPluginModelBase base) throws CoreException {
+ List<IPluginModelBase> dependencies = new UniqueEList<IPluginModelBase>();
+ dependencies.add(base);
+ BundleDescription description = base.getBundleDescription();
+ if (description == null) {
+ return dependencies;
+ }
+ for (BundleSpecification requiredBundle : description.getRequiredBundles()) {
+ for (IPluginModelBase workspaceModel : PluginRegistry.getWorkspaceModels()) {
+ if (requiredBundle.isSatisfiedBy(workspaceModel.getBundleDescription())) {
+ dependencies.addAll(getWorkspaceModelDependencies(workspaceModel));
+ break;
+ }
+ }
+ }
+ for (ImportPackageSpecification importPackage : description.getImportPackages()) {
+ for (IPluginModelBase workspaceModel : PluginRegistry.getWorkspaceModels()) {
+ for (ExportPackageDescription export : workspaceModel.getBundleDescription().getExportPackages()) {
+ if (importPackage.isSatisfiedBy(export)) {
+ dependencies.addAll(getWorkspaceModelDependencies(workspaceModel));
+ break;
+ }
+ }
+ }
+ }
+ return dependencies;
+ }
+
+ /**
+ * Installs the bundle corresponding to the given location. This will fail
+ * if
+ * the location doesn't point
+ * to a valid bundle.
+ *
+ * @param location
+ * Location of the bundle to be installed.
+ * @return The installed bundle.
+ * @throws BundleException
+ * Thrown if the Bundle isn't valid.
+ * @throws IllegalStateException
+ * Thrown if the bundle couldn't be installed properly.
+ */
+ private Bundle installBundle(String location) throws CoreException {
+ Bundle bundle = null;
+ try {
+ bundle = _context.installBundle(location);
+ } catch (Throwable t) {
+ throw new CoreException(EGFCorePlugin.getDefault().newStatus(IStatus.ERROR, NLS.bind(EGFCoreMessages.ProjectBundleSession_InstallationFailure, location), t));
+ }
+ // Not sure if it's needed, anyway we are conservative on that one
+ if (bundle == null) {
+ throw new CoreException(EGFCorePlugin.getDefault().newStatus(IStatus.ERROR, NLS.bind(EGFCoreMessages.ProjectBundleSession_InstallationFailure, location), null));
+ }
+ int state = bundle.getState();
+ if (state != Bundle.INSTALLED) {
+ throw new CoreException(EGFCorePlugin.getDefault().newStatus(IStatus.ERROR, NLS.bind(EGFCoreMessages.ProjectBundleSession_IllegalBundleState, bundle, state), null));
+ }
+ return bundle;
+ }
+
+ /**
+ * This will set the equinox classpath of <code>bundle</code> to reflect the
+ * eclipse classpath of <code>plugin</code>.
+ *
+ * @param project
+ * The eclipse plugin which classpath is to be set for its
+ * corresponding equinox bundle.
+ * @param bundle
+ * The equinox bundle which classpath is to reflect an eclipse
+ * development plugin.
+ */
+ private void addOutputFoldersToBundleClasspath(IProject project, Bundle bundle) throws CoreException {
+ List<String> outputFolders = JavaHelper.getStringOutputFolders(JavaCore.create(project));
+ BaseData bundleData = (BaseData) ((AbstractBundle) bundle).getBundleData();
+ StringBuilder classpath = new StringBuilder();
+ if (outputFolders.size() == 0) {
+ classpath.append("."); //$NON-NLS-1$
+ } else {
+ for (Iterator<String> it = outputFolders.iterator(); it.hasNext();) {
+ if (classpath.length() > 0) {
+ classpath.append(","); //$NON-NLS-1$
+ }
+ classpath.append(it.next());
+ }
+ }
+ bundleData.setClassPathString(classpath.toString());
+ }
+
+ /**
+ * Returns the bundle corresponding to the IProject if any.
+ *
+ * @param project
+ * The plug-in ID of the bundle we seek.
+ * @return The bundle corresponding to the given location if any,
+ * <code>null</code> otherwise.
+ */
+ public Bundle getBundle(String id) throws CoreException {
+ IPluginModelBase model = PluginRegistry.findModel(id);
+ if (model == null) {
+ return null;
+ }
+ // Check if we face a non workspace model
+ if (model.getUnderlyingResource() == null) {
+ return Platform.getBundle(BundleHelper.getBundleId(model));
+ }
+ String location = getLocation(model);
+ if (location == null) {
+ return null;
+ }
+ // Workspace model
+ Bundle bundle = _projectBundles.get(location);
+ if (bundle == null) {
+ return installBundle(model);
+ }
+ return bundle;
+ }
+
+ /**
+ * Returns the bundle corresponding to the IProject if any.
+ *
+ * @param project
+ * The IProject of the bundle we seek.
+ * @return The bundle corresponding to the given location if any,
+ * <code>null</code> otherwise.
+ */
+ public Bundle getBundle(IProject project) throws CoreException {
+ IPluginModelBase model = PluginRegistry.findModel(project);
+ if (model == null) {
+ return null;
+ }
+ String location = getLocation(model);
+ if (location == null) {
+ return null;
+ }
+ Bundle bundle = _projectBundles.get(location);
+ if (bundle == null) {
+ return installBundle(model);
+ }
+ return bundle;
+ }
+
+ /**
+ * Refreshes all exported packages of the given bundles. This must be called
+ * after installing the bundle.
+ *
+ * @param bundles
+ * Bundles which exported packages are to be refreshed.
+ */
+ private void refreshPackages(Bundle[] bundles) throws CoreException {
+ ServiceReference packageAdminReference = _context.getServiceReference(PackageAdmin.class.getName());
+ PackageAdmin packageAdmin = null;
+ if (packageAdminReference != null) {
+ packageAdmin = (PackageAdmin) _context.getService(packageAdminReference);
+ }
+ if (packageAdmin != null) {
+ final boolean[] flag = new boolean[] { false };
+ final Throwable[] throwable = new Throwable[1];
+ FrameworkListener listener = new FrameworkListener() {
+ public void frameworkEvent(FrameworkEvent event) {
+ if (event.getType() == FrameworkEvent.PACKAGES_REFRESHED || event.getType() == FrameworkEvent.ERROR) {
+ if (event.getType() == FrameworkEvent.ERROR) {
+ throwable[0] = event.getThrowable();
+ }
+ synchronized (flag) {
+ flag[0] = true;
+ flag.notifyAll();
+ }
+ } else if (event.getType() == FrameworkEvent.WARNING) {
+ if (event.getThrowable() != null) {
+ EGFCorePlugin.getDefault().logWarning(event.getThrowable());
+ }
+ }
+ }
+ };
+ _context.addFrameworkListener(listener);
+ packageAdmin.refreshPackages(bundles);
+ synchronized (flag) {
+ while (flag[0] == false) {
+ try {
+ flag.wait();
+ } catch (InterruptedException e) {
+ break;
+ }
+ }
+ }
+ _context.removeFrameworkListener(listener);
+ _context.ungetService(packageAdminReference);
+ // Throw a CoreException
+ if (throwable[0] != null) {
+ throw new CoreException(EGFCorePlugin.getDefault().newStatus(IStatus.ERROR, EGFCoreMessages.ProjectBundleSession_PackageRefreshFailure, throwable[0]));
+ }
+ }
+ }
+
+ /**
+ * This can be used to uninstall all manually loaded bundles from the
+ * registry
+ * and remove all listeners.
+ * It will be called on plugin stopping and is not intended to be called by
+ * clients.
+ *
+ * @noreference This method is not intended to be referenced by clients.
+ */
+ public void dispose() throws CoreException {
+ // Reinstall bundle collector
+ final List<Bundle> bundles = new UniqueEList<Bundle>(_uninstalled.size());
+ // Uninstall workspace bundle
+ if (_projectBundles.isEmpty() == false) {
+ for (Bundle bundle : _projectBundles.values()) {
+ uninstallBundle(bundle);
+ if (EGFCorePlugin.getDefault().isDebugging()) {
+ EGFCorePlugin.getDefault().logInfo(NLS.bind("Workspace Bundle ''{0}'' is uninstalled.", bundle.getSymbolicName())); //$NON-NLS-1$
+ }
+ }
+ refreshPackages(_projectBundles.values().toArray(new Bundle[_projectBundles.values().size()]));
+ }
+ // Install target bundles
+ if (_uninstalled.isEmpty() == false) {
+ for (String location : _uninstalled) {
+ Bundle bundle = installBundle(location);
+ bundles.add(bundle);
+ if (EGFCorePlugin.getDefault().isDebugging()) {
+ EGFCorePlugin.getDefault().logInfo(NLS.bind("Target Bundle ''{0}'' is installed.", bundle.getSymbolicName())); //$NON-NLS-1$
+ }
+ }
+ refreshPackages(bundles.toArray(new Bundle[bundles.size()]));
+ }
+ // Final
+ _projectBundles.clear();
+ _uninstalled.clear();
+ }
+
+ /**
+ * Uninstalls the given bundle from the context.
+ *
+ * @param bundle
+ * The bundle that is to be uninstalled.
+ * @throws CoreException
+ * Thrown if a lifecycle issue arises.
+ */
+ private void uninstallBundle(Bundle bundle) throws CoreException {
+ try {
+ bundle.uninstall();
+ } catch (BundleException be) {
+ throw new CoreException(EGFCorePlugin.getDefault().newStatus(IStatus.ERROR, NLS.bind(EGFCoreMessages.ProjectBundleSession_UninstallationFailure, bundle.getSymbolicName()), be));
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/workspace/EGFChangedSyncRequest.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/workspace/EGFChangedSyncRequest.java
new file mode 100644
index 0000000..c0da2f7
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/workspace/EGFChangedSyncRequest.java
@@ -0,0 +1,48 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * 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:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id: ChangedSynchRequest.java,v 1.3 2007/11/14 18:14:08 cdamus Exp $
+ */
+package org.eclipse.egf.core.workspace;
+
+import org.eclipse.emf.ecore.resource.Resource;
+
+/**
+ * Concrete synchronization request for resource content changes.
+ *
+ * @author Christian W. Damus (cdamus)
+ */
+class EGFChangedSynchRequest extends EGFSynchRequest {
+ /**
+ * Initializes me with the synchronizer on whose behalf I perform a
+ * synchronization and the resource whose workspace partner is changed.
+ *
+ * @param synch
+ * the workspace synchronizer
+ * @param resource
+ * the resource that has changed
+ */
+ EGFChangedSynchRequest(EGFWorkspaceSynchronizer synch, Resource resource) {
+ super(synch, resource);
+ }
+
+ @Override
+ protected void doPerform() {
+ if (!synch.getDelegate().handleResourceChanged(resource)) {
+ // note that if our delegate is the default, it
+ // will always return true
+ EGFWorkspaceSynchronizer.defaultDelegate.handleResourceChanged(resource);
+ }
+ }
+}
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/workspace/EGFDeletedSyncRequest.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/workspace/EGFDeletedSyncRequest.java
new file mode 100644
index 0000000..39a33bb
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/workspace/EGFDeletedSyncRequest.java
@@ -0,0 +1,48 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * 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:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id: DeletedSynchRequest.java,v 1.3 2007/11/14 18:14:08 cdamus Exp $
+ */
+package org.eclipse.egf.core.workspace;
+
+import org.eclipse.emf.ecore.resource.Resource;
+
+/**
+ * Concrete synchronization request for resource deletions.
+ *
+ * @author Christian W. Damus (cdamus)
+ */
+class EGFDeletedSynchRequest extends EGFSynchRequest {
+ /**
+ * Initializes me with the synchronizer on whose behalf I perform a
+ * synchronization and the resource whose workspace partner is deleted.
+ *
+ * @param synch
+ * the workspace synchronizer
+ * @param resource
+ * the resource that has been deleted
+ */
+ EGFDeletedSynchRequest(EGFWorkspaceSynchronizer synch, Resource resource) {
+ super(synch, resource);
+ }
+
+ @Override
+ protected void doPerform() {
+ if (!synch.getDelegate().handleResourceDeleted(resource)) {
+ // note that if our delegate is the default, it
+ // will always return true
+ EGFWorkspaceSynchronizer.defaultDelegate.handleResourceDeleted(resource);
+ }
+ }
+}
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/workspace/EGFMovedSyncRequest.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/workspace/EGFMovedSyncRequest.java
new file mode 100644
index 0000000..55b0739
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/workspace/EGFMovedSyncRequest.java
@@ -0,0 +1,56 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * 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:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id: MovedSynchRequest.java,v 1.3 2007/11/14 18:14:08 cdamus Exp $
+ */
+package org.eclipse.egf.core.workspace;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+
+/**
+ * Concrete synchronization request for resource moves.
+ *
+ * @author Christian W. Damus (cdamus)
+ */
+class EGFMovedSynchRequest extends EGFSynchRequest {
+
+ private final URI newURI;
+
+ /**
+ * Initializes me with the synchronizer on whose behalf I perform a
+ * synchronization and the resource whose workspace partner is moved.
+ *
+ * @param synch
+ * the workspace synchronizer
+ * @param resource
+ * the resource that has moved
+ * @param newURI
+ * the resource's new URI
+ */
+ EGFMovedSynchRequest(EGFWorkspaceSynchronizer synch, Resource resource, URI newURI) {
+ super(synch, resource);
+
+ this.newURI = newURI;
+ }
+
+ @Override
+ protected void doPerform() {
+ if (!synch.getDelegate().handleResourceMoved(resource, newURI)) {
+ // note that if our delegate is the default, it
+ // will always return true
+ EGFWorkspaceSynchronizer.defaultDelegate.handleResourceMoved(resource, newURI);
+ }
+ }
+}
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/workspace/EGFPersistedSyncRequest.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/workspace/EGFPersistedSyncRequest.java
new file mode 100644
index 0000000..563f912
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/workspace/EGFPersistedSyncRequest.java
@@ -0,0 +1,42 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.workspace;
+
+import org.eclipse.emf.ecore.resource.Resource;
+
+/**
+ * Concrete synchronization request for new persisted resource.
+ *
+ * @author Xavier Maysonnave
+ */
+class EGFPersistedSynchRequest extends EGFSynchRequest {
+ /**
+ * Initializes me with the synchronizer on whose behalf I perform a
+ * synchronization and the resource whose workspace partner is created.
+ *
+ * @param synch
+ * the workspace synchronizer
+ * @param resource
+ * the resource that has been deleted
+ */
+ EGFPersistedSynchRequest(EGFWorkspaceSynchronizer synch, Resource resource) {
+ super(synch, resource);
+ }
+
+ @Override
+ protected void doPerform() {
+ if (!synch.getDelegate().handleResourcePersisted(resource)) {
+ // note that if our delegate is the default, it
+ // will always return true
+ EGFWorkspaceSynchronizer.defaultDelegate.handleResourcePersisted(resource);
+ }
+ }
+}
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/workspace/EGFSyncRequest.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/workspace/EGFSyncRequest.java
new file mode 100644
index 0000000..4f59494
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/workspace/EGFSyncRequest.java
@@ -0,0 +1,99 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2005, 2008 IBM Corporation, Zeligsoft Inc. and others.
+ * 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:
+ * IBM - Initial API and implementation
+ * Zeligsoft - Bug 233004
+ *
+ * </copyright>
+ *
+ * $Id: SynchRequest.java,v 1.3 2008/08/13 13:24:44 cdamus Exp $
+ */
+package org.eclipse.egf.core.workspace;
+
+import org.eclipse.emf.ecore.resource.Resource;
+
+/**
+ * Abstract definition of a single request to synchronize a workspace
+ * resource change with the EMF resource representation in the editing
+ * domain.
+ *
+ * @author Christian W. Damus (cdamus)
+ */
+abstract class EGFSynchRequest {
+
+ protected final EGFWorkspaceSynchronizer synch;
+
+ protected final Resource resource;
+
+ /**
+ * Initializes me with the synchronizer on whose behalf I perform a
+ * synchronization and the resource whose workspace partner is changed.
+ *
+ * @param synch
+ * the workspace synchronizer
+ * @param resource
+ * the resource that has changed
+ */
+ EGFSynchRequest(EGFWorkspaceSynchronizer synch, Resource resource) {
+ this.synch = synch;
+ this.resource = resource;
+ }
+
+ /**
+ * Performs the synchronization on the synchronizer's behalf.
+ * Clients must hold my {@linkplain #getLock() synchronization lock} when
+ * calling this method.
+ *
+ * @throws InterruptedException
+ * if the job thread is interrupted while
+ * attempting to start a read-only transaction in the editing domain
+ *
+ * @see #getLock()
+ */
+ public final void perform() throws InterruptedException {
+ synch.getEditingDomain().runExclusive(new Runnable() {
+ public void run() {
+ doPerform();
+ }
+ });
+ }
+
+ /**
+ * Implemented by subclasses to actually perform their synchronization
+ * by delegation to the synchronizer's delegate.
+ */
+ protected abstract void doPerform();
+
+ /**
+ * Queries whether I am disposed. If I am disposed, then I should not
+ * be performed. Clients must hold my {@linkplain #getLock() synchronization lock} when calling this method.
+ *
+ * @return whether I am disposed
+ *
+ * @see #getLock()
+ * @since 1.2.1
+ */
+ protected final boolean isDisposed() {
+ return synch.isDisposed();
+ }
+
+ /**
+ * My synchronization lock, for external synchronization of calls to
+ * such methods as {@link #isDisposed()} and {@link #perform()}.
+ * Note that this lock is held while the request is being performed, but
+ * that this still allows the delegate (if any) to dispose its synchronizer
+ * during its invocation.
+ *
+ * @return my external lock object
+ */
+ final Object getLock() {
+ return synch;
+ }
+}
diff --git a/org.eclipse.egf.core/src/org/eclipse/egf/core/workspace/EGFWorkspaceSynchronizer.java b/org.eclipse.egf.core/src/org/eclipse/egf/core/workspace/EGFWorkspaceSynchronizer.java
new file mode 100644
index 0000000..f3f72b1
--- /dev/null
+++ b/org.eclipse.egf.core/src/org/eclipse/egf/core/workspace/EGFWorkspaceSynchronizer.java
@@ -0,0 +1,666 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2005, 2008 IBM Corporation, Zeligsoft Inc. and others.
+ * 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:
+ * IBM - Initial API and implementation
+ * Geoff Martin - Fix deletion of resource that has markers
+ * Zeligsoft - Bug 233004
+ * Christian Vogt - Bug 235634
+ *
+ * </copyright>
+ *
+ * $Id: WorkspaceSynchronizer.java,v 1.11 2008/08/13 13:24:44 cdamus Exp $
+ */
+package org.eclipse.egf.core.workspace;
+
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceDeltaVisitor;
+import org.eclipse.core.resources.IResourceRuleFactory;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.resources.WorkspaceJob;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.core.runtime.jobs.MultiRule;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.core.l10n.EGFCoreMessages;
+import org.eclipse.emf.common.archive.ArchiveURLConnection;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.common.util.UniqueEList;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.URIConverter;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+
+/**
+ * A utility object that listens to workspace resource changes to synchronize
+ * the state of an EMF resource set with the workspace.
+ * <p>
+ * The default behaviour
+ * on workspace resource deletions is to unload the corresponding EMF resource.
+ * The default behaviour on resource changes is to unload and reload the
+ * corresponding EMF resource, unless the resource path has changed (by move
+ * or rename), in which case it is simply unloaded.
+ * </p>
+ * <p>
+ * To customize the behaviour of the synchronizer, initialize it with a {@link WorkspaceSynchronizer.Delegate delegate} that provides the required
+ * behaviour. For example, it might be more user-friendly to prompt the user
+ * before taking drastic measures.
+ * </p>
+ * <p>
+ * Whether implemented by a delegate or not, the synchronization algorithm is
+ * invoked asynchronously (as a job) and in a read-only transaction on the
+ * synchronizer's editing domain. This ensures timely completion of the
+ * workspace's event dispatching and exclusive access to the resource set
+ * according to the transaction protocol. Also, the job is scheduled on the
+ * workspace rule, so that the delegate call-backs are free to read or modify
+ * any resources that they may need.
+ * </p>
+ *
+ * @author Christian W. Damus (cdamus)
+ */
+public final class EGFWorkspaceSynchronizer {
+
+ private final TransactionalEditingDomain domain;
+
+ private Delegate delegate;
+
+ // we employ a copy-on-write strategy on this collection for thread safety
+ private static Collection<EGFWorkspaceSynchronizer> synchronizers = new java.util.ArrayList<EGFWorkspaceSynchronizer>();
+
+ // we use a single listener to serve all synchronizers.
+ private static IResourceChangeListener workspaceListener = new WorkspaceListener();
+
+ // the default synchronization strategies
+ static Delegate defaultDelegate = new DefaultDelegate();
+
+ /**
+ * Initializes me with the editing domain for which I synchronize resources,
+ * using the default change-handling behaviour.
+ * <p>
+ * I immediately start listening for workspace resource changes.
+ * </p>
+ *
+ * @param domain
+ * my domain (must not be <code>null</code>)
+ */
+ public EGFWorkspaceSynchronizer(TransactionalEditingDomain domain) {
+ this(domain, null);
+ }
+
+ /**
+ * Initializes me with the editing domain for which I synchronize resources,
+ * using the specified delegate to handle resource changes.
+ * <p>
+ * I immediately start listening for workspace resource changes.
+ * </p>
+ *
+ * @param domain
+ * my domain (must not be <code>null</code>)
+ * @param delegate
+ * the delegate that handles my resource changes, or
+ * <code>null</code> to get the default behaviour
+ */
+ public EGFWorkspaceSynchronizer(TransactionalEditingDomain domain, Delegate delegate) {
+ if (domain == null) {
+ throw new IllegalArgumentException("null domain"); //$NON-NLS-1$
+ }
+
+ if (delegate == null) {
+ delegate = defaultDelegate;
+ }
+
+ this.domain = domain;
+ this.delegate = delegate;
+
+ startListening(this);
+ }
+
+ /**
+ * Queries the editing domain whose resources I synchronize with the
+ * workspace.
+ *
+ * @return my editing domain
+ */
+ public TransactionalEditingDomain getEditingDomain() {
+ return domain;
+ }
+
+ /**
+ * Obtains the delegate that handles resource changes.
+ *
+ * @return my delegate
+ */
+ Delegate getDelegate() {
+ return delegate;
+ }
+
+ /**
+ * Disposes me, in particular disconnecting me from the workspace so that
+ * I no longer respond to resource change events.
+ */
+ public void dispose() {
+ stopListening(this);
+
+ synchronized (this) {
+ if (!isDisposed()) {
+ delegate.dispose();
+ delegate = null;
+ }
+ }
+ }
+
+ /**
+ * Queries whether I am disposed already.
+ *
+ * @return whether I am disposed
+ *
+ * @since 1.2.1
+ */
+ boolean isDisposed() {
+ return delegate == null;
+ }
+
+ /**
+ * Processes a resource delta to determine whether it corresponds to a
+ * resource in my editing domain and, if so, how to handle removal or
+ * change of that resource.
+ *
+ * @param delta
+ * the resource change
+ * @param synchRequests
+ * accumulates synch requests for the deltas
+ * @param affectedFiles
+ * accumulates the files affected by the deltas
+ */
+ void processDelta(IResourceDelta delta, List<EGFSynchRequest> synchRequests, List<IProject> affectedProjects) {
+ String fullPath = delta.getFullPath().toString();
+ URI uri = URI.createPlatformResourceURI(fullPath, false);
+ ResourceSet rset = getEditingDomain().getResourceSet();
+
+ // try the unencoded URI first, in case the client doesn't encode
+ Resource resource = rset.getResource(uri, false);
+ if (resource == null) {
+ URI encodedURI = URI.createPlatformPluginURI(fullPath, true);
+ if (encodedURI.equals(uri) == false) {
+ // the URI needs to be encoded. Try it, then
+ uri = encodedURI;
+ resource = rset.getResource(uri, false);
+ }
+ }
+
+ if ((resource != null) && resource.isLoaded()) {
+ IProject project = ((IFile) delta.getResource()).getProject();
+ switch (delta.getKind()) {
+ case IResourceDelta.ADDED:
+ if ((delta.getFlags() & IResourceDelta.MOVED_FROM) != 0) {
+ affectedProjects.add(project);
+ } else {
+ synchRequests.add(new EGFPersistedSynchRequest(this, resource));
+ affectedProjects.add(project);
+ }
+ break;
+ case IResourceDelta.REMOVED:
+ if ((delta.getFlags() & IResourceDelta.MOVED_TO) != 0) {
+ // first, see whether a resource with the new URI already
+ // exists. If so, then we will use the same URI (whether
+ // encoded or not) because that seems to be what the
+ // client prefers. Otherwise, always encode
+ String newPath = delta.getMovedToPath().toString();
+ URI newURI = URI.createPlatformPluginURI(newPath, false);
+ if (rset.getResource(newURI, false) == null) {
+ // this may be the same, depending on absence of
+ // special characters
+ newURI = URI.createPlatformPluginURI(newPath, true);
+ }
+ synchRequests.add(new EGFMovedSynchRequest(this, resource, newURI));
+ } else {
+ synchRequests.add(new EGFDeletedSynchRequest(this, resource));
+ }
+
+ break;
+ case IResourceDelta.CHANGED:
+ // This prevent excessive notifications
+ if ((delta.getFlags() & IResourceDelta.CONTENT) != 0) {
+ synchRequests.add(new EGFChangedSynchRequest(this, resource));
+ affectedProjects.add(project);
+ }
+ break;
+ }
+ }
+ }
+
+ /**
+ * Obtains the workspace file corresponding to the specified resource, if
+ * it has a platform-resource URI. Note that the resulting file, if not
+ * <code>null</code>, may nonetheless not actually exist (as the file is
+ * just a handle).
+ * <p>
+ * Note that, if the <tt>resource</tt> is in an archive (such as a ZIP file)
+ * then it does not map to a workspace file. In this case, however, the
+ * workspace file (if any) corresponding to the containing archive can be
+ * obtained via the {@link #getUnderlyingFile(Resource)} method.
+ * </p>
+ *
+ * @param resource
+ * an EMF resource
+ *
+ * @return the corresponding workspace file, or <code>null</code> if the
+ * resource's URI is not a platform-resource URI
+ *
+ * @see #getUnderlyingFile(Resource)
+ */
+ public static IFile getFile(Resource resource) {
+ ResourceSet rset = resource.getResourceSet();
+ return getFile(resource.getURI(), (rset != null) ? rset.getURIConverter() : null, false);
+ }
+
+ /**
+ * Obtains the workspace file underlying the specified resource.
+ * If the resource has an {@link URI#isArchive() archive} scheme, the {@linkplain URI#authority() authority} is considered instead.
+ * If the URI has a file scheme, it's looked up in the workspace, just as
+ * in the {@link #getFile(Resource)} method.
+ * Otherwise, a platform scheme is assumed.
+ * <p>
+ * Note that the resulting file, if not
+ * <code>null</code>, may nonetheless not actually exist (as the file is
+ * just a handle).
+ * </p>
+ *
+ * @param resource
+ * an EMF resource
+ *
+ * @return the underlying workspace file, or <code>null</code> if the
+ * resource's URI is not a platform-resource URI
+ *
+ * @see #getFile(Resource)
+ * @since 1.2
+ */
+ public static IFile getUnderlyingFile(Resource resource) {
+ ResourceSet rset = resource.getResourceSet();
+
+ return getFile(resource.getURI(), (rset != null) ? rset.getURIConverter() : null, true);
+ }
+
+ /**
+ * Finds the file corresponding to the specified URI, using a URI converter
+ * if necessary (and provided) to normalize it.
+ *
+ * @param uri
+ * a URI
+ * @param converter
+ * an optional URI converter (may be <code>null</code>)
+ *
+ * @return the file, if available in the workspace
+ */
+ private static IFile getFile(URI uri, URIConverter converter, boolean considerArchives) {
+ IFile result = null;
+
+ if (considerArchives && uri.isArchive()) {
+ class MyArchiveURLConnection extends ArchiveURLConnection {
+ public MyArchiveURLConnection(String url) {
+ super(url);
+ }
+
+ public String getNestedURI() {
+ try {
+ return getNestedURL();
+ } catch (IOException exception) {
+ return ""; //$NON-NLS-1$
+ }
+ }
+ }
+ MyArchiveURLConnection archiveURLConnection = new MyArchiveURLConnection(uri.toString());
+ result = getFile(URI.createURI(archiveURLConnection.getNestedURI()), converter, considerArchives);
+ } else if (uri.isPlatformResource()) {
+ IPath path = new Path(uri.toPlatformString(true));
+ result = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
+ } else if (uri.isFile() && !uri.isRelative()) {
+ result = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(new Path(uri.toFileString()));
+ } else {
+ // normalize, to see whether may we can resolve it this time
+ if (converter != null) {
+ URI normalized = converter.normalize(uri);
+
+ if (!uri.equals(normalized)) {
+ // recurse on the new URI
+ result = getFile(normalized, converter, considerArchives);
+ }
+ }
+ }
+
+ if ((result == null) && !uri.isRelative()) {
+ try {
+ IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocationURI(new java.net.URI(uri.toString()));
+ if (files.length > 0) {
+ // set the result to be the first file found
+ result = files[0];
+ }
+ } catch (URISyntaxException e) {
+ // won't get this because EMF provides a well-formed URI
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Starts a synchronizer listening to resource change events.
+ *
+ * @param synchronizer
+ * the synchronizer to start
+ */
+ static void startListening(EGFWorkspaceSynchronizer synchronizer) {
+ // copy-on-write for thread safety
+ synchronized (synchronizers) {
+ Collection<EGFWorkspaceSynchronizer> newList = new ArrayList<EGFWorkspaceSynchronizer>(synchronizers.size() + 1);
+ newList.addAll(synchronizers);
+ newList.add(synchronizer);
+ synchronizers = newList;
+ // ensure that we are listening to the workspace
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(workspaceListener, IResourceChangeEvent.POST_CHANGE);
+ }
+ }
+
+ /**
+ * Stops a synchronizer listening to resource change events.
+ *
+ * @param synchronizer
+ * the synchronizer to stop
+ */
+ static void stopListening(EGFWorkspaceSynchronizer synchronizer) {
+ // copy-on-write for thread safety
+ synchronized (synchronizers) {
+ Collection<EGFWorkspaceSynchronizer> newList = new ArrayList<EGFWorkspaceSynchronizer>(synchronizers);
+ newList.remove(synchronizer);
+ synchronizers = newList;
+ if (synchronizers.isEmpty()) {
+ // stop listening to the workspace
+ ResourcesPlugin.getWorkspace().removeResourceChangeListener(workspaceListener);
+ }
+ }
+ }
+
+ /**
+ * Obtains the synchronizers that need to process a resource change event.
+ *
+ * @return the currently active synchronizers
+ */
+ static Collection<EGFWorkspaceSynchronizer> getSynchronizers() {
+ // does not need synchronization because we copy on write
+ return synchronizers;
+ }
+
+ /**
+ * Call-back interface for an object to which a {@link WorkspaceSynchronizer} delegates the algorithms for handling different kinds of resource
+ * changes.
+ * <p>
+ * Every call-back is invoked asynchronously in a read-only transaction on
+ * the synchronizer's editing domain. Any model changes that the
+ * receiver wishes to make must be scheduled asynchronously, although
+ * workspace changes are permitted as the calling thread has the
+ * workspace lock. The call-backs are not actually required to handle the
+ * resource change; they can defer to the default behaviour.
+ * </p>
+ *
+ * @author Christian W. Damus (cdamus)
+ */
+ public static interface Delegate {
+
+ /**
+ * Optionally handles the persistence of the physical workspace resource
+ * behind the specified EMF resource.
+ *
+ * @param resource
+ * a resource whose storage has been persisted
+ *
+ * @return <code>true</code> if I handled the resource persistence;
+ * <code>false</code> to defer to the workspace synchronizer's
+ * default algorithm
+ */
+ boolean handleResourcePersisted(Resource resource);
+
+ /**
+ * Optionally handles the deletion of the physical workspace resource
+ * behind the specified EMF resource.
+ *
+ * @param resource
+ * a resource whose storage has been deleted
+ *
+ * @return <code>true</code> if I handled the resource deletion;
+ * <code>false</code> to defer to the workspace synchronizer's
+ * default algorithm
+ */
+ boolean handleResourceDeleted(Resource resource);
+
+ /**
+ * Optionally handles the move of the physical workspace resource
+ * behind the specified EMF resource. Both in-place renames of a
+ * resource and relocations of a resource to another container are
+ * considered as moves.
+ *
+ * @param resource
+ * a resource whose storage has been moved
+ * @param newURI
+ * the new URI of the moved resource
+ *
+ * @return <code>true</code> if I handled the resource deletion;
+ * <code>false</code> to defer to the workspace synchronizer's
+ * default algorithm
+ */
+ boolean handleResourceMoved(Resource resource, URI newURI);
+
+ /**
+ * Optionally handles a change to the physical workspace resource
+ * behind the specified EMF resource.
+ *
+ * @param resource
+ * a resource whose storage has been changed
+ *
+ * @return <code>true</code> if I handled the resource change;
+ * <code>false</code> to defer to the workspace synchronizer's
+ * default algorithm
+ */
+ boolean handleResourceChanged(Resource resource);
+
+ /**
+ * Disposes me. This is called by the synchronizer when it is disposed.
+ */
+ void dispose();
+
+ }
+
+ /**
+ * The single shared workspace listener that passes workspace changes
+ * along to the currently active synchronizers.
+ *
+ * @author Christian W. Damus (cdamus)
+ */
+ private static class WorkspaceListener implements IResourceChangeListener {
+
+ public void resourceChanged(IResourceChangeEvent event) {
+
+ IResourceDelta delta = event.getDelta();
+
+ try {
+
+ final List<EGFSynchRequest> synchRequests = new ArrayList<EGFSynchRequest>();
+
+ final List<IProject> affectedProjects = new UniqueEList<IProject>();
+
+ delta.accept(new IResourceDeltaVisitor() {
+ public boolean visit(IResourceDelta innerDelta) {
+ if (innerDelta.getResource().getType() == IResource.FILE) {
+ switch (innerDelta.getKind()) {
+ case IResourceDelta.CHANGED:
+ if (innerDelta.getFlags() == IResourceDelta.MARKERS) {
+ break;
+ }
+ case IResourceDelta.ADDED:
+ case IResourceDelta.REMOVED:
+ processDelta(innerDelta, synchRequests, affectedProjects);
+ break;
+ }
+ }
+
+ return true;
+ }
+ });
+
+ if (synchRequests.isEmpty() == false) {
+ new ResourceSynchJob(synchRequests, affectedProjects).schedule();
+ }
+
+ } catch (CoreException e) {
+ EGFCorePlugin.getDefault().logError(e);
+ }
+
+ }
+
+ /**
+ * Passes the delta to all available synchronizers, to process it.
+ *
+ * @param delta
+ * the delta to process
+ * @param synchRequests
+ * accumulates synch requests for the deltas
+ * @param affectedFiles
+ * accumulates files affected by the deltas
+ */
+ private void processDelta(IResourceDelta delta, List<EGFSynchRequest> synchRequests, List<IProject> affectedProjects) {
+ for (EGFWorkspaceSynchronizer next : getSynchronizers()) {
+ next.processDelta(delta, synchRequests, affectedProjects);
+ }
+ }
+ }
+
+ /**
+ * The default algorithms for handling workspace resource changes.
+ *
+ * @author Christian W. Damus (cdamus)
+ */
+ private static class DefaultDelegate implements Delegate {
+
+ public boolean handleResourcePersisted(Resource resource) {
+ // Nothing to do
+ return true;
+ }
+
+ public boolean handleResourceDeleted(Resource resource) {
+ resource.unload();
+ return true;
+ }
+
+ public boolean handleResourceMoved(Resource resource, URI newURI) {
+ resource.unload();
+ return true;
+ }
+
+ public boolean handleResourceChanged(Resource resource) {
+ resource.unload();
+ try {
+ resource.load(resource.getResourceSet().getLoadOptions());
+ } catch (IOException e) {
+ EGFCorePlugin.getDefault().logError(e);
+ }
+
+ return true;
+ }
+
+ public void dispose() {
+ // nothing to dispose (especially as I am shared)
+ }
+
+ }
+
+ /**
+ * A job that runs under the workspace scheduling rule to process one or
+ * more resource synchronization requests.
+ *
+ * @author Christian W. Damus (cdamus)
+ */
+ private static class ResourceSynchJob extends WorkspaceJob {
+
+ private final List<EGFSynchRequest> synchRequests;
+
+ /**
+ * Initializes me with the list of resources changes that I am to
+ * process.
+ *
+ * @param synchRequests
+ * the resource synchronization requests
+ * @param affectedResources
+ * the resources affected by the workspace changes
+ */
+ ResourceSynchJob(List<EGFSynchRequest> synchRequests, List<IProject> affectedProjects) {
+ super(EGFCoreMessages.synchJobName);
+ this.synchRequests = synchRequests;
+ setRule(getRule(affectedProjects));
+ }
+
+ /**
+ * Processes my queued resource synchronization requests.
+ */
+ @Override
+ public IStatus runInWorkspace(IProgressMonitor monitor) {
+ try {
+ for (EGFSynchRequest next : synchRequests) {
+ try {
+ synchronized (next.getLock()) {
+ if (next.isDisposed() == false) {
+ next.perform();
+ }
+ }
+ } catch (RuntimeException e) {
+ EGFCorePlugin.getDefault().logError(e);
+ }
+ }
+ } catch (InterruptedException e) {
+ return Status.CANCEL_STATUS;
+ }
+
+ return Status.OK_STATUS;
+ }
+
+ /**
+ * Obtains a scheduling rule to schedule myself on to give my delegate
+ * access to the specified affected projects.
+ *
+ * @param affectedProjects
+ * @return the appropriate scheduling rule, or <code>null</code> if
+ * none is required
+ */
+ private ISchedulingRule getRule(List<IProject> affectedProjects) {
+ ISchedulingRule result = null;
+ if (affectedProjects.isEmpty() == false) {
+ IResourceRuleFactory factory = ResourcesPlugin.getWorkspace().getRuleFactory();
+ for (IResource next : affectedProjects) {
+ result = MultiRule.combine(result, factory.modifyRule(next));
+ }
+ }
+ return result;
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.dev/.project b/org.eclipse.egf.dev/.project
new file mode 100644
index 0000000..8459b9d
--- /dev/null
+++ b/org.eclipse.egf.dev/.project
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.dev</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ </buildSpec>
+ <natures>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.dev/preferences/codetemplates.xml b/org.eclipse.egf.dev/preferences/codetemplates.xml
new file mode 100644
index 0000000..566694b
--- /dev/null
+++ b/org.eclipse.egf.dev/preferences/codetemplates.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><templates><template autoinsert="false" context="gettercomment_context" deleted="false" description="Comment for getter method" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name="gettercomment"/><template autoinsert="false" context="settercomment_context" deleted="false" description="Comment for setter method" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.settercomment" name="settercomment"/><template autoinsert="false" context="constructorcomment_context" deleted="false" description="Comment for created constructors" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name="constructorcomment"/><template autoinsert="false" context="filecomment_context" deleted="false" description="Comment for created Java files" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.filecomment" name="filecomment">/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+</template><template autoinsert="false" context="typecomment_context" deleted="false" description="Comment for created types" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.typecomment" name="typecomment">/**
+ * @author Thomas Guiu
+ *
+ */</template><template autoinsert="false" context="fieldcomment_context" deleted="false" description="Comment for fields" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name="fieldcomment"/><template autoinsert="false" context="methodcomment_context" deleted="false" description="Comment for non-overriding methods" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name="methodcomment"/><template autoinsert="false" context="overridecomment_context" deleted="false" description="Comment for overriding methods" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name="overridecomment"/><template autoinsert="false" context="delegatecomment_context" deleted="false" description="Comment for delegate methods" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name="delegatecomment"/><template autoinsert="true" context="newtype_context" deleted="false" description="Newly created files" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.newtype" name="newtype">${filecomment}
+${package_declaration}
+
+${typecomment}
+${type_declaration}</template><template autoinsert="true" context="classbody_context" deleted="false" description="Code in new class type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.classbody" name="classbody">
+</template><template autoinsert="true" context="interfacebody_context" deleted="false" description="Code in new interface type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name="interfacebody">
+</template><template autoinsert="true" context="enumbody_context" deleted="false" description="Code in new enum type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.enumbody" name="enumbody">
+</template><template autoinsert="true" context="annotationbody_context" deleted="false" description="Code in new annotation type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name="annotationbody">
+</template><template autoinsert="false" context="catchblock_context" deleted="false" description="Code in new catch blocks" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.catchblock" name="catchblock">Activator.getDafault().logError(${exception_var});
+</template><template autoinsert="false" context="methodbody_context" deleted="false" description="Code in created method stubs" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.methodbody" name="methodbody">${body_statement}</template><template autoinsert="false" context="constructorbody_context" deleted="false" description="Code in created constructor stubs" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name="constructorbody">${body_statement}
+</template><template autoinsert="true" context="getterbody_context" deleted="false" description="Code in created getters" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.getterbody" name="getterbody">return ${field};</template><template autoinsert="true" context="setterbody_context" deleted="false" description="Code in created setters" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.setterbody" name="setterbody">${field} = ${param};</template></templates>
\ No newline at end of file
diff --git a/org.eclipse.egf.dev/preferences/editor.templates.xml b/org.eclipse.egf.dev/preferences/editor.templates.xml
new file mode 100644
index 0000000..d8b653c
--- /dev/null
+++ b/org.eclipse.egf.dev/preferences/editor.templates.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><templates><template autoinsert="true" context="java" deleted="false" description="Throw an IllegalArgumentException" enabled="true" name="illa">if (${name:var} == null)
+ throw new IllegalArgumentException();
+${cursor}</template><template autoinsert="true" context="java" deleted="false" description="Throw an IllegalStateException" enabled="true" name="ills">if (${name:var} == null)
+ throw new IllegalStateException();
+${cursor}</template></templates>
\ No newline at end of file
diff --git a/org.eclipse.egf.dev/preferences/formatter.xml b/org.eclipse.egf.dev/preferences/formatter.xml
new file mode 100644
index 0000000..de8ae20
--- /dev/null
+++ b/org.eclipse.egf.dev/preferences/formatter.xml
@@ -0,0 +1,269 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<profiles version="11">
+<profile kind="CodeFormatterProfile" name="egf" version="11">
+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
+<setting id="org.eclipse.jdt.core.compiler.source" value="1.5"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="800"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
+<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.5"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/>
+<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="80"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.wrap_before_binary_operator" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.5"/>
+<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
+</profile>
+</profiles>
diff --git a/org.eclipse.egf.fprod.producer/.classpath b/org.eclipse.egf.fprod.producer/.classpath
new file mode 100644
index 0000000..2d1a430
--- /dev/null
+++ b/org.eclipse.egf.fprod.producer/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.egf.fprod.producer/.options b/org.eclipse.egf.fprod.producer/.options
new file mode 100644
index 0000000..9e82b43
--- /dev/null
+++ b/org.eclipse.egf.fprod.producer/.options
@@ -0,0 +1,2 @@
+# Prints debug information
+org.eclipse.egf.model.fprod.producer/debug=true
diff --git a/org.eclipse.egf.fprod.producer/.project b/org.eclipse.egf.fprod.producer/.project
new file mode 100644
index 0000000..a366e41
--- /dev/null
+++ b/org.eclipse.egf.fprod.producer/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.fprod.producer</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.fprod.producer/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egf.fprod.producer/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..9e924ed
--- /dev/null
+++ b/org.eclipse.egf.fprod.producer/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:51:04 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.egf.fprod.producer/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egf.fprod.producer/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..d6e41b9
--- /dev/null
+++ b/org.eclipse.egf.fprod.producer/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Tue Oct 13 09:46:08 CEST 2009
+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/org.eclipse.egf.fprod.producer/META-INF/MANIFEST.MF b/org.eclipse.egf.fprod.producer/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..6a86b8e
--- /dev/null
+++ b/org.eclipse.egf.fprod.producer/META-INF/MANIFEST.MF
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.fprod.producer;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.egf.fprod.producer.EGFFprodProducerPlugin
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle:
+ org.eclipse.core.runtime,
+ org.eclipse.egf.producer;visibility:=reexport,
+ org.eclipse.egf.model.fprod;visibility:=reexport
+Export-Package:
+ org.eclipse.egf.fprod.producer
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.egf.fprod.producer/about.html b/org.eclipse.egf.fprod.producer/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/org.eclipse.egf.fprod.producer/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/org.eclipse.egf.fprod.producer/build.properties b/org.eclipse.egf.fprod.producer/build.properties
new file mode 100644
index 0000000..7569fbf
--- /dev/null
+++ b/org.eclipse.egf.fprod.producer/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ .options,\
+ plugin.properties,\
+ plugin.xml,\
+ about.html
+src.includes = about.html
diff --git a/org.eclipse.egf.fprod.producer/plugin.properties b/org.eclipse.egf.fprod.producer/plugin.properties
new file mode 100644
index 0000000..dee0933
--- /dev/null
+++ b/org.eclipse.egf.fprod.producer/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 Model Factory Production Producer (Incubation)
+providerName=Eclipse Modeling Project
diff --git a/org.eclipse.egf.fprod.producer/plugin.xml b/org.eclipse.egf.fprod.producer/plugin.xml
new file mode 100644
index 0000000..38768c0
--- /dev/null
+++ b/org.eclipse.egf.fprod.producer/plugin.xml
Binary files differ
diff --git a/org.eclipse.egf.fprod.producer/src/org/eclipse/egf/fprod/producer/EGFFprodProducerPlugin.java b/org.eclipse.egf.fprod.producer/src/org/eclipse/egf/fprod/producer/EGFFprodProducerPlugin.java
new file mode 100644
index 0000000..a7717c7
--- /dev/null
+++ b/org.eclipse.egf.fprod.producer/src/org/eclipse/egf/fprod/producer/EGFFprodProducerPlugin.java
@@ -0,0 +1,47 @@
+package org.eclipse.egf.fprod.producer;
+
+import org.eclipse.egf.common.activator.EGFAbstractPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class EGFFprodProducerPlugin extends EGFAbstractPlugin {
+
+ /**
+ * The shared instance
+ */
+ private static EGFFprodProducerPlugin __plugin;
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ __plugin = this;
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ __plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static EGFFprodProducerPlugin getDefault() {
+ return __plugin;
+ }
+
+}
diff --git a/org.eclipse.egf.fprod.producer/src/org/eclipse/egf/fprod/producer/internal/context/FactoryComponentProductionContextProducer.java b/org.eclipse.egf.fprod.producer/src/org/eclipse/egf/fprod/producer/internal/context/FactoryComponentProductionContextProducer.java
new file mode 100644
index 0000000..40c108a
--- /dev/null
+++ b/org.eclipse.egf.fprod.producer/src/org/eclipse/egf/fprod/producer/internal/context/FactoryComponentProductionContextProducer.java
@@ -0,0 +1,46 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.fprod.producer.internal.context;
+
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.core.producer.context.IProductionContext;
+import org.eclipse.egf.core.session.ProjectBundleSession;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.producer.context.ActivityProductionContextProducer;
+import org.eclipse.egf.producer.context.IFactoryComponentProductionContext;
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class FactoryComponentProductionContextProducer extends ActivityProductionContextProducer<FactoryComponent> {
+
+ @Override
+ public EClass getActivity() {
+ return FcorePackage.Literals.FACTORY_COMPONENT;
+ }
+
+ @Override
+ protected IFactoryComponentProductionContext doCreateActivityProductionContext(ProjectBundleSession projectBundleSession, Activity element) throws InvocationException {
+ return FprodProducerContextFactory.createContext(projectBundleSession, (FactoryComponent) element);
+ }
+
+ @Override
+ protected IFactoryComponentProductionContext doCreateActivityProductionContext(IProductionContext<Invocation, InvocationContract> parent, ProjectBundleSession projectBundleSession, Activity element) throws InvocationException {
+ return FprodProducerContextFactory.createContext(parent, projectBundleSession, (FactoryComponent) element);
+ }
+
+}
diff --git a/org.eclipse.egf.fprod.producer/src/org/eclipse/egf/fprod/producer/internal/context/FprodProducerContextFactory.java b/org.eclipse.egf.fprod.producer/src/org/eclipse/egf/fprod/producer/internal/context/FprodProducerContextFactory.java
new file mode 100644
index 0000000..871339f
--- /dev/null
+++ b/org.eclipse.egf.fprod.producer/src/org/eclipse/egf/fprod/producer/internal/context/FprodProducerContextFactory.java
@@ -0,0 +1,58 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.fprod.producer.internal.context;
+
+import org.eclipse.egf.common.helper.EMFHelper;
+import org.eclipse.egf.core.producer.context.IProductionContext;
+import org.eclipse.egf.core.session.ProjectBundleSession;
+import org.eclipse.egf.model.fcore.Contract;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.model.fcore.OrchestrationParameter;
+import org.eclipse.egf.model.fprod.ProductionPlan;
+import org.eclipse.egf.model.fprod.ProductionPlanInvocation;
+import org.eclipse.egf.producer.context.IFactoryComponentProductionContext;
+import org.eclipse.egf.producer.internal.context.FactoryComponentProductionContext;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class FprodProducerContextFactory {
+
+ private FprodProducerContextFactory() {
+ // Prevent Instantiation
+ }
+
+ // FactoryComponent
+
+ public static IFactoryComponentProductionContext createContext(ProjectBundleSession projectBundleSession, FactoryComponent element) {
+ return new FactoryComponentProductionContext(projectBundleSession, element, EMFHelper.getText(element));
+ }
+
+ public static IFactoryComponentProductionContext createContext(IProductionContext<Invocation, InvocationContract> parent, ProjectBundleSession projectBundleSession, FactoryComponent element) {
+ return new FactoryComponentProductionContext(parent, projectBundleSession, element, EMFHelper.getText(element));
+ }
+
+ // ProductionPlan
+
+ public static IProductionContext<ProductionPlan, OrchestrationParameter> createContext(IProductionContext<FactoryComponent, Contract> parent, ProjectBundleSession projectBundleSession, ProductionPlan element) {
+ return new ProductionPlanProductionContext(parent, projectBundleSession, element, EMFHelper.getText(element));
+ }
+
+ // ProductionPlanInvocation
+
+ public static IProductionContext<ProductionPlanInvocation, InvocationContract> createContext(IProductionContext<ProductionPlan, OrchestrationParameter> parent, ProjectBundleSession projectBundleSession, ProductionPlanInvocation element) {
+ return new ProductionPlanInvocationProductionContext(parent, projectBundleSession, element, EMFHelper.getText(element));
+ }
+
+}
diff --git a/org.eclipse.egf.fprod.producer/src/org/eclipse/egf/fprod/producer/internal/context/ProductionPlanInvocationProductionContext.java b/org.eclipse.egf.fprod.producer/src/org/eclipse/egf/fprod/producer/internal/context/ProductionPlanInvocationProductionContext.java
new file mode 100644
index 0000000..0d8c242
--- /dev/null
+++ b/org.eclipse.egf.fprod.producer/src/org/eclipse/egf/fprod/producer/internal/context/ProductionPlanInvocationProductionContext.java
@@ -0,0 +1,34 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.fprod.producer.internal.context;
+
+import org.eclipse.egf.core.producer.context.IProductionContext;
+import org.eclipse.egf.core.session.ProjectBundleSession;
+import org.eclipse.egf.model.fcore.OrchestrationParameter;
+import org.eclipse.egf.model.fprod.ProductionPlan;
+import org.eclipse.egf.model.fprod.ProductionPlanInvocation;
+import org.eclipse.egf.producer.internal.context.InvocationProductionContext;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class ProductionPlanInvocationProductionContext extends InvocationProductionContext<ProductionPlanInvocation, ProductionPlan> {
+
+ public ProductionPlanInvocationProductionContext(ProjectBundleSession projectBundleSession, ProductionPlanInvocation element, String name) {
+ super(projectBundleSession, element, name);
+ }
+
+ public ProductionPlanInvocationProductionContext(IProductionContext<ProductionPlan, OrchestrationParameter> parent, ProjectBundleSession projectBundleSession, ProductionPlanInvocation element, String name) {
+ super(parent, projectBundleSession, element, name);
+ }
+
+}
diff --git a/org.eclipse.egf.fprod.producer/src/org/eclipse/egf/fprod/producer/internal/context/ProductionPlanProductionContext.java b/org.eclipse.egf.fprod.producer/src/org/eclipse/egf/fprod/producer/internal/context/ProductionPlanProductionContext.java
new file mode 100644
index 0000000..c8d517e
--- /dev/null
+++ b/org.eclipse.egf.fprod.producer/src/org/eclipse/egf/fprod/producer/internal/context/ProductionPlanProductionContext.java
@@ -0,0 +1,34 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.fprod.producer.internal.context;
+
+import org.eclipse.egf.core.producer.context.IProductionContext;
+import org.eclipse.egf.core.session.ProjectBundleSession;
+import org.eclipse.egf.model.fcore.Contract;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fprod.ProductionPlan;
+import org.eclipse.egf.producer.internal.context.OrchestrationProductionContext;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class ProductionPlanProductionContext extends OrchestrationProductionContext<ProductionPlan> {
+
+ public ProductionPlanProductionContext(ProjectBundleSession projectBundleSession, ProductionPlan element, String name) {
+ super(projectBundleSession, element, name);
+ }
+
+ public ProductionPlanProductionContext(IProductionContext<FactoryComponent, Contract> parent, ProjectBundleSession projectBundleSession, ProductionPlan element, String name) {
+ super(parent, projectBundleSession, element, name);
+ }
+
+}
diff --git a/org.eclipse.egf.fprod.producer/src/org/eclipse/egf/fprod/producer/internal/manager/ProductionPlanInvocationManager.java b/org.eclipse.egf.fprod.producer/src/org/eclipse/egf/fprod/producer/internal/manager/ProductionPlanInvocationManager.java
new file mode 100644
index 0000000..3811e59
--- /dev/null
+++ b/org.eclipse.egf.fprod.producer/src/org/eclipse/egf/fprod/producer/internal/manager/ProductionPlanInvocationManager.java
@@ -0,0 +1,127 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.fprod.producer.internal.manager;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.egf.core.l10n.EGFCoreMessages;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.core.producer.context.IProductionContext;
+import org.eclipse.egf.core.producer.context.ProductionContext;
+import org.eclipse.egf.fprod.producer.internal.context.FprodProducerContextFactory;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.model.fcore.OrchestrationParameter;
+import org.eclipse.egf.model.fprod.ProductionPlan;
+import org.eclipse.egf.model.fprod.ProductionPlanInvocation;
+import org.eclipse.egf.producer.EGFProducerPlugin;
+import org.eclipse.egf.producer.internal.manager.InvocationManager;
+import org.eclipse.egf.producer.manager.ActivityManagerProducer;
+import org.eclipse.egf.producer.manager.IActivityManager;
+import org.eclipse.egf.producer.manager.IModelElementManager;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.UniqueEList;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class ProductionPlanInvocationManager extends InvocationManager<ProductionPlan, ProductionPlanInvocation> {
+
+ private IActivityManager<Activity> _activityManager;
+
+ public ProductionPlanInvocationManager(IModelElementManager<ProductionPlan, OrchestrationParameter> parent, ProductionPlanInvocation element) throws InvocationException {
+ super(parent, element);
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public ProductionContext<ProductionPlanInvocation, InvocationContract> getInternalProductionContext() throws InvocationException {
+ if (_productionContext == null) {
+ _productionContext = FprodProducerContextFactory.createContext((IProductionContext<ProductionPlan, OrchestrationParameter>) getParent().getProductionContext(), getProjectBundleSession(), getElement());
+ }
+ return (ProductionContext<ProductionPlanInvocation, InvocationContract>) _productionContext;
+ }
+
+ public IActivityManager<Activity> getActivityManager() throws InvocationException {
+ if (_activityManager == null && getElement().getInvokedActivity() != null) {
+ ActivityManagerProducer<Activity> producer = null;
+ try {
+ producer = EGFProducerPlugin.getActivityManagerProducer(getElement().getInvokedActivity());
+ } catch (Throwable t) {
+ throw new InvocationException(t);
+ }
+ _activityManager = producer.createActivityManager(this, getElement().getInvokedActivity());
+ }
+ return _activityManager;
+ }
+
+ @Override
+ public void dispose() throws InvocationException {
+ super.dispose();
+ if (getActivityManager() != null) {
+ getActivityManager().dispose();
+ }
+ }
+
+ @Override
+ public Diagnostic canInvoke() throws InvocationException {
+ BasicDiagnostic diagnostic = checkInputElement(false);
+ if (getActivityManager() != null) {
+ diagnostic.add(getActivityManager().canInvoke());
+ }
+ return diagnostic;
+ }
+
+ @Override
+ public void initializeContext() throws InvocationException {
+ super.initializeContext();
+ if (getActivityManager() != null) {
+ getActivityManager().initializeContext();
+ }
+ }
+
+ public int getSteps() throws InvocationException {
+ if (getActivityManager() != null) {
+ return getActivityManager().getSteps();
+ }
+ return 0;
+ }
+
+ public List<Activity> getActivities() throws InvocationException {
+ List<Activity> activities = new UniqueEList<Activity>();
+ if (getActivityManager() != null) {
+ activities.addAll(getActivityManager().getActivities());
+ }
+ return activities;
+ }
+
+ public Diagnostic invoke(IProgressMonitor monitor) throws InvocationException {
+ SubMonitor subMonitor = SubMonitor.convert(monitor, NLS.bind(EGFCoreMessages.Production_Invoke, getName()), 1);
+ BasicDiagnostic diagnostic = checkInputElement(true);
+ if (diagnostic.getSeverity() != Diagnostic.ERROR) {
+ IActivityManager<Activity> activityManager = getActivityManager();
+ if (activityManager != null) {
+ diagnostic.add(activityManager.invoke(subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE)));
+ if (monitor.isCanceled()) {
+ throw new OperationCanceledException();
+ }
+ }
+ }
+ return diagnostic;
+ }
+
+}
diff --git a/org.eclipse.egf.fprod.producer/src/org/eclipse/egf/fprod/producer/internal/manager/ProductionPlanManager.java b/org.eclipse.egf.fprod.producer/src/org/eclipse/egf/fprod/producer/internal/manager/ProductionPlanManager.java
new file mode 100644
index 0000000..7819ade
--- /dev/null
+++ b/org.eclipse.egf.fprod.producer/src/org/eclipse/egf/fprod/producer/internal/manager/ProductionPlanManager.java
@@ -0,0 +1,189 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.fprod.producer.internal.manager;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.egf.common.helper.EMFHelper;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.core.producer.context.IProductionContext;
+import org.eclipse.egf.core.producer.context.ProductionContext;
+import org.eclipse.egf.fprod.producer.internal.context.FprodProducerContextFactory;
+import org.eclipse.egf.fprod.producer.l10n.FprodProducerMessages;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.Contract;
+import org.eclipse.egf.model.fcore.ContractMode;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.model.fcore.OrchestrationParameter;
+import org.eclipse.egf.model.fprod.ProductionPlan;
+import org.eclipse.egf.model.fprod.ProductionPlanInvocation;
+import org.eclipse.egf.model.types.Type;
+import org.eclipse.egf.producer.EGFProducerPlugin;
+import org.eclipse.egf.producer.internal.manager.OrchestrationManager;
+import org.eclipse.egf.producer.manager.IActivityManager;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.UniqueEList;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class ProductionPlanManager extends OrchestrationManager<ProductionPlan> {
+
+ private Map<ProductionPlanInvocation, ProductionPlanInvocationManager> _managers;
+
+ public ProductionPlanManager(IActivityManager<FactoryComponent> parent, ProductionPlan productionPlan) throws InvocationException {
+ super(parent, productionPlan);
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public ProductionContext<ProductionPlan, OrchestrationParameter> getInternalProductionContext() throws InvocationException {
+ if (_productionContext == null) {
+ _productionContext = FprodProducerContextFactory.createContext((IProductionContext<FactoryComponent, Contract>) getParent().getProductionContext(), getProjectBundleSession(), getElement());
+ }
+ return (ProductionContext<ProductionPlan, OrchestrationParameter>) _productionContext;
+ }
+
+ private Map<ProductionPlanInvocation, ProductionPlanInvocationManager> getProductionPlanManagers() throws InvocationException {
+ if (_managers == null && getElement().getInvocations() != null) {
+ _managers = new HashMap<ProductionPlanInvocation, ProductionPlanInvocationManager>(getElement().getInvocations().size());
+ for (ProductionPlanInvocation invocation : getElement().getInvocations()) {
+ _managers.put(invocation, new ProductionPlanInvocationManager(this, invocation));
+ }
+ }
+ return _managers;
+ }
+
+ @Override
+ public void dispose() throws InvocationException {
+ super.dispose();
+ Map<ProductionPlanInvocation, ProductionPlanInvocationManager> managers = getProductionPlanManagers();
+ if (managers != null) {
+ for (Invocation invocation : getElement().getInvocations()) {
+ managers.get(invocation).dispose();
+ }
+ }
+ }
+
+ @Override
+ public Diagnostic canInvoke() throws InvocationException {
+ BasicDiagnostic diagnostic = checkInputElement(false);
+ Map<ProductionPlanInvocation, ProductionPlanInvocationManager> managers = getProductionPlanManagers();
+ if (managers != null) {
+ for (Invocation invocation : getElement().getInvocations()) {
+ diagnostic.add(managers.get(invocation).canInvoke());
+ }
+ }
+ return diagnostic;
+ }
+
+ @Override
+ public void initializeContext() throws InvocationException {
+ super.initializeContext();
+ Map<ProductionPlanInvocation, ProductionPlanInvocationManager> managers = getProductionPlanManagers();
+ if (managers != null) {
+ for (Invocation invocation : getElement().getInvocations()) {
+ managers.get(invocation).initializeContext();
+ }
+ }
+ }
+
+ public int getSteps() throws InvocationException {
+ int steps = 0;
+ Map<ProductionPlanInvocation, ProductionPlanInvocationManager> managers = getProductionPlanManagers();
+ if (managers != null) {
+ for (Invocation invocation : getElement().getInvocations()) {
+ steps += managers.get(invocation).getSteps();
+ }
+ }
+ return steps;
+ }
+
+ public List<Activity> getActivities() throws InvocationException {
+ List<Activity> activities = new UniqueEList<Activity>();
+ Map<ProductionPlanInvocation, ProductionPlanInvocationManager> managers = getProductionPlanManagers();
+ if (managers != null) {
+ for (Invocation invocation : getElement().getInvocations()) {
+ activities.addAll(managers.get(invocation).getActivities());
+ }
+ }
+ return activities;
+ }
+
+ public Diagnostic invoke(IProgressMonitor monitor) throws InvocationException {
+ BasicDiagnostic diagnostic = checkInputElement(true);
+ if (diagnostic.getSeverity() != Diagnostic.ERROR) {
+ Map<ProductionPlanInvocation, ProductionPlanInvocationManager> managers = getProductionPlanManagers();
+ if (managers != null) {
+ int steps = getSteps();
+ SubMonitor subMonitor = SubMonitor.convert(monitor, null, steps * 900);
+ for (Invocation invocation : getElement().getInvocations()) {
+ ProductionPlanInvocationManager manager = managers.get(invocation);
+ // invoke
+ Diagnostic innerDiagnostic = manager.invoke(subMonitor.newChild(900 * manager.getSteps(), SubMonitor.SUPPRESS_NONE));
+ diagnostic.add(innerDiagnostic);
+ // Stop if any invocation diagnosis error are raised
+ if (innerDiagnostic.getSeverity() == Diagnostic.ERROR) {
+ break;
+ }
+ // populate target runtime context
+ populateTargetRuntimeContext(manager);
+ // Check subMonitor
+ if (subMonitor.isCanceled()) {
+ throw new OperationCanceledException();
+ }
+ }
+ }
+ }
+ return diagnostic;
+ }
+
+ private void populateTargetRuntimeContext(ProductionPlanInvocationManager manager) throws InvocationException {
+ for (InvocationContract contract : manager.getElement().getInvocationContracts(ContractMode.OUT)) {
+ // Target Contract
+ for (InvocationContract targetInvocationContract : contract.getTargetInvocationContract()) {
+ // Nothing to do
+ if (targetInvocationContract == null || targetInvocationContract.getInvocation() == null) {
+ continue;
+ }
+ // Locate target manager
+ ProductionPlanInvocationManager targetManager = getProductionPlanManagers().get(targetInvocationContract.getInvocation());
+ if (targetManager == null) {
+ throw new InvocationException(new CoreException(EGFProducerPlugin.getDefault().newStatus(IStatus.ERROR, NLS.bind(FprodProducerMessages.ProductionPlanManager_unknown_manager, EMFHelper.getText(targetInvocationContract.getInvocation())), null)));
+ }
+ // Populate value accordingly
+ Type type = contract.getType();
+ if (type == null) {
+ type = contract.getInvokedContract().getType();
+ }
+ Object value = manager.getProductionContext().getOutputValue(contract.getInvokedContract(), type.getType());
+ if (targetInvocationContract.getInvokedMode() == ContractMode.IN) {
+ targetManager.getInternalProductionContext().addInputData(targetInvocationContract, type.getType(), value, false);
+ } else {
+ targetManager.getInternalProductionContext().addInputData(targetInvocationContract, type.getType(), value, false);
+ targetManager.getInternalProductionContext().addOutputData(targetInvocationContract, type.getType(), value, false);
+ }
+ }
+ }
+ }
+}
diff --git a/org.eclipse.egf.fprod.producer/src/org/eclipse/egf/fprod/producer/internal/manager/ProductionPlanManagerFactory.java b/org.eclipse.egf.fprod.producer/src/org/eclipse/egf/fprod/producer/internal/manager/ProductionPlanManagerFactory.java
new file mode 100644
index 0000000..8b14fe8
--- /dev/null
+++ b/org.eclipse.egf.fprod.producer/src/org/eclipse/egf/fprod/producer/internal/manager/ProductionPlanManagerFactory.java
@@ -0,0 +1,34 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.fprod.producer.internal.manager;
+
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.OrchestrationParameter;
+import org.eclipse.egf.model.fprod.ProductionPlan;
+import org.eclipse.egf.producer.manager.IActivityManager;
+import org.eclipse.egf.producer.manager.IModelElementManager;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class ProductionPlanManagerFactory {
+
+ private ProductionPlanManagerFactory() {
+ // Prevent Instantiation
+ }
+
+ public static IModelElementManager<ProductionPlan, OrchestrationParameter> createProductionManager(IActivityManager<FactoryComponent> parent, ProductionPlan productionPlan) throws InvocationException {
+ return new ProductionPlanManager(parent, productionPlan);
+ }
+
+}
diff --git a/org.eclipse.egf.fprod.producer/src/org/eclipse/egf/fprod/producer/internal/manager/ProductionPlanManagerProducer.java b/org.eclipse.egf.fprod.producer/src/org/eclipse/egf/fprod/producer/internal/manager/ProductionPlanManagerProducer.java
new file mode 100644
index 0000000..d8697fd
--- /dev/null
+++ b/org.eclipse.egf.fprod.producer/src/org/eclipse/egf/fprod/producer/internal/manager/ProductionPlanManagerProducer.java
@@ -0,0 +1,38 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.fprod.producer.internal.manager;
+
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.OrchestrationParameter;
+import org.eclipse.egf.model.fprod.FprodPackage;
+import org.eclipse.egf.model.fprod.ProductionPlan;
+import org.eclipse.egf.producer.manager.IActivityManager;
+import org.eclipse.egf.producer.manager.IModelElementManager;
+import org.eclipse.egf.producer.manager.OrchestrationManagerProducer;
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class ProductionPlanManagerProducer extends OrchestrationManagerProducer<ProductionPlan> {
+
+ @Override
+ public EClass getOrchestration() {
+ return FprodPackage.Literals.PRODUCTION_PLAN;
+ }
+
+ @Override
+ protected IModelElementManager<ProductionPlan, OrchestrationParameter> doCreateOrchestrationManager(IActivityManager<FactoryComponent> parent, ProductionPlan productionPlan) throws InvocationException {
+ return ProductionPlanManagerFactory.createProductionManager(parent, productionPlan);
+ }
+}
diff --git a/org.eclipse.egf.fprod.producer/src/org/eclipse/egf/fprod/producer/l10n/FprodProducerMessages.java b/org.eclipse.egf.fprod.producer/src/org/eclipse/egf/fprod/producer/l10n/FprodProducerMessages.java
new file mode 100644
index 0000000..4f1db85
--- /dev/null
+++ b/org.eclipse.egf.fprod.producer/src/org/eclipse/egf/fprod/producer/l10n/FprodProducerMessages.java
@@ -0,0 +1,32 @@
+/**
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ * Thales Corporate Services S.A.S
+ */
+
+package org.eclipse.egf.fprod.producer.l10n;
+
+import org.eclipse.osgi.util.NLS;
+
+public class FprodProducerMessages {
+
+ private static final String BUNDLE_NAME = "org.eclipse.egf.fprod.producer.l10n.messages"; //$NON-NLS-1$
+
+ private FprodProducerMessages() {
+ // Do not instantiate
+ }
+
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, FprodProducerMessages.class);
+ }
+
+ public static String ProductionPlanManager_unknown_manager;
+
+}
diff --git a/org.eclipse.egf.fprod.producer/src/org/eclipse/egf/fprod/producer/l10n/messages.properties b/org.eclipse.egf.fprod.producer/src/org/eclipse/egf/fprod/producer/l10n/messages.properties
new file mode 100644
index 0000000..9744cb1
--- /dev/null
+++ b/org.eclipse.egf.fprod.producer/src/org/eclipse/egf/fprod/producer/l10n/messages.properties
@@ -0,0 +1,13 @@
+##
+# Copyright (c) 2000, 2009 IBM Corporation and others.
+# 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:
+# IBM Corporation - initial API and implementation
+# Thales Corporate Services S.A.S
+##
+
+ProductionPlanManager_unknown_manager= Unknown ModelElementManager for ''{0}''
\ No newline at end of file
diff --git a/org.eclipse.egf.ftask.producer/.classpath b/org.eclipse.egf.ftask.producer/.classpath
new file mode 100644
index 0000000..2d1a430
--- /dev/null
+++ b/org.eclipse.egf.ftask.producer/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.egf.ftask.producer/.options b/org.eclipse.egf.ftask.producer/.options
new file mode 100644
index 0000000..68d0923
--- /dev/null
+++ b/org.eclipse.egf.ftask.producer/.options
@@ -0,0 +1,2 @@
+# Prints debug information
+org.eclipse.egf.model.ftask.producer/debug=true
diff --git a/org.eclipse.egf.ftask.producer/.project b/org.eclipse.egf.ftask.producer/.project
new file mode 100644
index 0000000..492e066
--- /dev/null
+++ b/org.eclipse.egf.ftask.producer/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.ftask.producer</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.ftask.producer/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egf.ftask.producer/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..926e5b4
--- /dev/null
+++ b/org.eclipse.egf.ftask.producer/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:51:13 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.egf.ftask.producer/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egf.ftask.producer/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..d6e41b9
--- /dev/null
+++ b/org.eclipse.egf.ftask.producer/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Tue Oct 13 09:46:08 CEST 2009
+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/org.eclipse.egf.ftask.producer/META-INF/MANIFEST.MF b/org.eclipse.egf.ftask.producer/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..b940ce7
--- /dev/null
+++ b/org.eclipse.egf.ftask.producer/META-INF/MANIFEST.MF
@@ -0,0 +1,20 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.ftask.producer;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.egf.ftask.producer.EGFFtaskProducerPlugin
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle:
+ org.eclipse.core.runtime,
+ org.eclipse.egf.producer;visibility:=reexport,
+ org.eclipse.egf.model.ftask;visibility:=reexport
+Export-Package:
+ org.eclipse.egf.ftask.producer,
+ org.eclipse.egf.ftask.producer.invocation,
+ org.eclipse.egf.ftask.producer.manager,
+ org.eclipse.egf.ftask.producer.task
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.egf.ftask.producer/about.html b/org.eclipse.egf.ftask.producer/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/org.eclipse.egf.ftask.producer/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/org.eclipse.egf.ftask.producer/build.properties b/org.eclipse.egf.ftask.producer/build.properties
new file mode 100644
index 0000000..7569fbf
--- /dev/null
+++ b/org.eclipse.egf.ftask.producer/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ .options,\
+ plugin.properties,\
+ plugin.xml,\
+ about.html
+src.includes = about.html
diff --git a/org.eclipse.egf.ftask.producer/plugin.properties b/org.eclipse.egf.ftask.producer/plugin.properties
new file mode 100644
index 0000000..ee2d80b
--- /dev/null
+++ b/org.eclipse.egf.ftask.producer/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 Model Factory Task Producer (Incubation)
+providerName=Eclipse Modeling Project
diff --git a/org.eclipse.egf.ftask.producer/plugin.xml b/org.eclipse.egf.ftask.producer/plugin.xml
new file mode 100644
index 0000000..24d848c
--- /dev/null
+++ b/org.eclipse.egf.ftask.producer/plugin.xml
Binary files differ
diff --git a/org.eclipse.egf.ftask.producer/src/org/eclipse/egf/ftask/producer/EGFFtaskProducerPlugin.java b/org.eclipse.egf.ftask.producer/src/org/eclipse/egf/ftask/producer/EGFFtaskProducerPlugin.java
new file mode 100644
index 0000000..89ff177
--- /dev/null
+++ b/org.eclipse.egf.ftask.producer/src/org/eclipse/egf/ftask/producer/EGFFtaskProducerPlugin.java
@@ -0,0 +1,66 @@
+package org.eclipse.egf.ftask.producer;
+
+import org.eclipse.egf.common.activator.EGFAbstractPlugin;
+import org.eclipse.egf.ftask.producer.internal.task.TaskProductionInvocationFactory;
+import org.eclipse.egf.ftask.producer.task.ITaskProductionInvocationFactory;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class EGFFtaskProducerPlugin extends EGFAbstractPlugin {
+
+ /**
+ * The shared instance
+ */
+ private static EGFFtaskProducerPlugin __plugin;
+
+ /**
+ * ITaskProductionInvocationFactory singleton.
+ */
+ private static ITaskProductionInvocationFactory __taskProductionInvocationFactory;
+
+ /**
+ * Returns the singleton instance of the ITaskProductionInvocationFactory.
+ *
+ * @return the singleton task runner factory.
+ */
+ public static ITaskProductionInvocationFactory getTaskProductionInvocationFactory() {
+ if (__taskProductionInvocationFactory == null) {
+ __taskProductionInvocationFactory = new TaskProductionInvocationFactory();
+ }
+ return __taskProductionInvocationFactory;
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ __plugin = this;
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ __plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static EGFFtaskProducerPlugin getDefault() {
+ return __plugin;
+ }
+
+}
diff --git a/org.eclipse.egf.ftask.producer/src/org/eclipse/egf/ftask/producer/internal/context/FtaskProducerContextFactory.java b/org.eclipse.egf.ftask.producer/src/org/eclipse/egf/ftask/producer/internal/context/FtaskProducerContextFactory.java
new file mode 100644
index 0000000..2a88b3f
--- /dev/null
+++ b/org.eclipse.egf.ftask.producer/src/org/eclipse/egf/ftask/producer/internal/context/FtaskProducerContextFactory.java
@@ -0,0 +1,41 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.ftask.producer.internal.context;
+
+import org.eclipse.egf.common.helper.EMFHelper;
+import org.eclipse.egf.core.producer.context.IProductionContext;
+import org.eclipse.egf.core.session.ProjectBundleSession;
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.model.ftask.Task;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class FtaskProducerContextFactory {
+
+ private FtaskProducerContextFactory() {
+ // Prevent Instantiation
+ }
+
+ // Task
+
+ public static ITaskProductionContext createContext(ProjectBundleSession projectBundleSession, Task element) {
+ return new TaskProductionContext(projectBundleSession, element, EMFHelper.getText(element));
+ }
+
+ public static ITaskProductionContext createContext(IProductionContext<Invocation, InvocationContract> parent, ProjectBundleSession projectBundleSession, Task element) {
+ return new TaskProductionContext(parent, projectBundleSession, element, EMFHelper.getText(element));
+ }
+
+}
diff --git a/org.eclipse.egf.ftask.producer/src/org/eclipse/egf/ftask/producer/internal/context/TaskProductionContext.java b/org.eclipse.egf.ftask.producer/src/org/eclipse/egf/ftask/producer/internal/context/TaskProductionContext.java
new file mode 100644
index 0000000..7873d76
--- /dev/null
+++ b/org.eclipse.egf.ftask.producer/src/org/eclipse/egf/ftask/producer/internal/context/TaskProductionContext.java
@@ -0,0 +1,35 @@
+/**
+ * Copyright (c) 2009 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
+ */
+package org.eclipse.egf.ftask.producer.internal.context;
+
+import org.eclipse.egf.core.producer.context.IProductionContext;
+import org.eclipse.egf.core.session.ProjectBundleSession;
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.model.ftask.Task;
+import org.eclipse.egf.producer.internal.context.ActivityProductionContext;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class TaskProductionContext extends ActivityProductionContext<Task> implements ITaskProductionContext {
+
+ public TaskProductionContext(ProjectBundleSession projectBundleSession, Task element, String name) {
+ super(projectBundleSession, element, name);
+ }
+
+ public TaskProductionContext(IProductionContext<Invocation, InvocationContract> parent, ProjectBundleSession projectBundleSession, Task element, String name) {
+ super(parent, projectBundleSession, element, name);
+ }
+
+}
diff --git a/org.eclipse.egf.ftask.producer/src/org/eclipse/egf/ftask/producer/internal/context/TaskProductionContextProducer.java b/org.eclipse.egf.ftask.producer/src/org/eclipse/egf/ftask/producer/internal/context/TaskProductionContextProducer.java
new file mode 100644
index 0000000..a4c73cf
--- /dev/null
+++ b/org.eclipse.egf.ftask.producer/src/org/eclipse/egf/ftask/producer/internal/context/TaskProductionContextProducer.java
@@ -0,0 +1,46 @@
+/**
+ * Copyright (c) 2009 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
+ */
+package org.eclipse.egf.ftask.producer.internal.context;
+
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.core.producer.context.IProductionContext;
+import org.eclipse.egf.core.session.ProjectBundleSession;
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.model.ftask.FtaskPackage;
+import org.eclipse.egf.model.ftask.Task;
+import org.eclipse.egf.producer.context.ActivityProductionContextProducer;
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class TaskProductionContextProducer extends ActivityProductionContextProducer<Task> {
+
+ @Override
+ public EClass getActivity() {
+ return FtaskPackage.Literals.TASK;
+ }
+
+ @Override
+ protected ITaskProductionContext doCreateActivityProductionContext(ProjectBundleSession projectBundleSession, Activity activity) throws InvocationException {
+ return FtaskProducerContextFactory.createContext(projectBundleSession, (Task) activity);
+ }
+
+ @Override
+ protected ITaskProductionContext doCreateActivityProductionContext(IProductionContext<Invocation, InvocationContract> parent, ProjectBundleSession projectBundleSession, Activity activity) throws InvocationException {
+ return FtaskProducerContextFactory.createContext(parent, projectBundleSession, (Task) activity);
+ }
+
+}
diff --git a/org.eclipse.egf.ftask.producer/src/org/eclipse/egf/ftask/producer/internal/invocation/TaskProductionInvocation.java b/org.eclipse.egf.ftask.producer/src/org/eclipse/egf/ftask/producer/internal/invocation/TaskProductionInvocation.java
new file mode 100644
index 0000000..d94374a
--- /dev/null
+++ b/org.eclipse.egf.ftask.producer/src/org/eclipse/egf/ftask/producer/internal/invocation/TaskProductionInvocation.java
@@ -0,0 +1,56 @@
+/**
+ * Copyright (c) 2009 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
+ */
+package org.eclipse.egf.ftask.producer.internal.invocation;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+import org.eclipse.egf.ftask.producer.invocation.ITaskProductionInvocation;
+import org.eclipse.egf.model.ftask.Task;
+import org.eclipse.egf.model.ftask.task.TaskHook;
+import org.osgi.framework.Bundle;
+
+/**
+ * This class is responsible to process user defined {@link org.eclipse.egf.ftask.producer.invocation.ITaskProductionInvocation}.
+ *
+ * @author Xavier Maysonnave
+ */
+public class TaskProductionInvocation implements ITaskProductionInvocation {
+
+ /**
+ * Bundle
+ */
+ private Bundle bundle;
+
+ /**
+ * ITaskProductionContext
+ */
+ private ITaskProductionContext productionContext;
+
+ /**
+ * Task
+ */
+ private Task task;
+
+ public TaskProductionInvocation(Bundle bundle, ITaskProductionContext productionContext, Task task) {
+ Assert.isNotNull(bundle);
+ Assert.isNotNull(productionContext);
+ this.bundle = bundle;
+ this.productionContext = productionContext;
+ this.task = task;
+ }
+
+ public void invoke(final IProgressMonitor monitor) throws InvocationException {
+ TaskHook.HELPER.getHook(task).invoke(bundle, productionContext, task, monitor);
+ }
+
+}
diff --git a/org.eclipse.egf.ftask.producer/src/org/eclipse/egf/ftask/producer/internal/manager/TaskManager.java b/org.eclipse.egf.ftask.producer/src/org/eclipse/egf/ftask/producer/internal/manager/TaskManager.java
new file mode 100644
index 0000000..1ce1925
--- /dev/null
+++ b/org.eclipse.egf.ftask.producer/src/org/eclipse/egf/ftask/producer/internal/manager/TaskManager.java
@@ -0,0 +1,115 @@
+/**
+ * Copyright (c) 2009 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
+ */
+package org.eclipse.egf.ftask.producer.internal.manager;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.egf.common.helper.EMFHelper;
+import org.eclipse.egf.core.l10n.EGFCoreMessages;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.ftask.producer.EGFFtaskProducerPlugin;
+import org.eclipse.egf.ftask.producer.internal.context.TaskProductionContext;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.model.ftask.Task;
+import org.eclipse.egf.producer.EGFProducerPlugin;
+import org.eclipse.egf.producer.context.ActivityProductionContextProducer;
+import org.eclipse.egf.producer.internal.manager.ActivityManager;
+import org.eclipse.egf.producer.manager.IModelElementManager;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.UniqueEList;
+import org.eclipse.osgi.util.NLS;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class TaskManager extends ActivityManager<Task> {
+
+ public TaskManager(Task Task) throws InvocationException {
+ super(Task);
+ }
+
+ public TaskManager(Bundle bundle, Task Task) throws InvocationException {
+ super(bundle, Task);
+ }
+
+ public <T extends Invocation> TaskManager(IModelElementManager<T, InvocationContract> parent, Task task) throws InvocationException {
+ super(parent, task);
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public TaskProductionContext getInternalProductionContext() throws InvocationException {
+ if (_productionContext == null) {
+ ActivityProductionContextProducer producer = null;
+ try {
+ producer = EGFProducerPlugin.getActivityProductionContextProducer(getElement());
+ } catch (Throwable t) {
+ throw new InvocationException(t);
+ }
+ if (getParent() != null) {
+ _productionContext = producer.createActivityProductionContext(getParent().getProductionContext(), getProjectBundleSession(), getElement());
+ } else {
+ _productionContext = producer.createActivityProductionContext(getProjectBundleSession(), getElement());
+ }
+ }
+ return (TaskProductionContext) _productionContext;
+ }
+
+ @Override
+ public void dispose() throws InvocationException {
+ super.dispose();
+ }
+
+ @Override
+ protected BasicDiagnostic checkInputElement(boolean runtime) throws InvocationException {
+ BasicDiagnostic diagnostic = super.checkInputElement(runtime);
+ if (getElement().getImplementationValue() == null) {
+ diagnostic.add(new BasicDiagnostic(Diagnostic.ERROR, EGFProducerPlugin.getDefault().getPluginID(), 0, NLS.bind("Task Implementation is mandatory for ''{0}''", EMFHelper.getText(getElement())), //$NON-NLS-1$
+ new Object[] { getElement() }));
+ }
+ return diagnostic;
+ }
+
+ public int getSteps() throws InvocationException {
+ if (getElement().getImplementationValue() != null) {
+ return 1;
+ }
+ return 0;
+ }
+
+ public List<Activity> getActivities() throws InvocationException {
+ List<Activity> activities = new UniqueEList<Activity>();
+ activities.add(getElement());
+ return activities;
+ }
+
+ public Diagnostic invoke(IProgressMonitor monitor) throws InvocationException {
+ SubMonitor subMonitor = SubMonitor.convert(monitor, NLS.bind(EGFCoreMessages.Production_Invoke, getName()), 1);
+ BasicDiagnostic diagnostic = checkInputElement(true);
+ if (diagnostic.getSeverity() != Diagnostic.ERROR) {
+ EGFFtaskProducerPlugin.getTaskProductionInvocationFactory().createInvocation(getBundle(), getInternalProductionContext(), getElement()).invoke(subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE));
+ if (monitor.isCanceled()) {
+ throw new OperationCanceledException();
+ }
+ checkOutputElement(diagnostic);
+ }
+ return diagnostic;
+ }
+
+}
diff --git a/org.eclipse.egf.ftask.producer/src/org/eclipse/egf/ftask/producer/internal/manager/TaskManagerProducer.java b/org.eclipse.egf.ftask.producer/src/org/eclipse/egf/ftask/producer/internal/manager/TaskManagerProducer.java
new file mode 100644
index 0000000..382775dc
--- /dev/null
+++ b/org.eclipse.egf.ftask.producer/src/org/eclipse/egf/ftask/producer/internal/manager/TaskManagerProducer.java
@@ -0,0 +1,52 @@
+/**
+ * Copyright (c) 2009 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
+ */
+package org.eclipse.egf.ftask.producer.internal.manager;
+
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.ftask.producer.manager.TaskManagerFactory;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.model.ftask.FtaskPackage;
+import org.eclipse.egf.model.ftask.Task;
+import org.eclipse.egf.producer.manager.ActivityManagerProducer;
+import org.eclipse.egf.producer.manager.IActivityManager;
+import org.eclipse.egf.producer.manager.IModelElementManager;
+import org.eclipse.emf.ecore.EClass;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class TaskManagerProducer extends ActivityManagerProducer<Task> {
+
+ @Override
+ public EClass getActivity() {
+ return FtaskPackage.Literals.TASK;
+ }
+
+ @Override
+ protected IActivityManager<Task> doCreateActivityManager(Activity activity) throws InvocationException {
+ return TaskManagerFactory.createProductionManager((Task) activity);
+ }
+
+ @Override
+ protected IActivityManager<Task> doCreateActivityManager(Bundle bundle, Activity activity) throws InvocationException {
+ return TaskManagerFactory.createProductionManager(bundle, (Task) activity);
+ }
+
+ @Override
+ protected <T extends Invocation> IActivityManager<Task> doCreateActivityManager(IModelElementManager<T, InvocationContract> parent, Activity activity) throws InvocationException {
+ return TaskManagerFactory.createProductionManager(parent, (Task) activity);
+ }
+
+}
diff --git a/org.eclipse.egf.ftask.producer/src/org/eclipse/egf/ftask/producer/internal/task/TaskProductionInvocationFactory.java b/org.eclipse.egf.ftask.producer/src/org/eclipse/egf/ftask/producer/internal/task/TaskProductionInvocationFactory.java
new file mode 100644
index 0000000..826e7d1
--- /dev/null
+++ b/org.eclipse.egf.ftask.producer/src/org/eclipse/egf/ftask/producer/internal/task/TaskProductionInvocationFactory.java
@@ -0,0 +1,30 @@
+/**
+ * Copyright (c) 2009 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
+ */
+package org.eclipse.egf.ftask.producer.internal.task;
+
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+import org.eclipse.egf.ftask.producer.internal.invocation.TaskProductionInvocation;
+import org.eclipse.egf.ftask.producer.invocation.ITaskProductionInvocation;
+import org.eclipse.egf.ftask.producer.task.ITaskProductionInvocationFactory;
+import org.eclipse.egf.model.ftask.Task;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class TaskProductionInvocationFactory implements ITaskProductionInvocationFactory {
+
+ public ITaskProductionInvocation createInvocation(Bundle bundle, ITaskProductionContext context, Task taskJava) {
+ return new TaskProductionInvocation(bundle, context, taskJava);
+ }
+
+}
diff --git a/org.eclipse.egf.ftask.producer/src/org/eclipse/egf/ftask/producer/invocation/ITaskProductionInvocation.java b/org.eclipse.egf.ftask.producer/src/org/eclipse/egf/ftask/producer/invocation/ITaskProductionInvocation.java
new file mode 100644
index 0000000..d166d02
--- /dev/null
+++ b/org.eclipse.egf.ftask.producer/src/org/eclipse/egf/ftask/producer/invocation/ITaskProductionInvocation.java
@@ -0,0 +1,24 @@
+/**
+ * Copyright (c) 2009 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
+ */
+package org.eclipse.egf.ftask.producer.invocation;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.core.producer.InvocationException;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public interface ITaskProductionInvocation {
+
+ public void invoke(final IProgressMonitor monitor) throws InvocationException;
+
+}
diff --git a/org.eclipse.egf.ftask.producer/src/org/eclipse/egf/ftask/producer/manager/TaskManagerFactory.java b/org.eclipse.egf.ftask.producer/src/org/eclipse/egf/ftask/producer/manager/TaskManagerFactory.java
new file mode 100644
index 0000000..29cad7c
--- /dev/null
+++ b/org.eclipse.egf.ftask.producer/src/org/eclipse/egf/ftask/producer/manager/TaskManagerFactory.java
@@ -0,0 +1,44 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.ftask.producer.manager;
+
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.ftask.producer.internal.manager.TaskManager;
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.model.ftask.Task;
+import org.eclipse.egf.producer.manager.IActivityManager;
+import org.eclipse.egf.producer.manager.IModelElementManager;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class TaskManagerFactory {
+
+ private TaskManagerFactory() {
+ // Prevent Instantiation
+ }
+
+ public static IActivityManager<Task> createProductionManager(Task Task) throws InvocationException {
+ return new TaskManager(Task);
+ }
+
+ public static IActivityManager<Task> createProductionManager(Bundle bundle, Task Task) throws InvocationException {
+ return new TaskManager(bundle, Task);
+ }
+
+ public static <T extends Invocation> IActivityManager<Task> createProductionManager(IModelElementManager<T, InvocationContract> parent, Task Task) throws InvocationException {
+ return new TaskManager(parent, Task);
+ }
+
+}
diff --git a/org.eclipse.egf.ftask.producer/src/org/eclipse/egf/ftask/producer/task/ITaskProductionInvocationFactory.java b/org.eclipse.egf.ftask.producer/src/org/eclipse/egf/ftask/producer/task/ITaskProductionInvocationFactory.java
new file mode 100644
index 0000000..3aad8a7
--- /dev/null
+++ b/org.eclipse.egf.ftask.producer/src/org/eclipse/egf/ftask/producer/task/ITaskProductionInvocationFactory.java
@@ -0,0 +1,26 @@
+/**
+ * Copyright (c) 2009 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
+ */
+package org.eclipse.egf.ftask.producer.task;
+
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+import org.eclipse.egf.ftask.producer.invocation.ITaskProductionInvocation;
+import org.eclipse.egf.model.ftask.Task;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public interface ITaskProductionInvocationFactory {
+
+ public ITaskProductionInvocation createInvocation(Bundle bundle, ITaskProductionContext context, Task taskJava);
+
+}
diff --git a/org.eclipse.egf.model.edit/.classpath b/org.eclipse.egf.model.edit/.classpath
new file mode 100644
index 0000000..a9d0f9a
--- /dev/null
+++ b/org.eclipse.egf.model.edit/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="generated"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.egf.model.edit/.project b/org.eclipse.egf.model.edit/.project
new file mode 100644
index 0000000..ebfc72e
--- /dev/null
+++ b/org.eclipse.egf.model.edit/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.model.edit</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.model.edit/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egf.model.edit/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..456309c
--- /dev/null
+++ b/org.eclipse.egf.model.edit/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:51:38 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.egf.model.edit/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egf.model.edit/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..5597c9e
--- /dev/null
+++ b/org.eclipse.egf.model.edit/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Fri Jun 19 13:24:30 CEST 2009
+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/org.eclipse.egf.model.edit/META-INF/MANIFEST.MF b/org.eclipse.egf.model.edit/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..4a8d444
--- /dev/null
+++ b/org.eclipse.egf.model.edit/META-INF/MANIFEST.MF
@@ -0,0 +1,27 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.model.edit;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.egf.model.edit.EGFModelEditPlugin$Implementation
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package:
+ org.eclipse.egf.model.domain.provider,
+ org.eclipse.egf.model.edit,
+ org.eclipse.egf.model.fcore.commands,
+ org.eclipse.egf.model.fcore.provider,
+ org.eclipse.egf.model.fcore.helper,
+ org.eclipse.egf.model.mapping.provider,
+ org.eclipse.egf.model.pattern.provider,
+ org.eclipse.egf.model.types.provider
+Require-Bundle:
+ org.eclipse.core.runtime,
+ org.eclipse.emf.edit;visibility:=reexport,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.emf.ecore.edit;visibility:=reexport,
+ org.eclipse.egf.core;visibility:=reexport,
+ org.eclipse.egf.model;visibility:=reexport
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.egf.model.edit/about.html b/org.eclipse.egf.model.edit/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/org.eclipse.egf.model.edit/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/org.eclipse.egf.model.edit/build.properties b/org.eclipse.egf.model.edit/build.properties
new file mode 100644
index 0000000..ff2e511
--- /dev/null
+++ b/org.eclipse.egf.model.edit/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+source.. = generated/,\
+ src/
+output.. = bin/
+bin.includes = .,\
+ icons/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties
+src.includes = about.html
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/domain/provider/DomainEPackageItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/domain/provider/DomainEPackageItemProvider.java
new file mode 100644
index 0000000..47c9145
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/domain/provider/DomainEPackageItemProvider.java
@@ -0,0 +1,168 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.domain.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.domain.DomainEPackage;
+import org.eclipse.egf.model.domain.DomainPackage;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.UniqueEList;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.domain.DomainEPackage} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class DomainEPackageItemProvider extends DomainItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider,
+ IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public DomainEPackageItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addEPackagePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the EPackage feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected void addEPackagePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DomainEPackage_ePackage_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_DomainEPackage_ePackage_feature", "_UI_DomainEPackage_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ DomainPackage.Literals.DOMAIN_EPACKAGE__EPACKAGE, true, false, true, null, getString("_UI_DataPropertyCategory"), //$NON-NLS-1$
+ null) {
+ @Override
+ public Collection<EPackage> getChoiceOfValues(Object current) {
+ DomainEPackage domainEPackage = (DomainEPackage) current;
+ Collection<EPackage> result = new UniqueEList<EPackage>();
+ for (Object ePackage : EPackage.Registry.INSTANCE.values()) {
+ result.add((EPackage) ePackage);
+ }
+ result.add(null);
+ result.add(domainEPackage.getEPackage());
+ return result;
+ }
+ });
+ }
+
+ /**
+ * This returns DomainEPackage.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/DomainEPackage")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ DomainEPackage domainEPackage = (DomainEPackage) object;
+ String nsuri = null;
+ if (domainEPackage.getEPackage() != null) {
+ nsuri = "[" + domainEPackage.getEPackage().getNsURI() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ String label = "[" + getString("_UI_DomainEPackage_type") + "]";//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ if (nsuri != null) {
+ label = nsuri + " " + label; //$NON-NLS-1$
+ }
+ return label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(DomainEPackage.class)) {
+ case DomainPackage.DOMAIN_EPACKAGE__EPACKAGE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/domain/provider/DomainItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/domain/provider/DomainItemProvider.java
new file mode 100644
index 0000000..299db53
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/domain/provider/DomainItemProvider.java
@@ -0,0 +1,124 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.domain.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.domain.Domain;
+import org.eclipse.egf.model.edit.EGFModelEditPlugin;
+import org.eclipse.egf.model.fcore.provider.ModelElementItemProvider;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.domain.Domain} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class DomainItemProvider extends ModelElementItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public DomainItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((Domain) object).getID();
+ return label == null || label.length() == 0 ? "[" + getString("_UI_Domain_type") + "]" : //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ label + " [" + getString("_UI_Domain_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EGFModelEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/domain/provider/DomainItemProviderAdapterFactory.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/domain/provider/DomainItemProviderAdapterFactory.java
new file mode 100644
index 0000000..227c06a
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/domain/provider/DomainItemProviderAdapterFactory.java
@@ -0,0 +1,478 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.domain.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.common.helper.ClassHelper;
+import org.eclipse.egf.model.domain.DomainFactory;
+import org.eclipse.egf.model.domain.TypeDomainEPackage;
+import org.eclipse.egf.model.domain.TypeDomainURI;
+import org.eclipse.egf.model.domain.util.DomainAdapterFactory;
+import org.eclipse.egf.model.edit.EGFModelEditPlugin;
+import org.eclipse.egf.model.fcore.Contract;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.model.fcore.OrchestrationParameter;
+import org.eclipse.egf.model.fcore.ViewpointContainer;
+import org.eclipse.egf.model.fcore.util.FcoreSwitch;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.CommandParameter;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IChildCreationExtender;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class DomainItemProviderAdapterFactory extends DomainAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
+ /**
+ * This keeps track of the root adapter factory that delegates to this adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ComposedAdapterFactory parentAdapterFactory;
+
+ /**
+ * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+ /**
+ * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+ /**
+ * This constructs an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DomainItemProviderAdapterFactory() {
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ supportedTypes.add(IItemPropertySource.class);
+ supportedTypes.add(ITableItemLabelProvider.class);
+ supportedTypes.add(ITableItemColorProvider.class);
+ supportedTypes.add(ITableItemFontProvider.class);
+ supportedTypes.add(IItemColorProvider.class);
+ supportedTypes.add(IItemFontProvider.class);
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.domain.DomainViewpoint} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected DomainViewpointItemProvider domainViewpointItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.domain.DomainViewpoint}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createDomainViewpointAdapter() {
+ if (domainViewpointItemProvider == null) {
+ domainViewpointItemProvider = new DomainViewpointItemProvider(this);
+ }
+
+ return domainViewpointItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.domain.DomainEPackage} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected DomainEPackageItemProvider domainEPackageItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.domain.DomainEPackage}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createDomainEPackageAdapter() {
+ if (domainEPackageItemProvider == null) {
+ domainEPackageItemProvider = new DomainEPackageItemProvider(this);
+ }
+
+ return domainEPackageItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.domain.TypeDomainEPackage} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeDomainEPackageItemProvider typeDomainEPackageItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.domain.TypeDomainEPackage}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createTypeDomainEPackageAdapter() {
+ if (typeDomainEPackageItemProvider == null) {
+ typeDomainEPackageItemProvider = new TypeDomainEPackageItemProvider(this);
+ }
+
+ return typeDomainEPackageItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.domain.DomainURI} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected DomainURIItemProvider domainURIItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.domain.DomainURI}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createDomainURIAdapter() {
+ if (domainURIItemProvider == null) {
+ domainURIItemProvider = new DomainURIItemProvider(this);
+ }
+
+ return domainURIItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.domain.TypeDomainURI} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeDomainURIItemProvider typeDomainURIItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.domain.TypeDomainURI}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createTypeDomainURIAdapter() {
+ if (typeDomainURIItemProvider == null) {
+ typeDomainURIItemProvider = new TypeDomainURIItemProvider(this);
+ }
+
+ return typeDomainURIItemProvider;
+ }
+
+ /**
+ * This returns the root adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ComposeableAdapterFactory getRootAdapterFactory() {
+ return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+ }
+
+ /**
+ * This sets the composed adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
+ this.parentAdapterFactory = parentAdapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return supportedTypes.contains(type) || super.isFactoryForType(type);
+ }
+
+ /**
+ * This implementation substitutes the factory itself as the key for the adapter.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter adapt(Notifier notifier, Object type) {
+ return super.adapt(notifier, this);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object adapt(Object object, Object type) {
+ if (isFactoryForType(type)) {
+ Object adapter = super.adapt(object, type);
+ if (!(type instanceof Class<?>) || (((Class<?>) type).isInstance(adapter))) {
+ return adapter;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * This adds a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void addListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void fireNotifyChanged(Notification notification) {
+ changeNotifier.fireNotifyChanged(notification);
+
+ if (parentAdapterFactory != null) {
+ parentAdapterFactory.fireNotifyChanged(notification);
+ }
+ }
+
+ /**
+ * This disposes all of the item providers created by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void dispose() {
+ if (domainViewpointItemProvider != null)
+ domainViewpointItemProvider.dispose();
+ if (domainEPackageItemProvider != null)
+ domainEPackageItemProvider.dispose();
+ if (typeDomainEPackageItemProvider != null)
+ typeDomainEPackageItemProvider.dispose();
+ if (domainURIItemProvider != null)
+ domainURIItemProvider.dispose();
+ if (typeDomainURIItemProvider != null)
+ typeDomainURIItemProvider.dispose();
+ }
+
+ /**
+ * A child creation extender for the {@link FcorePackage}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class FcoreChildCreationExtender implements IChildCreationExtender {
+ /**
+ * The switch for creating child descriptors specific to each extended class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static class CreationSwitch extends FcoreSwitch<Object> {
+ /**
+ * The child descriptors being populated.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected List<Object> newChildDescriptors;
+
+ /**
+ * The domain in which to create the children.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EditingDomain editingDomain;
+
+ /**
+ * Creates the a switch for populating child descriptors in the given domain.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ CreationSwitch(List<Object> newChildDescriptors, EditingDomain editingDomain) {
+ this.newChildDescriptors = newChildDescriptors;
+ this.editingDomain = editingDomain;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object caseContract(Contract object) {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.CONTRACT__TYPE, DomainFactory.eINSTANCE.createTypeDomainEPackage()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.CONTRACT__TYPE, DomainFactory.eINSTANCE.createTypeDomainURI()));
+
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object caseViewpointContainer(ViewpointContainer object) {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.VIEWPOINT_CONTAINER__VIEWPOINTS, DomainFactory.eINSTANCE.createDomainViewpoint()));
+
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object caseOrchestrationParameter(OrchestrationParameter object) {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.ORCHESTRATION_PARAMETER__TYPE, DomainFactory.eINSTANCE.createTypeDomainEPackage()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.ORCHESTRATION_PARAMETER__TYPE, DomainFactory.eINSTANCE.createTypeDomainURI()));
+
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public Object caseInvocationContract(InvocationContract object) {
+
+ if (object.getInvokedContract() == null || object.getInvokedContract().getType() == null) {
+ return null;
+ }
+
+ {
+ TypeDomainEPackage type = DomainFactory.eINSTANCE.createTypeDomainEPackage();
+ if (ClassHelper.asSubClass(type.getType(), object.getInvokedContract().getType().getType())) {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.INVOCATION_CONTRACT__TYPE, type));
+ }
+ }
+
+ {
+ TypeDomainURI type = DomainFactory.eINSTANCE.createTypeDomainURI();
+ if (ClassHelper.asSubClass(type.getType(), object.getInvokedContract().getType().getType())) {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.INVOCATION_CONTRACT__TYPE, type));
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CommandParameter createChildParameter(Object feature, Object child) {
+ return new CommandParameter(null, feature, child);
+ }
+
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Collection<Object> getNewChildDescriptors(Object object, EditingDomain editingDomain) {
+ ArrayList<Object> result = new ArrayList<Object>();
+ new CreationSwitch(result, editingDomain).doSwitch((EObject) object);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceLocator getResourceLocator() {
+ return EGFModelEditPlugin.INSTANCE;
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/domain/provider/DomainURIItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/domain/provider/DomainURIItemProvider.java
new file mode 100644
index 0000000..3e97bfe
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/domain/provider/DomainURIItemProvider.java
@@ -0,0 +1,153 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.domain.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.domain.DomainPackage;
+import org.eclipse.egf.model.domain.DomainURI;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.domain.DomainURI} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class DomainURIItemProvider extends DomainItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public DomainURIItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addUriPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Uri feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addUriPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DomainURI_uri_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_DomainURI_uri_feature", "_UI_DomainURI_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ DomainPackage.Literals.DOMAIN_URI__URI, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_DataPropertyCategory"), //$NON-NLS-1$
+ null));
+ }
+
+ /**
+ * This returns DomainURI.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/DomainURI")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ DomainURI domainURI = (DomainURI) object;
+ String nsuri = null;
+ if (domainURI.getUri() != null) {
+ nsuri = "[" + domainURI.getUri() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ String label = "[" + getString("_UI_DomainURI_type") + "]";//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ if (nsuri != null) {
+ label = nsuri + " " + label; //$NON-NLS-1$
+ }
+ return label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(DomainURI.class)) {
+ case DomainPackage.DOMAIN_URI__URI:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/domain/provider/DomainViewpointItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/domain/provider/DomainViewpointItemProvider.java
new file mode 100644
index 0000000..9e6971f
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/domain/provider/DomainViewpointItemProvider.java
@@ -0,0 +1,171 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.domain.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.domain.DomainFactory;
+import org.eclipse.egf.model.domain.DomainPackage;
+import org.eclipse.egf.model.domain.DomainViewpoint;
+import org.eclipse.egf.model.edit.EGFModelEditPlugin;
+import org.eclipse.egf.model.fcore.provider.ViewpointItemProvider;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.domain.DomainViewpoint} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class DomainViewpointItemProvider extends ViewpointItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DomainViewpointItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(DomainPackage.Literals.DOMAIN_VIEWPOINT__DOMAINS);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns DomainViewpoint.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/DomainViewpoint")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_DomainViewpoint_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(DomainViewpoint.class)) {
+ case DomainPackage.DOMAIN_VIEWPOINT__DOMAINS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add(createChildParameter(DomainPackage.Literals.DOMAIN_VIEWPOINT__DOMAINS, DomainFactory.eINSTANCE.createDomainEPackage()));
+
+ newChildDescriptors.add(createChildParameter(DomainPackage.Literals.DOMAIN_VIEWPOINT__DOMAINS, DomainFactory.eINSTANCE.createDomainURI()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EGFModelEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/domain/provider/TypeDomainEPackageItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/domain/provider/TypeDomainEPackageItemProvider.java
new file mode 100644
index 0000000..e3cef15
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/domain/provider/TypeDomainEPackageItemProvider.java
@@ -0,0 +1,174 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.domain.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.domain.DomainPackage;
+import org.eclipse.egf.model.domain.TypeDomainEPackage;
+import org.eclipse.egf.model.edit.EGFModelEditPlugin;
+import org.eclipse.egf.model.types.provider.TypeObjectItemProvider;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.domain.TypeDomainEPackage} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TypeDomainEPackageItemProvider extends TypeObjectItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TypeDomainEPackageItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addDomainPropertyDescriptor(object);
+ addValuePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Domain feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDomainPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TypeDomainEPackage_domain_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_TypeDomainEPackage_domain_feature", "_UI_TypeDomainEPackage_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ DomainPackage.Literals.TYPE_DOMAIN_EPACKAGE__DOMAIN, true, false, true, null, getString("_UI_DomainPropertyCategory"), //$NON-NLS-1$
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Value feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addValuePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TypeDomainEPackage_value_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_TypeDomainEPackage_value_feature", "_UI_TypeDomainEPackage_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ DomainPackage.Literals.TYPE_DOMAIN_EPACKAGE__VALUE, false, false, false, null, getString("_UI_DataPropertyCategory"), //$NON-NLS-1$
+ null));
+ }
+
+ /**
+ * This returns TypeDomainEPackage.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/TypeDomainEPackage")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ TypeDomainEPackage typeDomainEPackage = (TypeDomainEPackage) object;
+ String nsuri = null;
+ if (typeDomainEPackage.getValue() != null) {
+ nsuri = "[" + typeDomainEPackage.getValue().getNsURI() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ String label = "[" + getString("_UI_TypeDomainEPackage_type") + "]";//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ if (nsuri != null) {
+ label = nsuri + " " + label; //$NON-NLS-1$
+ }
+ return label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(TypeDomainEPackage.class)) {
+ case DomainPackage.TYPE_DOMAIN_EPACKAGE__DOMAIN:
+ case DomainPackage.TYPE_DOMAIN_EPACKAGE__VALUE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EGFModelEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/domain/provider/TypeDomainURIItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/domain/provider/TypeDomainURIItemProvider.java
new file mode 100644
index 0000000..3c0d12c
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/domain/provider/TypeDomainURIItemProvider.java
@@ -0,0 +1,196 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.domain.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.domain.DomainPackage;
+import org.eclipse.egf.model.domain.DomainURI;
+import org.eclipse.egf.model.domain.TypeDomainURI;
+import org.eclipse.egf.model.edit.EGFModelEditPlugin;
+import org.eclipse.egf.model.fcore.helper.TypeDomainURIHelper;
+import org.eclipse.egf.model.types.provider.TypeObjectItemProvider;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.domain.TypeDomainURI} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class TypeDomainURIItemProvider extends TypeObjectItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider,
+ IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypeDomainURIItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addDomainPropertyDescriptor(object);
+ addValuePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Domain feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected void addDomainPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TypeDomainURI_domain_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_TypeDomainURI_domain_feature", "_UI_TypeDomainURI_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ DomainPackage.Literals.TYPE_DOMAIN_URI__DOMAIN, true, false, true, null, getString("_UI_DomainPropertyCategory"), //$NON-NLS-1$
+ null) {
+ @Override
+ public Collection<?> getChoiceOfValues(Object current) {
+ TypeDomainURI domain = (TypeDomainURI) current;
+ Collection<DomainURI> available = TypeDomainURIHelper.getAvailableDomainURI(domain);
+ available.add(null);
+ available.add(domain.getDomain());
+ return available;
+ }
+ });
+ }
+
+ /**
+ * This adds a property descriptor for the Value feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addValuePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TypeDomainURI_value_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_TypeDomainURI_value_feature", "_UI_TypeDomainURI_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ DomainPackage.Literals.TYPE_DOMAIN_URI__VALUE, false, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_DataPropertyCategory"), //$NON-NLS-1$
+ null));
+ }
+
+ /**
+ * This returns TypeDomainURI.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/TypeDomainURI")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ TypeDomainURI typeDomainEPackage = (TypeDomainURI) object;
+ String nsuri = null;
+ if (typeDomainEPackage.getValue() != null) {
+ nsuri = "[" + typeDomainEPackage.getValue() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ String label = "[" + getString("_UI_TypeDomainURI_type") + "]";//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ if (nsuri != null) {
+ label = nsuri + " " + label; //$NON-NLS-1$
+ }
+ return label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(TypeDomainURI.class)) {
+ case DomainPackage.TYPE_DOMAIN_URI__DOMAIN:
+ case DomainPackage.TYPE_DOMAIN_URI__VALUE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EGFModelEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/edit/EGFModelEditPlugin.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/edit/EGFModelEditPlugin.java
new file mode 100644
index 0000000..0b22846
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/edit/EGFModelEditPlugin.java
@@ -0,0 +1,104 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.edit;
+
+import org.eclipse.egf.common.activator.EGFEclipsePlugin;
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.provider.EcoreEditPlugin;
+
+/**
+ * This is the central singleton for the Pattern edit plugin.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ * @generated
+ */
+public final class EGFModelEditPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final EGFModelEditPlugin INSTANCE = new EGFModelEditPlugin();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EGFModelEditPlugin() {
+ // TODO: EMF try to generate a delegated resource locator to the current plugin
+ // however that one should be ignore eg: EGFModelsEditPlugin.INSTANCE is null
+ // super(new ResourceLocator[] { EcoreEditPlugin.INSTANCE, EGFModelsEditPlugin.INSTANCE, });
+ super(new ResourceLocator[] { EcoreEditPlugin.INSTANCE, });
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends EGFEclipsePlugin {
+
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/ActivityItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/ActivityItemProvider.java
new file mode 100644
index 0000000..0562638
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/ActivityItemProvider.java
@@ -0,0 +1,171 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.FcoreFactory;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.commands.ActivitySetCommand;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.command.CommandParameter;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.fcore.Activity} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ActivityItemProvider extends NamedModelElementItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider,
+ IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ActivityItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(FcorePackage.Literals.ACTIVITY__CONTRACT_CONTAINER);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((Activity) object).getName();
+ return label == null || label.length() == 0 ? "[" + getString("_UI_Activity_type") + "]" : //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ label + " [" + getString("_UI_Activity_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Activity.class)) {
+ case FcorePackage.ACTIVITY__CONTRACT_CONTAINER:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.ACTIVITY__CONTRACT_CONTAINER, FcoreFactory.eINSTANCE.createContractContainer()));
+ }
+
+ /**
+ * This returned a primitive {@link org.eclipse.emf.edit.command.SetCommand}, but it has been replaced, since this
+ * command can now take an index. The replacement method still calls this method when invoked with {@link CommandParameter#NO_INDEX no index}, to provide backwards compatibility.
+ *
+ * <p>This method will soon be deprecated. New code should use or override the {@link #createSetCommand(EditingDomain, EObject, EStructuralFeature, Object, int) new form}, instead.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ protected Command createSetCommand(EditingDomain domain, EObject owner, EStructuralFeature feature, Object value) {
+ return new ActivitySetCommand(domain, owner, feature, value);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/ContractContainerItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/ContractContainerItemProvider.java
new file mode 100644
index 0000000..711f72c
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/ContractContainerItemProvider.java
@@ -0,0 +1,200 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.fcore.ContractContainer;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.FcoreFactory;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.commands.ContractContainerAddCommand;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.edit.command.CopyCommand;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.fcore.ContractContainer} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ContractContainerItemProvider extends ModelElementItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider,
+ IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ContractContainerItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(FcorePackage.Literals.CONTRACT_CONTAINER__CONTRACTS);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns ContractContainer.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ContractContainer")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_ContractContainer_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(ContractContainer.class)) {
+ case FcorePackage.CONTRACT_CONTAINER__CONTRACTS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ ContractContainer contractContainer = (ContractContainer) object;
+ if (contractContainer.getActivity() == null || contractContainer.getActivity() instanceof FactoryComponent == false) {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.CONTRACT_CONTAINER__CONTRACTS, FcoreFactory.eINSTANCE.createContract()));
+ } else {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.CONTRACT_CONTAINER__CONTRACTS, FcoreFactory.eINSTANCE.createFactoryComponentContract()));
+ }
+ }
+
+ /**
+ * This creates a primitive {@link org.eclipse.emf.edit.command.AddCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ protected Command createAddCommand(EditingDomain domain, EObject owner, EStructuralFeature feature, Collection<?> collection, int index) {
+ if (owner.eResource() == null || collection.isEmpty()) {
+ return new ContractContainerAddCommand(domain, owner, feature, collection, index);
+ }
+ // Collection analysis
+ for (Object value : collection) {
+ if (value instanceof EObject == false || ((EObject) value).eResource() == null) {
+ return new ContractContainerAddCommand(domain, owner, feature, collection, index);
+ }
+ EObject eObjectValue = (EObject) value;
+ // if we are in the same resource and in the same hierarchy
+ if (owner.eResource() == eObjectValue.eResource() && EcoreUtil.getRootContainer(owner) == EcoreUtil.getRootContainer(eObjectValue)) {
+ return new ContractContainerAddCommand(domain, owner, feature, collection, index);
+ }
+ }
+ // Copy rather than add
+ return new ContractContainerAddCommand(domain, owner, feature, CopyCommand.create(domain, collection).getResult(), index);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/ContractItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/ContractItemProvider.java
new file mode 100644
index 0000000..49ae9ba
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/ContractItemProvider.java
@@ -0,0 +1,256 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.fcore.Contract;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.types.TypesFactory;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedImage;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.fcore.Contract} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ContractItemProvider extends NamedModelElementItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider,
+ IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ContractItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addMandatoryPropertyDescriptor(object);
+ addModePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Mandatory feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addMandatoryPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Contract_mandatory_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Contract_mandatory_feature", "_UI_Contract_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ FcorePackage.Literals.CONTRACT__MANDATORY, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, getString("_UI_BehaviourPropertyCategory"), //$NON-NLS-1$
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Mode feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addModePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Contract_mode_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Contract_mode_feature", "_UI_Contract_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ FcorePackage.Literals.CONTRACT__MODE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_BehaviourPropertyCategory"), //$NON-NLS-1$
+ null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(FcorePackage.Literals.CONTRACT__TYPE);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns Contract.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public Object getImage(Object object) {
+ Contract contract = (Contract) object;
+ List<Object> images = new ArrayList<Object>(2);
+ images.add(getResourceLocator().getImage("full/obj16/Contract")); //$NON-NLS-1$
+ if (contract.isMandatory()) {
+ images.add(getResourceLocator().getImage("full/ovr/Mandatory")); //$NON-NLS-1$
+ }
+ return new ComposedImage(images);
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ Contract contract = (Contract) object;
+ String label = contract.getName();
+ String mode = null;
+ if (contract.getMode() != null) {
+ mode = "[" + contract.getMode().getLiteral() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ if (label == null || label.length() == 0) {
+ label = "[" + getString("_UI_Contract_type") + "]";//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ if (mode != null) {
+ label = mode + " " + label; //$NON-NLS-1$
+ }
+ } else {
+ if (mode != null) {
+ label = label + " " + mode + " [" + getString("_UI_Contract_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ } else {
+ label = label + " [" + getString("_UI_Contract_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+ }
+ return label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Contract.class)) {
+ case FcorePackage.CONTRACT__MANDATORY:
+ case FcorePackage.CONTRACT__MODE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case FcorePackage.CONTRACT__TYPE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.CONTRACT__TYPE, TypesFactory.eINSTANCE.createTypeCollection()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.CONTRACT__TYPE, TypesFactory.eINSTANCE.createTypeList()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.CONTRACT__TYPE, TypesFactory.eINSTANCE.createTypeSet()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.CONTRACT__TYPE, TypesFactory.eINSTANCE.createTypeGeneratorAdapterFactory()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.CONTRACT__TYPE, TypesFactory.eINSTANCE.createTypeMap()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.CONTRACT__TYPE, TypesFactory.eINSTANCE.createTypeBigDecimal()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.CONTRACT__TYPE, TypesFactory.eINSTANCE.createTypeBigInteger()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.CONTRACT__TYPE, TypesFactory.eINSTANCE.createTypeBoolean()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.CONTRACT__TYPE, TypesFactory.eINSTANCE.createTypeByte()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.CONTRACT__TYPE, TypesFactory.eINSTANCE.createTypeCharacter()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.CONTRACT__TYPE, TypesFactory.eINSTANCE.createTypeDate()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.CONTRACT__TYPE, TypesFactory.eINSTANCE.createTypeDouble()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.CONTRACT__TYPE, TypesFactory.eINSTANCE.createTypeFloat()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.CONTRACT__TYPE, TypesFactory.eINSTANCE.createTypeInteger()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.CONTRACT__TYPE, TypesFactory.eINSTANCE.createTypeLong()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.CONTRACT__TYPE, TypesFactory.eINSTANCE.createTypeShort()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.CONTRACT__TYPE, TypesFactory.eINSTANCE.createTypeString()));
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/FactoryComponentContractItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/FactoryComponentContractItemProvider.java
new file mode 100644
index 0000000..2d32de8
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/FactoryComponentContractItemProvider.java
@@ -0,0 +1,176 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.fcore.FactoryComponentContract;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.helper.FactoryComponentContractHelper;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedImage;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.fcore.FactoryComponentContract} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class FactoryComponentContractItemProvider extends ContractItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider,
+ IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public FactoryComponentContractItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addInvocationContractsPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Invocation Contracts feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected void addInvocationContractsPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_FactoryComponentContract_invocationContracts_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_FactoryComponentContract_invocationContracts_feature", "_UI_FactoryComponentContract_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ FcorePackage.Literals.FACTORY_COMPONENT_CONTRACT__INVOCATION_CONTRACTS, true, false, true, null, getString("_UI_InvocationContractsPropertyCategory"), null) { //$NON-NLS-1$
+ @Override
+ public Collection<?> getChoiceOfValues(Object current) {
+ return FactoryComponentContractHelper.getAvailableInvocationContracts((FactoryComponentContract) current);
+ }
+ });
+ }
+
+ /**
+ * This returns FactoryComponentContract.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public Object getImage(Object object) {
+ FactoryComponentContract contract = (FactoryComponentContract) object;
+ List<Object> images = new ArrayList<Object>(2);
+ images.add(getResourceLocator().getImage("full/obj16/FactoryComponentContract")); //$NON-NLS-1$
+ if (contract.isMandatory()) {
+ images.add(getResourceLocator().getImage("full/ovr/Mandatory")); //$NON-NLS-1$
+ }
+ return new ComposedImage(images);
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ FactoryComponentContract contract = (FactoryComponentContract) object;
+ String label = contract.getName();
+ String mode = null;
+ if (contract.getMode() != null) {
+ mode = "[" + contract.getMode().getLiteral() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ if (label == null || label.length() == 0) {
+ label = "[" + getString("_UI_FactoryComponentContract_type") + "]";//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ if (mode != null) {
+ label = mode + " " + label; //$NON-NLS-1$
+ }
+ } else {
+ if (mode != null) {
+ label = label + " " + mode + " [" + getString("_UI_FactoryComponentContract_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ } else {
+ label = label + " [" + getString("_UI_FactoryComponentContract_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+ }
+ return label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(FactoryComponentContract.class)) {
+ case FcorePackage.FACTORY_COMPONENT_CONTRACT__INVOCATION_CONTRACTS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/FactoryComponentItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/FactoryComponentItemProvider.java
new file mode 100644
index 0000000..60e6dc2
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/FactoryComponentItemProvider.java
@@ -0,0 +1,166 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.FcoreFactory;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.fcore.FactoryComponent} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class FactoryComponentItemProvider extends ActivityItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider,
+ IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public FactoryComponentItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(FcorePackage.Literals.FACTORY_COMPONENT__VIEWPOINT_CONTAINER);
+ childrenFeatures.add(FcorePackage.Literals.FACTORY_COMPONENT__ORCHESTRATION);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns FactoryComponent.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/FactoryComponent")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((FactoryComponent) object).getName();
+ return label == null || label.length() == 0 ? "[" + getString("_UI_FactoryComponent_type") + "]" : //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ label + " [" + getString("_UI_FactoryComponent_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(FactoryComponent.class)) {
+ case FcorePackage.FACTORY_COMPONENT__VIEWPOINT_CONTAINER:
+ case FcorePackage.FACTORY_COMPONENT__ORCHESTRATION:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.FACTORY_COMPONENT__VIEWPOINT_CONTAINER, FcoreFactory.eINSTANCE.createViewpointContainer()));
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/FcoreItemProviderAdapterFactory.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/FcoreItemProviderAdapterFactory.java
new file mode 100644
index 0000000..61154a3
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/FcoreItemProviderAdapterFactory.java
@@ -0,0 +1,466 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.edit.EGFModelEditPlugin;
+
+import org.eclipse.egf.model.fcore.FcorePackage;
+
+import org.eclipse.egf.model.fcore.util.FcoreAdapterFactory;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.domain.EditingDomain;
+
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ChildCreationExtenderManager;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IChildCreationExtender;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class FcoreItemProviderAdapterFactory extends FcoreAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable, IChildCreationExtender {
+ /**
+ * This keeps track of the root adapter factory that delegates to this adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ComposedAdapterFactory parentAdapterFactory;
+
+ /**
+ * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+ /**
+ * This helps manage the child creation extenders.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ChildCreationExtenderManager childCreationExtenderManager = new ChildCreationExtenderManager(EGFModelEditPlugin.INSTANCE, FcorePackage.eNS_URI);
+
+ /**
+ * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+ /**
+ * This constructs an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FcoreItemProviderAdapterFactory() {
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ supportedTypes.add(IItemPropertySource.class);
+ supportedTypes.add(ITableItemLabelProvider.class);
+ supportedTypes.add(ITableItemColorProvider.class);
+ supportedTypes.add(ITableItemFontProvider.class);
+ supportedTypes.add(IItemColorProvider.class);
+ supportedTypes.add(IItemFontProvider.class);
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.fcore.Contract} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ContractItemProvider contractItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.fcore.Contract}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createContractAdapter() {
+ if (contractItemProvider == null) {
+ contractItemProvider = new ContractItemProvider(this);
+ }
+
+ return contractItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.fcore.FactoryComponent} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected FactoryComponentItemProvider factoryComponentItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.fcore.FactoryComponent}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createFactoryComponentAdapter() {
+ if (factoryComponentItemProvider == null) {
+ factoryComponentItemProvider = new FactoryComponentItemProvider(this);
+ }
+
+ return factoryComponentItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.fcore.ContractContainer} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ContractContainerItemProvider contractContainerItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.fcore.ContractContainer}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createContractContainerAdapter() {
+ if (contractContainerItemProvider == null) {
+ contractContainerItemProvider = new ContractContainerItemProvider(this);
+ }
+
+ return contractContainerItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.fcore.FactoryComponentContract} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected FactoryComponentContractItemProvider factoryComponentContractItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.fcore.FactoryComponentContract}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createFactoryComponentContractAdapter() {
+ if (factoryComponentContractItemProvider == null) {
+ factoryComponentContractItemProvider = new FactoryComponentContractItemProvider(this);
+ }
+
+ return factoryComponentContractItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.fcore.ViewpointContainer} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ViewpointContainerItemProvider viewpointContainerItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.fcore.ViewpointContainer}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createViewpointContainerAdapter() {
+ if (viewpointContainerItemProvider == null) {
+ viewpointContainerItemProvider = new ViewpointContainerItemProvider(this);
+ }
+
+ return viewpointContainerItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.fcore.OrchestrationParameterContainer} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected OrchestrationParameterContainerItemProvider orchestrationParameterContainerItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.fcore.OrchestrationParameterContainer}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createOrchestrationParameterContainerAdapter() {
+ if (orchestrationParameterContainerItemProvider == null) {
+ orchestrationParameterContainerItemProvider = new OrchestrationParameterContainerItemProvider(this);
+ }
+
+ return orchestrationParameterContainerItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.fcore.OrchestrationParameter} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected OrchestrationParameterItemProvider orchestrationParameterItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.fcore.OrchestrationParameter}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createOrchestrationParameterAdapter() {
+ if (orchestrationParameterItemProvider == null) {
+ orchestrationParameterItemProvider = new OrchestrationParameterItemProvider(this);
+ }
+
+ return orchestrationParameterItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.fcore.InvocationContractContainer} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected InvocationContractContainerItemProvider invocationContractContainerItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.fcore.InvocationContractContainer}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createInvocationContractContainerAdapter() {
+ if (invocationContractContainerItemProvider == null) {
+ invocationContractContainerItemProvider = new InvocationContractContainerItemProvider(this);
+ }
+
+ return invocationContractContainerItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.fcore.InvocationContract} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected InvocationContractItemProvider invocationContractItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.fcore.InvocationContract}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createInvocationContractAdapter() {
+ if (invocationContractItemProvider == null) {
+ invocationContractItemProvider = new InvocationContractItemProvider(this);
+ }
+
+ return invocationContractItemProvider;
+ }
+
+ /**
+ * This returns the root adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ComposeableAdapterFactory getRootAdapterFactory() {
+ return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+ }
+
+ /**
+ * This sets the composed adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
+ this.parentAdapterFactory = parentAdapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return supportedTypes.contains(type) || super.isFactoryForType(type);
+ }
+
+ /**
+ * This implementation substitutes the factory itself as the key for the adapter.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter adapt(Notifier notifier, Object type) {
+ return super.adapt(notifier, this);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object adapt(Object object, Object type) {
+ if (isFactoryForType(type)) {
+ Object adapter = super.adapt(object, type);
+ if (!(type instanceof Class<?>) || (((Class<?>) type).isInstance(adapter))) {
+ return adapter;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List<IChildCreationExtender> getChildCreationExtenders() {
+ return childCreationExtenderManager.getChildCreationExtenders();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Collection<?> getNewChildDescriptors(Object object, EditingDomain editingDomain) {
+ return childCreationExtenderManager.getNewChildDescriptors(object, editingDomain);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceLocator getResourceLocator() {
+ return childCreationExtenderManager;
+ }
+
+ /**
+ * This adds a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void addListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void fireNotifyChanged(Notification notification) {
+ changeNotifier.fireNotifyChanged(notification);
+
+ if (parentAdapterFactory != null) {
+ parentAdapterFactory.fireNotifyChanged(notification);
+ }
+ }
+
+ /**
+ * This disposes all of the item providers created by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void dispose() {
+ if (contractItemProvider != null)
+ contractItemProvider.dispose();
+ if (factoryComponentItemProvider != null)
+ factoryComponentItemProvider.dispose();
+ if (contractContainerItemProvider != null)
+ contractContainerItemProvider.dispose();
+ if (factoryComponentContractItemProvider != null)
+ factoryComponentContractItemProvider.dispose();
+ if (viewpointContainerItemProvider != null)
+ viewpointContainerItemProvider.dispose();
+ if (orchestrationParameterContainerItemProvider != null)
+ orchestrationParameterContainerItemProvider.dispose();
+ if (orchestrationParameterItemProvider != null)
+ orchestrationParameterItemProvider.dispose();
+ if (invocationContractContainerItemProvider != null)
+ invocationContractContainerItemProvider.dispose();
+ if (invocationContractItemProvider != null)
+ invocationContractItemProvider.dispose();
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/InvocationContractContainerItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/InvocationContractContainerItemProvider.java
new file mode 100644
index 0000000..f06b5c8
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/InvocationContractContainerItemProvider.java
@@ -0,0 +1,185 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.fcore.FcoreFactory;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.InvocationContractContainer;
+import org.eclipse.egf.model.fcore.commands.RemoveInvocationContractContainerInvocationContracts;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.fcore.InvocationContractContainer} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class InvocationContractContainerItemProvider extends ModelElementItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider,
+ IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public InvocationContractContainerItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(FcorePackage.Literals.INVOCATION_CONTRACT_CONTAINER__INVOCATION_CONTRACTS);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns InvocationContractContainer.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/InvocationContractContainer")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_InvocationContractContainer_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(InvocationContractContainer.class)) {
+ case FcorePackage.INVOCATION_CONTRACT_CONTAINER__INVOCATION_CONTRACTS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.INVOCATION_CONTRACT_CONTAINER__INVOCATION_CONTRACTS, FcoreFactory.eINSTANCE.createInvocationContract()));
+ }
+
+ /**
+ * This creates a primitive {@link org.eclipse.emf.edit.command.RemoveCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ protected Command createRemoveCommand(EditingDomain editingDomain, EObject modelElement, EStructuralFeature feature, Collection<?> collection) {
+ // Default Command
+ Command command = super.createRemoveCommand(editingDomain, modelElement, feature, collection);
+ // feature could be null
+ if (feature == null) {
+ return command;
+ }
+ // Get the feature id to switch on the right stuff.
+ int featureId = feature.getFeatureID();
+ switch (featureId) {
+ case FcorePackage.INVOCATION_CONTRACT_CONTAINER__INVOCATION_CONTRACTS:
+ command = new RemoveInvocationContractContainerInvocationContracts(editingDomain, (InvocationContractContainer) modelElement, (Collection<?>) collection);
+ break;
+ }
+ return command;
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/InvocationContractItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/InvocationContractItemProvider.java
new file mode 100644
index 0000000..3827d48
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/InvocationContractItemProvider.java
@@ -0,0 +1,454 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.common.helper.ClassHelper;
+import org.eclipse.egf.model.fcore.Contract;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.model.fcore.OrchestrationParameter;
+import org.eclipse.egf.model.fcore.helper.InvocationContractHelper;
+import org.eclipse.egf.model.types.TypeBigDecimal;
+import org.eclipse.egf.model.types.TypeBigInteger;
+import org.eclipse.egf.model.types.TypeBoolean;
+import org.eclipse.egf.model.types.TypeByte;
+import org.eclipse.egf.model.types.TypeCharacter;
+import org.eclipse.egf.model.types.TypeCollection;
+import org.eclipse.egf.model.types.TypeDate;
+import org.eclipse.egf.model.types.TypeDouble;
+import org.eclipse.egf.model.types.TypeFloat;
+import org.eclipse.egf.model.types.TypeGeneratorAdapterFactory;
+import org.eclipse.egf.model.types.TypeInteger;
+import org.eclipse.egf.model.types.TypeList;
+import org.eclipse.egf.model.types.TypeLong;
+import org.eclipse.egf.model.types.TypeMap;
+import org.eclipse.egf.model.types.TypeSet;
+import org.eclipse.egf.model.types.TypeShort;
+import org.eclipse.egf.model.types.TypeString;
+import org.eclipse.egf.model.types.TypesFactory;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.fcore.InvocationContract} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class InvocationContractItemProvider extends ModelElementItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider,
+ IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public InvocationContractItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addFactoryComponentContractPropertyDescriptor(object);
+ addOrchestrationParameterPropertyDescriptor(object);
+ addSourceInvocationContractPropertyDescriptor(object);
+ addTargetInvocationContractPropertyDescriptor(object);
+ addInvokedContractPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Factory Component Contract feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected void addFactoryComponentContractPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_InvocationContract_factoryComponentContract_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_InvocationContract_factoryComponentContract_feature", "_UI_InvocationContract_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ FcorePackage.Literals.INVOCATION_CONTRACT__FACTORY_COMPONENT_CONTRACT, true, false, true, null, getString("_UI_FactoryComponentPropertyCategory"), //$NON-NLS-1$
+ null) {
+ @Override
+ public Collection<?> getChoiceOfValues(Object current) {
+ InvocationContract contract = (InvocationContract) current;
+ Collection<Contract> available = InvocationContractHelper.getAvailableFactoryComponentContract(contract);
+ available.add(null);
+ available.add(contract.getFactoryComponentContract());
+ return available;
+ }
+ });
+ }
+
+ /**
+ * This adds a property descriptor for the Orchestration Parameter feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected void addOrchestrationParameterPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_InvocationContract_orchestrationParameter_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_InvocationContract_orchestrationParameter_feature", "_UI_InvocationContract_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ FcorePackage.Literals.INVOCATION_CONTRACT__ORCHESTRATION_PARAMETER, true, false, true, null, getString("_UI_OrchestrationPropertyCategory"), //$NON-NLS-1$
+ null) {
+ @Override
+ public Collection<?> getChoiceOfValues(Object current) {
+ InvocationContract contract = (InvocationContract) current;
+ Collection<OrchestrationParameter> available = InvocationContractHelper.getAvailableOrchestrationParameter(contract);
+ available.add(null);
+ available.add(contract.getOrchestrationParameter());
+ return available;
+ }
+ });
+ }
+
+ /**
+ * This adds a property descriptor for the Source Invocation Contract feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected void addSourceInvocationContractPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_InvocationContract_sourceInvocationContract_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_InvocationContract_sourceInvocationContract_feature", "_UI_InvocationContract_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ FcorePackage.Literals.INVOCATION_CONTRACT__SOURCE_INVOCATION_CONTRACT, true, false, true, null, getString("_UI_ConnectorPropertyCategory"), //$NON-NLS-1$
+ null) {
+ @Override
+ public Collection<?> getChoiceOfValues(Object current) {
+ InvocationContract contract = (InvocationContract) current;
+ Collection<InvocationContract> available = InvocationContractHelper.getAvailableSourceInvocationContract(contract);
+ available.add(null);
+ available.add(contract.getSourceInvocationContract());
+ return available;
+ }
+ });
+ }
+
+ /**
+ * This adds a property descriptor for the Target Invocation Contract feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected void addTargetInvocationContractPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_InvocationContract_targetInvocationContract_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_InvocationContract_targetInvocationContract_feature", "_UI_InvocationContract_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ FcorePackage.Literals.INVOCATION_CONTRACT__TARGET_INVOCATION_CONTRACT, true, false, true, null, getString("_UI_ConnectorPropertyCategory"), //$NON-NLS-1$
+ null) {
+ @Override
+ public Collection<?> getChoiceOfValues(Object current) {
+ return InvocationContractHelper.getAvailableTargetInvocationContract((InvocationContract) current);
+ }
+ });
+ }
+
+ /**
+ * This adds a property descriptor for the Invoked Contract feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected void addInvokedContractPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_InvocationContract_invokedContract_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_InvocationContract_invokedContract_feature", "_UI_InvocationContract_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ FcorePackage.Literals.INVOCATION_CONTRACT__INVOKED_CONTRACT, true, false, true, null, getString("_UI_BehaviourPropertyCategory"), //$NON-NLS-1$
+ null) {
+ @Override
+ public Collection<?> getChoiceOfValues(Object current) {
+ InvocationContract contract = (InvocationContract) current;
+ Collection<Contract> available = InvocationContractHelper.getAvailableInvokedContract(contract);
+ available.add(null);
+ available.add(contract.getInvokedContract());
+ return available;
+ }
+ });
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(FcorePackage.Literals.INVOCATION_CONTRACT__TYPE);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns InvocationContract.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/InvocationContract")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ InvocationContract invocationContract = (InvocationContract) object;
+ String invoked = null;
+ if (invocationContract.getInvokedContract() != null) {
+ invoked = invocationContract.getInvokedContract().getName();
+ String mode = null;
+ if (invocationContract.getInvokedContract().getMode() != null) {
+ mode = "[" + invocationContract.getInvokedContract().getMode().getLiteral() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ if ((invoked == null || invoked.length() == 0) && mode != null) {
+ invoked = mode;
+ } else if (mode != null) {
+ invoked = invoked + " " + mode; //$NON-NLS-1$
+ }
+ }
+ String label = "[" + getString("_UI_InvocationContract_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ if (invoked != null) {
+ label = invoked + " " + label; //$NON-NLS-1$
+ }
+ return label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(InvocationContract.class)) {
+ case FcorePackage.INVOCATION_CONTRACT__FACTORY_COMPONENT_CONTRACT:
+ case FcorePackage.INVOCATION_CONTRACT__ORCHESTRATION_PARAMETER:
+ case FcorePackage.INVOCATION_CONTRACT__SOURCE_INVOCATION_CONTRACT:
+ case FcorePackage.INVOCATION_CONTRACT__TARGET_INVOCATION_CONTRACT:
+ case FcorePackage.INVOCATION_CONTRACT__INVOKED_CONTRACT:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case FcorePackage.INVOCATION_CONTRACT__TYPE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ if (object instanceof InvocationContract == false) {
+ return;
+ }
+ InvocationContract invocationContract = (InvocationContract) object;
+
+ if (invocationContract.getInvokedContract() == null || invocationContract.getInvokedContract().getType() == null) {
+ return;
+ }
+
+ {
+ TypeCollection type = TypesFactory.eINSTANCE.createTypeCollection();
+ if (ClassHelper.asSubClass(type.getType(), invocationContract.getInvokedContract().getType().getType())) {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.INVOCATION_CONTRACT__TYPE, type));
+ }
+ }
+
+ {
+ TypeList type = TypesFactory.eINSTANCE.createTypeList();
+ if (ClassHelper.asSubClass(type.getType(), invocationContract.getInvokedContract().getType().getType())) {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.INVOCATION_CONTRACT__TYPE, type));
+ }
+ }
+
+ {
+ TypeSet type = TypesFactory.eINSTANCE.createTypeSet();
+ if (ClassHelper.asSubClass(type.getType(), invocationContract.getInvokedContract().getType().getType())) {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.INVOCATION_CONTRACT__TYPE, type));
+ }
+ }
+
+ {
+ TypeMap type = TypesFactory.eINSTANCE.createTypeMap();
+ if (ClassHelper.asSubClass(type.getType(), invocationContract.getInvokedContract().getType().getType())) {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.INVOCATION_CONTRACT__TYPE, type));
+ }
+ }
+
+ {
+ TypeBigDecimal type = TypesFactory.eINSTANCE.createTypeBigDecimal();
+ if (ClassHelper.asSubClass(type.getType(), invocationContract.getInvokedContract().getType().getType())) {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.INVOCATION_CONTRACT__TYPE, type));
+ }
+ }
+
+ {
+ TypeBigInteger type = TypesFactory.eINSTANCE.createTypeBigInteger();
+ if (ClassHelper.asSubClass(type.getType(), invocationContract.getInvokedContract().getType().getType())) {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.INVOCATION_CONTRACT__TYPE, type));
+ }
+ }
+
+ {
+ TypeBoolean type = TypesFactory.eINSTANCE.createTypeBoolean();
+ if (ClassHelper.asSubClass(type.getType(), invocationContract.getInvokedContract().getType().getType())) {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.INVOCATION_CONTRACT__TYPE, type));
+ }
+ }
+
+ {
+ TypeByte type = TypesFactory.eINSTANCE.createTypeByte();
+ if (ClassHelper.asSubClass(type.getType(), invocationContract.getInvokedContract().getType().getType())) {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.INVOCATION_CONTRACT__TYPE, type));
+ }
+ }
+
+ {
+ TypeCharacter type = TypesFactory.eINSTANCE.createTypeCharacter();
+ if (ClassHelper.asSubClass(type.getType(), invocationContract.getInvokedContract().getType().getType())) {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.INVOCATION_CONTRACT__TYPE, type));
+ }
+ }
+
+ {
+ TypeDate type = TypesFactory.eINSTANCE.createTypeDate();
+ if (ClassHelper.asSubClass(type.getType(), invocationContract.getInvokedContract().getType().getType())) {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.INVOCATION_CONTRACT__TYPE, type));
+ }
+ }
+
+ {
+ TypeDouble type = TypesFactory.eINSTANCE.createTypeDouble();
+ if (ClassHelper.asSubClass(type.getType(), invocationContract.getInvokedContract().getType().getType())) {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.INVOCATION_CONTRACT__TYPE, type));
+ }
+ }
+
+ {
+ TypeFloat type = TypesFactory.eINSTANCE.createTypeFloat();
+ if (ClassHelper.asSubClass(type.getType(), invocationContract.getInvokedContract().getType().getType())) {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.INVOCATION_CONTRACT__TYPE, type));
+ }
+ }
+
+ {
+ TypeInteger type = TypesFactory.eINSTANCE.createTypeInteger();
+ if (ClassHelper.asSubClass(type.getType(), invocationContract.getInvokedContract().getType().getType())) {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.INVOCATION_CONTRACT__TYPE, type));
+ }
+ }
+
+ {
+ TypeLong type = TypesFactory.eINSTANCE.createTypeLong();
+ if (ClassHelper.asSubClass(type.getType(), invocationContract.getInvokedContract().getType().getType())) {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.INVOCATION_CONTRACT__TYPE, type));
+ }
+ }
+
+ {
+ TypeShort type = TypesFactory.eINSTANCE.createTypeShort();
+ if (ClassHelper.asSubClass(type.getType(), invocationContract.getInvokedContract().getType().getType())) {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.INVOCATION_CONTRACT__TYPE, type));
+ }
+ }
+
+ {
+ TypeString type = TypesFactory.eINSTANCE.createTypeString();
+ if (ClassHelper.asSubClass(type.getType(), invocationContract.getInvokedContract().getType().getType())) {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.INVOCATION_CONTRACT__TYPE, type));
+ }
+ }
+
+ {
+ TypeGeneratorAdapterFactory type = TypesFactory.eINSTANCE.createTypeGeneratorAdapterFactory();
+ if (ClassHelper.asSubClass(type.getType(), invocationContract.getInvokedContract().getType().getType())) {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.INVOCATION_CONTRACT__TYPE, type));
+ }
+ }
+
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/InvocationItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/InvocationItemProvider.java
new file mode 100644
index 0000000..2b69619
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/InvocationItemProvider.java
@@ -0,0 +1,208 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.FcoreFactory;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.egf.model.fcore.commands.SetInvocationInvokedActivityCommand;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.fcore.Invocation} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class InvocationItemProvider extends NamedModelElementItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider,
+ IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public InvocationItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addInvokedActivityPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Invoked Activity feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addInvokedActivityPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Invocation_invokedActivity_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Invocation_invokedActivity_feature", "_UI_Invocation_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ FcorePackage.Literals.INVOCATION__INVOKED_ACTIVITY, true, false, true, null, getString("_UI_ActivityPropertyCategory"), //$NON-NLS-1$
+ null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(FcorePackage.Literals.INVOCATION__INVOCATION_CONTRACT_CONTAINER);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns Invocation.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Invocation")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((Invocation) object).getName();
+ return label == null || label.length() == 0 ? "[" + getString("_UI_Invocation_type") + "]" : //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ label + " [" + getString("_UI_Invocation_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Invocation.class)) {
+ case FcorePackage.INVOCATION__INVOKED_ACTIVITY:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case FcorePackage.INVOCATION__INVOCATION_CONTRACT_CONTAINER:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.INVOCATION__INVOCATION_CONTRACT_CONTAINER, FcoreFactory.eINSTANCE.createInvocationContractContainer()));
+ }
+
+ /**
+ * Create a command to proceed a set operation.
+ *
+ * @see org.eclipse.emf.edit.provider.ItemProviderAdapter#createSetCommand(org.eclipse.emf.edit.domain.EditingDomain, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EStructuralFeature, java.lang.Object)
+ * @generated NOT
+ *
+ */
+ @Override
+ protected Command createSetCommand(EditingDomain editingDomain, EObject owner, EStructuralFeature feature, Object value) {
+ // Default Command
+ Command command = super.createSetCommand(editingDomain, owner, feature, value);
+ // feature could be null, typically during a drop operation
+ // see org.eclipse.emf.edit.command.DragAndDropCommand#prepareDropLinkOn()
+ if (feature == null) {
+ return command;
+ }
+ // Get the feature id to switch on the right stuff.
+ int featureId = feature.getFeatureID();
+ switch (featureId) {
+ case FcorePackage.INVOCATION__INVOKED_ACTIVITY:
+ if (value == null || value instanceof Activity) {
+ command = new SetInvocationInvokedActivityCommand(editingDomain, (Invocation) owner, (Activity) value);
+ }
+ break;
+ }
+ return command;
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/ModelElementItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/ModelElementItemProvider.java
new file mode 100644
index 0000000..43b5395
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/ModelElementItemProvider.java
@@ -0,0 +1,241 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.ModelElement;
+import org.eclipse.egf.model.fcore.commands.FcoreDragAndDropCommand;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.edit.command.CopyCommand;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IChildCreationExtender;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.fcore.ModelElement} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ModelElementItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider,
+ IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ModelElementItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addIDPropertyDescriptor(object);
+ addDescriptionPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the ID feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addIDPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ModelElement_iD_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_ModelElement_iD_feature", "_UI_ModelElement_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ FcorePackage.Literals.MODEL_ELEMENT__ID, false, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_IdentifierPropertyCategory"), //$NON-NLS-1$
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Description feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addDescriptionPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ModelElement_description_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_ModelElement_description_feature", "_UI_ModelElement_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ FcorePackage.Literals.MODEL_ELEMENT__DESCRIPTION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_DocumentationPropertyCategory"), //$NON-NLS-1$
+ null));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean hasChildren(Object object) {
+ return hasChildren(object, true);
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_ModelElement_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(ModelElement.class)) {
+ case FcorePackage.MODEL_ELEMENT__DESCRIPTION:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return ((IChildCreationExtender) adapterFactory).getResourceLocator();
+ }
+
+ /**
+ * This returns the icon image for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public Object getCreateChildImage(Object owner, Object feature, Object child, Collection<?> selection) {
+ if (owner instanceof Resource) {
+ try {
+ return getResourceLocator().getImage("full/ctool16/Create" + ((EObject) child).eClass().getName()); //$NON-NLS-1$
+ } catch (Exception e) {
+ // Do Nothing
+ }
+ }
+ return super.getCreateChildImage(owner, feature, child, selection);
+ }
+
+ /**
+ * This creates a primitive {@link org.eclipse.emf.edit.command.AddCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ protected Command createAddCommand(EditingDomain domain, EObject owner, EStructuralFeature feature, Collection<?> collection, int index) {
+ if (owner.eResource() == null || collection.isEmpty()) {
+ return new AddCommand(domain, owner, feature, collection, index);
+ }
+ // Collection analysis
+ for (Object value : collection) {
+ if (value instanceof EObject == false || ((EObject) value).eResource() == null) {
+ return new AddCommand(domain, owner, feature, collection, index);
+ }
+ EObject eObjectValue = (EObject) value;
+ // if we are in the same resource and in the same hierarchy
+ if (owner.eResource() == eObjectValue.eResource() && EcoreUtil.getRootContainer(owner) == EcoreUtil.getRootContainer(eObjectValue)) {
+ return new AddCommand(domain, owner, feature, collection, index);
+ }
+ }
+ // Copy rather than add
+ return new AddCommand(domain, owner, feature, CopyCommand.create(domain, collection).getResult(), index);
+ }
+
+ /**
+ * This creates a primitive {@link org.eclipse.emf.edit.command.DragAndDropCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ protected Command createDragAndDropCommand(EditingDomain domain, Object owner, float location, int operations, int operation, Collection<?> collection) {
+ return new FcoreDragAndDropCommand(domain, owner, location, operations, operation, collection);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/NamedModelElementItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/NamedModelElementItemProvider.java
new file mode 100644
index 0000000..627ed0e
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/NamedModelElementItemProvider.java
@@ -0,0 +1,130 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.NamedModelElement;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.fcore.NamedModelElement} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class NamedModelElementItemProvider extends ModelElementItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider,
+ IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NamedModelElementItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addNamePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NamedModelElement_name_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_NamedModelElement_name_feature", "_UI_NamedModelElement_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ FcorePackage.Literals.NAMED_MODEL_ELEMENT__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_IdentityPropertyCategory"), //$NON-NLS-1$
+ null));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((NamedModelElement) object).getName();
+ return label == null || label.length() == 0 ? "[" + getString("_UI_NamedModelElement_type") + "]" : //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ label + " [" + getString("_UI_NamedModelElement_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(NamedModelElement.class)) {
+ case FcorePackage.NAMED_MODEL_ELEMENT__NAME:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/OrchestrationItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/OrchestrationItemProvider.java
new file mode 100644
index 0000000..7528a7b
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/OrchestrationItemProvider.java
@@ -0,0 +1,145 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.fcore.FcoreFactory;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.Orchestration;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.fcore.Orchestration} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class OrchestrationItemProvider extends ModelElementItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider,
+ IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public OrchestrationItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(FcorePackage.Literals.ORCHESTRATION__ORCHESTRATION_PARAMETER_CONTAINER);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_Orchestration_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Orchestration.class)) {
+ case FcorePackage.ORCHESTRATION__ORCHESTRATION_PARAMETER_CONTAINER:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.ORCHESTRATION__ORCHESTRATION_PARAMETER_CONTAINER, FcoreFactory.eINSTANCE.createOrchestrationParameterContainer()));
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/OrchestrationParameterContainerItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/OrchestrationParameterContainerItemProvider.java
new file mode 100644
index 0000000..c5db04c
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/OrchestrationParameterContainerItemProvider.java
@@ -0,0 +1,156 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.fcore.FcoreFactory;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.OrchestrationParameterContainer;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.fcore.OrchestrationParameterContainer} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class OrchestrationParameterContainerItemProvider extends ModelElementItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider,
+ ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public OrchestrationParameterContainerItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(FcorePackage.Literals.ORCHESTRATION_PARAMETER_CONTAINER__ORCHESTRATION_PARAMETERS);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns OrchestrationParameterContainer.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/OrchestrationParameterContainer")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_OrchestrationParameterContainer_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(OrchestrationParameterContainer.class)) {
+ case FcorePackage.ORCHESTRATION_PARAMETER_CONTAINER__ORCHESTRATION_PARAMETERS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.ORCHESTRATION_PARAMETER_CONTAINER__ORCHESTRATION_PARAMETERS, FcoreFactory.eINSTANCE.createOrchestrationParameter()));
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/OrchestrationParameterItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/OrchestrationParameterItemProvider.java
new file mode 100644
index 0000000..87746bc
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/OrchestrationParameterItemProvider.java
@@ -0,0 +1,215 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.OrchestrationParameter;
+import org.eclipse.egf.model.fcore.helper.OrchestrationParameterHelper;
+import org.eclipse.egf.model.types.TypesFactory;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.fcore.OrchestrationParameter} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class OrchestrationParameterItemProvider extends NamedModelElementItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider,
+ IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public OrchestrationParameterItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addInvocationContractsPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Invocation Contracts feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected void addInvocationContractsPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_OrchestrationParameter_invocationContracts_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_OrchestrationParameter_invocationContracts_feature", "_UI_OrchestrationParameter_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ FcorePackage.Literals.ORCHESTRATION_PARAMETER__INVOCATION_CONTRACTS, true, false, true, null, getString("_UI_InvocationContractsPropertyCategory"), //$NON-NLS-1$
+ null) {
+ @Override
+ public Collection<?> getChoiceOfValues(Object current) {
+ return OrchestrationParameterHelper.getAvailableInvocationContracts((OrchestrationParameter) current);
+ }
+ });
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(FcorePackage.Literals.ORCHESTRATION_PARAMETER__TYPE);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns OrchestrationParameter.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/OrchestrationParameter")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((OrchestrationParameter) object).getName();
+ return label == null || label.length() == 0 ? "[" + getString("_UI_OrchestrationParameter_type") + "]" : //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ label + " [" + getString("_UI_OrchestrationParameter_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(OrchestrationParameter.class)) {
+ case FcorePackage.ORCHESTRATION_PARAMETER__INVOCATION_CONTRACTS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case FcorePackage.ORCHESTRATION_PARAMETER__TYPE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.ORCHESTRATION_PARAMETER__TYPE, TypesFactory.eINSTANCE.createTypeCollection()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.ORCHESTRATION_PARAMETER__TYPE, TypesFactory.eINSTANCE.createTypeList()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.ORCHESTRATION_PARAMETER__TYPE, TypesFactory.eINSTANCE.createTypeSet()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.ORCHESTRATION_PARAMETER__TYPE, TypesFactory.eINSTANCE.createTypeGeneratorAdapterFactory()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.ORCHESTRATION_PARAMETER__TYPE, TypesFactory.eINSTANCE.createTypeMap()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.ORCHESTRATION_PARAMETER__TYPE, TypesFactory.eINSTANCE.createTypeBigDecimal()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.ORCHESTRATION_PARAMETER__TYPE, TypesFactory.eINSTANCE.createTypeBigInteger()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.ORCHESTRATION_PARAMETER__TYPE, TypesFactory.eINSTANCE.createTypeBoolean()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.ORCHESTRATION_PARAMETER__TYPE, TypesFactory.eINSTANCE.createTypeByte()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.ORCHESTRATION_PARAMETER__TYPE, TypesFactory.eINSTANCE.createTypeCharacter()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.ORCHESTRATION_PARAMETER__TYPE, TypesFactory.eINSTANCE.createTypeDate()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.ORCHESTRATION_PARAMETER__TYPE, TypesFactory.eINSTANCE.createTypeDouble()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.ORCHESTRATION_PARAMETER__TYPE, TypesFactory.eINSTANCE.createTypeFloat()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.ORCHESTRATION_PARAMETER__TYPE, TypesFactory.eINSTANCE.createTypeInteger()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.ORCHESTRATION_PARAMETER__TYPE, TypesFactory.eINSTANCE.createTypeLong()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.ORCHESTRATION_PARAMETER__TYPE, TypesFactory.eINSTANCE.createTypeShort()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.ORCHESTRATION_PARAMETER__TYPE, TypesFactory.eINSTANCE.createTypeString()));
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/ViewpointContainerItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/ViewpointContainerItemProvider.java
new file mode 100644
index 0000000..1d1f401
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/ViewpointContainerItemProvider.java
@@ -0,0 +1,153 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.ViewpointContainer;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.fcore.ViewpointContainer} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ViewpointContainerItemProvider extends ModelElementItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider,
+ IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ViewpointContainerItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(FcorePackage.Literals.VIEWPOINT_CONTAINER__VIEWPOINTS);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns ViewpointContainer.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ViewpointContainer")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_ViewpointContainer_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(ViewpointContainer.class)) {
+ case FcorePackage.VIEWPOINT_CONTAINER__VIEWPOINTS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/ViewpointItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/ViewpointItemProvider.java
new file mode 100644
index 0000000..20cf409
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/fcore/provider/ViewpointItemProvider.java
@@ -0,0 +1,107 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.fcore.Viewpoint} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ViewpointItemProvider extends ModelElementItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider,
+ IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ViewpointItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_Viewpoint_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/mapping/provider/MappingDomainItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/mapping/provider/MappingDomainItemProvider.java
new file mode 100644
index 0000000..39a0847
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/mapping/provider/MappingDomainItemProvider.java
@@ -0,0 +1,152 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.mapping.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.mapping.MappingDomain;
+import org.eclipse.egf.model.mapping.MappingPackage;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.mapping.MappingDomain} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class MappingDomainItemProvider extends MappingItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MappingDomainItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addSourcePropertyDescriptor(object);
+ addTargetPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Source feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addSourcePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MappingDomain_source_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_MappingDomain_source_feature", "_UI_MappingDomain_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ MappingPackage.Literals.MAPPING_DOMAIN__SOURCE, true, false, true, null, getString("_UI_ConnectorPropertyCategory"), //$NON-NLS-1$
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Target feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addTargetPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MappingDomain_target_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_MappingDomain_target_feature", "_UI_MappingDomain_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ MappingPackage.Literals.MAPPING_DOMAIN__TARGET, true, false, true, null, getString("_UI_ConnectorPropertyCategory"), //$NON-NLS-1$
+ null));
+ }
+
+ /**
+ * This returns MappingDomain.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/MappingDomain")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((MappingDomain) object).getName();
+ return label == null || label.length() == 0 ? "[" + getString("_UI_MappingDomain_type") + "]" : //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ label + " [" + getString("_UI_MappingDomain_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(MappingDomain.class)) {
+ case MappingPackage.MAPPING_DOMAIN__SOURCE:
+ case MappingPackage.MAPPING_DOMAIN__TARGET:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/mapping/provider/MappingItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/mapping/provider/MappingItemProvider.java
new file mode 100644
index 0000000..3f1003e
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/mapping/provider/MappingItemProvider.java
@@ -0,0 +1,117 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.mapping.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.edit.EGFModelEditPlugin;
+import org.eclipse.egf.model.fcore.provider.NamedModelElementItemProvider;
+import org.eclipse.egf.model.mapping.Mapping;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.mapping.Mapping} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class MappingItemProvider extends NamedModelElementItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MappingItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((Mapping) object).getName();
+ return label == null || label.length() == 0 ? "[" + getString("_UI_Mapping_type") + "]" : //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ label + " [" + getString("_UI_Mapping_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EGFModelEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/mapping/provider/MappingItemProviderAdapterFactory.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/mapping/provider/MappingItemProviderAdapterFactory.java
new file mode 100644
index 0000000..e4dd3c4
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/mapping/provider/MappingItemProviderAdapterFactory.java
@@ -0,0 +1,339 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.mapping.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.edit.EGFModelEditPlugin;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.ViewpointContainer;
+import org.eclipse.egf.model.fcore.util.FcoreSwitch;
+import org.eclipse.egf.model.mapping.MappingFactory;
+import org.eclipse.egf.model.mapping.util.MappingAdapterFactory;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.CommandParameter;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IChildCreationExtender;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class MappingItemProviderAdapterFactory extends MappingAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
+ /**
+ * This keeps track of the root adapter factory that delegates to this adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ComposedAdapterFactory parentAdapterFactory;
+
+ /**
+ * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+ /**
+ * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+ /**
+ * This constructs an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MappingItemProviderAdapterFactory() {
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ supportedTypes.add(IItemPropertySource.class);
+ supportedTypes.add(ITableItemLabelProvider.class);
+ supportedTypes.add(ITableItemColorProvider.class);
+ supportedTypes.add(ITableItemFontProvider.class);
+ supportedTypes.add(IItemColorProvider.class);
+ supportedTypes.add(IItemFontProvider.class);
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.mapping.MappingViewpoint} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected MappingViewpointItemProvider mappingViewpointItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.mapping.MappingViewpoint}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createMappingViewpointAdapter() {
+ if (mappingViewpointItemProvider == null) {
+ mappingViewpointItemProvider = new MappingViewpointItemProvider(this);
+ }
+
+ return mappingViewpointItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.mapping.MappingDomain} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected MappingDomainItemProvider mappingDomainItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.mapping.MappingDomain}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createMappingDomainAdapter() {
+ if (mappingDomainItemProvider == null) {
+ mappingDomainItemProvider = new MappingDomainItemProvider(this);
+ }
+
+ return mappingDomainItemProvider;
+ }
+
+ /**
+ * This returns the root adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ComposeableAdapterFactory getRootAdapterFactory() {
+ return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+ }
+
+ /**
+ * This sets the composed adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
+ this.parentAdapterFactory = parentAdapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return supportedTypes.contains(type) || super.isFactoryForType(type);
+ }
+
+ /**
+ * This implementation substitutes the factory itself as the key for the adapter.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter adapt(Notifier notifier, Object type) {
+ return super.adapt(notifier, this);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object adapt(Object object, Object type) {
+ if (isFactoryForType(type)) {
+ Object adapter = super.adapt(object, type);
+ if (!(type instanceof Class<?>) || (((Class<?>) type).isInstance(adapter))) {
+ return adapter;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * This adds a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void addListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void fireNotifyChanged(Notification notification) {
+ changeNotifier.fireNotifyChanged(notification);
+
+ if (parentAdapterFactory != null) {
+ parentAdapterFactory.fireNotifyChanged(notification);
+ }
+ }
+
+ /**
+ * This disposes all of the item providers created by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void dispose() {
+ if (mappingViewpointItemProvider != null)
+ mappingViewpointItemProvider.dispose();
+ if (mappingDomainItemProvider != null)
+ mappingDomainItemProvider.dispose();
+ }
+
+ /**
+ * A child creation extender for the {@link FcorePackage}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class FcoreChildCreationExtender implements IChildCreationExtender {
+ /**
+ * The switch for creating child descriptors specific to each extended class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static class CreationSwitch extends FcoreSwitch<Object> {
+ /**
+ * The child descriptors being populated.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected List<Object> newChildDescriptors;
+
+ /**
+ * The domain in which to create the children.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EditingDomain editingDomain;
+
+ /**
+ * Creates the a switch for populating child descriptors in the given domain.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ CreationSwitch(List<Object> newChildDescriptors, EditingDomain editingDomain) {
+ this.newChildDescriptors = newChildDescriptors;
+ this.editingDomain = editingDomain;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object caseViewpointContainer(ViewpointContainer object) {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.VIEWPOINT_CONTAINER__VIEWPOINTS, MappingFactory.eINSTANCE.createMappingViewpoint()));
+
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CommandParameter createChildParameter(Object feature, Object child) {
+ return new CommandParameter(null, feature, child);
+ }
+
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Collection<Object> getNewChildDescriptors(Object object, EditingDomain editingDomain) {
+ ArrayList<Object> result = new ArrayList<Object>();
+ new CreationSwitch(result, editingDomain).doSwitch((EObject) object);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceLocator getResourceLocator() {
+ return EGFModelEditPlugin.INSTANCE;
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/mapping/provider/MappingViewpointItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/mapping/provider/MappingViewpointItemProvider.java
new file mode 100644
index 0000000..8dbf03c
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/mapping/provider/MappingViewpointItemProvider.java
@@ -0,0 +1,169 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.mapping.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.edit.EGFModelEditPlugin;
+import org.eclipse.egf.model.fcore.provider.ViewpointItemProvider;
+import org.eclipse.egf.model.mapping.MappingFactory;
+import org.eclipse.egf.model.mapping.MappingPackage;
+import org.eclipse.egf.model.mapping.MappingViewpoint;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.mapping.MappingViewpoint} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class MappingViewpointItemProvider extends ViewpointItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MappingViewpointItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(MappingPackage.Literals.MAPPING_VIEWPOINT__MAPPINGS);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns MappingViewpoint.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/MappingViewpoint")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_MappingViewpoint_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(MappingViewpoint.class)) {
+ case MappingPackage.MAPPING_VIEWPOINT__MAPPINGS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add(createChildParameter(MappingPackage.Literals.MAPPING_VIEWPOINT__MAPPINGS, MappingFactory.eINSTANCE.createMappingDomain()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EGFModelEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/AbstractPatternCallItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/AbstractPatternCallItemProvider.java
new file mode 100644
index 0000000..71e2074
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/AbstractPatternCallItemProvider.java
@@ -0,0 +1,123 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.pattern.AbstractPatternCall} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class AbstractPatternCallItemProvider extends CallItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider,
+ IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public AbstractPatternCallItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addCalledPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Called feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addCalledPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_AbstractPatternCall_called_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_AbstractPatternCall_called_feature", "_UI_AbstractPatternCall_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ PatternPackage.Literals.ABSTRACT_PATTERN_CALL__CALLED, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_AbstractPatternCall_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/BackCallItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/BackCallItemProvider.java
new file mode 100644
index 0000000..5cd071b
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/BackCallItemProvider.java
@@ -0,0 +1,114 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.pattern.BackCall;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.pattern.BackCall} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class BackCallItemProvider extends CallItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public BackCallItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns BackCall.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/BackCall")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((BackCall) object).getID();
+ return label == null || label.length() == 0 ? "[" + getString("_UI_BackCall_type") + "]" : //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ label + " [" + getString("_UI_BackCall_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/BasicQueryItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/BasicQueryItemProvider.java
new file mode 100644
index 0000000..038415c
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/BasicQueryItemProvider.java
@@ -0,0 +1,119 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.pattern.BasicQuery} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class BasicQueryItemProvider extends QueryItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider,
+ IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public BasicQueryItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns BasicQuery.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/BasicQuery")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_BasicQuery_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/CallItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/CallItemProvider.java
new file mode 100644
index 0000000..09d14e7
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/CallItemProvider.java
@@ -0,0 +1,122 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.edit.EGFModelEditPlugin;
+import org.eclipse.egf.model.fcore.provider.ModelElementItemProvider;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.pattern.Call} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class CallItemProvider extends ModelElementItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider,
+ IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public CallItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_Call_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EGFModelEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/CustomQueryItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/CustomQueryItemProvider.java
new file mode 100644
index 0000000..74dcd53
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/CustomQueryItemProvider.java
@@ -0,0 +1,119 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.pattern.CustomQuery} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class CustomQueryItemProvider extends QueryItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider,
+ IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public CustomQueryItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns CustomQuery.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/CustomQuery")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_CustomQuery_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/MethodCallItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/MethodCallItemProvider.java
new file mode 100644
index 0000000..c214ba7
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/MethodCallItemProvider.java
@@ -0,0 +1,135 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.pattern.MethodCall} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class MethodCallItemProvider extends CallItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider,
+ IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public MethodCallItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addCalledPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Called feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addCalledPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MethodCall_called_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_MethodCall_called_feature", "_UI_MethodCall_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ PatternPackage.Literals.METHOD_CALL__CALLED, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns MethodCall.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/MethodCall")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_MethodCall_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/Paramerter2ParameterMapItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/Paramerter2ParameterMapItemProvider.java
new file mode 100644
index 0000000..a553e74
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/Paramerter2ParameterMapItemProvider.java
@@ -0,0 +1,165 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.provider;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.egf.model.edit.EGFModelEditPlugin;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+
+/**
+ * This is the item provider adapter for a {@link java.util.Map.Entry} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class Paramerter2ParameterMapItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Paramerter2ParameterMapItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addValuePropertyDescriptor(object);
+ addKeyPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Value feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addValuePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Paramerter2ParameterMap_value_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Paramerter2ParameterMap_value_feature", "_UI_Paramerter2ParameterMap_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ PatternPackage.Literals.PARAMERTER2_PARAMETER_MAP__VALUE, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Key feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addKeyPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Paramerter2ParameterMap_key_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Paramerter2ParameterMap_key_feature", "_UI_Paramerter2ParameterMap_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ PatternPackage.Literals.PARAMERTER2_PARAMETER_MAP__KEY, true, false, true, null, null, null));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean hasChildren(Object object) {
+ return hasChildren(object, true);
+ }
+
+ /**
+ * This returns Paramerter2ParameterMap.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Paramerter2ParameterMap")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ Map.Entry<?, ?> paramerter2ParameterMap = (Map.Entry<?, ?>) object;
+ return "" + paramerter2ParameterMap.getKey() + " -> " + paramerter2ParameterMap.getValue(); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EGFModelEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/PatternCallItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/PatternCallItemProvider.java
new file mode 100644
index 0000000..8508aef
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/PatternCallItemProvider.java
@@ -0,0 +1,135 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.pattern.PatternCall} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class PatternCallItemProvider extends AbstractPatternCallItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider,
+ IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public PatternCallItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addParameterMatchingPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Parameter Matching feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addParameterMatchingPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PatternCall_parameterMatching_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_PatternCall_parameterMatching_feature", "_UI_PatternCall_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ PatternPackage.Literals.PATTERN_CALL__PARAMETER_MATCHING, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns PatternCall.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/PatternCall")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_PatternCall_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/PatternElementItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/PatternElementItemProvider.java
new file mode 100644
index 0000000..e0b43a3
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/PatternElementItemProvider.java
@@ -0,0 +1,117 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.edit.EGFModelEditPlugin;
+import org.eclipse.egf.model.fcore.provider.NamedModelElementItemProvider;
+import org.eclipse.egf.model.pattern.PatternElement;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.pattern.PatternElement} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PatternElementItemProvider extends NamedModelElementItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PatternElementItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((PatternElement) object).getName();
+ return label == null || label.length() == 0 ? "[" + getString("_UI_PatternElement_type") + "]" : //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ label + " [" + getString("_UI_PatternElement_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EGFModelEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/PatternInjectedCallItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/PatternInjectedCallItemProvider.java
new file mode 100644
index 0000000..5d9b491
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/PatternInjectedCallItemProvider.java
@@ -0,0 +1,135 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.pattern.PatternInjectedCall} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class PatternInjectedCallItemProvider extends AbstractPatternCallItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider,
+ IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public PatternInjectedCallItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addContextPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Context feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addContextPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PatternInjectedCall_context_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_PatternInjectedCall_context_feature", "_UI_PatternInjectedCall_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ PatternPackage.Literals.PATTERN_INJECTED_CALL__CONTEXT, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns PatternInjectedCall.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/PatternInjectedCall")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_PatternInjectedCall_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/PatternItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/PatternItemProvider.java
new file mode 100644
index 0000000..c52d871
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/PatternItemProvider.java
@@ -0,0 +1,283 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.UniqueEList;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.pattern.Pattern} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class PatternItemProvider extends PatternElementItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider,
+ IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public PatternItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addHeaderMethodPropertyDescriptor(object);
+ addFooterMethodPropertyDescriptor(object);
+ addSuperPatternPropertyDescriptor(object);
+ addOrchestrationPropertyDescriptor(object);
+ addInitMethodPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Header Method feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected void addHeaderMethodPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Pattern_headerMethod_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Pattern_headerMethod_feature", "_UI_Pattern_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ PatternPackage.Literals.PATTERN__HEADER_METHOD, true, false, true, null, null, null) {
+
+ @Override
+ public Collection<?> getChoiceOfValues(Object current) {
+ Pattern pattern = (Pattern) current;
+ EList<PatternMethod> result = new UniqueEList<PatternMethod>();
+ // add a null value to reset an existing value
+ result.add(null);
+ // Load existing methods
+ result.addAll(pattern.getMethods());
+ if (pattern.getFooterMethod() != null) {
+ result.remove(pattern.getFooterMethod());
+ }
+ return result;
+ }
+
+ });
+ }
+
+ /**
+ * This adds a property descriptor for the Footer Method feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected void addFooterMethodPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Pattern_footerMethod_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", //$NON-NLS-1$
+ "_UI_Pattern_footerMethod_feature", //$NON-NLS-1$
+ "_UI_Pattern_type" //$NON-NLS-1$
+ ), PatternPackage.Literals.PATTERN__FOOTER_METHOD, true, false, true, null, null, null) {
+
+ @Override
+ public Collection<?> getChoiceOfValues(Object current) {
+ Pattern pattern = (Pattern) current;
+ EList<PatternMethod> result = new UniqueEList<PatternMethod>();
+ // add a null value to reset an existing value
+ result.add(null);
+ // Load existing methods
+ result.addAll(pattern.getMethods());
+ if (pattern.getHeaderMethod() != null) {
+ result.remove(pattern.getHeaderMethod());
+ }
+ return result;
+ }
+
+ });
+ }
+
+ /**
+ * This adds a property descriptor for the Super Pattern feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addSuperPatternPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Pattern_superPattern_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Pattern_superPattern_feature", "_UI_Pattern_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ PatternPackage.Literals.PATTERN__SUPER_PATTERN, true, false, true, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Orchestration feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addOrchestrationPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Pattern_orchestration_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Pattern_orchestration_feature", "_UI_Pattern_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ PatternPackage.Literals.PATTERN__ORCHESTRATION, true, false, false, null, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Init Method feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addInitMethodPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Pattern_initMethod_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Pattern_initMethod_feature", "_UI_Pattern_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ PatternPackage.Literals.PATTERN__INIT_METHOD, true, false, true, null, null, null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(PatternPackage.Literals.PATTERN__METHODS);
+ childrenFeatures.add(PatternPackage.Literals.PATTERN__PARAMETERS);
+ childrenFeatures.add(PatternPackage.Literals.PATTERN__NATURE);
+ childrenFeatures.add(PatternPackage.Literals.PATTERN__VARIABLES);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns Pattern.gif.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Pattern")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((Pattern) object).getName();
+ return label == null || label.length() == 0 ? "[" + getString("_UI_Pattern_type") + "]" : //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ label + " [" + getString("_UI_Pattern_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Pattern.class)) {
+ case PatternPackage.PATTERN__HEADER_METHOD:
+ case PatternPackage.PATTERN__FOOTER_METHOD:
+ case PatternPackage.PATTERN__SUPER_PATTERN:
+ case PatternPackage.PATTERN__ORCHESTRATION:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case PatternPackage.PATTERN__METHODS:
+ case PatternPackage.PATTERN__PARAMETERS:
+ case PatternPackage.PATTERN__NATURE:
+ case PatternPackage.PATTERN__VARIABLES:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ // super.collectNewChildDescriptors(newChildDescriptors, object);
+ //
+ // newChildDescriptors.add(createChildParameter(PatternPackage.Literals.PATTERN__METHODS,
+ // PatternFactory.eINSTANCE.createPatternMethod()));
+ //
+ // newChildDescriptors.add(createChildParameter(PatternPackage.Literals.PATTERN__PARAMETERS,
+ // PatternFactory.eINSTANCE.createPatternParameter()));
+ //
+ // newChildDescriptors.add(createChildParameter(PatternPackage.Literals.PATTERN__VARIABLES,
+ // PatternFactory.eINSTANCE.createPatternVariable()));
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/PatternItemProviderAdapterFactory.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/PatternItemProviderAdapterFactory.java
new file mode 100644
index 0000000..e7620e6
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/PatternItemProviderAdapterFactory.java
@@ -0,0 +1,899 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.common.helper.ClassHelper;
+import org.eclipse.egf.model.edit.EGFModelEditPlugin;
+import org.eclipse.egf.model.fcore.Contract;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.model.fcore.OrchestrationParameter;
+import org.eclipse.egf.model.fcore.ViewpointContainer;
+import org.eclipse.egf.model.fcore.util.FcoreSwitch;
+import org.eclipse.egf.model.pattern.PatternFactory;
+import org.eclipse.egf.model.pattern.TypePatternCallBackHandler;
+import org.eclipse.egf.model.pattern.TypePatternDomainVisitor;
+import org.eclipse.egf.model.pattern.TypePatternExecutionReporter;
+import org.eclipse.egf.model.pattern.TypePatternList;
+import org.eclipse.egf.model.pattern.util.PatternAdapterFactory;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.CommandParameter;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IChildCreationExtender;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PatternItemProviderAdapterFactory extends PatternAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
+ /**
+ * This keeps track of the root adapter factory that delegates to this adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ComposedAdapterFactory parentAdapterFactory;
+
+ /**
+ * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+ /**
+ * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+ /**
+ * This constructs an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PatternItemProviderAdapterFactory() {
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ supportedTypes.add(IItemPropertySource.class);
+ supportedTypes.add(ITableItemLabelProvider.class);
+ supportedTypes.add(ITableItemColorProvider.class);
+ supportedTypes.add(ITableItemFontProvider.class);
+ supportedTypes.add(IItemColorProvider.class);
+ supportedTypes.add(IItemFontProvider.class);
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.pattern.Pattern} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PatternItemProvider patternItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.pattern.Pattern}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createPatternAdapter() {
+ if (patternItemProvider == null) {
+ patternItemProvider = new PatternItemProvider(this);
+ }
+
+ return patternItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.pattern.PatternMethod} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PatternMethodItemProvider patternMethodItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.pattern.PatternMethod}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createPatternMethodAdapter() {
+ if (patternMethodItemProvider == null) {
+ patternMethodItemProvider = new PatternMethodItemProvider(this);
+ }
+
+ return patternMethodItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.pattern.PatternParameter} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PatternParameterItemProvider patternParameterItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.pattern.PatternParameter}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createPatternParameterAdapter() {
+ if (patternParameterItemProvider == null) {
+ patternParameterItemProvider = new PatternParameterItemProvider(this);
+ }
+
+ return patternParameterItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.pattern.PatternLibrary} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PatternLibraryItemProvider patternLibraryItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.pattern.PatternLibrary}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createPatternLibraryAdapter() {
+ if (patternLibraryItemProvider == null) {
+ patternLibraryItemProvider = new PatternLibraryItemProvider(this);
+ }
+
+ return patternLibraryItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.pattern.PatternViewpoint} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PatternViewpointItemProvider patternViewpointItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.pattern.PatternViewpoint}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createPatternViewpointAdapter() {
+ if (patternViewpointItemProvider == null) {
+ patternViewpointItemProvider = new PatternViewpointItemProvider(this);
+ }
+
+ return patternViewpointItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.pattern.PatternCall} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PatternCallItemProvider patternCallItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.pattern.PatternCall}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createPatternCallAdapter() {
+ if (patternCallItemProvider == null) {
+ patternCallItemProvider = new PatternCallItemProvider(this);
+ }
+
+ return patternCallItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.pattern.SuperCall} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected SuperCallItemProvider superCallItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.pattern.SuperCall}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createSuperCallAdapter() {
+ if (superCallItemProvider == null) {
+ superCallItemProvider = new SuperCallItemProvider(this);
+ }
+
+ return superCallItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link java.util.Map.Entry} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Paramerter2ParameterMapItemProvider paramerter2ParameterMapItemProvider;
+
+ /**
+ * This creates an adapter for a {@link java.util.Map.Entry}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createParamerter2ParameterMapAdapter() {
+ if (paramerter2ParameterMapItemProvider == null) {
+ paramerter2ParameterMapItemProvider = new Paramerter2ParameterMapItemProvider(this);
+ }
+
+ return paramerter2ParameterMapItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.pattern.MethodCall} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected MethodCallItemProvider methodCallItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.pattern.MethodCall}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createMethodCallAdapter() {
+ if (methodCallItemProvider == null) {
+ methodCallItemProvider = new MethodCallItemProvider(this);
+ }
+
+ return methodCallItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.pattern.PatternVariable} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PatternVariableItemProvider patternVariableItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.pattern.PatternVariable}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createPatternVariableAdapter() {
+ if (patternVariableItemProvider == null) {
+ patternVariableItemProvider = new PatternVariableItemProvider(this);
+ }
+
+ return patternVariableItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.pattern.PatternInjectedCall} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PatternInjectedCallItemProvider patternInjectedCallItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.pattern.PatternInjectedCall}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createPatternInjectedCallAdapter() {
+ if (patternInjectedCallItemProvider == null) {
+ patternInjectedCallItemProvider = new PatternInjectedCallItemProvider(this);
+ }
+
+ return patternInjectedCallItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.pattern.BasicQuery} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected BasicQueryItemProvider basicQueryItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.pattern.BasicQuery}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createBasicQueryAdapter() {
+ if (basicQueryItemProvider == null) {
+ basicQueryItemProvider = new BasicQueryItemProvider(this);
+ }
+
+ return basicQueryItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.pattern.StringQuery} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected StringQueryItemProvider stringQueryItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.pattern.StringQuery}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createStringQueryAdapter() {
+ if (stringQueryItemProvider == null) {
+ stringQueryItemProvider = new StringQueryItemProvider(this);
+ }
+
+ return stringQueryItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.pattern.CustomQuery} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CustomQueryItemProvider customQueryItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.pattern.CustomQuery}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createCustomQueryAdapter() {
+ if (customQueryItemProvider == null) {
+ customQueryItemProvider = new CustomQueryItemProvider(this);
+ }
+
+ return customQueryItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link java.util.Map.Entry} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected String2PatternListItemProvider string2PatternListItemProvider;
+
+ /**
+ * This creates an adapter for a {@link java.util.Map.Entry}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createString2PatternListAdapter() {
+ if (string2PatternListItemProvider == null) {
+ string2PatternListItemProvider = new String2PatternListItemProvider(this);
+ }
+
+ return string2PatternListItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link java.util.Map.Entry} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected String2StringItemProvider string2StringItemProvider;
+
+ /**
+ * This creates an adapter for a {@link java.util.Map.Entry}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createString2StringAdapter() {
+ if (string2StringItemProvider == null) {
+ string2StringItemProvider = new String2StringItemProvider(this);
+ }
+
+ return string2StringItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.pattern.TypePatternExecutionReporter} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypePatternExecutionReporterItemProvider typePatternExecutionReporterItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.pattern.TypePatternExecutionReporter}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createTypePatternExecutionReporterAdapter() {
+ if (typePatternExecutionReporterItemProvider == null) {
+ typePatternExecutionReporterItemProvider = new TypePatternExecutionReporterItemProvider(this);
+ }
+
+ return typePatternExecutionReporterItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.pattern.BackCall} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected BackCallItemProvider backCallItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.pattern.BackCall}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createBackCallAdapter() {
+ if (backCallItemProvider == null) {
+ backCallItemProvider = new BackCallItemProvider(this);
+ }
+
+ return backCallItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.pattern.TypePatternCallBackHandler} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypePatternCallBackHandlerItemProvider typePatternCallBackHandlerItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.pattern.TypePatternCallBackHandler}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createTypePatternCallBackHandlerAdapter() {
+ if (typePatternCallBackHandlerItemProvider == null) {
+ typePatternCallBackHandlerItemProvider = new TypePatternCallBackHandlerItemProvider(this);
+ }
+
+ return typePatternCallBackHandlerItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.pattern.TypePatternDomainVisitor} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypePatternDomainVisitorItemProvider typePatternDomainVisitorItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.pattern.TypePatternDomainVisitor}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createTypePatternDomainVisitorAdapter() {
+ if (typePatternDomainVisitorItemProvider == null) {
+ typePatternDomainVisitorItemProvider = new TypePatternDomainVisitorItemProvider(this);
+ }
+
+ return typePatternDomainVisitorItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.pattern.TypePatternList} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypePatternListItemProvider typePatternListItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.pattern.TypePatternList}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createTypePatternListAdapter() {
+ if (typePatternListItemProvider == null) {
+ typePatternListItemProvider = new TypePatternListItemProvider(this);
+ }
+
+ return typePatternListItemProvider;
+ }
+
+ /**
+ * This returns the root adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ComposeableAdapterFactory getRootAdapterFactory() {
+ return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+ }
+
+ /**
+ * This sets the composed adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
+ this.parentAdapterFactory = parentAdapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return supportedTypes.contains(type) || super.isFactoryForType(type);
+ }
+
+ /**
+ * This implementation substitutes the factory itself as the key for the adapter.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter adapt(Notifier notifier, Object type) {
+ return super.adapt(notifier, this);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object adapt(Object object, Object type) {
+ if (isFactoryForType(type)) {
+ Object adapter = super.adapt(object, type);
+ if (!(type instanceof Class<?>) || (((Class<?>) type).isInstance(adapter))) {
+ return adapter;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * This adds a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void addListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void fireNotifyChanged(Notification notification) {
+ changeNotifier.fireNotifyChanged(notification);
+
+ if (parentAdapterFactory != null) {
+ parentAdapterFactory.fireNotifyChanged(notification);
+ }
+ }
+
+ /**
+ * This disposes all of the item providers created by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void dispose() {
+ if (patternItemProvider != null)
+ patternItemProvider.dispose();
+ if (patternMethodItemProvider != null)
+ patternMethodItemProvider.dispose();
+ if (patternParameterItemProvider != null)
+ patternParameterItemProvider.dispose();
+ if (patternLibraryItemProvider != null)
+ patternLibraryItemProvider.dispose();
+ if (patternViewpointItemProvider != null)
+ patternViewpointItemProvider.dispose();
+ if (patternCallItemProvider != null)
+ patternCallItemProvider.dispose();
+ if (superCallItemProvider != null)
+ superCallItemProvider.dispose();
+ if (paramerter2ParameterMapItemProvider != null)
+ paramerter2ParameterMapItemProvider.dispose();
+ if (methodCallItemProvider != null)
+ methodCallItemProvider.dispose();
+ if (patternVariableItemProvider != null)
+ patternVariableItemProvider.dispose();
+ if (patternInjectedCallItemProvider != null)
+ patternInjectedCallItemProvider.dispose();
+ if (basicQueryItemProvider != null)
+ basicQueryItemProvider.dispose();
+ if (stringQueryItemProvider != null)
+ stringQueryItemProvider.dispose();
+ if (customQueryItemProvider != null)
+ customQueryItemProvider.dispose();
+ if (string2PatternListItemProvider != null)
+ string2PatternListItemProvider.dispose();
+ if (string2StringItemProvider != null)
+ string2StringItemProvider.dispose();
+ if (typePatternExecutionReporterItemProvider != null)
+ typePatternExecutionReporterItemProvider.dispose();
+ if (backCallItemProvider != null)
+ backCallItemProvider.dispose();
+ if (typePatternCallBackHandlerItemProvider != null)
+ typePatternCallBackHandlerItemProvider.dispose();
+ if (typePatternDomainVisitorItemProvider != null)
+ typePatternDomainVisitorItemProvider.dispose();
+ if (typePatternListItemProvider != null)
+ typePatternListItemProvider.dispose();
+ }
+
+ /**
+ * A child creation extender for the {@link FcorePackage}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class FcoreChildCreationExtender implements IChildCreationExtender {
+ /**
+ * The switch for creating child descriptors specific to each extended class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static class CreationSwitch extends FcoreSwitch<Object> {
+ /**
+ * The child descriptors being populated.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected List<Object> newChildDescriptors;
+
+ /**
+ * The domain in which to create the children.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EditingDomain editingDomain;
+
+ /**
+ * Creates the a switch for populating child descriptors in the given domain.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ CreationSwitch(List<Object> newChildDescriptors, EditingDomain editingDomain) {
+ this.newChildDescriptors = newChildDescriptors;
+ this.editingDomain = editingDomain;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object caseContract(Contract object) {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.CONTRACT__TYPE, PatternFactory.eINSTANCE.createTypePatternExecutionReporter()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.CONTRACT__TYPE, PatternFactory.eINSTANCE.createTypePatternCallBackHandler()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.CONTRACT__TYPE, PatternFactory.eINSTANCE.createTypePatternDomainVisitor()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.CONTRACT__TYPE, PatternFactory.eINSTANCE.createTypePatternList()));
+
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object caseViewpointContainer(ViewpointContainer object) {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.VIEWPOINT_CONTAINER__VIEWPOINTS, PatternFactory.eINSTANCE.createPatternViewpoint()));
+
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object caseOrchestrationParameter(OrchestrationParameter object) {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.ORCHESTRATION_PARAMETER__TYPE, PatternFactory.eINSTANCE.createTypePatternExecutionReporter()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.ORCHESTRATION_PARAMETER__TYPE, PatternFactory.eINSTANCE.createTypePatternCallBackHandler()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.ORCHESTRATION_PARAMETER__TYPE, PatternFactory.eINSTANCE.createTypePatternDomainVisitor()));
+
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.ORCHESTRATION_PARAMETER__TYPE, PatternFactory.eINSTANCE.createTypePatternList()));
+
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public Object caseInvocationContract(InvocationContract object) {
+
+ if (object.getInvokedContract() == null || object.getInvokedContract().getType() == null) {
+ return null;
+ }
+
+ {
+ TypePatternExecutionReporter type = PatternFactory.eINSTANCE.createTypePatternExecutionReporter();
+ if (ClassHelper.asSubClass(type.getType(), object.getInvokedContract().getType().getType())) {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.INVOCATION_CONTRACT__TYPE, type));
+ }
+ }
+ {
+ TypePatternList type = PatternFactory.eINSTANCE.createTypePatternList();
+ if (ClassHelper.asSubClass(type.getType(), object.getInvokedContract().getType().getType())) {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.INVOCATION_CONTRACT__TYPE, type));
+ }
+ }
+ {
+ TypePatternCallBackHandler type = PatternFactory.eINSTANCE.createTypePatternCallBackHandler();
+ if (ClassHelper.asSubClass(type.getType(), object.getInvokedContract().getType().getType())) {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.INVOCATION_CONTRACT__TYPE, type));
+ }
+ }
+ {
+ TypePatternDomainVisitor type = PatternFactory.eINSTANCE.createTypePatternDomainVisitor();
+ if (ClassHelper.asSubClass(type.getType(), object.getInvokedContract().getType().getType())) {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.INVOCATION_CONTRACT__TYPE, type));
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CommandParameter createChildParameter(Object feature, Object child) {
+ return new CommandParameter(null, feature, child);
+ }
+
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Collection<Object> getNewChildDescriptors(Object object, EditingDomain editingDomain) {
+ ArrayList<Object> result = new ArrayList<Object>();
+ new CreationSwitch(result, editingDomain).doSwitch((EObject) object);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceLocator getResourceLocator() {
+ return EGFModelEditPlugin.INSTANCE;
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/PatternLibraryItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/PatternLibraryItemProvider.java
new file mode 100644
index 0000000..64b2a46
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/PatternLibraryItemProvider.java
@@ -0,0 +1,173 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.pattern.PatternLibrary;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.pattern.PatternLibrary} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class PatternLibraryItemProvider extends PatternElementItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider,
+ IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public PatternLibraryItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(PatternPackage.Literals.PATTERN_LIBRARY__ELEMENTS);
+ childrenFeatures.add(PatternPackage.Literals.PATTERN_LIBRARY__FILTERS);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns PatternLibrary.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/PatternLibrary")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((PatternLibrary) object).getName();
+ return label == null || label.length() == 0 ? "[" + getString("_UI_PatternLibrary_type") + "]" : //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ label + " [" + getString("_UI_PatternLibrary_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(PatternLibrary.class)) {
+ case PatternPackage.PATTERN_LIBRARY__ELEMENTS:
+ case PatternPackage.PATTERN_LIBRARY__FILTERS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ // super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ // newChildDescriptors.add(createChildParameter(PatternPackage.Literals.PATTERN_LIBRARY__ELEMENTS,
+ // PatternFactory.eINSTANCE.createPattern()));
+ //
+ // newChildDescriptors.add(createChildParameter(PatternPackage.Literals.PATTERN_LIBRARY__ELEMENTS,
+ // PatternFactory.eINSTANCE.createPatternLibrary()));
+ //
+ // newChildDescriptors.add(createChildParameter(PatternPackage.Literals.PATTERN_LIBRARY__FILTERS,
+ // PatternFactory.eINSTANCE.create(PatternPackage.Literals.STRING2_PATTERN_LIST)));
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/PatternMethodItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/PatternMethodItemProvider.java
new file mode 100644
index 0000000..357b782
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/PatternMethodItemProvider.java
@@ -0,0 +1,171 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.edit.EGFModelEditPlugin;
+import org.eclipse.egf.model.fcore.provider.NamedModelElementItemProvider;
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.pattern.PatternMethod}
+ * object. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class PatternMethodItemProvider extends NamedModelElementItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public PatternMethodItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addPatternFilePathPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Pattern File Path feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addPatternFilePathPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PatternMethod_patternFilePath_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_PatternMethod_patternFilePath_feature", "_UI_PatternMethod_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ PatternPackage.Literals.PATTERN_METHOD__PATTERN_FILE_PATH, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This returns PatternMethod.gif. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public Object getImage(Object object) {
+ PatternMethod method = (PatternMethod) object;
+ if (method.getPattern() != null && method.getPattern().eGet(PatternPackage.Literals.PATTERN__HEADER_METHOD) == method) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/PatternHeaderMethod")); //$NON-NLS-1$
+ } else if (method.getPattern() != null && method.getPattern().eGet(PatternPackage.Literals.PATTERN__FOOTER_METHOD) == method) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/PatternFooterMethod")); //$NON-NLS-1$
+ }
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/PatternMethod")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ PatternMethod method = (PatternMethod) object;
+ String label = method.getName();
+ String type = getString("_UI_PatternMethod_type"); //$NON-NLS-1$
+ if (method.getPattern() != null && method.getPattern().eGet(PatternPackage.Literals.PATTERN__HEADER_METHOD) == method) {
+ type = getString("_UI_Pattern_headerMethod_feature") + " " + type; //$NON-NLS-1$ //$NON-NLS-2$
+ } else if (method.getPattern() != null && method.getPattern().eGet(PatternPackage.Literals.PATTERN__FOOTER_METHOD) == method) {
+ type = getString("_UI_Pattern_footerMethod_feature") + " " + type; //$NON-NLS-1$ //$NON-NLS-2$
+ } else if (method.getPattern() != null && method.getPattern().eGet(PatternPackage.Literals.PATTERN__METHODS) != null) {
+ @SuppressWarnings("unchecked")
+ EList<PatternMethod> list = (EList<PatternMethod>) method.getPattern().eGet(PatternPackage.Literals.PATTERN__METHODS);
+ if (list.contains(method)) {
+ type = getString("_UI_Pattern_methods_feature") + " " + type; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+ return label == null || label.length() == 0 ? type : type + " " + label; //$NON-NLS-1$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(PatternMethod.class)) {
+ case PatternPackage.PATTERN_METHOD__PATTERN_FILE_PATH:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EGFModelEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/PatternNatureItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/PatternNatureItemProvider.java
new file mode 100644
index 0000000..a30c660
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/PatternNatureItemProvider.java
@@ -0,0 +1,117 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.edit.EGFModelEditPlugin;
+import org.eclipse.egf.model.fcore.provider.NamedModelElementItemProvider;
+import org.eclipse.egf.model.pattern.PatternNature;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.pattern.PatternNature} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PatternNatureItemProvider extends NamedModelElementItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PatternNatureItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((PatternNature) object).getName();
+ return label == null || label.length() == 0 ? "[" + getString("_UI_PatternNature_type") + "]" : //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ label + " [" + getString("_UI_PatternNature_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EGFModelEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/PatternParameterItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/PatternParameterItemProvider.java
new file mode 100644
index 0000000..81cb5f8
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/PatternParameterItemProvider.java
@@ -0,0 +1,189 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.edit.EGFModelEditPlugin;
+import org.eclipse.egf.model.fcore.provider.NamedModelElementItemProvider;
+import org.eclipse.egf.model.pattern.PatternFactory;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.egf.model.pattern.PatternParameter;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.pattern.PatternParameter} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PatternParameterItemProvider extends NamedModelElementItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PatternParameterItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addTypePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Type feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addTypePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PatternParameter_type_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_PatternParameter_type_feature", "_UI_PatternParameter_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ PatternPackage.Literals.PATTERN_PARAMETER__TYPE, true, false, true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(PatternPackage.Literals.PATTERN_PARAMETER__QUERY);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns PatternParameter.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/PatternParameter")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((PatternParameter) object).getName();
+ return label == null || label.length() == 0 ? "[" + getString("_UI_PatternParameter_type") + "]" : //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ label + " [" + getString("_UI_PatternParameter_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(PatternParameter.class)) {
+ case PatternPackage.PATTERN_PARAMETER__QUERY:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add(createChildParameter(PatternPackage.Literals.PATTERN_PARAMETER__QUERY, PatternFactory.eINSTANCE.createBasicQuery()));
+
+ newChildDescriptors.add(createChildParameter(PatternPackage.Literals.PATTERN_PARAMETER__QUERY, PatternFactory.eINSTANCE.createStringQuery()));
+
+ newChildDescriptors.add(createChildParameter(PatternPackage.Literals.PATTERN_PARAMETER__QUERY, PatternFactory.eINSTANCE.createCustomQuery()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EGFModelEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/PatternVariableItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/PatternVariableItemProvider.java
new file mode 100644
index 0000000..b08efd9
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/PatternVariableItemProvider.java
@@ -0,0 +1,151 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.edit.EGFModelEditPlugin;
+import org.eclipse.egf.model.fcore.provider.NamedModelElementItemProvider;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.egf.model.pattern.PatternVariable;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.pattern.PatternVariable} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PatternVariableItemProvider extends NamedModelElementItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PatternVariableItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addTypePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Type feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addTypePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PatternVariable_type_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_PatternVariable_type_feature", "_UI_PatternVariable_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ PatternPackage.Literals.PATTERN_VARIABLE__TYPE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This returns PatternVariable.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/PatternVariable")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((PatternVariable) object).getName();
+ return label == null || label.length() == 0 ? "[" + getString("_UI_PatternVariable_type") + "]" : //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ label + " [" + getString("_UI_PatternVariable_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(PatternVariable.class)) {
+ case PatternPackage.PATTERN_VARIABLE__TYPE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EGFModelEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/PatternViewpointItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/PatternViewpointItemProvider.java
new file mode 100644
index 0000000..2504009
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/PatternViewpointItemProvider.java
@@ -0,0 +1,169 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.edit.EGFModelEditPlugin;
+import org.eclipse.egf.model.fcore.provider.ViewpointItemProvider;
+import org.eclipse.egf.model.pattern.PatternFactory;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.egf.model.pattern.PatternViewpoint;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.pattern.PatternViewpoint} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PatternViewpointItemProvider extends ViewpointItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PatternViewpointItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(PatternPackage.Literals.PATTERN_VIEWPOINT__LIBRARIES);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns PatternViewpoint.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/PatternViewpoint")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_PatternViewpoint_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(PatternViewpoint.class)) {
+ case PatternPackage.PATTERN_VIEWPOINT__LIBRARIES:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add(createChildParameter(PatternPackage.Literals.PATTERN_VIEWPOINT__LIBRARIES, PatternFactory.eINSTANCE.createPatternLibrary()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EGFModelEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/QueryItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/QueryItemProvider.java
new file mode 100644
index 0000000..9dc5073
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/QueryItemProvider.java
@@ -0,0 +1,176 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.edit.EGFModelEditPlugin;
+import org.eclipse.egf.model.fcore.provider.ModelElementItemProvider;
+import org.eclipse.egf.model.pattern.PatternFactory;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.egf.model.pattern.Query;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.pattern.Query} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class QueryItemProvider extends ModelElementItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public QueryItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addExtensionIdPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Extension Id feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addExtensionIdPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Query_extensionId_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Query_extensionId_feature", "_UI_Query_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ PatternPackage.Literals.QUERY__EXTENSION_ID, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(PatternPackage.Literals.QUERY__QUERY_CONTEXT);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_Query_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Query.class)) {
+ case PatternPackage.QUERY__EXTENSION_ID:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case PatternPackage.QUERY__QUERY_CONTEXT:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add(createChildParameter(PatternPackage.Literals.QUERY__QUERY_CONTEXT, PatternFactory.eINSTANCE.create(PatternPackage.Literals.STRING2_STRING)));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EGFModelEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/String2PatternListItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/String2PatternListItemProvider.java
new file mode 100644
index 0000000..34d9946
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/String2PatternListItemProvider.java
@@ -0,0 +1,177 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.provider;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.egf.model.edit.EGFModelEditPlugin;
+
+import org.eclipse.egf.model.pattern.PatternPackage;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link java.util.Map.Entry} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class String2PatternListItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String2PatternListItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addKeyPropertyDescriptor(object);
+ addValuePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Key feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addKeyPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_String2PatternList_key_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_String2PatternList_key_feature", "_UI_String2PatternList_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ PatternPackage.Literals.STRING2_PATTERN_LIST__KEY, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Value feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addValuePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_String2PatternList_value_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_String2PatternList_value_feature", "_UI_String2PatternList_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ PatternPackage.Literals.STRING2_PATTERN_LIST__VALUE, true, false, true, null, null, null));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean hasChildren(Object object) {
+ return hasChildren(object, true);
+ }
+
+ /**
+ * This returns String2PatternList.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/String2PatternList")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ Map.Entry<?, ?> string2PatternList = (Map.Entry<?, ?>) object;
+ return "" + string2PatternList.getKey() + " -> " + string2PatternList.getValue(); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Map.Entry.class)) {
+ case PatternPackage.STRING2_PATTERN_LIST__KEY:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EGFModelEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/String2StringItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/String2StringItemProvider.java
new file mode 100644
index 0000000..2e33edf
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/String2StringItemProvider.java
@@ -0,0 +1,178 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.provider;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.egf.model.edit.EGFModelEditPlugin;
+
+import org.eclipse.egf.model.pattern.PatternPackage;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link java.util.Map.Entry} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class String2StringItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String2StringItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addKeyPropertyDescriptor(object);
+ addValuePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Key feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addKeyPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_String2String_key_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_String2String_key_feature", "_UI_String2String_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ PatternPackage.Literals.STRING2_STRING__KEY, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Value feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addValuePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_String2String_value_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_String2String_value_feature", "_UI_String2String_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ PatternPackage.Literals.STRING2_STRING__VALUE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean hasChildren(Object object) {
+ return hasChildren(object, true);
+ }
+
+ /**
+ * This returns String2String.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/String2String")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ Map.Entry<?, ?> string2String = (Map.Entry<?, ?>) object;
+ return "" + string2String.getKey() + " -> " + string2String.getValue(); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Map.Entry.class)) {
+ case PatternPackage.STRING2_STRING__KEY:
+ case PatternPackage.STRING2_STRING__VALUE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EGFModelEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/StringQueryItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/StringQueryItemProvider.java
new file mode 100644
index 0000000..2ffcef4
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/StringQueryItemProvider.java
@@ -0,0 +1,119 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.pattern.StringQuery} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class StringQueryItemProvider extends QueryItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider,
+ IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public StringQueryItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns StringQuery.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/StringQuery")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_StringQuery_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/SuperCallItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/SuperCallItemProvider.java
new file mode 100644
index 0000000..6c49ea3
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/SuperCallItemProvider.java
@@ -0,0 +1,116 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.pattern.SuperCall;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.pattern.SuperCall} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class SuperCallItemProvider extends CallItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SuperCallItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns SuperCall.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/SuperCall")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((SuperCall) object).getID();
+ return label == null || label.length() == 0 ? "[" + getString("_UI_SuperCall_type") + "]" : //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ label + " [" + getString("_UI_SuperCall_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/TypePatternCallBackHandlerItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/TypePatternCallBackHandlerItemProvider.java
new file mode 100644
index 0000000..e3b10b9
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/TypePatternCallBackHandlerItemProvider.java
@@ -0,0 +1,137 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.edit.EGFModelEditPlugin;
+import org.eclipse.egf.model.types.provider.TypeAbstractClassItemProvider;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the item provider adapter for a
+ * {@link org.eclipse.egf.model.pattern.TypePatternCallBackHandler} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class TypePatternCallBackHandlerItemProvider extends TypeAbstractClassItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypePatternCallBackHandlerItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns TypePatternCallBackHandler.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/TypePatternCallBackHandler")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_TypePatternCallBackHandler_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to
+ * update any cached
+ * children and by creating a viewer notification, which it passes to
+ * {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EGFModelEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/TypePatternDomainVisitorItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/TypePatternDomainVisitorItemProvider.java
new file mode 100644
index 0000000..4e67264
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/TypePatternDomainVisitorItemProvider.java
@@ -0,0 +1,137 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.edit.EGFModelEditPlugin;
+import org.eclipse.egf.model.types.provider.TypeAbstractClassItemProvider;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the item provider adapter for a
+ * {@link org.eclipse.egf.model.pattern.TypePatternDomainVisitor} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class TypePatternDomainVisitorItemProvider extends TypeAbstractClassItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypePatternDomainVisitorItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns TypePatternDomainVisitor.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/TypePatternDomainVisitor")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_TypePatternDomainVisitor_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to
+ * update any cached
+ * children and by creating a viewer notification, which it passes to
+ * {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EGFModelEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/TypePatternExecutionReporterItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/TypePatternExecutionReporterItemProvider.java
new file mode 100644
index 0000000..94e861f
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/TypePatternExecutionReporterItemProvider.java
@@ -0,0 +1,134 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.edit.EGFModelEditPlugin;
+import org.eclipse.egf.model.types.provider.TypeAbstractClassItemProvider;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.pattern.TypePatternExecutionReporter} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class TypePatternExecutionReporterItemProvider extends TypeAbstractClassItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider,
+ ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypePatternExecutionReporterItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns TypePatternExecutionReporter.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/TypePatternExecutionReporter")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_TypePatternExecutionReporter_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EGFModelEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/TypePatternListItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/TypePatternListItemProvider.java
new file mode 100644
index 0000000..6734dfe
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/pattern/provider/TypePatternListItemProvider.java
@@ -0,0 +1,153 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.edit.EGFModelEditPlugin;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.egf.model.types.provider.TypeItemProvider;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the item provider adapter for a
+ * {@link org.eclipse.egf.model.pattern.TypePatternList} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class TypePatternListItemProvider extends TypeItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypePatternListItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addElementsPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Elements feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void addElementsPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TypePatternList_elements_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_TypePatternList_elements_feature", "_UI_TypePatternList_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ PatternPackage.Literals.TYPE_PATTERN_LIST__ELEMENTS, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns TypePatternList.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/TypePatternList")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_TypePatternList_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to
+ * update any cached
+ * children and by creating a viewer notification, which it passes to
+ * {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EGFModelEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeAbstractClassItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeAbstractClassItemProvider.java
new file mode 100644
index 0000000..07d7783
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeAbstractClassItemProvider.java
@@ -0,0 +1,126 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.types.TypeAbstractClass;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.types.TypeAbstractClass} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TypeAbstractClassItemProvider extends TypeItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TypeAbstractClassItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addValuePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Value feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addValuePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TypeAbstractClass_value_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_TypeAbstractClass_value_feature", "_UI_TypeAbstractClass_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ TypesPackage.Literals.TYPE_ABSTRACT_CLASS__VALUE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_DataPropertyCategory"), //$NON-NLS-1$
+ null));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_TypeAbstractClass_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(TypeAbstractClass.class)) {
+ case TypesPackage.TYPE_ABSTRACT_CLASS__VALUE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeBigDecimalItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeBigDecimalItemProvider.java
new file mode 100644
index 0000000..673f970
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeBigDecimalItemProvider.java
@@ -0,0 +1,137 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.types.TypeBigDecimal;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.types.TypeBigDecimal} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TypeBigDecimalItemProvider extends TypeObjectItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TypeBigDecimalItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addValuePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Value feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addValuePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TypeBigDecimal_value_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_TypeBigDecimal_value_feature", "_UI_TypeBigDecimal_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ TypesPackage.Literals.TYPE_BIG_DECIMAL__VALUE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_DataPropertyCategory"), //$NON-NLS-1$
+ null));
+ }
+
+ /**
+ * This returns TypeBigDecimal.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/TypeBigDecimal")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_TypeBigDecimal_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(TypeBigDecimal.class)) {
+ case TypesPackage.TYPE_BIG_DECIMAL__VALUE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeBigIntegerItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeBigIntegerItemProvider.java
new file mode 100644
index 0000000..d387349
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeBigIntegerItemProvider.java
@@ -0,0 +1,137 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.types.TypeBigInteger;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.types.TypeBigInteger} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TypeBigIntegerItemProvider extends TypeObjectItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TypeBigIntegerItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addValuePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Value feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addValuePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TypeBigInteger_value_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_TypeBigInteger_value_feature", "_UI_TypeBigInteger_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ TypesPackage.Literals.TYPE_BIG_INTEGER__VALUE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_DataPropertyCategory"), //$NON-NLS-1$
+ null));
+ }
+
+ /**
+ * This returns TypeBigInteger.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/TypeBigInteger")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_TypeBigInteger_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(TypeBigInteger.class)) {
+ case TypesPackage.TYPE_BIG_INTEGER__VALUE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeBooleanItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeBooleanItemProvider.java
new file mode 100644
index 0000000..ebc416a
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeBooleanItemProvider.java
@@ -0,0 +1,137 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.types.TypeBoolean;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.types.TypeBoolean} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TypeBooleanItemProvider extends TypeObjectItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TypeBooleanItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addValuePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Value feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addValuePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TypeBoolean_value_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_TypeBoolean_value_feature", "_UI_TypeBoolean_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ TypesPackage.Literals.TYPE_BOOLEAN__VALUE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_DataPropertyCategory"), //$NON-NLS-1$
+ null));
+ }
+
+ /**
+ * This returns TypeBoolean.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/TypeBoolean")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_TypeBoolean_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(TypeBoolean.class)) {
+ case TypesPackage.TYPE_BOOLEAN__VALUE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeByteItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeByteItemProvider.java
new file mode 100644
index 0000000..1254d8f
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeByteItemProvider.java
@@ -0,0 +1,137 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.types.TypeByte;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.types.TypeByte} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TypeByteItemProvider extends TypeObjectItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TypeByteItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addValuePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Value feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addValuePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TypeByte_value_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_TypeByte_value_feature", "_UI_TypeByte_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ TypesPackage.Literals.TYPE_BYTE__VALUE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_DataPropertyCategory"), //$NON-NLS-1$
+ null));
+ }
+
+ /**
+ * This returns TypeByte.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/TypeByte")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_TypeByte_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(TypeByte.class)) {
+ case TypesPackage.TYPE_BYTE__VALUE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeCharacterItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeCharacterItemProvider.java
new file mode 100644
index 0000000..aba2629
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeCharacterItemProvider.java
@@ -0,0 +1,137 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.types.TypeCharacter;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.types.TypeCharacter} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TypeCharacterItemProvider extends TypeObjectItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TypeCharacterItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addValuePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Value feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addValuePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TypeCharacter_value_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_TypeCharacter_value_feature", "_UI_TypeCharacter_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ TypesPackage.Literals.TYPE_CHARACTER__VALUE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_DataPropertyCategory"), //$NON-NLS-1$
+ null));
+ }
+
+ /**
+ * This returns TypeCharacter.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/TypeCharacter")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_TypeCharacter_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(TypeCharacter.class)) {
+ case TypesPackage.TYPE_CHARACTER__VALUE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeCollectionItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeCollectionItemProvider.java
new file mode 100644
index 0000000..183854a
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeCollectionItemProvider.java
@@ -0,0 +1,119 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.types.TypeCollection}
+ * object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class TypeCollectionItemProvider extends TypeAbstractClassItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypeCollectionItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns TypeCollection.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/TypeCollection")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_TypeCollection_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeDateItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeDateItemProvider.java
new file mode 100644
index 0000000..762a0c6
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeDateItemProvider.java
@@ -0,0 +1,137 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.types.TypeDate;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.types.TypeDate} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TypeDateItemProvider extends TypeObjectItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TypeDateItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addValuePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Value feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addValuePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TypeDate_value_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_TypeDate_value_feature", "_UI_TypeDate_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ TypesPackage.Literals.TYPE_DATE__VALUE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_DataPropertyCategory"), //$NON-NLS-1$
+ null));
+ }
+
+ /**
+ * This returns TypeDate.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/TypeDate")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_TypeDate_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(TypeDate.class)) {
+ case TypesPackage.TYPE_DATE__VALUE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeDoubleItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeDoubleItemProvider.java
new file mode 100644
index 0000000..6c35442
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeDoubleItemProvider.java
@@ -0,0 +1,137 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.types.TypeDouble;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.types.TypeDouble} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TypeDoubleItemProvider extends TypeObjectItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TypeDoubleItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addValuePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Value feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addValuePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TypeDouble_value_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_TypeDouble_value_feature", "_UI_TypeDouble_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ TypesPackage.Literals.TYPE_DOUBLE__VALUE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_DataPropertyCategory"), //$NON-NLS-1$
+ null));
+ }
+
+ /**
+ * This returns TypeDouble.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/TypeDouble")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_TypeDouble_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(TypeDouble.class)) {
+ case TypesPackage.TYPE_DOUBLE__VALUE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeElementItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeElementItemProvider.java
new file mode 100644
index 0000000..1e40e15
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeElementItemProvider.java
@@ -0,0 +1,164 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.types.TypeElement;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IChildCreationExtender;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.types.TypeElement} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TypeElementItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TypeElementItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addIDPropertyDescriptor(object);
+ addDescriptionPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the ID feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addIDPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TypeElement_iD_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_TypeElement_iD_feature", "_UI_TypeElement_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ TypesPackage.Literals.TYPE_ELEMENT__ID, false, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_IdentifierPropertyCategory"), //$NON-NLS-1$
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Description feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDescriptionPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TypeElement_description_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_TypeElement_description_feature", "_UI_TypeElement_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ TypesPackage.Literals.TYPE_ELEMENT__DESCRIPTION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_DocumentationPropertyCategory"), //$NON-NLS-1$
+ null));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean hasChildren(Object object) {
+ return hasChildren(object, true);
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_TypeElement_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(TypeElement.class)) {
+ case TypesPackage.TYPE_ELEMENT__DESCRIPTION:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return ((IChildCreationExtender) adapterFactory).getResourceLocator();
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeFloatItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeFloatItemProvider.java
new file mode 100644
index 0000000..41dd665
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeFloatItemProvider.java
@@ -0,0 +1,137 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.types.TypeFloat;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.types.TypeFloat} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TypeFloatItemProvider extends TypeObjectItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TypeFloatItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addValuePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Value feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addValuePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TypeFloat_value_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_TypeFloat_value_feature", "_UI_TypeFloat_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ TypesPackage.Literals.TYPE_FLOAT__VALUE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_DataPropertyCategory"), //$NON-NLS-1$
+ null));
+ }
+
+ /**
+ * This returns TypeFloat.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/TypeFloat")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_TypeFloat_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(TypeFloat.class)) {
+ case TypesPackage.TYPE_FLOAT__VALUE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeGeneratorAdapterFactoryItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeGeneratorAdapterFactoryItemProvider.java
new file mode 100644
index 0000000..f62cb0b
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeGeneratorAdapterFactoryItemProvider.java
@@ -0,0 +1,119 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the item provider adapter for a
+ * {@link org.eclipse.egf.model.types.TypeGeneratorAdapterFactory} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class TypeGeneratorAdapterFactoryItemProvider extends TypeAbstractClassItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypeGeneratorAdapterFactoryItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns TypeGeneratorAdapterFactory.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/TypeGeneratorAdapterFactory")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_TypeGeneratorAdapterFactory_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeIntegerItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeIntegerItemProvider.java
new file mode 100644
index 0000000..7a190f5
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeIntegerItemProvider.java
@@ -0,0 +1,137 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.types.TypeInteger;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.types.TypeInteger} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TypeIntegerItemProvider extends TypeObjectItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TypeIntegerItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addValuePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Value feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addValuePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TypeInteger_value_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_TypeInteger_value_feature", "_UI_TypeInteger_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ TypesPackage.Literals.TYPE_INTEGER__VALUE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_DataPropertyCategory"), //$NON-NLS-1$
+ null));
+ }
+
+ /**
+ * This returns TypeInteger.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/TypeInteger")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_TypeInteger_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(TypeInteger.class)) {
+ case TypesPackage.TYPE_INTEGER__VALUE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeItemProvider.java
new file mode 100644
index 0000000..5647179
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeItemProvider.java
@@ -0,0 +1,106 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.types.Type} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class TypeItemProvider extends TypeElementItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypeItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_Type_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeListItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeListItemProvider.java
new file mode 100644
index 0000000..fdde0ba
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeListItemProvider.java
@@ -0,0 +1,118 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.types.TypeList} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class TypeListItemProvider extends TypeAbstractClassItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypeListItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns TypeList.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/TypeList")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_TypeList_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeLongItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeLongItemProvider.java
new file mode 100644
index 0000000..56717c3
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeLongItemProvider.java
@@ -0,0 +1,137 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.types.TypeLong;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.types.TypeLong} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TypeLongItemProvider extends TypeObjectItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TypeLongItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addValuePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Value feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addValuePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TypeLong_value_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_TypeLong_value_feature", "_UI_TypeLong_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ TypesPackage.Literals.TYPE_LONG__VALUE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_DataPropertyCategory"), //$NON-NLS-1$
+ null));
+ }
+
+ /**
+ * This returns TypeLong.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/TypeLong")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_TypeLong_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(TypeLong.class)) {
+ case TypesPackage.TYPE_LONG__VALUE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeMapItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeMapItemProvider.java
new file mode 100644
index 0000000..b5bc626
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeMapItemProvider.java
@@ -0,0 +1,118 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.types.TypeMap} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class TypeMapItemProvider extends TypeAbstractClassItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypeMapItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns TypeMap.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/TypeMap")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_TypeMap_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeObjectItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeObjectItemProvider.java
new file mode 100644
index 0000000..f5598e7
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeObjectItemProvider.java
@@ -0,0 +1,106 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.types.TypeObject} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class TypeObjectItemProvider extends TypeItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypeObjectItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_TypeObject_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeSetItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeSetItemProvider.java
new file mode 100644
index 0000000..f65cb66
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeSetItemProvider.java
@@ -0,0 +1,118 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.types.TypeSet} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class TypeSetItemProvider extends TypeAbstractClassItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypeSetItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns TypeSet.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/TypeSet")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_TypeSet_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeShortItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeShortItemProvider.java
new file mode 100644
index 0000000..a171510
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeShortItemProvider.java
@@ -0,0 +1,137 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.types.TypeShort;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.types.TypeShort} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TypeShortItemProvider extends TypeObjectItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TypeShortItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addValuePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Value feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addValuePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TypeShort_value_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_TypeShort_value_feature", "_UI_TypeShort_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ TypesPackage.Literals.TYPE_SHORT__VALUE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_DataPropertyCategory"), //$NON-NLS-1$
+ null));
+ }
+
+ /**
+ * This returns TypeShort.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/TypeShort")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_TypeShort_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(TypeShort.class)) {
+ case TypesPackage.TYPE_SHORT__VALUE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeStringItemProvider.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeStringItemProvider.java
new file mode 100644
index 0000000..9915dca
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypeStringItemProvider.java
@@ -0,0 +1,137 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.types.TypeString;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.types.TypeString} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TypeStringItemProvider extends TypeObjectItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TypeStringItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addValuePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Value feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addValuePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TypeString_value_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_TypeString_value_feature", "_UI_TypeString_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ TypesPackage.Literals.TYPE_STRING__VALUE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_DataPropertyCategory"), //$NON-NLS-1$
+ null));
+ }
+
+ /**
+ * This returns TypeString.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/TypeString")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_TypeString_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(TypeString.class)) {
+ case TypesPackage.TYPE_STRING__VALUE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypesItemProviderAdapterFactory.java b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypesItemProviderAdapterFactory.java
new file mode 100644
index 0000000..f570c46
--- /dev/null
+++ b/org.eclipse.egf.model.edit/generated/org/eclipse/egf/model/types/provider/TypesItemProviderAdapterFactory.java
@@ -0,0 +1,660 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.edit.EGFModelEditPlugin;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.egf.model.types.util.TypesAdapterFactory;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ChildCreationExtenderManager;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IChildCreationExtender;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TypesItemProviderAdapterFactory extends TypesAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable, IChildCreationExtender {
+ /**
+ * This keeps track of the root adapter factory that delegates to this adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ComposedAdapterFactory parentAdapterFactory;
+
+ /**
+ * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+ /**
+ * This helps manage the child creation extenders.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ChildCreationExtenderManager childCreationExtenderManager = new ChildCreationExtenderManager(EGFModelEditPlugin.INSTANCE, TypesPackage.eNS_URI);
+
+ /**
+ * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+ /**
+ * This constructs an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TypesItemProviderAdapterFactory() {
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ supportedTypes.add(IItemPropertySource.class);
+ supportedTypes.add(ITableItemLabelProvider.class);
+ supportedTypes.add(ITableItemColorProvider.class);
+ supportedTypes.add(ITableItemFontProvider.class);
+ supportedTypes.add(IItemColorProvider.class);
+ supportedTypes.add(IItemFontProvider.class);
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.types.TypeCollection} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeCollectionItemProvider typeCollectionItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.types.TypeCollection}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createTypeCollectionAdapter() {
+ if (typeCollectionItemProvider == null) {
+ typeCollectionItemProvider = new TypeCollectionItemProvider(this);
+ }
+
+ return typeCollectionItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.types.TypeList} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeListItemProvider typeListItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.types.TypeList}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createTypeListAdapter() {
+ if (typeListItemProvider == null) {
+ typeListItemProvider = new TypeListItemProvider(this);
+ }
+
+ return typeListItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.types.TypeSet} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeSetItemProvider typeSetItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.types.TypeSet}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createTypeSetAdapter() {
+ if (typeSetItemProvider == null) {
+ typeSetItemProvider = new TypeSetItemProvider(this);
+ }
+
+ return typeSetItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.types.TypeGeneratorAdapterFactory} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeGeneratorAdapterFactoryItemProvider typeGeneratorAdapterFactoryItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.types.TypeGeneratorAdapterFactory}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createTypeGeneratorAdapterFactoryAdapter() {
+ if (typeGeneratorAdapterFactoryItemProvider == null) {
+ typeGeneratorAdapterFactoryItemProvider = new TypeGeneratorAdapterFactoryItemProvider(this);
+ }
+
+ return typeGeneratorAdapterFactoryItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.types.TypeMap} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeMapItemProvider typeMapItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.types.TypeMap}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createTypeMapAdapter() {
+ if (typeMapItemProvider == null) {
+ typeMapItemProvider = new TypeMapItemProvider(this);
+ }
+
+ return typeMapItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.types.TypeBigDecimal} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeBigDecimalItemProvider typeBigDecimalItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.types.TypeBigDecimal}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createTypeBigDecimalAdapter() {
+ if (typeBigDecimalItemProvider == null) {
+ typeBigDecimalItemProvider = new TypeBigDecimalItemProvider(this);
+ }
+
+ return typeBigDecimalItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.types.TypeBigInteger} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeBigIntegerItemProvider typeBigIntegerItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.types.TypeBigInteger}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createTypeBigIntegerAdapter() {
+ if (typeBigIntegerItemProvider == null) {
+ typeBigIntegerItemProvider = new TypeBigIntegerItemProvider(this);
+ }
+
+ return typeBigIntegerItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.types.TypeBoolean} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeBooleanItemProvider typeBooleanItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.types.TypeBoolean}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createTypeBooleanAdapter() {
+ if (typeBooleanItemProvider == null) {
+ typeBooleanItemProvider = new TypeBooleanItemProvider(this);
+ }
+
+ return typeBooleanItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.types.TypeByte} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeByteItemProvider typeByteItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.types.TypeByte}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createTypeByteAdapter() {
+ if (typeByteItemProvider == null) {
+ typeByteItemProvider = new TypeByteItemProvider(this);
+ }
+
+ return typeByteItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.types.TypeCharacter} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeCharacterItemProvider typeCharacterItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.types.TypeCharacter}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createTypeCharacterAdapter() {
+ if (typeCharacterItemProvider == null) {
+ typeCharacterItemProvider = new TypeCharacterItemProvider(this);
+ }
+
+ return typeCharacterItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.types.TypeDate} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeDateItemProvider typeDateItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.types.TypeDate}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createTypeDateAdapter() {
+ if (typeDateItemProvider == null) {
+ typeDateItemProvider = new TypeDateItemProvider(this);
+ }
+
+ return typeDateItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.types.TypeDouble} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeDoubleItemProvider typeDoubleItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.types.TypeDouble}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createTypeDoubleAdapter() {
+ if (typeDoubleItemProvider == null) {
+ typeDoubleItemProvider = new TypeDoubleItemProvider(this);
+ }
+
+ return typeDoubleItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.types.TypeFloat} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeFloatItemProvider typeFloatItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.types.TypeFloat}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createTypeFloatAdapter() {
+ if (typeFloatItemProvider == null) {
+ typeFloatItemProvider = new TypeFloatItemProvider(this);
+ }
+
+ return typeFloatItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.types.TypeInteger} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeIntegerItemProvider typeIntegerItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.types.TypeInteger}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createTypeIntegerAdapter() {
+ if (typeIntegerItemProvider == null) {
+ typeIntegerItemProvider = new TypeIntegerItemProvider(this);
+ }
+
+ return typeIntegerItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.types.TypeLong} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeLongItemProvider typeLongItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.types.TypeLong}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createTypeLongAdapter() {
+ if (typeLongItemProvider == null) {
+ typeLongItemProvider = new TypeLongItemProvider(this);
+ }
+
+ return typeLongItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.types.TypeShort} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeShortItemProvider typeShortItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.types.TypeShort}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createTypeShortAdapter() {
+ if (typeShortItemProvider == null) {
+ typeShortItemProvider = new TypeShortItemProvider(this);
+ }
+
+ return typeShortItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.types.TypeString} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeStringItemProvider typeStringItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.types.TypeString}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createTypeStringAdapter() {
+ if (typeStringItemProvider == null) {
+ typeStringItemProvider = new TypeStringItemProvider(this);
+ }
+
+ return typeStringItemProvider;
+ }
+
+ /**
+ * This returns the root adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ComposeableAdapterFactory getRootAdapterFactory() {
+ return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+ }
+
+ /**
+ * This sets the composed adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
+ this.parentAdapterFactory = parentAdapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return supportedTypes.contains(type) || super.isFactoryForType(type);
+ }
+
+ /**
+ * This implementation substitutes the factory itself as the key for the adapter.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter adapt(Notifier notifier, Object type) {
+ return super.adapt(notifier, this);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object adapt(Object object, Object type) {
+ if (isFactoryForType(type)) {
+ Object adapter = super.adapt(object, type);
+ if (!(type instanceof Class<?>) || (((Class<?>) type).isInstance(adapter))) {
+ return adapter;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List<IChildCreationExtender> getChildCreationExtenders() {
+ return childCreationExtenderManager.getChildCreationExtenders();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Collection<?> getNewChildDescriptors(Object object, EditingDomain editingDomain) {
+ return childCreationExtenderManager.getNewChildDescriptors(object, editingDomain);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceLocator getResourceLocator() {
+ return childCreationExtenderManager;
+ }
+
+ /**
+ * This adds a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void addListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void fireNotifyChanged(Notification notification) {
+ changeNotifier.fireNotifyChanged(notification);
+
+ if (parentAdapterFactory != null) {
+ parentAdapterFactory.fireNotifyChanged(notification);
+ }
+ }
+
+ /**
+ * This disposes all of the item providers created by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void dispose() {
+ if (typeCollectionItemProvider != null)
+ typeCollectionItemProvider.dispose();
+ if (typeListItemProvider != null)
+ typeListItemProvider.dispose();
+ if (typeSetItemProvider != null)
+ typeSetItemProvider.dispose();
+ if (typeGeneratorAdapterFactoryItemProvider != null)
+ typeGeneratorAdapterFactoryItemProvider.dispose();
+ if (typeMapItemProvider != null)
+ typeMapItemProvider.dispose();
+ if (typeBigDecimalItemProvider != null)
+ typeBigDecimalItemProvider.dispose();
+ if (typeBigIntegerItemProvider != null)
+ typeBigIntegerItemProvider.dispose();
+ if (typeBooleanItemProvider != null)
+ typeBooleanItemProvider.dispose();
+ if (typeByteItemProvider != null)
+ typeByteItemProvider.dispose();
+ if (typeCharacterItemProvider != null)
+ typeCharacterItemProvider.dispose();
+ if (typeDateItemProvider != null)
+ typeDateItemProvider.dispose();
+ if (typeDoubleItemProvider != null)
+ typeDoubleItemProvider.dispose();
+ if (typeFloatItemProvider != null)
+ typeFloatItemProvider.dispose();
+ if (typeIntegerItemProvider != null)
+ typeIntegerItemProvider.dispose();
+ if (typeLongItemProvider != null)
+ typeLongItemProvider.dispose();
+ if (typeShortItemProvider != null)
+ typeShortItemProvider.dispose();
+ if (typeStringItemProvider != null)
+ typeStringItemProvider.dispose();
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateActivity_contractContainer_ContractContainer.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateActivity_contractContainer_ContractContainer.gif
new file mode 100644
index 0000000..39d25e7
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateActivity_contractContainer_ContractContainer.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContractContainer_contracts_Contract.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContractContainer_contracts_Contract.gif
new file mode 100644
index 0000000..71b8fb8
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContractContainer_contracts_Contract.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContractContainer_contracts_FactoryComponentContract.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContractContainer_contracts_FactoryComponentContract.gif
new file mode 100644
index 0000000..71b8fb8
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContractContainer_contracts_FactoryComponentContract.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TYpeDomainURI.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TYpeDomainURI.gif
new file mode 100644
index 0000000..6b23cee
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TYpeDomainURI.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeBigDecimal.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeBigDecimal.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeBigDecimal.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeBigInteger.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeBigInteger.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeBigInteger.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeBoolean.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeBoolean.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeBoolean.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeByte.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeByte.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeByte.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeCharacter.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeCharacter.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeCharacter.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeCollection.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeCollection.gif
new file mode 100644
index 0000000..1875722
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeCollection.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeDate.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeDate.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeDate.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeDomainEPackage.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeDomainEPackage.gif
new file mode 100644
index 0000000..9434fd6
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeDomainEPackage.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeDouble.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeDouble.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeDouble.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeFloat.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeFloat.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeFloat.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeGeneratorAdapterFactory.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeGeneratorAdapterFactory.gif
new file mode 100644
index 0000000..2a9fa02
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeGeneratorAdapterFactory.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeInteger.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeInteger.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeInteger.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeList.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeList.gif
new file mode 100644
index 0000000..1875722
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeList.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeLong.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeLong.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeLong.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeMap.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeMap.gif
new file mode 100644
index 0000000..1875722
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeMap.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypePatternCallBackHandler.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypePatternCallBackHandler.gif
new file mode 100644
index 0000000..babcc9e
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypePatternCallBackHandler.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypePatternDomainVisitor.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypePatternDomainVisitor.gif
new file mode 100644
index 0000000..c41c6fc
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypePatternDomainVisitor.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypePatternExecutionReporter.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypePatternExecutionReporter.gif
new file mode 100644
index 0000000..2a9fa02
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypePatternExecutionReporter.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypePatternList.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypePatternList.gif
new file mode 100644
index 0000000..bcf7097
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypePatternList.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypePatternModelVisitor.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypePatternModelVisitor.gif
new file mode 100644
index 0000000..19e985f
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypePatternModelVisitor.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeSet.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeSet.gif
new file mode 100644
index 0000000..1875722
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeSet.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeShort.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeShort.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeShort.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeString.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeString.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateContract_type_TypeString.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateDomainViewpoint_domains_DomainEPackage.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateDomainViewpoint_domains_DomainEPackage.gif
new file mode 100644
index 0000000..c2bed78
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateDomainViewpoint_domains_DomainEPackage.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateDomainViewpoint_domains_DomainURI.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateDomainViewpoint_domains_DomainURI.gif
new file mode 100644
index 0000000..6b23cee
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateDomainViewpoint_domains_DomainURI.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateFactoryComponent.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateFactoryComponent.gif
new file mode 100644
index 0000000..5b7e63d
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateFactoryComponent.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateFactoryComponent_viewpointContainer_ViewpointContainer.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateFactoryComponent_viewpointContainer_ViewpointContainer.gif
new file mode 100644
index 0000000..1d92f49
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateFactoryComponent_viewpointContainer_ViewpointContainer.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContractContainer_invocationContracts_InvocationContract.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContractContainer_invocationContracts_InvocationContract.gif
new file mode 100644
index 0000000..5bd668a
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContractContainer_invocationContracts_InvocationContract.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeBigDecimal.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeBigDecimal.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeBigDecimal.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeBigInteger.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeBigInteger.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeBigInteger.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeBoolean.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeBoolean.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeBoolean.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeByte.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeByte.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeByte.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeCharacter.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeCharacter.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeCharacter.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeCollection.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeCollection.gif
new file mode 100644
index 0000000..1875722
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeCollection.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeDate.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeDate.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeDate.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeDomainEPackage.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeDomainEPackage.gif
new file mode 100644
index 0000000..9434fd6
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeDomainEPackage.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeDomainURI.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeDomainURI.gif
new file mode 100644
index 0000000..6b23cee
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeDomainURI.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeDouble.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeDouble.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeDouble.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeFloat.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeFloat.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeFloat.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeGeneratorAdapterFactory.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeGeneratorAdapterFactory.gif
new file mode 100644
index 0000000..2a9fa02
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeGeneratorAdapterFactory.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeInteger.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeInteger.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeInteger.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeList.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeList.gif
new file mode 100644
index 0000000..1875722
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeList.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeLong.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeLong.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeLong.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeMap.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeMap.gif
new file mode 100644
index 0000000..1875722
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeMap.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypePatternCallBackHandler.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypePatternCallBackHandler.gif
new file mode 100644
index 0000000..63deb7e
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypePatternCallBackHandler.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypePatternDomainVisitor.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypePatternDomainVisitor.gif
new file mode 100644
index 0000000..fce4def
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypePatternDomainVisitor.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypePatternExecutionReporter.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypePatternExecutionReporter.gif
new file mode 100644
index 0000000..2a9fa02
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypePatternExecutionReporter.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypePatternList.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypePatternList.gif
new file mode 100644
index 0000000..bad30bb
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypePatternList.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypePatternModelVisitor.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypePatternModelVisitor.gif
new file mode 100644
index 0000000..9b14586
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypePatternModelVisitor.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeSet.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeSet.gif
new file mode 100644
index 0000000..1875722
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeSet.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeShort.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeShort.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeShort.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeString.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeString.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocationContract_type_TypeString.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocation_invocationContractContainer_InvocationContractContainer.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocation_invocationContractContainer_InvocationContractContainer.gif
new file mode 100644
index 0000000..5bd668a
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateInvocation_invocationContractContainer_InvocationContractContainer.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateMappingViewpoint_mappings_MappingDomain.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateMappingViewpoint_mappings_MappingDomain.gif
new file mode 100644
index 0000000..578f0ac
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateMappingViewpoint_mappings_MappingDomain.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameterContainer_orchestrationParameters_OrchestrationParameter.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameterContainer_orchestrationParameters_OrchestrationParameter.gif
new file mode 100644
index 0000000..5bd668a
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameterContainer_orchestrationParameters_OrchestrationParameter.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeBigDecimal.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeBigDecimal.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeBigDecimal.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeBigInteger.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeBigInteger.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeBigInteger.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeBoolean.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeBoolean.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeBoolean.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeByte.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeByte.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeByte.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeCharacter.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeCharacter.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeCharacter.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeCollection.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeCollection.gif
new file mode 100644
index 0000000..1875722
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeCollection.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeDate.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeDate.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeDate.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeDomainEPackage.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeDomainEPackage.gif
new file mode 100644
index 0000000..9434fd6
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeDomainEPackage.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeDomainURI.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeDomainURI.gif
new file mode 100644
index 0000000..6b23cee
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeDomainURI.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeDouble.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeDouble.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeDouble.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeFloat.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeFloat.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeFloat.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeGeneratorAdapterFactory.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeGeneratorAdapterFactory.gif
new file mode 100644
index 0000000..2a9fa02
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeGeneratorAdapterFactory.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeInteger.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeInteger.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeInteger.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeList.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeList.gif
new file mode 100644
index 0000000..1875722
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeList.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeLong.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeLong.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeLong.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeMap.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeMap.gif
new file mode 100644
index 0000000..1875722
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeMap.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypePatternCallBackHandler.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypePatternCallBackHandler.gif
new file mode 100644
index 0000000..1d991c2
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypePatternCallBackHandler.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypePatternDomainVisitor.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypePatternDomainVisitor.gif
new file mode 100644
index 0000000..9b77758
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypePatternDomainVisitor.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypePatternExecutionReporter.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypePatternExecutionReporter.gif
new file mode 100644
index 0000000..2a9fa02
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypePatternExecutionReporter.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypePatternList.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypePatternList.gif
new file mode 100644
index 0000000..33e0742
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypePatternList.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypePatternModelVisitor.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypePatternModelVisitor.gif
new file mode 100644
index 0000000..ddad704
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypePatternModelVisitor.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeSet.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeSet.gif
new file mode 100644
index 0000000..1875722
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeSet.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeShort.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeShort.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeShort.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeString.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeString.gif
new file mode 100644
index 0000000..9a5e8f1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestrationParameter_type_TypeString.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestration_orchestrationParameterContainer_OrchestrationParameterContainer.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestration_orchestrationParameterContainer_OrchestrationParameterContainer.gif
new file mode 100644
index 0000000..5bd668a
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateOrchestration_orchestrationParameterContainer_OrchestrationParameterContainer.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePatternLibrary_elements_Pattern.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePatternLibrary_elements_Pattern.gif
new file mode 100644
index 0000000..e6089ce
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePatternLibrary_elements_Pattern.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePatternLibrary_elements_PatternLibrary.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePatternLibrary_elements_PatternLibrary.gif
new file mode 100644
index 0000000..56d0782
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePatternLibrary_elements_PatternLibrary.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePatternLibrary_filters_String2PatternList.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePatternLibrary_filters_String2PatternList.gif
new file mode 100644
index 0000000..9a2424e
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePatternLibrary_filters_String2PatternList.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePatternLibrary_schedulingRules_String2PatternList.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePatternLibrary_schedulingRules_String2PatternList.gif
new file mode 100644
index 0000000..9a2424e
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePatternLibrary_schedulingRules_String2PatternList.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePatternParameter_query_AdvancedQuery.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePatternParameter_query_AdvancedQuery.gif
new file mode 100644
index 0000000..f7e0ea7
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePatternParameter_query_AdvancedQuery.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePatternParameter_query_BasicQuery.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePatternParameter_query_BasicQuery.gif
new file mode 100644
index 0000000..1af04eb
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePatternParameter_query_BasicQuery.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePatternParameter_query_CustomQuery.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePatternParameter_query_CustomQuery.gif
new file mode 100644
index 0000000..828b9b1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePatternParameter_query_CustomQuery.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePatternParameter_query_StringQuery.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePatternParameter_query_StringQuery.gif
new file mode 100644
index 0000000..e4486f0
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePatternParameter_query_StringQuery.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePatternViewpoint_libraries_PatternLibrary.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePatternViewpoint_libraries_PatternLibrary.gif
new file mode 100644
index 0000000..374e25e
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePatternViewpoint_libraries_PatternLibrary.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePattern_methods_PatternMethod.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePattern_methods_PatternMethod.gif
new file mode 100644
index 0000000..99cc99d
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePattern_methods_PatternMethod.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePattern_parameters_PatternParameter.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePattern_parameters_PatternParameter.gif
new file mode 100644
index 0000000..a707b53
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePattern_parameters_PatternParameter.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePattern_variables_PatternVariable.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePattern_variables_PatternVariable.gif
new file mode 100644
index 0000000..9696206
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreatePattern_variables_PatternVariable.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateQuery_queryContext_String2String.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateQuery_queryContext_String2String.gif
new file mode 100644
index 0000000..c5374c2
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateQuery_queryContext_String2String.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateViewpointContainer_viewpoints_DomainViewpoint.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateViewpointContainer_viewpoints_DomainViewpoint.gif
new file mode 100644
index 0000000..58b45e4
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateViewpointContainer_viewpoints_DomainViewpoint.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateViewpointContainer_viewpoints_MappingViewpoint.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateViewpointContainer_viewpoints_MappingViewpoint.gif
new file mode 100644
index 0000000..9e3b20f
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateViewpointContainer_viewpoints_MappingViewpoint.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ctool16/CreateViewpointContainer_viewpoints_PatternViewpoint.gif b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateViewpointContainer_viewpoints_PatternViewpoint.gif
new file mode 100644
index 0000000..75b163e
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ctool16/CreateViewpointContainer_viewpoints_PatternViewpoint.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/AdvancedQuery.gif b/org.eclipse.egf.model.edit/icons/full/obj16/AdvancedQuery.gif
new file mode 100644
index 0000000..4365960
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/AdvancedQuery.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/BackCall.gif b/org.eclipse.egf.model.edit/icons/full/obj16/BackCall.gif
new file mode 100644
index 0000000..d3dc5a9
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/BackCall.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/BasicQuery.gif b/org.eclipse.egf.model.edit/icons/full/obj16/BasicQuery.gif
new file mode 100644
index 0000000..caf2804
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/BasicQuery.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/Contract.gif b/org.eclipse.egf.model.edit/icons/full/obj16/Contract.gif
new file mode 100644
index 0000000..53442c5
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/Contract.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/ContractContainer.gif b/org.eclipse.egf.model.edit/icons/full/obj16/ContractContainer.gif
new file mode 100644
index 0000000..d1f7656
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/ContractContainer.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/CustomQuery.gif b/org.eclipse.egf.model.edit/icons/full/obj16/CustomQuery.gif
new file mode 100644
index 0000000..94c953e
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/CustomQuery.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/DomainEPackage.gif b/org.eclipse.egf.model.edit/icons/full/obj16/DomainEPackage.gif
new file mode 100644
index 0000000..0d25526
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/DomainEPackage.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/DomainURI.gif b/org.eclipse.egf.model.edit/icons/full/obj16/DomainURI.gif
new file mode 100644
index 0000000..88cdf2a
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/DomainURI.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/DomainViewpoint.gif b/org.eclipse.egf.model.edit/icons/full/obj16/DomainViewpoint.gif
new file mode 100644
index 0000000..32aab1a
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/DomainViewpoint.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/FactoryComponent.gif b/org.eclipse.egf.model.edit/icons/full/obj16/FactoryComponent.gif
new file mode 100644
index 0000000..955d5e8
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/FactoryComponent.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/FactoryComponentContract.gif b/org.eclipse.egf.model.edit/icons/full/obj16/FactoryComponentContract.gif
new file mode 100644
index 0000000..53442c5
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/FactoryComponentContract.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/Fcore.gif b/org.eclipse.egf.model.edit/icons/full/obj16/Fcore.gif
new file mode 100644
index 0000000..b276cac
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/Fcore.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/IN.gif b/org.eclipse.egf.model.edit/icons/full/obj16/IN.gif
new file mode 100644
index 0000000..d12cafa
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/IN.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/IN_OUT.gif b/org.eclipse.egf.model.edit/icons/full/obj16/IN_OUT.gif
new file mode 100644
index 0000000..d65ee11
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/IN_OUT.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/Invocation.gif b/org.eclipse.egf.model.edit/icons/full/obj16/Invocation.gif
new file mode 100644
index 0000000..30f0c48
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/Invocation.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/InvocationContract.gif b/org.eclipse.egf.model.edit/icons/full/obj16/InvocationContract.gif
new file mode 100644
index 0000000..9076c00
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/InvocationContract.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/InvocationContractContainer.gif b/org.eclipse.egf.model.edit/icons/full/obj16/InvocationContractContainer.gif
new file mode 100644
index 0000000..9076c00
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/InvocationContractContainer.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/MappingDomain.gif b/org.eclipse.egf.model.edit/icons/full/obj16/MappingDomain.gif
new file mode 100644
index 0000000..06cd0d7
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/MappingDomain.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/MappingViewpoint.gif b/org.eclipse.egf.model.edit/icons/full/obj16/MappingViewpoint.gif
new file mode 100644
index 0000000..615ad6c
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/MappingViewpoint.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/MethodCall.gif b/org.eclipse.egf.model.edit/icons/full/obj16/MethodCall.gif
new file mode 100644
index 0000000..30f0c48
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/MethodCall.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/OUT.gif b/org.eclipse.egf.model.edit/icons/full/obj16/OUT.gif
new file mode 100644
index 0000000..aeea60e
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/OUT.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/OrchestrationParameter.gif b/org.eclipse.egf.model.edit/icons/full/obj16/OrchestrationParameter.gif
new file mode 100644
index 0000000..9076c00
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/OrchestrationParameter.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/OrchestrationParameterContainer.gif b/org.eclipse.egf.model.edit/icons/full/obj16/OrchestrationParameterContainer.gif
new file mode 100644
index 0000000..9076c00
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/OrchestrationParameterContainer.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/Paramerter2ParameterMap.gif b/org.eclipse.egf.model.edit/icons/full/obj16/Paramerter2ParameterMap.gif
new file mode 100644
index 0000000..420eee1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/Paramerter2ParameterMap.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/Pattern.gif b/org.eclipse.egf.model.edit/icons/full/obj16/Pattern.gif
new file mode 100644
index 0000000..168c405
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/Pattern.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/PatternCall.gif b/org.eclipse.egf.model.edit/icons/full/obj16/PatternCall.gif
new file mode 100644
index 0000000..be22463
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/PatternCall.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/PatternFooterMethod.gif b/org.eclipse.egf.model.edit/icons/full/obj16/PatternFooterMethod.gif
new file mode 100644
index 0000000..1cac790
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/PatternFooterMethod.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/PatternHeaderMethod.gif b/org.eclipse.egf.model.edit/icons/full/obj16/PatternHeaderMethod.gif
new file mode 100644
index 0000000..513603b
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/PatternHeaderMethod.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/PatternInjectedCall.gif b/org.eclipse.egf.model.edit/icons/full/obj16/PatternInjectedCall.gif
new file mode 100644
index 0000000..a3908bc
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/PatternInjectedCall.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/PatternLibrary.gif b/org.eclipse.egf.model.edit/icons/full/obj16/PatternLibrary.gif
new file mode 100644
index 0000000..deda7eb
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/PatternLibrary.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/PatternMethod.gif b/org.eclipse.egf.model.edit/icons/full/obj16/PatternMethod.gif
new file mode 100644
index 0000000..050199e
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/PatternMethod.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/PatternParameter.gif b/org.eclipse.egf.model.edit/icons/full/obj16/PatternParameter.gif
new file mode 100644
index 0000000..da47364
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/PatternParameter.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/PatternSuperMethod.gif b/org.eclipse.egf.model.edit/icons/full/obj16/PatternSuperMethod.gif
new file mode 100644
index 0000000..94610f2
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/PatternSuperMethod.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/PatternVariable.gif b/org.eclipse.egf.model.edit/icons/full/obj16/PatternVariable.gif
new file mode 100644
index 0000000..c3370c7
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/PatternVariable.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/PatternViewpoint.gif b/org.eclipse.egf.model.edit/icons/full/obj16/PatternViewpoint.gif
new file mode 100644
index 0000000..5d921e5
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/PatternViewpoint.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/String2PatternList.gif b/org.eclipse.egf.model.edit/icons/full/obj16/String2PatternList.gif
new file mode 100644
index 0000000..a3908bc
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/String2PatternList.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/String2String.gif b/org.eclipse.egf.model.edit/icons/full/obj16/String2String.gif
new file mode 100644
index 0000000..c4a8af4
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/String2String.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/StringQuery.gif b/org.eclipse.egf.model.edit/icons/full/obj16/StringQuery.gif
new file mode 100644
index 0000000..e4bc22d
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/StringQuery.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/SuperCall.gif b/org.eclipse.egf.model.edit/icons/full/obj16/SuperCall.gif
new file mode 100644
index 0000000..db7414e
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/SuperCall.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/SuperMethodCall.gif b/org.eclipse.egf.model.edit/icons/full/obj16/SuperMethodCall.gif
new file mode 100644
index 0000000..90d10f9
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/SuperMethodCall.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/SuperPatternCall.gif b/org.eclipse.egf.model.edit/icons/full/obj16/SuperPatternCall.gif
new file mode 100644
index 0000000..a3908bc
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/SuperPatternCall.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/TypeBigDecimal.gif b/org.eclipse.egf.model.edit/icons/full/obj16/TypeBigDecimal.gif
new file mode 100644
index 0000000..5d31048
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/TypeBigDecimal.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/TypeBigInteger.gif b/org.eclipse.egf.model.edit/icons/full/obj16/TypeBigInteger.gif
new file mode 100644
index 0000000..5d31048
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/TypeBigInteger.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/TypeBoolean.gif b/org.eclipse.egf.model.edit/icons/full/obj16/TypeBoolean.gif
new file mode 100644
index 0000000..5d31048
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/TypeBoolean.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/TypeByte.gif b/org.eclipse.egf.model.edit/icons/full/obj16/TypeByte.gif
new file mode 100644
index 0000000..5d31048
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/TypeByte.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/TypeCharacter.gif b/org.eclipse.egf.model.edit/icons/full/obj16/TypeCharacter.gif
new file mode 100644
index 0000000..5d31048
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/TypeCharacter.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/TypeCollection.gif b/org.eclipse.egf.model.edit/icons/full/obj16/TypeCollection.gif
new file mode 100644
index 0000000..343d086
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/TypeCollection.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/TypeDate.gif b/org.eclipse.egf.model.edit/icons/full/obj16/TypeDate.gif
new file mode 100644
index 0000000..5d31048
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/TypeDate.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/TypeDomainEPackage.gif b/org.eclipse.egf.model.edit/icons/full/obj16/TypeDomainEPackage.gif
new file mode 100644
index 0000000..30c5c10
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/TypeDomainEPackage.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/TypeDomainURI.gif b/org.eclipse.egf.model.edit/icons/full/obj16/TypeDomainURI.gif
new file mode 100644
index 0000000..88cdf2a
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/TypeDomainURI.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/TypeDouble.gif b/org.eclipse.egf.model.edit/icons/full/obj16/TypeDouble.gif
new file mode 100644
index 0000000..5d31048
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/TypeDouble.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/TypeFloat.gif b/org.eclipse.egf.model.edit/icons/full/obj16/TypeFloat.gif
new file mode 100644
index 0000000..5d31048
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/TypeFloat.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/TypeGeneratorAdapterFactory.gif b/org.eclipse.egf.model.edit/icons/full/obj16/TypeGeneratorAdapterFactory.gif
new file mode 100644
index 0000000..2b8da63
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/TypeGeneratorAdapterFactory.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/TypeInteger.gif b/org.eclipse.egf.model.edit/icons/full/obj16/TypeInteger.gif
new file mode 100644
index 0000000..5d31048
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/TypeInteger.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/TypeList.gif b/org.eclipse.egf.model.edit/icons/full/obj16/TypeList.gif
new file mode 100644
index 0000000..343d086
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/TypeList.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/TypeLong.gif b/org.eclipse.egf.model.edit/icons/full/obj16/TypeLong.gif
new file mode 100644
index 0000000..5d31048
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/TypeLong.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/TypeMap.gif b/org.eclipse.egf.model.edit/icons/full/obj16/TypeMap.gif
new file mode 100644
index 0000000..343d086
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/TypeMap.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/TypePatternCallBackHandler.gif b/org.eclipse.egf.model.edit/icons/full/obj16/TypePatternCallBackHandler.gif
new file mode 100644
index 0000000..f8041d2
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/TypePatternCallBackHandler.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/TypePatternDomainVisitor.gif b/org.eclipse.egf.model.edit/icons/full/obj16/TypePatternDomainVisitor.gif
new file mode 100644
index 0000000..2124f3e
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/TypePatternDomainVisitor.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/TypePatternExecutionReporter.gif b/org.eclipse.egf.model.edit/icons/full/obj16/TypePatternExecutionReporter.gif
new file mode 100644
index 0000000..2b8da63
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/TypePatternExecutionReporter.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/TypePatternList.gif b/org.eclipse.egf.model.edit/icons/full/obj16/TypePatternList.gif
new file mode 100644
index 0000000..420eee1
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/TypePatternList.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/TypePatternModelVisitor.gif b/org.eclipse.egf.model.edit/icons/full/obj16/TypePatternModelVisitor.gif
new file mode 100644
index 0000000..ef56c14
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/TypePatternModelVisitor.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/TypeSet.gif b/org.eclipse.egf.model.edit/icons/full/obj16/TypeSet.gif
new file mode 100644
index 0000000..343d086
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/TypeSet.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/TypeShort.gif b/org.eclipse.egf.model.edit/icons/full/obj16/TypeShort.gif
new file mode 100644
index 0000000..5d31048
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/TypeShort.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/TypeString.gif b/org.eclipse.egf.model.edit/icons/full/obj16/TypeString.gif
new file mode 100644
index 0000000..5d31048
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/TypeString.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/obj16/ViewpointContainer.gif b/org.eclipse.egf.model.edit/icons/full/obj16/ViewpointContainer.gif
new file mode 100644
index 0000000..5c930f8
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/obj16/ViewpointContainer.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/icons/full/ovr/Mandatory.gif b/org.eclipse.egf.model.edit/icons/full/ovr/Mandatory.gif
new file mode 100644
index 0000000..055d020
--- /dev/null
+++ b/org.eclipse.egf.model.edit/icons/full/ovr/Mandatory.gif
Binary files differ
diff --git a/org.eclipse.egf.model.edit/plugin.properties b/org.eclipse.egf.model.edit/plugin.properties
new file mode 100644
index 0000000..41287b0
--- /dev/null
+++ b/org.eclipse.egf.model.edit/plugin.properties
Binary files differ
diff --git a/org.eclipse.egf.model.edit/plugin.xml b/org.eclipse.egf.model.edit/plugin.xml
new file mode 100644
index 0000000..6fc41bc
--- /dev/null
+++ b/org.eclipse.egf.model.edit/plugin.xml
@@ -0,0 +1,179 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+
+<!--
+ 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>
+
+ <!-- ================================================================================= -->
+ <!-- Types Model -->
+ <!-- ================================================================================= -->
+
+ <extension
+ point="org.eclipse.emf.edit.itemProviderAdapterFactories"
+ >
+ <factory
+ uri="http://www.eclipse.org/egf/1.0.0/types"
+ class="org.eclipse.egf.model.types.provider.TypesItemProviderAdapterFactory"
+ supportedTypes=
+ "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+ org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+ org.eclipse.emf.edit.provider.ITreeItemContentProvider
+ org.eclipse.emf.edit.provider.IItemLabelProvider
+ org.eclipse.emf.edit.provider.IItemPropertySource
+ org.eclipse.emf.edit.provider.ITableItemLabelProvider
+ org.eclipse.emf.edit.provider.ITableItemColorProvider
+ org.eclipse.emf.edit.provider.ITableItemFontProvider
+ org.eclipse.emf.edit.provider.IItemColorProvider
+ org.eclipse.emf.edit.provider.IItemFontProvider"
+ />
+ </extension>
+
+ <!-- ================================================================================= -->
+ <!-- Fcore Model -->
+ <!-- ================================================================================= -->
+
+ <extension
+ point="org.eclipse.emf.edit.itemProviderAdapterFactories"
+ >
+ <factory
+ uri="http://www.eclipse.org/egf/1.0.0/fcore"
+ class="org.eclipse.egf.model.fcore.provider.FcoreItemProviderAdapterFactory"
+ supportedTypes=
+ "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+ org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+ org.eclipse.emf.edit.provider.ITreeItemContentProvider
+ org.eclipse.emf.edit.provider.IItemLabelProvider
+ org.eclipse.emf.edit.provider.IItemPropertySource
+ org.eclipse.emf.edit.provider.ITableItemLabelProvider
+ org.eclipse.emf.edit.provider.ITableItemColorProvider
+ org.eclipse.emf.edit.provider.ITableItemFontProvider
+ org.eclipse.emf.edit.provider.IItemColorProvider
+ org.eclipse.emf.edit.provider.IItemFontProvider"
+ />
+ </extension>
+
+ <extension
+ point="org.eclipse.emf.edit.itemProviderAdapterFactories"
+ >
+ <factory
+ uri="org.eclipse.egf.model.fcore.util"
+ class="org.eclipse.egf.model.fcore.provider.FcoreResourceItemProviderAdapterFactory"
+ supportedTypes=
+ "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+ org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+ org.eclipse.emf.edit.provider.ITreeItemContentProvider
+ org.eclipse.emf.edit.provider.IItemLabelProvider
+ org.eclipse.emf.edit.provider.IItemPropertySource"
+ />
+ </extension>
+
+ <!-- ================================================================================= -->
+ <!-- Domain Model -->
+ <!-- ================================================================================= -->
+
+ <extension
+ point="org.eclipse.emf.edit.itemProviderAdapterFactories"
+ >
+ <factory
+ uri="http://www.eclipse.org/egf/1.0.0/domain"
+ class="org.eclipse.egf.model.domain.provider.DomainItemProviderAdapterFactory"
+ supportedTypes=
+ "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+ org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+ org.eclipse.emf.edit.provider.ITreeItemContentProvider
+ org.eclipse.emf.edit.provider.IItemLabelProvider
+ org.eclipse.emf.edit.provider.IItemPropertySource
+ org.eclipse.emf.edit.provider.ITableItemLabelProvider
+ org.eclipse.emf.edit.provider.ITableItemColorProvider
+ org.eclipse.emf.edit.provider.ITableItemFontProvider
+ org.eclipse.emf.edit.provider.IItemColorProvider
+ org.eclipse.emf.edit.provider.IItemFontProvider"
+ />
+ </extension>
+
+ <extension
+ point="org.eclipse.emf.edit.childCreationExtenders"
+ >
+ <extender
+ uri="http://www.eclipse.org/egf/1.0.0/fcore"
+ class="org.eclipse.egf.model.domain.provider.DomainItemProviderAdapterFactory$FcoreChildCreationExtender"
+ />
+ </extension>
+
+ <!-- ================================================================================= -->
+ <!-- Mapping Model -->
+ <!-- ================================================================================= -->
+
+ <extension
+ point="org.eclipse.emf.edit.itemProviderAdapterFactories"
+ >
+ <factory
+ uri="http://www.eclipse.org/egf/1.0.0/mapping"
+ class="org.eclipse.egf.model.mapping.provider.MappingItemProviderAdapterFactory"
+ supportedTypes=
+ "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+ org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+ org.eclipse.emf.edit.provider.ITreeItemContentProvider
+ org.eclipse.emf.edit.provider.IItemLabelProvider
+ org.eclipse.emf.edit.provider.IItemPropertySource
+ org.eclipse.emf.edit.provider.ITableItemLabelProvider
+ org.eclipse.emf.edit.provider.ITableItemColorProvider
+ org.eclipse.emf.edit.provider.ITableItemFontProvider
+ org.eclipse.emf.edit.provider.IItemColorProvider
+ org.eclipse.emf.edit.provider.IItemFontProvider"
+ />
+ </extension>
+
+ <extension
+ point="org.eclipse.emf.edit.childCreationExtenders"
+ >
+ <extender
+ uri="http://www.eclipse.org/egf/1.0.0/fcore"
+ class="org.eclipse.egf.model.mapping.provider.MappingItemProviderAdapterFactory$FcoreChildCreationExtender"
+ />
+ </extension>
+
+ <!-- ================================================================================= -->
+ <!-- Pattern Model -->
+ <!-- ================================================================================= -->
+
+ <extension
+ point="org.eclipse.emf.edit.itemProviderAdapterFactories"
+ >
+ <factory
+ uri="http://www.eclipse.org/egf/1.0.0/pattern"
+ class="org.eclipse.egf.model.pattern.provider.PatternItemProviderAdapterFactory"
+ supportedTypes=
+ "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+ org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+ org.eclipse.emf.edit.provider.ITreeItemContentProvider
+ org.eclipse.emf.edit.provider.IItemLabelProvider
+ org.eclipse.emf.edit.provider.IItemPropertySource
+ org.eclipse.emf.edit.provider.ITableItemLabelProvider
+ org.eclipse.emf.edit.provider.ITableItemColorProvider
+ org.eclipse.emf.edit.provider.ITableItemFontProvider
+ org.eclipse.emf.edit.provider.IItemColorProvider
+ org.eclipse.emf.edit.provider.IItemFontProvider"
+ />
+ </extension>
+
+ <extension
+ point="org.eclipse.emf.edit.childCreationExtenders"
+ >
+ <extender
+ uri="http://www.eclipse.org/egf/1.0.0/fcore"
+ class="org.eclipse.egf.model.pattern.provider.PatternItemProviderAdapterFactory$FcoreChildCreationExtender"
+ />
+ </extension>
+
+</plugin>
diff --git a/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/commands/ActivitySetCommand.java b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/commands/ActivitySetCommand.java
new file mode 100644
index 0000000..54371bf
--- /dev/null
+++ b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/commands/ActivitySetCommand.java
@@ -0,0 +1,72 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.model.fcore.commands;
+
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.ContractContainer;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.FactoryComponentContract;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.emf.edit.domain.EditingDomain;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class ActivitySetCommand extends SetCommand {
+
+ /**
+ * This constructs a primitive command to insert a collection of values into the specified many-valued feature of the owner.
+ */
+ public ActivitySetCommand(EditingDomain domain, EObject owner, EStructuralFeature feature, Object value) {
+ super(domain, owner, feature, value);
+ }
+
+ @Override
+ protected boolean prepare() {
+ boolean result = super.prepare();
+ if (result == false) {
+ return false;
+ }
+ if (owner instanceof Activity == false) {
+ return true;
+ }
+ if (feature != FcorePackage.Literals.ACTIVITY__CONTRACT_CONTAINER) {
+ return true;
+ }
+ if (value instanceof ContractContainer == false) {
+ return true;
+ }
+ Activity activity = (Activity) owner;
+ ContractContainer contractContainer = (ContractContainer) value;
+ if (contractContainer.getContracts() == null || contractContainer.getContracts().isEmpty()) {
+ return true;
+ }
+ if (activity instanceof FactoryComponent) {
+ for (Object object : contractContainer.getContracts()) {
+ if (object instanceof FactoryComponentContract == false) {
+ return false;
+ }
+ }
+ } else {
+ for (Object object : contractContainer.getContracts()) {
+ if (object instanceof FactoryComponentContract) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/commands/ContractContainerAddCommand.java b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/commands/ContractContainerAddCommand.java
new file mode 100644
index 0000000..dc1f488
--- /dev/null
+++ b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/commands/ContractContainerAddCommand.java
@@ -0,0 +1,69 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.model.fcore.commands;
+
+import java.util.Collection;
+
+import org.eclipse.egf.model.fcore.ContractContainer;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.FactoryComponentContract;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.edit.domain.EditingDomain;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class ContractContainerAddCommand extends AddCommand {
+
+ /**
+ * This constructs a primitive command to insert a collection of values into the specified many-valued feature of the owner.
+ */
+ public ContractContainerAddCommand(EditingDomain domain, EObject owner, EStructuralFeature feature, Collection<?> collection, int index) {
+ super(domain, owner, feature, collection, index);
+ }
+
+ @Override
+ protected boolean prepare() {
+ boolean result = super.prepare();
+ if (result == false) {
+ return false;
+ }
+ if (owner instanceof ContractContainer == false) {
+ return true;
+ }
+ if (feature != FcorePackage.Literals.CONTRACT_CONTAINER__CONTRACTS) {
+ return true;
+ }
+ ContractContainer contractContainer = (ContractContainer) owner;
+ if (contractContainer.getActivity() == null) {
+ return true;
+ }
+ if (contractContainer.getActivity() instanceof FactoryComponent) {
+ for (Object object : collection) {
+ if (object instanceof FactoryComponentContract == false) {
+ return false;
+ }
+ }
+ } else {
+ for (Object object : collection) {
+ if (object instanceof FactoryComponentContract) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/commands/FcoreDragAndDropCommand.java b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/commands/FcoreDragAndDropCommand.java
new file mode 100644
index 0000000..b4ec974
--- /dev/null
+++ b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/commands/FcoreDragAndDropCommand.java
@@ -0,0 +1,155 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.model.fcore.commands;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.ListIterator;
+
+import org.eclipse.egf.model.fcore.util.FcoreResourceImpl;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.common.command.IdentityCommand;
+import org.eclipse.emf.common.command.UnexecutableCommand;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.edit.command.CommandParameter;
+import org.eclipse.emf.edit.command.CopyCommand;
+import org.eclipse.emf.edit.command.DragAndDropCommand;
+import org.eclipse.emf.edit.command.MoveCommand;
+import org.eclipse.emf.edit.command.RemoveCommand;
+import org.eclipse.emf.edit.domain.EditingDomain;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class FcoreDragAndDropCommand extends DragAndDropCommand {
+
+ /**
+ * This creates a command to perform a drag and drop operation upon the owner.
+ * See {@link DragAndDropCommand DragAndDropCommand} for a description of the arguments.
+ */
+ public static Command create(EditingDomain domain, Object owner, float location, int operations, int operation, Collection<?> collection) {
+ return domain.createCommand(FcoreDragAndDropCommand.class, new CommandParameter(owner, new Detail(location, operations, operation), collection));
+ }
+
+ public FcoreDragAndDropCommand(EditingDomain domain, Object owner, float location, int operations, int operation, Collection<?> collection) {
+ this(domain, owner, location, operations, operation, collection, domain == null ? false : domain.getOptimizeCopy());
+ }
+
+ public FcoreDragAndDropCommand(EditingDomain domain, Object owner, float location, int operations, int operation, Collection<?> collection, boolean optimize) {
+ super(domain, owner, location, operations, operation, collection);
+ }
+
+ /**
+ * This attempts to prepare a drop move insert operation.
+ */
+ @Override
+ protected boolean prepareDropMoveInsert(Object parent, Collection<?> children, int index) {
+ // We don't want to move insert an object before or after itself...
+ //
+ if (collection.contains(owner)) {
+ dragCommand = IdentityCommand.INSTANCE;
+ dropCommand = UnexecutableCommand.INSTANCE;
+ }
+ // If the dragged objects share a parent...
+ //
+ else if (children.containsAll(collection)) {
+ dragCommand = IdentityCommand.INSTANCE;
+
+ // Create move commands for all the objects in the collection.
+ //
+ CompoundCommand compoundCommand = new CompoundCommand();
+ List<Object> before = new ArrayList<Object>();
+ List<Object> after = new ArrayList<Object>();
+
+ int j = 0;
+ for (Object object : children) {
+ if (collection.contains(object)) {
+ if (j < index) {
+ before.add(object);
+ } else if (j > index) {
+ after.add(object);
+ }
+ }
+ ++j;
+ }
+
+ for (Object object : before) {
+ compoundCommand.append(MoveCommand.create(domain, parent, null, object, index - 1));
+ }
+
+ for (ListIterator<Object> objects = after.listIterator(after.size()); objects.hasPrevious();) {
+ Object object = objects.previous();
+ compoundCommand.append(MoveCommand.create(domain, parent, null, object, index));
+ }
+
+ dropCommand = compoundCommand.getCommandList().size() == 0 ? (Command) IdentityCommand.INSTANCE : compoundCommand;
+ } else if (isCrossDomain()) {
+ dragCommand = IdentityCommand.INSTANCE;
+ dropCommand = UnexecutableCommand.INSTANCE;
+ } else {
+ // Just remove the objects and add them.
+ //
+ if (parent instanceof FcoreResourceImpl) {
+ dropCommand = AddCommand.create(domain, parent, null, collection, index);
+ } else {
+ dropCommand = AddCommand.create(domain, parent, null, CopyCommand.create(domain, collection).getResult(), index);
+ }
+ if (analyzeForNonContainment(dropCommand)) {
+ dropCommand.dispose();
+ dropCommand = UnexecutableCommand.INSTANCE;
+ dragCommand = IdentityCommand.INSTANCE;
+ } else {
+ if (parent instanceof FcoreResourceImpl) {
+ dragCommand = RemoveCommand.create(domain, collection);
+ } else {
+ dragCommand = IdentityCommand.INSTANCE;
+ }
+ }
+ }
+
+ boolean result = dragCommand.canExecute() && dropCommand.canExecute();
+ return result;
+ }
+
+ /**
+ * This attempts to prepare a drop move on operation.
+ */
+ @Override
+ protected boolean prepareDropMoveOn() {
+ if (isCrossDomain()) {
+ dragCommand = IdentityCommand.INSTANCE;
+ dropCommand = UnexecutableCommand.INSTANCE;
+ } else {
+ if (owner instanceof FcoreResourceImpl) {
+ dropCommand = AddCommand.create(domain, owner, null, collection);
+ } else {
+ dropCommand = AddCommand.create(domain, owner, null, CopyCommand.create(domain, collection).getResult());
+ }
+ if (analyzeForNonContainment(dropCommand)) {
+ dropCommand.dispose();
+ dropCommand = UnexecutableCommand.INSTANCE;
+ dragCommand = IdentityCommand.INSTANCE;
+ } else {
+ if (owner instanceof FcoreResourceImpl) {
+ dragCommand = RemoveCommand.create(domain, collection);
+ } else {
+ dragCommand = IdentityCommand.INSTANCE;
+ }
+ }
+ }
+
+ boolean result = dragCommand.canExecute() && dropCommand.canExecute();
+ return result;
+ }
+}
diff --git a/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/commands/FcoreInitializeCopyCommand.java b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/commands/FcoreInitializeCopyCommand.java
new file mode 100644
index 0000000..68643ea
--- /dev/null
+++ b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/commands/FcoreInitializeCopyCommand.java
@@ -0,0 +1,177 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2002-2007 IBM Corporation and others.
+ * 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:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id: InitializeCopyCommand.java,v 1.9 2007/09/28 19:37:46 emerks Exp $
+ */
+package org.eclipse.egf.model.fcore.commands;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.util.FeatureMap;
+import org.eclipse.emf.ecore.util.FeatureMapUtil;
+import org.eclipse.emf.edit.command.CopyCommand;
+import org.eclipse.emf.edit.command.InitializeCopyCommand;
+import org.eclipse.emf.edit.command.OverrideableCommand;
+import org.eclipse.emf.edit.domain.EditingDomain;
+
+/**
+ * The initialize copy command is implemented to set the values of an object copy based on those
+ * of the original (copied) object. It is a helper command used by the CopyCommand.
+ *
+ * <p>
+ * An initialize copy command is an {@link OverrideableCommand}.
+ */
+public class FcoreInitializeCopyCommand extends InitializeCopyCommand {
+
+ /**
+ * This constructs an instance that will copy the attribute values of value to those of owner.
+ */
+ public FcoreInitializeCopyCommand(EditingDomain domain, EObject owner, CopyCommand.Helper copyHelper) {
+ super(domain, owner, copyHelper);
+ }
+
+ @Override
+ protected boolean prepare() {
+ return owner.eClass().isInstance(copy);
+ }
+
+ @Override
+ public void doExecute() {
+ copyAttributes();
+ copyReferences();
+ }
+
+ @Override
+ protected Collection<? extends EAttribute> getAttributesToCopy() {
+ return owner.eClass().getEAllAttributes();
+ }
+
+ /**
+ * This method will iterate over the attributes of the owner object and set them
+ * accordingly in the copy.
+ */
+ @Override
+ protected void copyAttributes() {
+ for (EAttribute attribute : getAttributesToCopy()) {
+ if (attribute.isChangeable() && !attribute.isDerived() && (attribute.isMany() || owner.eIsSet(attribute))) {
+ Object value = owner.eGet(attribute);
+ if (!attribute.isMany()) {
+ copy.eSet(attribute, value);
+ } else {
+ @SuppressWarnings("unchecked")
+ List<Object> list = (List<Object>) copy.eGet(attribute);
+ if (FeatureMapUtil.isFeatureMap(attribute)) {
+ FeatureMap featureMap = (FeatureMap) (List<?>) list;
+ LOOP: for (FeatureMap.Entry entry : (FeatureMap) value) {
+ EStructuralFeature entryFeature = entry.getEStructuralFeature();
+ if (entryFeature instanceof EAttribute) {
+ featureMap.add(entry);
+ } else {
+ EReference reference = (EReference) entryFeature;
+ EReference reverseReference = reference.getEOpposite();
+ Object entryValue = entry.getValue();
+ boolean copiedTargetRequired = reverseReference != null || reference.isContainment();
+ EObject target = copyHelper.getCopyTarget((EObject) entryValue, copiedTargetRequired);
+ if (target != null) {
+ if (reverseReference != null) {
+ for (FeatureMap.Entry copyEntry : featureMap) {
+ if (copyEntry.getEStructuralFeature() == reference && copyEntry.getValue() == target) {
+ featureMap.move(featureMap.size() - 1, copyEntry);
+ continue LOOP;
+ }
+ }
+ }
+ featureMap.add(reference, target);
+ }
+ }
+ }
+ } else {
+ list.addAll((List<?>) value);
+ }
+ }
+ }
+ }
+ }
+
+ @Override
+ protected Collection<? extends EReference> getReferencesToCopy() {
+ return owner.eClass().getEAllReferences();
+ }
+
+ /**
+ * This method will iterate over the references of the owner object and sets them.
+ * accordingly in the copy.
+ */
+ @Override
+ protected void copyReferences() {
+ for (EReference reference : getReferencesToCopy()) {
+ if (!reference.isChangeable() || reference.isDerived() || !owner.eIsSet(reference)) {
+ continue;
+ }
+
+ EReference reverseReference = reference.getEOpposite();
+
+ Object value = owner.eGet(reference);
+ if (value == null) {
+ // It must be an unsettable feature to be null and considered set.
+ //
+ copy.eSet(reference, null);
+ continue;
+ }
+
+ boolean copiedTargetRequired = reverseReference != null || reference.isContainment();
+ if (reference.isMany()) {
+ @SuppressWarnings("unchecked")
+ List<EObject> valueList = (List<EObject>) value;
+ @SuppressWarnings("unchecked")
+ EList<EObject> copyList = (EList<EObject>) copy.eGet(reference);
+ if (valueList.isEmpty()) {
+ // It must be an unsettable feature to be empty and considered set.
+ //
+ copyList.clear();
+ } else {
+ int index = 0;
+ for (EObject item : valueList) {
+ EObject target = copyHelper.getCopyTarget(item, copiedTargetRequired);
+ if (target == null)
+ break; // if one is null, they'll all be null
+ if (reverseReference != null) {
+ int position = copyList.indexOf(target);
+ if (position == -1) {
+ copyList.add(index, target);
+ } else {
+ copyList.move(index, target);
+ }
+ } else {
+ copyList.add(target);
+ }
+ ++index;
+ }
+ }
+ } else {
+ EObject target = copyHelper.getCopyTarget((EObject) value, copiedTargetRequired);
+ if (target != null) {
+ copy.eSet(reference, target);
+ }
+ }
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/commands/FcoreResourcePasteFromClipboardCommand.java b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/commands/FcoreResourcePasteFromClipboardCommand.java
new file mode 100644
index 0000000..236bce9
--- /dev/null
+++ b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/commands/FcoreResourcePasteFromClipboardCommand.java
@@ -0,0 +1,300 @@
+/**
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ * Thales Corporate Services S.A.S
+ */
+package org.eclipse.egf.model.fcore.commands;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.eclipse.egf.common.helper.EMFHelper;
+import org.eclipse.egf.model.fcore.provider.FcoreResourceItemProviderAdapterFactory;
+import org.eclipse.egf.model.fcore.util.FcoreResourceImpl;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CommandWrapper;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.common.command.StrictCompoundCommand;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.edit.command.CommandParameter;
+import org.eclipse.emf.edit.command.CopyCommand;
+import org.eclipse.emf.edit.command.PasteFromClipboardCommand;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.provider.IWrapperItemProvider;
+
+/**
+ * Multi-rooted resources support.
+ * This works exactly like an {@link AddCommand} but the things to be added are copied from the {@link EditingDomain} clipboard.
+ */
+public class FcoreResourcePasteFromClipboardCommand extends PasteFromClipboardCommand {
+
+ /**
+ * This creates a command to add copies from the clipboard to the specified feature of the owner.
+ */
+ public static Command create(EditingDomain domain, Object owner, Object feature) {
+ return create(domain, owner, feature, CommandParameter.NO_INDEX);
+ }
+
+ /**
+ * This creates a command to add copies from the clipboard to the specified feature of the owner
+ * and at the given index.
+ */
+ public static Command create(EditingDomain domain, Object owner, Object feature, int index) {
+ return new FcoreResourcePasteFromClipboardCommand(domain, owner, feature, index, true);
+ }
+
+ private FcoreResourceItemProviderAdapterFactory factory;
+
+ /**
+ * Constructor
+ *
+ * @param domain
+ * the editing domain
+ * @param owner
+ * the owner
+ * @param feature
+ * the feature
+ * @param index
+ * the index
+ *
+ * This constructs an instance from the domain, which provides access the clipboard
+ * collection
+ * via {@link EditingDomain#getCommandStack}.
+ */
+ public FcoreResourcePasteFromClipboardCommand(EditingDomain domain, Object owner, Object feature, int index) {
+ this(domain, owner, feature, index, true);
+ }
+
+ /**
+ * Constructor
+ *
+ * @param domain
+ * the editing domain
+ * @param owner
+ * the owner
+ * @param feature
+ * the feature
+ * @param index
+ * the index
+ * @param optimize
+ * optimize
+ *
+ * This constructs an instance from the domain, which provides access the clipboard
+ * collection
+ * via {@link EditingDomain#getCommandStack}.
+ */
+ public FcoreResourcePasteFromClipboardCommand(EditingDomain domain, Object owner, Object feature, int index, boolean optimize) {
+ super(domain, owner, feature, index, optimize);
+ owner = unwrap(owner);
+ factory = new FcoreResourceItemProviderAdapterFactory();
+ }
+
+ /**
+ * @see org.eclipse.emf.common.command.AbstractCommand#prepare()
+ */
+ @Override
+ public boolean prepare() {
+
+ if (domain.getClipboard() == null) {
+ return false;
+ }
+
+ // Resource lookup based on owner
+ final FcoreResourceImpl[] resource = new FcoreResourceImpl[] { null };
+ final Boolean[] analyseRoot = new Boolean[] { false };
+ if (owner instanceof EObject && ((EObject) owner).eResource() != null || ((EObject) owner).eResource() instanceof FcoreResourceImpl) {
+ resource[0] = (FcoreResourceImpl) ((EObject) owner).eResource();
+ }
+ // Are we on a root object
+ analyseRoot[0] = domain.getParent(owner) instanceof FcoreResourceImpl;
+
+ // Find the index of the sibling.
+ final Collection<EObject> children = resource[0].getContents();
+ final Integer[] siblingIndex = new Integer[] { -1 };
+ if (resource[0] != null && analyseRoot[0]) {
+ int i = 0;
+ // Sibling lookup
+ CHILDREN_LOOP: for (EObject child : children) {
+ if (child == owner) {
+ siblingIndex[0] = i;
+ break CHILDREN_LOOP;
+ }
+ ++i;
+ }
+ }
+
+ // Create a strict compound command to do a copy and then add the result
+ command = new StrictCompoundCommand();
+ // Create a command to copy the clipboard.
+ final Command copyCommand = CopyCommand.create(domain, domain.getClipboard());
+ command.append(copyCommand);
+ // Create a proxy that will create an add command.
+ command.append(
+
+ new CommandWrapper() {
+
+ protected Collection<Object> _original;
+
+ protected Collection<Object> _copy;
+
+ @Override
+ protected Command createCommand() {
+
+ _original = domain.getClipboard();
+
+ _copy = new ArrayList<Object>(copyCommand.getResult());
+
+ // Use the original to do the add, but only if it's of the same type as the copy.
+ // This ensures that if there is conversion being done as part of the copy,
+ // as would be the case for a cross domain copy in the mapping framework,
+ // that we do actually use the converted instance.
+ if (_original.size() == _copy.size()) {
+ for (Iterator<Object> j = _original.iterator(), k = _copy.iterator(); j.hasNext();) {
+ Object originalObject = j.next();
+ Object copyObject = k.next();
+ if (originalObject.getClass() != copyObject.getClass()) {
+ _original = null;
+ break;
+ }
+ }
+ }
+
+ Command addCommand = new CompoundCommand(CompoundCommand.MERGE_COMMAND_ALL);
+ Iterator<?> iter = null;
+ if (_original != null) {
+ iter = _original.iterator();
+ } else {
+ iter = _copy.iterator();
+ }
+ while (iter.hasNext()) {
+ // Root Object
+ Object object = iter.next();
+ EObject eObject = null;
+ if (object instanceof EObject) {
+ eObject = (EObject) object;
+ }
+ if (analyseRoot[0]) {
+ Collection<EClass> roots = factory.getRoots();
+ if (resource[0] != null && eObject != null && roots.contains(EMFHelper.solveAgainstStaticPackage(eObject.eClass()))) {
+ ((CompoundCommand) addCommand).append(new ResourceAddCommand(domain, resource[0], eObject, siblingIndex[0] + 1));
+ } else {
+ // Copy rather than add
+ ((CompoundCommand) addCommand).append(AddCommand.create(domain, owner, feature, object, index));
+ }
+ } else {
+ // Copy rather than add
+ ((CompoundCommand) addCommand).append(AddCommand.create(domain, owner, feature, object, index));
+ }
+ }
+ return addCommand;
+
+ }
+
+ @Override
+ public void execute() {
+ if (_original != null) {
+ domain.setClipboard(_copy);
+ }
+ super.execute();
+ }
+
+ @Override
+ public void undo() {
+ super.undo();
+ if (_original != null) {
+ domain.setClipboard(_original);
+ }
+ }
+
+ @Override
+ public void redo() {
+ if (_original != null) {
+ domain.setClipboard(_copy);
+ }
+ super.redo();
+ }
+
+ }
+
+ );
+
+ boolean result;
+
+ if (optimize) {
+ // This will determine canExecute as efficiently as possible.
+ result = optimizedCanExecute();
+ } else {
+ // This will actually execute the copy command in order to check if the add can execute.
+ result = command.canExecute();
+ }
+
+ return result;
+
+ }
+
+ /**
+ * We'll assume that the copy command can execute and that adding a copy of the clipboard
+ * is the same test as adding the clipboard contents itself.
+ */
+ @Override
+ protected boolean optimizedCanExecute() {
+ if (domain.getClipboard() == null) {
+ return false;
+ }
+ // Resource lookup based on owner
+ FcoreResourceImpl resource = null;
+ if (owner instanceof EObject && ((EObject) owner).eResource() != null || ((EObject) owner) instanceof FcoreResourceImpl) {
+ resource = (FcoreResourceImpl) ((EObject) owner).eResource();
+ }
+ // Are we on a root object
+ boolean analyseRoot = domain.getParent(owner) instanceof FcoreResourceImpl;
+ // temporary command
+ Command addCommand = new CompoundCommand(CompoundCommand.MERGE_COMMAND_ALL);
+ // Clipboard should contain Root elements
+ Iterator<?> iter = domain.getClipboard().iterator();
+ while (iter.hasNext()) {
+ // Root Object
+ Object object = iter.next();
+ EObject eObject = null;
+ if (object instanceof EObject) {
+ eObject = (EObject) object;
+ }
+ if (analyseRoot) {
+ Collection<EClass> roots = factory.getRoots();
+ if (resource != null && eObject != null && roots.contains(EMFHelper.solveAgainstStaticPackage(eObject.eClass()))) {
+ ((CompoundCommand) addCommand).append(new ResourceAddCommand(domain, resource, eObject));
+ } else {
+ ((CompoundCommand) addCommand).append(AddCommand.create(domain, owner, feature, object));
+ }
+ } else {
+ ((CompoundCommand) addCommand).append(AddCommand.create(domain, owner, feature, object));
+ }
+ }
+ // Check addCommand
+ boolean result = addCommand.canExecute();
+ // Clean temporary command
+ addCommand.dispose();
+ return result;
+ }
+
+ /**
+ * If the given object implements {@link IWrapperItemProvider}, it is unwrapped by obtaining a value from {@link IWrapperItemProvider#getValue getValue}. The unwrapping continues until a non-wrapper value is returned. This
+ * iterative unwrapping is required because values may be repeatedly wrapped, as children of a delegating wrapper.
+ */
+ protected Object unwrap(Object object) {
+ while (object instanceof IWrapperItemProvider) {
+ object = ((IWrapperItemProvider) object).getValue();
+ }
+ return object;
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/commands/RemoveInvocationContractContainerInvocationContracts.java b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/commands/RemoveInvocationContractContainerInvocationContracts.java
new file mode 100644
index 0000000..0cb1065
--- /dev/null
+++ b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/commands/RemoveInvocationContractContainerInvocationContracts.java
@@ -0,0 +1,106 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.commands;
+
+import java.util.Collection;
+
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.model.fcore.InvocationContractContainer;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.edit.EMFEditPlugin;
+import org.eclipse.emf.edit.command.RemoveCommand;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.emf.edit.domain.EditingDomain;
+
+public final class RemoveInvocationContractContainerInvocationContracts extends CompoundCommand {
+
+ /**
+ * This caches the label.
+ */
+ protected static final String LABEL = EMFEditPlugin.INSTANCE.getString("_UI_RemoveCommand_label"); //$NON-NLS-1$
+
+ /**
+ * This caches the description.
+ */
+ protected static final String DESCRIPTION = EMFEditPlugin.INSTANCE.getString("_UI_RemoveCommand_description"); //$NON-NLS-1$
+
+ /**
+ * Current Editing Domain.
+ */
+ private EditingDomain _editingDomain;
+
+ /**
+ * Current InvocationContractContainer
+ */
+ private InvocationContractContainer _invocationContractContainer;
+
+ /**
+ * The removed objects.
+ */
+ private Collection<?> _removedObjects;
+
+ /**
+ * Constructor.
+ *
+ * @param editingDomain
+ * @param invocationContractContainer
+ * @param removedObjects
+ */
+ public RemoveInvocationContractContainerInvocationContracts(EditingDomain editingDomain, InvocationContractContainer invocationContractContainer, Collection<?> removedObjects) {
+ super(LABEL, DESCRIPTION);
+ _editingDomain = editingDomain;
+ _invocationContractContainer = invocationContractContainer;
+ _removedObjects = removedObjects;
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param label
+ * @param description
+ * @param editingDomain
+ * @param invocationContractContainer
+ * @param removedObjects
+ */
+ public RemoveInvocationContractContainerInvocationContracts(String label, String description, EditingDomain editingDomain, InvocationContractContainer invocationContractContainer, Collection<?> removedObjects) {
+ super(label, description);
+ _editingDomain = editingDomain;
+ _invocationContractContainer = invocationContractContainer;
+ _removedObjects = removedObjects;
+ }
+
+ @Override
+ protected boolean prepare() {
+ for (Object removedObject : _removedObjects) {
+ if (removedObject instanceof InvocationContract == false) {
+ continue;
+ }
+ InvocationContract contract = (InvocationContract) removedObject;
+ // Reset source
+ if (contract.getSourceInvocationContract() != null) {
+ // This will reset the eOpposite accordingly
+ append(new SetCommand(_editingDomain, contract, FcorePackage.Literals.INVOCATION_CONTRACT__SOURCE_INVOCATION_CONTRACT, null));
+ }
+ // Reset target
+ if (contract.getTargetInvocationContract() != null) {
+ // This will reset the eOpposite accordingly
+ append(new RemoveCommand(_editingDomain, contract, FcorePackage.Literals.INVOCATION_CONTRACT__TARGET_INVOCATION_CONTRACT, contract.getTargetInvocationContract()));
+ }
+ }
+ // Remove InvocationContracts
+ append(new RemoveCommand(_editingDomain, _invocationContractContainer, FcorePackage.Literals.INVOCATION_CONTRACT_CONTAINER__INVOCATION_CONTRACTS, _removedObjects));
+ return super.prepare();
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/commands/ResourceAddCommand.java b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/commands/ResourceAddCommand.java
new file mode 100644
index 0000000..a921740
--- /dev/null
+++ b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/commands/ResourceAddCommand.java
@@ -0,0 +1,101 @@
+/**
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ * Thales Corporate Services S.A.S
+ */
+package org.eclipse.egf.model.fcore.commands;
+
+import java.util.Collection;
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.edit.command.CommandParameter;
+import org.eclipse.emf.edit.domain.EditingDomain;
+
+/**
+ * Multi-rooted resources support.
+ * This command will add a root defined EObject to the resource.
+ */
+public class ResourceAddCommand extends AddCommand {
+
+ /**
+ */
+ private Resource _resource = null;
+
+ /**
+ * Constructor
+ *
+ * @param domain
+ * the editing domain
+ * @param resource
+ * the resource to add to
+ * @param collection
+ * the collection to add
+ */
+ public ResourceAddCommand(EditingDomain domain, Resource resource, Collection<?> collection) {
+ this(domain, resource, collection, CommandParameter.NO_INDEX);
+ }
+
+ /**
+ * Constructor
+ *
+ * @param domain
+ * the editing domain
+ * @param resource
+ * the resource to add to
+ * @param collection
+ * the collection to add
+ * @param index
+ * the index
+ */
+ public ResourceAddCommand(EditingDomain domain, Resource resource, Collection<?> collection, int index) {
+ super(domain, resource.getContents(), collection, index);
+ _resource = resource;
+ }
+
+ /**
+ * Constructor
+ *
+ * @param domain
+ * the editing domain
+ * @param resource
+ * the resource to add to
+ * @param value
+ * the value to add
+ */
+ public ResourceAddCommand(EditingDomain domain, Resource resource, Object value) {
+ this(domain, resource, value, CommandParameter.NO_INDEX);
+ }
+
+ /**
+ * Constructor
+ *
+ * @param domain
+ * the editing domain
+ * @param resource
+ * the resource to add to
+ * @param value
+ * the value to add
+ * @param index
+ * the index
+ */
+ public ResourceAddCommand(EditingDomain domain, Resource resource, Object value, int index) {
+ super(domain, resource.getContents(), value, index);
+ _resource = resource;
+ }
+
+ @Override
+ protected boolean prepare() {
+ if (domain.isReadOnly(_resource)) {
+ return false;
+ }
+ return super.prepare();
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/commands/ResourceFeatureAddCommand.java b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/commands/ResourceFeatureAddCommand.java
new file mode 100644
index 0000000..23963e2
--- /dev/null
+++ b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/commands/ResourceFeatureAddCommand.java
@@ -0,0 +1,111 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.model.fcore.commands;
+
+import org.eclipse.egf.model.fcore.util.FcoreResourceImpl;
+import org.eclipse.emf.edit.command.CommandActionDelegate;
+import org.eclipse.emf.edit.command.CommandParameter;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+
+/**
+ * Multi-rooted resources support.
+ * This command will add a root defined EObject to the resource.
+ */
+public class ResourceFeatureAddCommand extends ResourceAddCommand implements CommandActionDelegate {
+
+ /**
+ */
+ private FcoreResourceImpl _fcoreResourceImpl = null;
+
+ /**
+ */
+ private ItemProviderAdapter _itemProvider = null;
+
+ /**
+ */
+ private Object _feature = null;
+
+ /**
+ */
+ private Object _value = null;
+
+ /**
+ * Constructor
+ *
+ * @param domain
+ * the editing domain
+ * @param resource
+ * the resource to add to
+ * @param _feature
+ * the feature to process
+ * @param value
+ * the value to add
+ */
+ public ResourceFeatureAddCommand(EditingDomain domain, FcoreResourceImpl fcoreResourceImpl, Object feature, Object value) {
+ this(domain, fcoreResourceImpl, feature, value, CommandParameter.NO_INDEX);
+ }
+
+ /**
+ * Constructor
+ *
+ * @param domain
+ * the editing domain
+ * @param resource
+ * the resource to add to
+ * @param _feature
+ * the feature to process
+ * @param value
+ * the value to add
+ * @param index
+ * the index
+ */
+ public ResourceFeatureAddCommand(EditingDomain domain, FcoreResourceImpl fcoreResourceImpl, Object feature, Object value, int index) {
+ super(domain, fcoreResourceImpl, value, index);
+ _fcoreResourceImpl = fcoreResourceImpl;
+ _feature = feature;
+ _value = value;
+ if (getDomain() instanceof AdapterFactoryEditingDomain) {
+ IEditingDomainItemProvider valueItemProvider = (IEditingDomainItemProvider) ((AdapterFactoryEditingDomain) getDomain()).getAdapterFactory().adapt(_value, IEditingDomainItemProvider.class);
+ if (valueItemProvider instanceof ItemProviderAdapter) {
+ _itemProvider = (ItemProviderAdapter) valueItemProvider;
+ }
+ }
+ if (_itemProvider != null) {
+ setLabel(_itemProvider.getCreateChildText(_fcoreResourceImpl, _feature, _value, null));
+ setDescription(_itemProvider.getCreateChildDescription(_fcoreResourceImpl, _feature, _value, null));
+ }
+ }
+
+ /**
+ * @see org.eclipse.emf.edit.command.CommandActionDelegate#getImage()
+ */
+ public Object getImage() {
+ return _itemProvider != null ? _itemProvider.getCreateChildImage(_fcoreResourceImpl, _feature, _value, null) : null;
+ }
+
+ /**
+ * @see org.eclipse.emf.edit.command.CommandActionDelegate#getText()
+ */
+ public String getText() {
+ return _itemProvider != null ? _itemProvider.getCreateChildText(_fcoreResourceImpl, _feature, _value, null) : null;
+ }
+
+ /**
+ * @see org.eclipse.emf.edit.command.CommandActionDelegate#getToolTipText()
+ */
+ public String getToolTipText() {
+ return _itemProvider != null ? _itemProvider.getCreateChildToolTipText(_fcoreResourceImpl, _feature, _value, null) : null;
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/commands/ResourceMoveCommand.java b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/commands/ResourceMoveCommand.java
new file mode 100644
index 0000000..f0e0bea
--- /dev/null
+++ b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/commands/ResourceMoveCommand.java
@@ -0,0 +1,61 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.model.fcore.commands;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.impl.NotificationImpl;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.edit.command.MoveCommand;
+import org.eclipse.emf.edit.domain.EditingDomain;
+
+/**
+ * Multi-rooted resources support.
+ * This command will a value in the list and notify
+ *
+ */
+public class ResourceMoveCommand extends MoveCommand {
+
+ private Resource _resource;
+
+ /**
+ * This constructs a primitive command to move a particular value to a particular index of the specified extent.
+ */
+ public ResourceMoveCommand(EditingDomain domain, Resource resource, Object value, int index) {
+ super(domain, resource.getContents(), value, index);
+ _resource = resource;
+ }
+
+ @Override
+ public void doExecute() {
+ oldIndex = ownerList.indexOf(value);
+ ownerList.move(index, value);
+ _resource.setModified(true);
+ Notification innerNotification = new NotificationImpl(Notification.MOVE, _resource.getContents().indexOf(value), value, index, _resource.getContents().isEmpty() == false) {
+ @Override
+ public Object getFeature() {
+ return value instanceof EObject ? ((EObject) value).eClass() : null;
+ }
+
+ @Override
+ public Object getNotifier() {
+ return _resource;
+ }
+
+ @Override
+ public int getFeatureID(Class<?> expectedClass) {
+ return Resource.RESOURCE__CONTENTS;
+ }
+ };
+ _resource.eNotify(innerNotification);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/commands/ResourceRemoveCommand.java b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/commands/ResourceRemoveCommand.java
new file mode 100644
index 0000000..938f331
--- /dev/null
+++ b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/commands/ResourceRemoveCommand.java
@@ -0,0 +1,86 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.model.fcore.commands;
+
+import java.util.Collection;
+
+import org.eclipse.egf.model.fcore.util.FcoreResourceImpl;
+import org.eclipse.emf.edit.command.CommandActionDelegate;
+import org.eclipse.emf.edit.command.RemoveCommand;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+
+/**
+ * The FcoreResourceImpl supports multi-rooted resources
+ * and therefore this command will remove a root from the resource..
+ */
+public class ResourceRemoveCommand extends RemoveCommand implements CommandActionDelegate {
+
+ /**
+ */
+ private FcoreResourceImpl _resource = null;
+
+ /**
+ * Attribute for the adapter factory
+ */
+ private IItemLabelProvider _labelProvider = null;
+
+ /**
+ * Constructor
+ *
+ * @param domain
+ * the editing domain
+ * @param resource
+ * the resource to modify
+ * @param collection
+ * the objects to be removed
+ */
+ public ResourceRemoveCommand(EditingDomain domain, FcoreResourceImpl resource, Collection<?> collection) {
+ super(domain, resource.getContents(), collection);
+ if (getDomain() instanceof AdapterFactoryEditingDomain) {
+ _labelProvider = (IItemLabelProvider) ((AdapterFactoryEditingDomain) getDomain()).getAdapterFactory().adapt(getCollection().toArray()[0], IItemLabelProvider.class);
+ }
+ _resource = resource;
+ setLabel(LABEL);
+ setDescription(DESCRIPTION);
+ }
+
+ /**
+ * @see org.eclipse.emf.edit.command.CommandActionDelegate#getImage()
+ */
+ public Object getImage() {
+ return this._labelProvider != null ? this._labelProvider.getImage(getCollection().toArray()[0]) : null;
+ }
+
+ /**
+ * @see org.eclipse.emf.edit.command.CommandActionDelegate#getText()
+ */
+ public String getText() {
+ return this._labelProvider != null ? this._labelProvider.getText(getCollection().toArray()[0]) : null;
+ }
+
+ /**
+ * @see org.eclipse.emf.edit.command.CommandActionDelegate#getToolTipText()
+ */
+ public String getToolTipText() {
+ return getText();
+ }
+
+ @Override
+ protected boolean prepare() {
+ if (domain.isReadOnly(_resource)) {
+ return false;
+ }
+ return super.prepare();
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/commands/SetInvocationInvokedActivityCommand.java b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/commands/SetInvocationInvokedActivityCommand.java
new file mode 100644
index 0000000..69f1807
--- /dev/null
+++ b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/commands/SetInvocationInvokedActivityCommand.java
@@ -0,0 +1,110 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.commands;
+
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.edit.EMFEditPlugin;
+import org.eclipse.emf.edit.command.RemoveCommand;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.emf.edit.domain.EditingDomain;
+
+public final class SetInvocationInvokedActivityCommand extends CompoundCommand {
+
+ /**
+ * This caches the label.
+ */
+ protected static final String LABEL = EMFEditPlugin.INSTANCE.getString("_UI_SetCommand_label"); //$NON-NLS-1$
+
+ /**
+ * This caches the description.
+ */
+ protected static final String DESCRIPTION = EMFEditPlugin.INSTANCE.getString("_UI_SetCommand_description"); //$NON-NLS-1$
+
+ /**
+ * Current Editing Domain.
+ */
+ private EditingDomain _editingDomain;
+
+ /**
+ * Current Invocation
+ */
+ private Invocation _invocation;
+
+ /**
+ * The new Activity
+ */
+ private Activity _activity;
+
+ /**
+ * Constructor.
+ *
+ * @param editingDomain
+ * @param invocation
+ * @param activity
+ */
+ public SetInvocationInvokedActivityCommand(EditingDomain editingDomain, Invocation invocation, Activity activity) {
+ super(LABEL, DESCRIPTION);
+ _editingDomain = editingDomain;
+ _invocation = invocation;
+ _activity = activity;
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param label
+ * @param description
+ * @param editingDomain
+ * @param invocation
+ * @param activity
+ */
+ public SetInvocationInvokedActivityCommand(String label, String description, EditingDomain editingDomain, Invocation invocation, Activity activity) {
+ super(label, description);
+ _editingDomain = editingDomain;
+ _invocation = invocation;
+ _activity = activity;
+ }
+
+ @Override
+ protected boolean prepare() {
+ // First reset inner reference if necessary
+ if (_invocation.getInvocationContractContainer() != null) {
+ for (InvocationContract contract : _invocation.getInvocationContractContainer().getInvocationContracts()) {
+ if (contract.getFactoryComponentContract() != null) {
+ append(new SetCommand(_editingDomain, contract, FcorePackage.Literals.INVOCATION_CONTRACT__FACTORY_COMPONENT_CONTRACT, null));
+ }
+ if (contract.getOrchestrationParameter() != null) {
+ append(new SetCommand(_editingDomain, contract, FcorePackage.Literals.INVOCATION_CONTRACT__ORCHESTRATION_PARAMETER, null));
+ }
+ if (contract.getSourceInvocationContract() != null) {
+ // This will reset the eOpposite accordingly
+ append(new SetCommand(_editingDomain, contract, FcorePackage.Literals.INVOCATION_CONTRACT__SOURCE_INVOCATION_CONTRACT, null));
+ }
+ if (contract.getTargetInvocationContract() != null) {
+ // This will reset the eOpposite accordingly
+ append(new RemoveCommand(_editingDomain, contract, FcorePackage.Literals.INVOCATION_CONTRACT__TARGET_INVOCATION_CONTRACT, contract.getTargetInvocationContract()));
+ }
+ }
+ }
+ // Reset contract container
+ append(new SetCommand(_editingDomain, _invocation, FcorePackage.Literals.INVOCATION__INVOCATION_CONTRACT_CONTAINER, null));
+ // Assign new activity
+ append(new SetCommand(_editingDomain, _invocation, FcorePackage.Literals.INVOCATION__INVOKED_ACTIVITY, _activity));
+ return super.prepare();
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/helper/FactoryComponentContractHelper.java b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/helper/FactoryComponentContractHelper.java
new file mode 100644
index 0000000..6cc80c5
--- /dev/null
+++ b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/helper/FactoryComponentContractHelper.java
@@ -0,0 +1,74 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.model.fcore.helper;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.eclipse.egf.model.fcore.Contract;
+import org.eclipse.egf.model.fcore.ContractMode;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.FactoryComponentContract;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.emf.common.util.UniqueEList;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class FactoryComponentContractHelper {
+
+ private FactoryComponentContractHelper() {
+ // Prevent Instantiation
+ }
+
+ public static Collection<InvocationContract> getAvailableInvocationContracts(FactoryComponentContract factoryComponentContract) {
+ Collection<InvocationContract> result = new UniqueEList<InvocationContract>();
+ // Nothing to retrieve
+ if (factoryComponentContract.getType() == null || factoryComponentContract.getActivity() == null) {
+ return result;
+ }
+ FactoryComponent factoryComponent = (FactoryComponent) factoryComponentContract.getActivity();
+ // Out or In_Out should have only one assigned InvocationContext
+ if (factoryComponentContract.getMode() != ContractMode.IN && factoryComponentContract.getInvocationContracts().size() != 0) {
+ return result;
+ }
+ // Retrieve all the InvocationContracts based on their types and mode
+ result.addAll(factoryComponent.getInvocationContracts(factoryComponentContract.getType(), factoryComponentContract.getMode()));
+ if (result.size() > 0) {
+ // Filter InvocationContract already assigned to an OrchestrationParameter
+ for (Iterator<InvocationContract> it = result.iterator(); it.hasNext();) {
+ InvocationContract invocationContract = it.next();
+ // an In_Out could either be in an OrchestrationParameter with an In semantic and
+ // in a FactoryComponentContract with an Out semantic but not both
+ if (invocationContract.getOrchestrationParameter() != null && factoryComponentContract.getMode() != ContractMode.OUT) {
+ it.remove();
+ }
+ // an In_Out could either be in a SourceInvocationContract with an In semantic and
+ // in a FactoryComponentContract with an Out semantic but not both
+ if (invocationContract.getSourceInvocationContract() != null && factoryComponentContract.getMode() != ContractMode.OUT) {
+ it.remove();
+ }
+ }
+ // Filter InvocationContract already assigned to a FactoryComponentContract
+ for (Contract innerContract : factoryComponent.getContracts(factoryComponentContract.getType(), factoryComponentContract.getMode())) {
+ if (factoryComponentContract == innerContract) {
+ continue;
+ }
+ for (InvocationContract invocationContract : ((FactoryComponentContract) innerContract).getInvocationContracts()) {
+ result.remove(invocationContract);
+ }
+ }
+ }
+ return result;
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/helper/InvocationContractHelper.java b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/helper/InvocationContractHelper.java
new file mode 100644
index 0000000..2fd56d5
--- /dev/null
+++ b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/helper/InvocationContractHelper.java
@@ -0,0 +1,244 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.model.fcore.helper;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.eclipse.egf.common.helper.ClassHelper;
+import org.eclipse.egf.model.fcore.Contract;
+import org.eclipse.egf.model.fcore.ContractMode;
+import org.eclipse.egf.model.fcore.FactoryComponentContract;
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.model.fcore.OrchestrationParameter;
+import org.eclipse.egf.model.types.Type;
+import org.eclipse.emf.common.util.UniqueEList;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class InvocationContractHelper {
+
+ private InvocationContractHelper() {
+ // Prevent Instantiation
+ }
+
+ public static Collection<Contract> getAvailableFactoryComponentContract(InvocationContract invocationContract) {
+ Collection<Contract> result = new UniqueEList<Contract>();
+ // Nothing to retrieve
+ if (invocationContract.getFactoryComponent() == null || invocationContract.getInvokedContract() == null || invocationContract.getInvokedContract().getType() == null) {
+ return result;
+ }
+ // If an OrchestrationParameter is already assigned, InvocationContract in In mode are not assignable
+ if (invocationContract.getOrchestrationParameter() != null && invocationContract.getInvokedMode() == ContractMode.IN) {
+ return result;
+ }
+ // Retrieve all the typed contracts if available
+ if (invocationContract.getInvokedMode() == ContractMode.IN) {
+ result.addAll(invocationContract.getFactoryComponent().getContracts(invocationContract.getInvokedContract().getType(), ContractMode.IN));
+ } else {
+ // In or In_Out Contract should have only one assigned InvocationContract.
+ for (Contract contract : invocationContract.getFactoryComponent().getContracts(invocationContract.getInvokedContract().getType(), invocationContract.getInvokedMode())) {
+ if (((FactoryComponentContract) contract).getInvocationContracts().size() == 0) {
+ result.add(contract);
+ }
+ }
+ }
+ // If an OrchestrationParameter or a SourceInvocationContract is already assigned, InvocationContract in In_Out mode are only assignable to an Out Mode Contract
+ if ((invocationContract.getOrchestrationParameter() != null || invocationContract.getSourceInvocationContract() != null) && invocationContract.getInvokedMode() == ContractMode.IN_OUT) {
+ for (Iterator<Contract> it = result.iterator(); it.hasNext();) {
+ Contract contract = it.next();
+ if (contract != null && contract.getMode() != ContractMode.OUT) {
+ it.remove();
+ }
+ }
+ }
+ return result;
+ }
+
+ public static Collection<OrchestrationParameter> getAvailableOrchestrationParameter(InvocationContract invocationContract) {
+ Collection<OrchestrationParameter> result = new UniqueEList<OrchestrationParameter>();
+ // Nothing to retrieve
+ if (invocationContract.getFactoryComponent() == null || invocationContract.getFactoryComponent().getOrchestration() == null || invocationContract.getInvokedContract() == null || invocationContract.getInvokedContract().getType() == null) {
+ return result;
+ }
+ // InvocationContract in Out mode are not assignable
+ if (invocationContract.getInvokedMode() == ContractMode.OUT) {
+ return result;
+ }
+ // InvocationContract already assigned to a FactoryComponentContract should be in In_Out mode
+ if (invocationContract.getFactoryComponentContract() != null && invocationContract.getInvokedMode() != ContractMode.IN_OUT) {
+ return result;
+ }
+ // InvocationContract already assigned to a SourceInvocationContract are not assignable
+ if (invocationContract.getSourceInvocationContract() != null) {
+ return result;
+ }
+ // Retrieve all compatible typed OrchestrationParameter
+ result.addAll(invocationContract.getFactoryComponent().getOrchestration().getOrchestrationParameters(invocationContract.getInvokedContract().getType()));
+ // Return
+ return result;
+ }
+
+ public static Collection<Contract> getAvailableInvokedContract(InvocationContract invocationContract) {
+ Collection<Contract> result = new UniqueEList<Contract>();
+ // Nothing to retrieve
+ if (invocationContract.getInvocation() == null || invocationContract.getInvocation().getInvokedActivity() == null) {
+ return result;
+ }
+ // Type filtering
+ if (invocationContract.getType() != null) {
+ if (invocationContract.getFactoryComponentContract() != null) {
+ result.addAll(invocationContract.getInvocation().getInvokedActivity().getContracts(invocationContract.getType(), invocationContract.getFactoryComponentContract().getMode()));
+ } else {
+ result.addAll(invocationContract.getInvocation().getInvokedActivity().getContracts(invocationContract.getType()));
+ }
+ // Filter all assigned contracts if necessary
+ if (result.size() > 0) {
+ for (Contract innerContract : invocationContract.getInvocation().getInvokedContracts(invocationContract.getType())) {
+ result.remove(innerContract);
+ }
+ }
+ } else {
+ if (invocationContract.getFactoryComponentContract() != null) {
+ result.addAll(invocationContract.getInvocation().getInvokedActivity().getContracts(invocationContract.getFactoryComponentContract().getMode()));
+ } else {
+ result.addAll(invocationContract.getInvocation().getInvokedActivity().getContracts());
+ }
+ // Filter all assigned contracts if necessary
+ if (result.size() > 0) {
+ for (Contract innerContract : invocationContract.getInvocation().getInvokedContracts()) {
+ result.remove(innerContract);
+ }
+ }
+ }
+ return result;
+ }
+
+ public static Collection<InvocationContract> getAvailableSourceInvocationContract(InvocationContract invocationContract) {
+ Collection<InvocationContract> result = new UniqueEList<InvocationContract>();
+ // Nothing to retrieve
+ if (invocationContract.getInvocation() == null || invocationContract.getFactoryComponent() == null || invocationContract.getFactoryComponent().getOrchestration() == null) {
+ return result;
+ }
+ // To get an assignable source InvocationContract the current invocationContract should have an In or an In_Out Contract Mode.
+ if (invocationContract.getInvokedContract() == null || invocationContract.getInvokedMode() == ContractMode.OUT || invocationContract.getInvokedContract().getType() == null) {
+ return result;
+ }
+ // Store the current type
+ Type type = invocationContract.getType();
+ if (type == null) {
+ type = invocationContract.getInvokedContract().getType();
+ }
+ // InvocationContract already assigned to an OrchestrationParameter are not assignable
+ if (invocationContract.getOrchestrationParameter() != null) {
+ return result;
+ }
+ // Assigned FactoryComponentContract should be in Out mode.
+ if (invocationContract.getFactoryComponentContract() != null && invocationContract.getFactoryComponentContract().getMode() != ContractMode.OUT) {
+ return result;
+ }
+ // Source should be an In_Out or an Out mode contract
+ for (Invocation invocation : invocationContract.getFactoryComponent().getOrchestration().getInvocations()) {
+ // First we check our current Invocation, all retrieved Invocation should be above
+ if (invocation == invocationContract.getInvocation()) {
+ break;
+ }
+ // InvocationContract analysis
+ for (InvocationContract innerInvocationContract : invocation.getInvocationContracts()) {
+ // InvokedContract and its according type should be assigned
+ if (innerInvocationContract.getInvokedContract() == null || innerInvocationContract.getInvokedContract().getType() == null) {
+ continue;
+ }
+ // Then we check In_Out or Out mode contract
+ if (innerInvocationContract.getInvokedMode() != ContractMode.IN_OUT && innerInvocationContract.getInvokedMode() != ContractMode.OUT) {
+ continue;
+ }
+ // Then we check if this innerInvocationContract is already assigned
+ if (innerInvocationContract.getSourceInvocationContract() != null) {
+ continue;
+ }
+ // Finally we check if their respective types are compatible
+ Type innerType = innerInvocationContract.getType();
+ if (innerType == null) {
+ innerType = innerInvocationContract.getInvokedContract().getType();
+ }
+ if (ClassHelper.asSubClass(type.getType(), innerType.getType())) {
+ result.add(innerInvocationContract);
+ }
+ }
+ }
+ return result;
+ }
+
+ public static Collection<InvocationContract> getAvailableTargetInvocationContract(InvocationContract invocationContract) {
+ Collection<InvocationContract> result = new UniqueEList<InvocationContract>();
+ // Nothing to retrieve
+ if (invocationContract.getInvocation() == null || invocationContract.getFactoryComponent() == null || invocationContract.getFactoryComponent().getOrchestration() == null) {
+ return result;
+ }
+ // To assign a target InvocationContract the current invocationContract should have an Out or an In_Out Contract Mode.
+ if (invocationContract.getInvokedContract() == null || invocationContract.getInvokedMode() == ContractMode.IN || invocationContract.getInvokedContract().getType() == null) {
+ return result;
+ }
+ // Store the current type
+ Type type = invocationContract.getType();
+ if (type == null) {
+ type = invocationContract.getInvokedContract().getType();
+ }
+ // Target should be an In_Out or an In mode contract
+ boolean analyse = false;
+ for (Invocation invocation : invocationContract.getFactoryComponent().getOrchestration().getInvocations()) {
+ // First we check our current Invocation, all retrieved InvocationContract should be below, ignore current
+ if (invocation == invocationContract.getInvocation()) {
+ analyse = true;
+ continue;
+ }
+ if (analyse == false) {
+ continue;
+ }
+ for (InvocationContract innerInvocationContract : invocation.getInvocationContracts()) {
+ // InvokedContract and its according type should be assigned
+ if (innerInvocationContract.getInvokedContract() == null || innerInvocationContract.getInvokedContract().getType() == null) {
+ continue;
+ }
+ // InvocationContract already assigned to an OrchestrationParameter are not assignable
+ if (innerInvocationContract.getOrchestrationParameter() != null) {
+ continue;
+ }
+ // Assigned FactoryComponentContract should be in Out mode.
+ if (innerInvocationContract.getFactoryComponentContract() != null && innerInvocationContract.getFactoryComponentContract().getMode() != ContractMode.OUT) {
+ continue;
+ }
+ // Then we check In_Out or Out mode contract
+ if (innerInvocationContract.getInvokedMode() != ContractMode.IN_OUT && innerInvocationContract.getInvokedMode() != ContractMode.IN) {
+ continue;
+ }
+ // Then we check if this innerInvocationContract is already assigned
+ if (innerInvocationContract.getSourceInvocationContract() != null) {
+ continue;
+ }
+ // Finally we check if their respective types are compatible
+ Type innerType = innerInvocationContract.getType();
+ if (innerType == null) {
+ innerType = innerInvocationContract.getInvokedContract().getType();
+ }
+ if (ClassHelper.asSubClass(type.getType(), innerType.getType())) {
+ result.add(innerInvocationContract);
+ }
+ }
+ }
+ return result;
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/helper/OrchestrationParameterHelper.java b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/helper/OrchestrationParameterHelper.java
new file mode 100644
index 0000000..149836e
--- /dev/null
+++ b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/helper/OrchestrationParameterHelper.java
@@ -0,0 +1,78 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.model.fcore.helper;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.eclipse.egf.model.fcore.ContractMode;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.model.fcore.OrchestrationParameter;
+import org.eclipse.emf.common.util.UniqueEList;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class OrchestrationParameterHelper {
+
+ private OrchestrationParameterHelper() {
+ // Prevent Instantiation
+ }
+
+ public static Collection<InvocationContract> getAvailableInvocationContracts(OrchestrationParameter orchestrationParameter) {
+ Collection<InvocationContract> result = new UniqueEList<InvocationContract>();
+ if (orchestrationParameter.getType() == null) {
+ return result;
+ }
+ // Retrieve all the InvocationContracts based on their types and mode
+ result.addAll(orchestrationParameter.getOrchestration().getInvocationContracts(orchestrationParameter.getType()));
+ if (result.isEmpty()) {
+ return result;
+ }
+ // Filter
+ for (Iterator<InvocationContract> it = result.iterator(); it.hasNext();) {
+ InvocationContract invocationContract = it.next();
+ if (invocationContract.getInvokedMode() == ContractMode.OUT) {
+ // Only In or In_Out mode are assignable to an OrchestrationParameter
+ // They have an In semantic in this area
+ it.remove();
+ } else {
+ if (invocationContract.getFactoryComponentContract() != null) {
+ if (invocationContract.getInvokedMode() == ContractMode.IN) {
+ // Filter InvocationContract with In mode already assigned to a FactoryComponentContract
+ it.remove();
+ } else if (invocationContract.getFactoryComponentContract().getMode() != ContractMode.OUT) {
+ // Filter InvocationContract with In_Out mode already assigned to an In or In_Out FactoryComponentContract
+ it.remove();
+ }
+ }
+ if (invocationContract.getSourceInvocationContract() != null) {
+ if (invocationContract.getInvokedMode() == ContractMode.IN) {
+ // Filter InvocationContract with In mode already assigned to a SourceInvocationContract
+ it.remove();
+ }
+ }
+ }
+ }
+ // Filter InvocationContract already assigned to an OrchestrationParameter
+ for (OrchestrationParameter innerOrchestrationParameter : orchestrationParameter.getOrchestrationParameterContainer().getOrchestrationParameters()) {
+ if (orchestrationParameter == innerOrchestrationParameter) {
+ continue;
+ }
+ for (InvocationContract invocationContract : innerOrchestrationParameter.getInvocationContracts()) {
+ result.remove(invocationContract);
+ }
+ }
+ return result;
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/helper/TypeDomainURIHelper.java b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/helper/TypeDomainURIHelper.java
new file mode 100644
index 0000000..f884a5d
--- /dev/null
+++ b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/helper/TypeDomainURIHelper.java
@@ -0,0 +1,47 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.model.fcore.helper;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.eclipse.egf.model.domain.DomainURI;
+import org.eclipse.egf.model.domain.TypeDomainURI;
+import org.eclipse.emf.common.util.UniqueEList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class TypeDomainURIHelper {
+
+ private TypeDomainURIHelper() {
+ // Prevent Instantiation
+ }
+
+ public static Collection<DomainURI> getAvailableDomainURI(TypeDomainURI typeDomainURI) {
+ Collection<DomainURI> result = new UniqueEList<DomainURI>();
+ // Resource analysis
+ if (typeDomainURI.eResource() == null) {
+ return result;
+ }
+ for (Iterator<EObject> iterator = EcoreUtil.getAllProperContents(typeDomainURI.eResource(), false); iterator.hasNext();) {
+ EObject eObject = iterator.next();
+ if (eObject instanceof DomainURI) {
+ result.add((DomainURI) eObject);
+ }
+ }
+ return result;
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/provider/FcoreCustomItemProviderAdapterFactory.java b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/provider/FcoreCustomItemProviderAdapterFactory.java
new file mode 100644
index 0000000..ad2d783
--- /dev/null
+++ b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/provider/FcoreCustomItemProviderAdapterFactory.java
@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2009 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
+ */
+package org.eclipse.egf.model.fcore.provider;
+
+import org.eclipse.emf.common.notify.Adapter;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class FcoreCustomItemProviderAdapterFactory extends FcoreItemProviderAdapterFactory {
+
+ /**
+ * This constructs an instance.
+ */
+ public FcoreCustomItemProviderAdapterFactory() {
+ super();
+ }
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.fcore.InvocationContract}.
+ */
+ @Override
+ public Adapter createInvocationContractAdapter() {
+ if (invocationContractItemProvider == null) {
+ invocationContractItemProvider = new InvocationContractCustomItemProvider(this);
+ }
+ return invocationContractItemProvider;
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/provider/FcoreResourceItemProvider.java b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/provider/FcoreResourceItemProvider.java
new file mode 100644
index 0000000..f02b555
--- /dev/null
+++ b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/provider/FcoreResourceItemProvider.java
@@ -0,0 +1,284 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.model.fcore.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.egf.common.helper.EMFHelper;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.core.fcore.IPlatformFcore;
+import org.eclipse.egf.model.edit.EGFModelEditPlugin;
+import org.eclipse.egf.model.fcore.FcoreFactory;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.commands.ResourceAddCommand;
+import org.eclipse.egf.model.fcore.commands.ResourceFeatureAddCommand;
+import org.eclipse.egf.model.fcore.commands.ResourceMoveCommand;
+import org.eclipse.egf.model.fcore.commands.ResourceRemoveCommand;
+import org.eclipse.egf.model.fcore.util.FcoreResourceImpl;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.UnexecutableCommand;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.common.util.UniqueEList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.edit.command.CommandParameter;
+import org.eclipse.emf.edit.command.CreateChildCommand;
+import org.eclipse.emf.edit.command.MoveCommand;
+import org.eclipse.emf.edit.command.RemoveCommand;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.provider.IChildCreationExtender;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.emf.edit.provider.resource.ResourceItemProvider;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class FcoreResourceItemProvider extends ResourceItemProvider {
+
+ protected ResourceChildCreationExtenderManager _resourceExtenderManager;
+
+ protected Collection<EClass> _roots;
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ */
+ public FcoreResourceItemProvider(AdapterFactory adapterFactory, ResourceChildCreationExtenderManager resourceExtenderManager) {
+ super(adapterFactory);
+ _resourceExtenderManager = resourceExtenderManager;
+ }
+
+ public Collection<EClass> getRoots() {
+ if (_roots == null) {
+ _roots = new UniqueEList<EClass>();
+ _roots.add(FcorePackage.Literals.FACTORY_COMPONENT);
+ // Add roots defined by extenders
+ _roots.addAll(_resourceExtenderManager.getRoots());
+ }
+ return _roots;
+ }
+
+ @Override
+ public Collection<?> getNewChildDescriptors(Object object, EditingDomain editingDomain, Object sibling) {
+ // Resource
+ FcoreResourceImpl resource = (FcoreResourceImpl) object;
+ // Build the collection of new child descriptors.
+ Collection<Object> newChildDescriptors = new ArrayList<Object>();
+ collectNewChildDescriptors(newChildDescriptors, object);
+ // Add child descriptors contributed by extenders.
+ if (adapterFactory instanceof IChildCreationExtender) {
+ newChildDescriptors.addAll(((IChildCreationExtender) adapterFactory).getNewChildDescriptors(object, editingDomain));
+ }
+ // If a sibling has been specified, add the best index possible to each CommandParameter.
+ if (sibling != null) {
+ // Unwrap
+ sibling = unwrap(sibling);
+ // Find the index of the sibling.
+ Collection<EObject> children = resource.getContents();
+ // For each CommandParameter with a non-null, multi-valued structural feature...
+ int i = 0;
+ DESCRIPTORS_LOOP: for (Object descriptor : newChildDescriptors) {
+ if (descriptor instanceof CommandParameter) {
+ CommandParameter parameter = (CommandParameter) descriptor;
+ // Look for the sibling value or an equivalent in the new child's feature.
+ // If it is found, the child should immediately follow it.
+ i = 0;
+ for (Object innerObject : children) {
+ if (isEquivalentValue(sibling, innerObject)) {
+ parameter.index = i + 1;
+ continue DESCRIPTORS_LOOP;
+ }
+ ++i;
+ }
+ }
+ }
+ }
+ return newChildDescriptors;
+ }
+
+ /**
+ * This adds to <code>newChildDescriptors</code>, a collection of new child
+ * descriptors. Typically, {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * will be used as descriptors. This implementation adds nothing to the
+ * collection, but derived classes should override this method, invoking the
+ * superclass implementation and then adding to the collection.
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.FACTORY_COMPONENT, FcoreFactory.eINSTANCE.createFactoryComponent()));
+ }
+
+ /**
+ * This is a convenience method that creates a <code>CommandParameter</code>
+ * for a given parent feature and child object.
+ */
+ @Override
+ protected CommandParameter createChildParameter(Object feature, Object child) {
+ return new CommandParameter(null, feature, child);
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ */
+ @Override
+ public String getText(Object object) {
+ Resource resource = (Resource) object;
+ StringBuffer buffer = new StringBuffer(resource.getURI() == null ? "" : URI.decode(resource.getURI().toString())); //$NON-NLS-1$
+ IPlatformFcore fc = EGFCorePlugin.getPlatformFcore(resource);
+ if (fc != null) {
+ if (fc.getPlatformBundle().isTarget()) {
+ buffer.append(" [Target]"); //$NON-NLS-1$
+ } else {
+ buffer.append(" [Workspace]"); //$NON-NLS-1$
+ }
+ buffer.append(" ["); //$NON-NLS-1$
+ buffer.append(fc.getPlatformBundle().getBundleLocation());
+ buffer.append("]"); //$NON-NLS-1$
+ }
+ return buffer.toString();
+ }
+
+ /**
+ * This returns Fcore.gif.
+ */
+ @Override
+ public Object getImage(Object object) {
+ return URI.createURI(EGFModelEditPlugin.INSTANCE.getPluginResourceLocator().getImage("full/obj16/Fcore").toString()); //$NON-NLS-1$
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return ((IChildCreationExtender) adapterFactory).getResourceLocator();
+ }
+
+ /**
+ * This implements delegated command creation for the given object.
+ */
+ @Override
+ public Command createCommand(Object object, EditingDomain domain, Class<? extends Command> commandClass, CommandParameter commandParameter) {
+ // Commands should operate on the values, not their wrappers. If the command's values needed to be unwrapped,
+ // we'll back get a new CommandParameter.
+ CommandParameter oldCommandParameter = commandParameter;
+ commandParameter = unwrapCommandValues(commandParameter, commandClass);
+ Command result = UnexecutableCommand.INSTANCE;
+ if (commandParameter.owner instanceof FcoreResourceImpl) {
+ if (commandClass == RemoveCommand.class) {
+ result = createRemoveCommand(domain, (FcoreResourceImpl) commandParameter.owner, commandParameter.getCollection());
+ } else if (commandClass == AddCommand.class) {
+ result = createAddCommand(domain, (FcoreResourceImpl) commandParameter.owner, commandParameter.getCollection(), commandParameter.getIndex());
+ } else if (commandClass == MoveCommand.class) {
+ result = createMoveCommand(domain, (FcoreResourceImpl) commandParameter.owner, commandParameter.getValue(), commandParameter.getIndex());
+ } else if (commandClass == CreateChildCommand.class) {
+ CommandParameter newChildParameter = (CommandParameter) commandParameter.getValue();
+ result = createCreateChildCommand(domain, (FcoreResourceImpl) commandParameter.owner, newChildParameter.getEStructuralFeature(), newChildParameter.getValue(), newChildParameter.getIndex(), commandParameter.getCollection());
+ } else {
+ return super.createCommand(object, domain, commandClass, commandParameter);
+ }
+ } else {
+ return super.createCommand(object, domain, commandClass, commandParameter);
+ }
+ // If necessary, get a command that replaces unwrapped values by their wrappers in the result and affected objects.
+ return wrapCommand(result, object, commandClass, commandParameter, oldCommandParameter);
+ }
+
+ /**
+ * This creates a primitive {@link org.eclipse.emf.edit.command.RemoveCommand}.
+ */
+ protected Command createRemoveCommand(EditingDomain domain, FcoreResourceImpl resource, Collection<?> collection) {
+ return new ResourceRemoveCommand(domain, resource, collection);
+ }
+
+ /**
+ * This creates a primitive {@link org.eclipse.emf.edit.command.AddCommand}.
+ */
+ protected Command createAddCommand(EditingDomain domain, FcoreResourceImpl resource, Collection<?> collection, int index) {
+ boolean isValid = true;
+ Collection<EClass> roots = getRoots();
+ for (Object object : collection) {
+ if (object instanceof EObject) {
+ EObject eObject = (EObject) object;
+ if (roots.contains(EMFHelper.solveAgainstStaticPackage(eObject.eClass())) == false) {
+ isValid = false;
+ break;
+ }
+ }
+ }
+ if (isValid) {
+ return new ResourceAddCommand(domain, resource, collection, index);
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * This creates a primitive {@link org.eclipse.emf.edit.command.MoveCommand}.
+ */
+ protected Command createMoveCommand(EditingDomain domain, FcoreResourceImpl resource, Object value, int index) {
+ if (value instanceof EObject) {
+ Collection<EClass> roots = getRoots();
+ EObject eObject = (EObject) value;
+ if (roots.contains(EMFHelper.solveAgainstStaticPackage(eObject.eClass()))) {
+ return new ResourceMoveCommand(domain, resource, value, index);
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * This creates a primitive {@link org.eclipse.emf.edit.command.CreateChildCommand}.
+ */
+ protected Command createCreateChildCommand(EditingDomain domain, FcoreResourceImpl resource, EStructuralFeature feature, Object value, int index, Collection<?> collection) {
+ if (collection != null && collection.size() == 1) {
+ Object object = collection.iterator().next();
+ if (object instanceof EObject) {
+ Collection<EClass> roots = getRoots();
+ EObject eObject = (EObject) object;
+ if (roots.contains(EMFHelper.solveAgainstStaticPackage(eObject.eClass()))) {
+ return new ResourceFeatureAddCommand(domain, resource, feature, value, resource.getContents().indexOf(eObject) == CommandParameter.NO_INDEX ? CommandParameter.NO_INDEX : resource.getContents().indexOf(eObject) + 1);
+ }
+ }
+ }
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ /**
+ * This handles notification by calling {@link #fireNotifyChanged(Notification) fireNotifyChanged}.
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ switch (notification.getFeatureID(Resource.class)) {
+ case Resource.RESOURCE__URI:
+ // case Resource.RESOURCE__IS_MODIFIED:
+ // case Resource.RESOURCE__IS_TRACKING_MODIFICATION:
+ // case Resource.RESOURCE__RESOURCE_SET:
+ {
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ case Resource.RESOURCE__IS_LOADED:
+ case Resource.RESOURCE__CONTENTS: {
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ }
+ super.notifyChanged(notification);
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/provider/FcoreResourceItemProviderAdapterFactory.java b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/provider/FcoreResourceItemProviderAdapterFactory.java
new file mode 100644
index 0000000..1ec6c23
--- /dev/null
+++ b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/provider/FcoreResourceItemProviderAdapterFactory.java
@@ -0,0 +1,101 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.model.fcore.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.edit.EGFModelEditPlugin;
+import org.eclipse.egf.model.fcore.util.FcoreResourceImpl;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.provider.IChildCreationExtender;
+import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class FcoreResourceItemProviderAdapterFactory extends ResourceItemProviderAdapterFactory implements IResourceChildCreationExtender {
+
+ /**
+ * The fcore resource URI.
+ */
+ public static String FCORE_URI = "org.eclipse.egf.model.fcore.util"; //$NON-NLS-1$
+
+ protected static Package fcoreResourceImplPackage = FcoreResourceImpl.class.getPackage();
+
+ protected FcoreResourceItemProvider _fcoreResourceItemProvider;
+
+ /**
+ * This helps manage the child creation extenders.
+ */
+ protected ResourceChildCreationExtenderManager resourceChildCreationExtenderManager = new ResourceChildCreationExtenderManager(EGFModelEditPlugin.INSTANCE, FCORE_URI);
+
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ if (target instanceof FcoreResourceImpl) {
+ return createFcoreResourceAdapter();
+ }
+ return createResourceSetAdapter();
+ }
+
+ /**
+ * 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.
+ */
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return type == fcoreResourceImplPackage || type instanceof FcoreResourceImpl || type instanceof ResourceSet || supportedTypes.contains(type);
+ }
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.emf.ecore.resource.FcoreResourceImpl}.
+ */
+ public Adapter createFcoreResourceAdapter() {
+ if (_fcoreResourceItemProvider == null) {
+ _fcoreResourceItemProvider = new FcoreResourceItemProvider(this, resourceChildCreationExtenderManager);
+ }
+ return _fcoreResourceItemProvider;
+ }
+
+ public ResourceChildCreationExtenderManager getResourceChildCreationExtenderManager() {
+ return resourceChildCreationExtenderManager;
+ }
+
+ public List<IChildCreationExtender> getChildCreationExtenders() {
+ return resourceChildCreationExtenderManager.getChildCreationExtenders();
+ }
+
+ public Collection<?> getNewChildDescriptors(Object object, EditingDomain editingDomain) {
+ return resourceChildCreationExtenderManager.getNewChildDescriptors(object, editingDomain);
+ }
+
+ public ResourceLocator getResourceLocator() {
+ return resourceChildCreationExtenderManager;
+ }
+
+ public Collection<EClass> getRoots() {
+ if (_fcoreResourceItemProvider == null) {
+ createFcoreResourceAdapter();
+ }
+ return _fcoreResourceItemProvider.getRoots();
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/provider/IResourceChildCreationExtender.java b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/provider/IResourceChildCreationExtender.java
new file mode 100644
index 0000000..fceb76f
--- /dev/null
+++ b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/provider/IResourceChildCreationExtender.java
@@ -0,0 +1,26 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.model.fcore.provider;
+
+import java.util.Collection;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.edit.provider.IChildCreationExtender;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public interface IResourceChildCreationExtender extends IChildCreationExtender {
+
+ public Collection<EClass> getRoots();
+
+}
diff --git a/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/provider/InvocationContractCustomItemProvider.java b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/provider/InvocationContractCustomItemProvider.java
new file mode 100644
index 0000000..b42c4d6
--- /dev/null
+++ b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/provider/InvocationContractCustomItemProvider.java
@@ -0,0 +1,67 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.model.fcore.provider;
+
+import org.eclipse.egf.common.helper.EMFHelper;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class InvocationContractCustomItemProvider extends InvocationContractItemProvider {
+
+ public InvocationContractCustomItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ */
+ @Override
+ public String getText(Object object) {
+ InvocationContract invocationContract = (InvocationContract) object;
+ String invocation = null;
+ if (invocationContract.getInvocation() != null) {
+ IItemLabelProvider provider = (IItemLabelProvider) (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory()).adapt(invocationContract.getInvocation(), IItemLabelProvider.class);
+ if (provider == null) {
+ invocation = EMFHelper.getText(invocationContract.getInvocation());
+ } else {
+ invocation = provider.getText(invocationContract.getInvocation());
+ }
+ }
+ String invoked = null;
+ if (invocationContract.getInvokedContract() != null) {
+ invoked = invocationContract.getInvokedContract().getName();
+ String mode = null;
+ if (invocationContract.getInvokedContract().getMode() != null) {
+ mode = "[" + invocationContract.getInvokedContract().getMode().getLiteral() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ if ((invoked == null || invoked.length() == 0) && mode != null) {
+ invoked = mode;
+ } else if (mode != null) {
+ invoked = invoked + " " + mode; //$NON-NLS-1$
+ }
+ }
+ String label = "[" + getString("_UI_InvocationContract_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ if (invoked != null) {
+ label = invoked + " " + label; //$NON-NLS-1$
+ }
+ if (invocation != null) {
+ label = invocation + " -> " + label; //$NON-NLS-1$
+ }
+ return label;
+ }
+
+}
diff --git a/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/provider/ResourceChildCreationExtenderManager.java b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/provider/ResourceChildCreationExtenderManager.java
new file mode 100644
index 0000000..01e7e64
--- /dev/null
+++ b/org.eclipse.egf.model.edit/src/org/eclipse/egf/model/fcore/provider/ResourceChildCreationExtenderManager.java
@@ -0,0 +1,187 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2008 IBM Corporation and others.
+ * 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:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ *
+ * $Id: ChildCreationExtenderManager.java,v 1.1 2008/01/29 21:13:13 emerks Exp $
+ */
+package org.eclipse.egf.model.fcore.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.util.BasicEList;
+import org.eclipse.emf.common.util.DelegatingResourceLocator;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.common.util.UniqueEList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.provider.IChildCreationExtender;
+
+/**
+ * A child creation extension manager encapsulates a {@link #getChildCreationExtenders() list of child creation extenders} for a particular package.
+ * The list is automatically populated based on {@link IChildCreationExtender.Descriptor.Registry#getDescriptors(String) registered extensions} for the package.
+ * The manager also acts as resource locator that loads resources from either the primary resource locator or one of the extenders.
+ */
+public class ResourceChildCreationExtenderManager extends DelegatingResourceLocator {
+
+ protected Collection<EClass> roots;
+ /**
+ * The primary resource locator.
+ */
+ protected ResourceLocator primaryResourceLocator;
+
+ /**
+ * A key in the {@link IChildCreationExtender.Descriptor.Registry child creation extender registry} which will typically be the namespace of the package being extended.
+ */
+ protected String namespace;
+
+ /**
+ * A specialized child creation extender list implementation that provides efficient access to the resource locators of the extenders.
+ */
+ private static class ChildCreationExtenderList extends BasicEList<IChildCreationExtender> {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * An empty array.
+ */
+ private static final ResourceLocator[] NO_RESOURCE_LOCATORS = new ResourceLocator[0];
+
+ /**
+ * A cache of the resource locators of the extenders.
+ */
+ protected ResourceLocator[] delegateResourceLocators = NO_RESOURCE_LOCATORS;
+
+ /**
+ * The modCount the last time the delegateResourceLocators were computed.
+ */
+ protected int expectedModCount = modCount;
+
+ /**
+ * Creates an empty new instance.
+ */
+ public ChildCreationExtenderList() {
+ super();
+ }
+
+ /**
+ * This list may not contain null.
+ */
+ @Override
+ protected boolean canContainNull() {
+ return false;
+ }
+
+ /**
+ * This list may only contain instances of {@link IChildCreationExtender}.
+ */
+ @Override
+ protected Object[] newData(int capacity) {
+ return new IChildCreationExtender[capacity];
+ }
+
+ /**
+ * Returns an efficiently computed array of the delegate resource locators.
+ */
+ protected ResourceLocator[] getDelegateResourceLocators() {
+ if (expectedModCount != modCount) {
+ expectedModCount = modCount;
+ if (size == 0) {
+ delegateResourceLocators = NO_RESOURCE_LOCATORS;
+ } else {
+ IChildCreationExtender[] childCreationExtenders = (IChildCreationExtender[]) data;
+ delegateResourceLocators = new ResourceLocator[size];
+ for (int i = 0; i < size; ++i) {
+ delegateResourceLocators[i] = childCreationExtenders[i].getResourceLocator();
+ }
+ }
+ }
+ return delegateResourceLocators;
+ }
+ }
+
+ /**
+ * The list of child creation extenders.
+ */
+ protected ChildCreationExtenderList childCreationExtenders;
+
+ /**
+ * Creates an instance for the given primary resource locator to manage the extensions for the given namespace.
+ *
+ * @param primaryResourceLocator
+ * the resource locator for finding basic resources.
+ * @param namespace
+ * a key in the {@link IChildCreationExtender.Descriptor.Registry child creation extender registry} which will typically be the namespace of the package whose extensions are being managed.
+ */
+ public ResourceChildCreationExtenderManager(ResourceLocator primaryResourceLocator, String namespace) {
+ this.primaryResourceLocator = primaryResourceLocator;
+ this.namespace = namespace;
+ }
+
+ @Override
+ protected ResourceLocator[] getDelegateResourceLocators() {
+ getChildCreationExtenders();
+ return childCreationExtenders.getDelegateResourceLocators();
+ }
+
+ @Override
+ protected ResourceLocator getPrimaryResourceLocator() {
+ return primaryResourceLocator;
+ }
+
+ /**
+ * Returns a modifiable list of the child creation extenders.
+ *
+ * @return a modifiable list of the child creation extenders.
+ */
+ public List<IChildCreationExtender> getChildCreationExtenders() {
+ if (childCreationExtenders == null) {
+ childCreationExtenders = new ChildCreationExtenderList();
+ for (IChildCreationExtender.Descriptor descriptor : IChildCreationExtender.Descriptor.Registry.INSTANCE.getDescriptors(namespace)) {
+ childCreationExtenders.add(descriptor.createChildCreationExtender());
+ }
+ }
+ return childCreationExtenders;
+ }
+
+ /**
+ * Returns the list of new child descriptors accumulated from each of the child creation extenders.
+ *
+ * @param object
+ * the owner object of the descriptors.
+ * @param editingDomain
+ * the domain for the descriptors.
+ * @return the list of new child descriptors accumulated from each of the child creation extenders.
+ */
+ public List<?> getNewChildDescriptors(Object object, EditingDomain editingDomain) {
+ List<Object> result = new ArrayList<Object>();
+ for (IChildCreationExtender childCreationExtender : getChildCreationExtenders()) {
+ result.addAll(childCreationExtender.getNewChildDescriptors(object, editingDomain));
+ }
+ return result;
+ }
+
+ public Collection<EClass> getRoots() {
+ if (roots == null) {
+ roots = new UniqueEList<EClass>();
+ for (IChildCreationExtender childCreationExtender : getChildCreationExtenders()) {
+ if (childCreationExtender instanceof IResourceChildCreationExtender) {
+ roots.addAll(((IResourceChildCreationExtender) childCreationExtender).getRoots());
+ }
+ }
+ }
+ return roots;
+ }
+
+}
diff --git a/org.eclipse.egf.model.editor/.classpath b/org.eclipse.egf.model.editor/.classpath
new file mode 100644
index 0000000..f701972
--- /dev/null
+++ b/org.eclipse.egf.model.editor/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="generated"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.egf.model.editor/.options b/org.eclipse.egf.model.editor/.options
new file mode 100644
index 0000000..bbba086
--- /dev/null
+++ b/org.eclipse.egf.model.editor/.options
@@ -0,0 +1,2 @@
+# Prints debug information
+org.eclipse.egf.model.editor/debug=true
diff --git a/org.eclipse.egf.model.editor/.project b/org.eclipse.egf.model.editor/.project
new file mode 100644
index 0000000..e0d9dec
--- /dev/null
+++ b/org.eclipse.egf.model.editor/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.model.editor</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.model.editor/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egf.model.editor/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..c571bb1
--- /dev/null
+++ b/org.eclipse.egf.model.editor/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:51:50 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.egf.model.editor/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egf.model.editor/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..7866a44
--- /dev/null
+++ b/org.eclipse.egf.model.editor/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Fri Jun 19 15:18:27 CEST 2009
+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/org.eclipse.egf.model.editor/META-INF/MANIFEST.MF b/org.eclipse.egf.model.editor/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..57daa60
--- /dev/null
+++ b/org.eclipse.egf.model.editor/META-INF/MANIFEST.MF
@@ -0,0 +1,31 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.model.editor;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.egf.model.editor.EGFModelEditorPlugin$Implementation
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package:
+ org.eclipse.egf.model.editor,
+ org.eclipse.egf.model.editor.contributions,
+ org.eclipse.egf.model.editor.dialogs,
+ org.eclipse.egf.model.editor.provider,
+ org.eclipse.egf.model.fcore.presentation
+Require-Bundle:
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.ui.ide,
+ org.eclipse.ui.views,
+ org.eclipse.emf.ecore.xmi,
+ org.eclipse.emf.edit.ui,
+ org.eclipse.emf.ecore.edit,
+ org.eclipse.emf.workspace,
+ org.eclipse.emf.workspace.ui,
+ org.eclipse.emf.transaction.ui,
+ org.eclipse.egf.core.ui,
+ org.eclipse.egf.model.fprod.edit,
+ org.eclipse.egf.model.ftask.edit
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.egf.model.editor/about.html b/org.eclipse.egf.model.editor/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/org.eclipse.egf.model.editor/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/org.eclipse.egf.model.editor/build.properties b/org.eclipse.egf.model.editor/build.properties
new file mode 100644
index 0000000..67be8c2
--- /dev/null
+++ b/org.eclipse.egf.model.editor/build.properties
@@ -0,0 +1,20 @@
+##
+# 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
+##
+source.. = generated/,\
+ src/
+output.. = bin/
+bin.includes = .,\
+ icons/,\
+ META-INF/,\
+ about.html,\
+ plugin.xml,\
+ plugin.properties
+src.includes = about.html
diff --git a/org.eclipse.egf.model.editor/generated/org/eclipse/egf/model/editor/EGFModelEditorPlugin.java b/org.eclipse.egf.model.editor/generated/org/eclipse/egf/model/editor/EGFModelEditorPlugin.java
new file mode 100644
index 0000000..13a03cf
--- /dev/null
+++ b/org.eclipse.egf.model.editor/generated/org/eclipse/egf/model/editor/EGFModelEditorPlugin.java
@@ -0,0 +1,144 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.editor;
+
+import org.eclipse.egf.common.ui.activator.EGFEclipseUIPlugin;
+import org.eclipse.egf.model.edit.EGFFprodEditPlugin;
+import org.eclipse.egf.model.edit.EGFFtaskEditPlugin;
+import org.eclipse.egf.model.edit.EGFModelEditPlugin;
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.provider.EcoreEditPlugin;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+
+/**
+ * This is the central singleton for the Fcore editor plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public final class EGFModelEditorPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final EGFModelEditorPlugin INSTANCE = new EGFModelEditorPlugin();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EGFModelEditorPlugin() {
+ super(new ResourceLocator[] { EcoreEditPlugin.INSTANCE, EGFModelEditPlugin.INSTANCE, EGFFprodEditPlugin.INSTANCE, EGFFtaskEditPlugin.INSTANCE, });
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ *
+ * Returns the currently active window for this workbench (if any). Returns
+ * <code>null</code> if there is no active workbench window. Returns
+ * <code>null</code> if called from a non-UI thread.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the active workbench window, or <code>null</code> if there is
+ * no active workbench window or if called from a non-UI thread
+ * @generated NOT
+ */
+ public static IWorkbenchWindow getActiveWorkbenchWindow() {
+ return getPlugin().getWorkbench().getActiveWorkbenchWindow();
+ }
+
+ /**
+ * Returns the currently active shell for this workbench (if any).
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the active workbench shell.
+ * @generated NOT
+ */
+ public static Shell getActiveWorkbenchShell() {
+ IWorkbenchWindow window = getActiveWorkbenchWindow();
+ if (window != null) {
+ return window.getShell();
+ }
+ return null;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static class Implementation extends EGFEclipseUIPlugin {
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+
+ }
+
+}
diff --git a/org.eclipse.egf.model.editor/generated/org/eclipse/egf/model/fcore/presentation/FcoreActionBarContributor.java b/org.eclipse.egf.model.editor/generated/org/eclipse/egf/model/fcore/presentation/FcoreActionBarContributor.java
new file mode 100644
index 0000000..f10eaf0
--- /dev/null
+++ b/org.eclipse.egf.model.editor/generated/org/eclipse/egf/model/fcore/presentation/FcoreActionBarContributor.java
@@ -0,0 +1,560 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.presentation;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.egf.common.ui.constant.EGFCommonUIConstants;
+import org.eclipse.egf.common.ui.helper.EditorHelper;
+import org.eclipse.egf.core.preferences.IEGFModelConstants;
+import org.eclipse.egf.core.session.ProjectBundleSession;
+import org.eclipse.egf.core.ui.EGFCoreUIPlugin;
+import org.eclipse.egf.core.ui.contributor.MenuContributor;
+import org.eclipse.egf.core.ui.diagnostic.EGFDiagnosticDialog;
+import org.eclipse.egf.model.editor.EGFModelEditorPlugin;
+import org.eclipse.egf.model.editor.actions.FcoreResourcePasteAction;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.ui.viewer.IViewerProvider;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.UniqueEList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.Diagnostician;
+import org.eclipse.emf.ecore.util.EObjectValidator;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
+import org.eclipse.emf.edit.ui.EMFEditUIPlugin;
+import org.eclipse.emf.edit.ui.action.ControlAction;
+import org.eclipse.emf.edit.ui.action.CreateChildAction;
+import org.eclipse.emf.edit.ui.action.CreateSiblingAction;
+import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
+import org.eclipse.emf.edit.ui.action.ValidateAction;
+import org.eclipse.emf.workspace.ui.actions.RedoActionWrapper;
+import org.eclipse.emf.workspace.ui.actions.UndoActionWrapper;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IContributionManager;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.window.Window;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.ActionFactory;
+
+/**
+ * This is the action bar contributor for the Fcore model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+public class FcoreActionBarContributor extends EditingDomainActionBarContributor implements ISelectionChangedListener {
+
+ private final List<MenuContributor> menuContributors = new ArrayList<MenuContributor>();
+
+ /**
+ * This keeps track of the active editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected IEditorPart activeEditorPart;
+
+ /**
+ * This keeps track of the current selection provider.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ISelectionProvider selectionProvider;
+
+ /**
+ * This action opens the Properties view.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected IAction showPropertiesViewAction = new Action(EGFModelEditorPlugin.INSTANCE.getString("_UI_ShowPropertiesView_menu_item")) { //$NON-NLS-1$
+ @Override
+ public void run() {
+ try {
+ getPage().showView("org.eclipse.ui.views.PropertySheet"); //$NON-NLS-1$
+ } catch (PartInitException exception) {
+ EGFModelEditorPlugin.INSTANCE.log(exception);
+ }
+ }
+ };
+
+ /**
+ * This action refreshes the viewer of the current editor if the editor
+ * implements {@link org.eclipse.emf.common.ui.viewer.IViewerProvider}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected IAction refreshViewerAction = new Action(EGFModelEditorPlugin.INSTANCE.getString("_UI_RefreshViewer_menu_item")) { //$NON-NLS-1$
+ @Override
+ public boolean isEnabled() {
+ return activeEditorPart instanceof IViewerProvider;
+ }
+
+ @Override
+ public void run() {
+ if (activeEditorPart instanceof IViewerProvider) {
+ Viewer viewer = ((IViewerProvider) activeEditorPart).getViewer();
+ if (viewer != null) {
+ viewer.refresh();
+ }
+ }
+ }
+ };
+
+ /**
+ * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateChildAction} corresponding to
+ * each descriptor
+ * generated for the current selection by the item provider.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Collection<IAction> createChildActions;
+
+ /**
+ * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} corresponding
+ * to each descriptor
+ * generated for the current selection by the item provider.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Collection<IAction> createSiblingActions;
+
+ /**
+ * This creates an instance of the contributor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public FcoreActionBarContributor() {
+ super(ADDITIONS_LAST_STYLE);
+ for (IConfigurationElement element : Platform.getExtensionRegistry().getConfigurationElementsFor(MenuContributor.EXTENSION_ID)) {
+ try {
+ MenuContributor contributor = (MenuContributor) element.createExecutableExtension("class"); //$NON-NLS-1$
+ contributor.setParentContributor(this);
+ menuContributors.add(contributor);
+ } catch (CoreException e) {
+ EGFCoreUIPlugin.getDefault().logError(e);
+ }
+ }
+
+ validateAction = new ValidateAction() {
+
+ private Resource currentResource;
+
+ /**
+ * This simply execute the command.
+ */
+ @Override
+ protected Diagnostic validate(IProgressMonitor progressMonitor) {
+
+ // Nothing to process
+ if (selectedObjects == null || selectedObjects.size() == 0) {
+ return Diagnostic.OK_INSTANCE;
+ }
+
+ // In our application, only one resource is edited per editor
+ // it is safe to get the resource from the first selectedObject
+ currentResource = selectedObjects.get(0).eResource();
+
+ int selectionSize = selectedObjects.size();
+ int count = selectionSize;
+ for (EObject eObject : selectedObjects) {
+ for (Iterator<?> i = eObject.eAllContents(); i.hasNext(); i.next()) {
+ ++count;
+ }
+ }
+
+ progressMonitor.beginTask("", count); //$NON-NLS-1$
+
+ AdapterFactory adapterFactory = domain instanceof AdapterFactoryEditingDomain ? ((AdapterFactoryEditingDomain) domain).getAdapterFactory() : null;
+ Diagnostician diagnostician = createDiagnostician(adapterFactory, progressMonitor);
+
+ BasicDiagnostic diagnostic;
+ if (selectionSize == 1) {
+ diagnostic = diagnostician.createDefaultDiagnostic(selectedObjects.get(0));
+ } else {
+ diagnostic = new BasicDiagnostic(EObjectValidator.DIAGNOSTIC_SOURCE, 0, EMFEditUIPlugin.INSTANCE.getString("_UI_DiagnosisOfNObjects_message", new String[] { Integer.toString(selectionSize) }), //$NON-NLS-1$
+ selectedObjects.toArray());
+ }
+ Map<Object, Object> context = diagnostician.createDefaultContext();
+ // Preferences
+ IPreferenceStore store = EGFCoreUIPlugin.getDefault().getPreferenceStore();
+ if (store.getBoolean(IEGFModelConstants.VALIDATE_TYPES)) {
+ context.put(IEGFModelConstants.VALIDATE_TYPES, Boolean.TRUE);
+ } else {
+ context.put(IEGFModelConstants.VALIDATE_TYPES, Boolean.FALSE);
+ }
+ // Bundle Session
+ ProjectBundleSession session = new ProjectBundleSession(EGFModelEditorPlugin.getPlugin().getBundle().getBundleContext());
+ context.put(ProjectBundleSession.PROJECT_BUNDLE_SESSION, session);
+ // Validation
+ for (EObject eObject : selectedObjects) {
+ progressMonitor.setTaskName(EMFEditUIPlugin.INSTANCE.getString("_UI_Validating_message", new Object[] { diagnostician.getObjectLabel(eObject) })); //$NON-NLS-1$
+ diagnostician.validate(eObject, diagnostic, context);
+ }
+ // Dispose Session
+ try {
+ session.dispose();
+ } catch (CoreException ce) {
+ EGFModelEditorPlugin.getPlugin().logError(ce);
+ }
+ return diagnostic;
+
+ }
+
+ @Override
+ protected void handleDiagnostic(Diagnostic diagnostic) {
+ int severity = diagnostic.getSeverity();
+ String title = null;
+ String message = null;
+ if (severity == Diagnostic.ERROR || severity == Diagnostic.WARNING) {
+ title = EMFEditUIPlugin.INSTANCE.getString("_UI_ValidationProblems_title"); //$NON-NLS-1$
+ message = EMFEditUIPlugin.INSTANCE.getString("_UI_ValidationProblems_message"); //$NON-NLS-1$
+ } else {
+ title = EMFEditUIPlugin.INSTANCE.getString("_UI_ValidationResults_title"); //$NON-NLS-1$
+ message = EMFEditUIPlugin.INSTANCE.getString(severity == Diagnostic.OK ? "_UI_ValidationOK_message" : "_UI_ValidationResults_message"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ // Reset existing Markers
+ if (currentResource != null) {
+ eclipseResourcesUtil.deleteMarkers(currentResource);
+ }
+ // Display that everything is fine
+ if (diagnostic.getSeverity() == Diagnostic.OK) {
+ MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), title, message);
+ return;
+ }
+ // Display Dialog
+ int result = 0;
+ EGFDiagnosticDialog dialog = new EGFDiagnosticDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), title, message, diagnostic, Diagnostic.OK | Diagnostic.INFO | Diagnostic.WARNING | Diagnostic.ERROR);
+ result = dialog.open();
+ // Dialog has been canceled
+ if (result != Window.OK) {
+ return;
+ }
+ // Nothing to select
+ if (dialog.getSelection() != null && dialog.getSelection().isEmpty() == false) {
+ // Select and reveal
+ Map<Resource, List<EObject>> resources = new HashMap<Resource, List<EObject>>();
+ // Try to select and reveal selected Diagnostics
+ for (Diagnostic innerDiagnostic : dialog.getSelection()) {
+ List<?> data = innerDiagnostic.getData();
+ if (data.isEmpty() == false && data.get(0) instanceof EObject && ((EObject) data.get(0)).eResource() != null) {
+ EObject eObject = (EObject) data.get(0);
+ List<EObject> eObjects = resources.get(eObject.eResource());
+ if (eObjects == null) {
+ eObjects = new UniqueEList<EObject>();
+ resources.put(eObject.eResource(), eObjects);
+ }
+ eObjects.add(eObject);
+ }
+ }
+ // Open and select
+ EditorHelper.openEditorsAndSelect(resources);
+ }
+ // Display markers
+ if (currentResource != null) {
+ for (Diagnostic childDiagnostic : diagnostic.getChildren()) {
+ eclipseResourcesUtil.createMarkers(currentResource, childDiagnostic);
+ }
+ }
+ }
+
+ };
+
+ controlAction = new ControlAction();
+ }
+
+ /**
+ * This adds Separators for editor additions to the tool bar.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void contributeToToolBar(IToolBarManager toolBarManager) {
+ // Do nothing
+ }
+
+ /**
+ * This adds to the menu bar a menu and some separators for editor
+ * additions,
+ * as well as the sub-menus for object creation items.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public void contributeToMenu(IMenuManager menuManager) {
+ // Do nothing
+ }
+
+ /**
+ * When the active editor changes, this remembers the change and registers
+ * with it as a selection
+ * provider.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public void setActiveEditor(IEditorPart part) {
+ super.setActiveEditor(part);
+ activeEditorPart = part;
+
+ // Switch to the new selection provider.
+ //
+ if (selectionProvider != null) {
+ selectionProvider.removeSelectionChangedListener(this);
+ }
+ if (part == null) {
+ selectionProvider = null;
+ } else {
+ selectionProvider = part.getSite().getSelectionProvider();
+ selectionProvider.addSelectionChangedListener(this);
+
+ // Fake a selection changed event to update the menus.
+ //
+ if (selectionProvider.getSelection() != null) {
+ selectionChanged(new SelectionChangedEvent(selectionProvider, selectionProvider.getSelection()));
+ }
+ }
+ for (MenuContributor vpc : menuContributors)
+ vpc.setActiveEditor(part);
+
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionChangedListener},
+ * handling {@link org.eclipse.jface.viewers.SelectionChangedEvent}s by
+ * querying for the children
+ * and siblings
+ * that can be added to the selected object and updating the menus
+ * accordingly.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public void selectionChanged(SelectionChangedEvent event) {
+
+ // Query the new selection for appropriate new child/sibling descriptors
+ Collection<?> newChildDescriptors = null;
+ Collection<?> newSiblingDescriptors = null;
+
+ ISelection selection = event.getSelection();
+ if (selection instanceof IStructuredSelection && ((IStructuredSelection) selection).size() == 1) {
+ Object object = ((IStructuredSelection) selection).getFirstElement();
+ EditingDomain domain = ((IEditingDomainProvider) activeEditorPart).getEditingDomain();
+ newChildDescriptors = domain.getNewChildDescriptors(object, null);
+ newSiblingDescriptors = domain.getNewChildDescriptors(null, object);
+ }
+
+ // Generate actions for selection; populate and redraw the menus.
+ createChildActions = generateCreateChildActions(newChildDescriptors, selection);
+ createSiblingActions = generateCreateSiblingActions(newSiblingDescriptors, selection);
+
+ for (MenuContributor vpc : menuContributors) {
+ vpc.selectionChanged(event);
+ }
+
+ }
+
+ /**
+ * This generates a {@link org.eclipse.emf.edit.ui.action.CreateChildAction} for each object in <code>descriptors</code>,
+ * and returns the collection of these actions.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Collection<IAction> generateCreateChildActions(Collection<?> descriptors, ISelection selection) {
+ Collection<IAction> actions = new ArrayList<IAction>();
+ if (descriptors != null) {
+ for (Object descriptor : descriptors) {
+ actions.add(new CreateChildAction(activeEditorPart, selection, descriptor));
+ }
+ }
+ return actions;
+ }
+
+ /**
+ * This generates a {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} for each
+ * object in <code>descriptors</code>,
+ * and returns the collection of these actions.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Collection<IAction> generateCreateSiblingActions(Collection<?> descriptors, ISelection selection) {
+ Collection<IAction> actions = new ArrayList<IAction>();
+ if (descriptors != null) {
+ for (Object descriptor : descriptors) {
+ actions.add(new CreateSiblingAction(activeEditorPart, selection, descriptor));
+ }
+ }
+ return actions;
+ }
+
+ /**
+ * This populates the specified <code>manager</code> with {@link org.eclipse.jface.action.ActionContributionItem}s
+ * based on the {@link org.eclipse.jface.action.IAction}s contained in the
+ * <code>actions</code> collection,
+ * by inserting them before the specified contribution item
+ * <code>contributionID</code>.
+ * If <code>contributionID</code> is <code>null</code>, they are simply
+ * added.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void populateManager(IContributionManager manager, Collection<? extends IAction> actions, String contributionID) {
+ if (actions != null) {
+ for (IAction action : actions) {
+ if (contributionID != null) {
+ manager.insertBefore(contributionID, action);
+ } else {
+ manager.add(action);
+ }
+ }
+ }
+ }
+
+ /**
+ * This populates the pop-up menu before it appears.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public void menuAboutToShow(IMenuManager menuManager) {
+ super.menuAboutToShow(menuManager);
+ menuManager.add(new Separator("settings")); //$NON-NLS-1$
+ menuManager.insertAfter(EGFCommonUIConstants.EDIT_MENU_GROUP, new Separator(EGFCommonUIConstants.OPEN_MENU_GROUP));
+ MenuManager submenuManager = null;
+
+ submenuManager = new MenuManager(EGFModelEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item"), EGFCommonUIConstants.CREATE_CHILD); //$NON-NLS-1$
+ populateManager(submenuManager, createChildActions, null);
+ menuManager.insertBefore(EGFCommonUIConstants.EDIT_MENU_GROUP, submenuManager);
+
+ submenuManager = new MenuManager(EGFModelEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item"), EGFCommonUIConstants.CREATE_SIBLING); //$NON-NLS-1$
+ populateManager(submenuManager, createSiblingActions, null);
+ menuManager.insertBefore(EGFCommonUIConstants.EDIT_MENU_GROUP, submenuManager);
+
+ for (MenuContributor vpc : menuContributors) {
+ vpc.menuAboutToShow(menuManager);
+ }
+
+ }
+
+ /**
+ * This inserts global actions before the "additions-end" separator.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void addGlobalActions(IMenuManager menuManager) {
+ menuManager.insertAfter("additions-end", new Separator("ui-actions")); //$NON-NLS-1$ //$NON-NLS-2$
+ menuManager.insertAfter("ui-actions", showPropertiesViewAction); //$NON-NLS-1$
+
+ refreshViewerAction.setEnabled(refreshViewerAction.isEnabled());
+ menuManager.insertAfter("ui-actions", refreshViewerAction); //$NON-NLS-1$
+
+ super.addGlobalActions(menuManager);
+ }
+
+ /**
+ * This ensures that a delete action will clean up all references to deleted
+ * objects.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean removeAllReferencesOnDelete() {
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void init(IActionBars actionBars) {
+ super.init(actionBars);
+ // Locate shared images registry
+ ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages();
+ // override the superclass implementation of these actions
+ undoAction = new UndoActionWrapper();
+ undoAction.setImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_UNDO));
+ actionBars.setGlobalActionHandler(ActionFactory.UNDO.getId(), undoAction);
+ redoAction = new RedoActionWrapper();
+ redoAction.setImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_REDO));
+ actionBars.setGlobalActionHandler(ActionFactory.REDO.getId(), redoAction);
+ pasteAction = new FcoreResourcePasteAction();
+ pasteAction.setImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE));
+ actionBars.setGlobalActionHandler(ActionFactory.PASTE.getId(), pasteAction);
+ }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.egf.model.editor/generated/org/eclipse/egf/model/fcore/presentation/FcoreEditor.java b/org.eclipse.egf.model.editor/generated/org/eclipse/egf/model/fcore/presentation/FcoreEditor.java
new file mode 100644
index 0000000..57d8cbc
--- /dev/null
+++ b/org.eclipse.egf.model.editor/generated/org/eclipse/egf/model/fcore/presentation/FcoreEditor.java
@@ -0,0 +1,1832 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.model.fcore.presentation;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.commands.operations.IOperationHistory;
+import org.eclipse.core.commands.operations.IOperationHistoryListener;
+import org.eclipse.core.commands.operations.IUndoContext;
+import org.eclipse.core.commands.operations.IUndoableOperation;
+import org.eclipse.core.commands.operations.ObjectUndoContext;
+import org.eclipse.core.commands.operations.OperationHistoryEvent;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.egf.common.ui.helper.EditorHelper;
+import org.eclipse.egf.common.ui.helper.ThrowableHandler;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.core.domain.EGFResourceLoadedListener;
+import org.eclipse.egf.core.domain.EGFResourceLoadedListener.ResourceListener;
+import org.eclipse.egf.core.domain.EGFResourceLoadedListener.ResourceUser;
+import org.eclipse.egf.core.helper.ResourceHelper;
+import org.eclipse.egf.core.ui.EGFCoreUIPlugin;
+import org.eclipse.egf.core.ui.contributor.ListenerContributor;
+import org.eclipse.egf.model.editor.EGFModelEditorPlugin;
+import org.eclipse.egf.model.editor.adapter.PatternBundleAdapter;
+import org.eclipse.egf.model.editor.adapter.TaskBundleAdapter;
+import org.eclipse.egf.model.editor.provider.FcoreContentProvider;
+import org.eclipse.egf.model.editor.provider.FcorePropertySheetPage;
+import org.eclipse.egf.model.fcore.provider.FcoreCustomItemProviderAdapterFactory;
+import org.eclipse.egf.model.fcore.provider.FcoreResourceItemProviderAdapterFactory;
+import org.eclipse.egf.model.fprod.provider.FprodCustomItemProviderAdapterFactory;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.ui.MarkerHelper;
+import org.eclipse.emf.common.ui.ViewerPane;
+import org.eclipse.emf.common.ui.editor.ProblemEditorPart;
+import org.eclipse.emf.common.ui.viewer.IViewerProvider;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.common.util.UniqueEList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EValidator;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.EContentAdapter;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
+import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
+import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor;
+import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter;
+import org.eclipse.emf.edit.ui.dnd.LocalTransfer;
+import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter;
+import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider.ViewerRefresh;
+import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.ui.provider.TransactionalAdapterFactoryContentProvider;
+import org.eclipse.emf.transaction.ui.provider.TransactionalAdapterFactoryLabelProvider;
+import org.eclipse.emf.workspace.EMFCommandOperation;
+import org.eclipse.emf.workspace.IWorkspaceCommandStack;
+import org.eclipse.emf.workspace.ResourceUndoContext;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IStatusLineManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CTabFolder;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.events.ControlAdapter;
+import org.eclipse.swt.events.ControlEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IPartListener;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
+import org.eclipse.ui.dialogs.SaveAsDialog;
+import org.eclipse.ui.ide.IGotoMarker;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.part.MultiPageEditorPart;
+import org.eclipse.ui.views.contentoutline.ContentOutline;
+import org.eclipse.ui.views.contentoutline.ContentOutlinePage;
+import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
+import org.eclipse.ui.views.properties.IPropertySheetPage;
+import org.eclipse.ui.views.properties.PropertySheet;
+import org.eclipse.ui.views.properties.PropertySheetPage;
+
+/**
+ * This is an example of a Fcore model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+public class FcoreEditor extends MultiPageEditorPart implements ResourceUser, ResourceListener, IEditingDomainProvider, ISelectionProvider, IMenuListener, IViewerProvider, IGotoMarker {
+ /**
+ * This keeps track of the editing domain that is used to track all changes
+ * to the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected AdapterFactoryEditingDomain editingDomain;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected ObjectUndoContext undoContext;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected Resource resource;
+
+ /**
+ * This is the one adapter factory used for providing views of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ComposedAdapterFactory adapterFactory;
+
+ /**
+ * This is the one adapter factory used for properties.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected ComposedAdapterFactory propertyAdapterFactory;
+
+ /**
+ * This is the content outline page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected IContentOutlinePage contentOutlinePage;
+
+ /**
+ * This is a kludge...
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected IStatusLineManager contentOutlineStatusLineManager;
+
+ /**
+ * This is the content outline page's viewer.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected TreeViewer contentOutlineViewer;
+
+ /**
+ * This is the property sheet page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected PropertySheetPage propertySheetPage;
+
+ /**
+ * This is the viewer that shadows the selection in the content outline.
+ * The parent relation must be correctly defined for this to work.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected TreeViewer selectionViewer;
+
+ /**
+ * This keeps track of the active viewer pane
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ViewerPane currentViewerPane;
+
+ /**
+ * This keeps track of the active content viewer, which may be either one of the viewers in the pages or the content outline viewer.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Viewer currentViewer;
+
+ /**
+ * This listens to which ever viewer is active.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ISelectionChangedListener selectionChangedListener;
+
+ /**
+ * This keeps track of all the {@link org.eclipse.jface.viewers.ISelectionChangedListener}s that
+ * are listening to this editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Collection<ISelectionChangedListener> selectionChangedListeners = new ArrayList<ISelectionChangedListener>();
+
+ /**
+ * This keeps track of the selection of the editor as a whole.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ISelection editorSelection = StructuredSelection.EMPTY;
+
+ /**
+ * The MarkerHelper is responsible for creating workspace resource markers
+ * presented
+ * in Eclipse's Problems View.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected MarkerHelper markerHelper = new EditUIMarkerHelper();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected ViewerRefresh viewerRefresh;
+
+ /**
+ * This listens for when the outline becomes active
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected IPartListener partListener = new IPartListener() {
+
+ public void partActivated(IWorkbenchPart p) {
+ if (p instanceof ContentOutline) {
+ if (((ContentOutline) p).getCurrentPage() == contentOutlinePage) {
+ getActionBarContributor().setActiveEditor(FcoreEditor.this);
+ setCurrentViewer(contentOutlineViewer);
+ }
+ } else if (p instanceof PropertySheet) {
+ if (((PropertySheet) p).getCurrentPage() == propertySheetPage) {
+ getActionBarContributor().setActiveEditor(FcoreEditor.this);
+ handleActivate();
+ }
+ } else if (p == FcoreEditor.this) {
+ handleActivate();
+ }
+ }
+
+ public void partBroughtToTop(IWorkbenchPart p) {
+ // Nothing to do
+ }
+
+ public void partClosed(IWorkbenchPart p) {
+ // Nothing to do
+ }
+
+ public void partDeactivated(IWorkbenchPart p) {
+ // Nothing to do
+ }
+
+ public void partOpened(IWorkbenchPart p) {
+ // Nothing to do
+ }
+
+ };
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public ObjectUndoContext getUndoContext() {
+ return undoContext;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ private IOperationHistoryListener historyListener = new IOperationHistoryListener() {
+ public void historyNotification(final OperationHistoryEvent event) {
+ Set<Resource> affectedResources = ResourceUndoContext.getAffectedResources(event.getOperation());
+ switch (event.getEventType()) {
+ case OperationHistoryEvent.DONE:
+ if (affectedResources.contains(getResource())) {
+ final IUndoableOperation operation = event.getOperation();
+ // remove the default undo context so that we can have
+ // independent undo/redo of independent resource changes
+ operation.removeContext(((IWorkspaceCommandStack) getEditingDomain().getCommandStack()).getDefaultUndoContext());
+ // add our undo context to populate our undo menu
+ operation.addContext(getUndoContext());
+ getSite().getShell().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+ // Try to select the affected objects.
+ if (operation instanceof EMFCommandOperation) {
+ Command command = ((EMFCommandOperation) operation).getCommand();
+ if (command != null) {
+ setSelectionToViewer(command.getAffectedObjects());
+ }
+ }
+ if (propertySheetPage != null) {
+ propertySheetPage.refresh();
+ }
+ }
+ });
+ }
+ break;
+ case OperationHistoryEvent.UNDONE:
+ case OperationHistoryEvent.REDONE:
+ if (affectedResources.contains(getResource())) {
+ final IUndoableOperation operation = event.getOperation();
+ getSite().getShell().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+ // Try to select the affected objects.
+ if (operation instanceof EMFCommandOperation) {
+ Command command = ((EMFCommandOperation) operation).getCommand();
+ if (command != null) {
+ setSelectionToViewer(command.getAffectedObjects());
+ }
+ }
+ if (propertySheetPage != null) {
+ propertySheetPage.refresh();
+ }
+ }
+ });
+ }
+ break;
+ }
+ }
+ };
+
+ /**
+ * Whether or not this resource has been removed
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected boolean resourceHasBeenRemoved;
+
+ /**
+ * Whether or not this resource has been externally changed
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected boolean resourceHasBeenExternallyChanged;
+
+ /**
+ * Whether or not user saved this resource in this editor
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected boolean userHasSavedResource;
+
+ /**
+ * Map to store the diagnostic associated with a resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Map<URI, Diagnostic> resourceToDiagnosticMap = new LinkedHashMap<URI, Diagnostic>();
+ /**
+ * Controls whether the problem indication should be updated.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected boolean updateProblemIndication = true;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected List<EContentAdapter> egfAdapters = new UniqueEList<EContentAdapter>();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ private boolean tabFolderGuard = false;
+
+ /**
+ * Adapter used to update the problem indication when resources are demanded
+ * loaded.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected EContentAdapter editorResourceAdapter = new EContentAdapter() {
+ @Override
+ public void notifyChanged(Notification notification) {
+ // Process Resource
+ if (notification.getNotifier() instanceof Resource) {
+ switch (notification.getFeatureID(Resource.class)) {
+ case Resource.RESOURCE__IS_LOADED:
+ case Resource.RESOURCE__ERRORS:
+ case Resource.RESOURCE__WARNINGS: {
+ // Problem
+ final Resource innerResource = (Resource) notification.getNotifier();
+ if (innerResource == getResource() || ResourceHelper.hasURIProxyReferences(getResource(), innerResource.getURI())) {
+ Diagnostic diagnostic = ResourceHelper.analyzeResourceProblems(innerResource, null, EGFCorePlugin.FCORE_EDITOR_ID);
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ resourceToDiagnosticMap.put(innerResource.getURI(), diagnostic);
+ } else {
+ resourceToDiagnosticMap.remove(innerResource.getURI());
+ }
+ // Try to refresh proxy owners
+ if (innerResource != getResource()) {
+ if (selectionViewer != null && selectionViewer.getControl() != null && selectionViewer.getControl().isDisposed() == false && selectionViewer.isBusy() == false) {
+ final List<EObject> owners = ResourceHelper.getURIProxyReferenceOwners(getResource(), innerResource.getURI());
+ if (owners != null && owners.isEmpty() == false) {
+ if (viewerRefresh == null) {
+ viewerRefresh = new ViewerRefresh(selectionViewer);
+ }
+ for (EObject eObject : owners) {
+ Notification ownerNotification = new ENotificationImpl((InternalEObject) eObject, Notification.RESOLVE, null, eObject, eObject);
+ viewerRefresh.addNotification(new ViewerNotification(ownerNotification, ownerNotification.getNotifier(), true, true));
+ }
+ selectionViewer.getControl().getDisplay().asyncExec(viewerRefresh);
+ }
+ }
+ }
+ // Display any trouble
+ if (updateProblemIndication) {
+ getSite().getShell().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ updateProblemIndication();
+ }
+ });
+ }
+ }
+ break;
+ }
+ case Resource.RESOURCE__CONTENTS:
+ case Resource.RESOURCE__URI: {
+ getSite().getShell().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+ }
+ });
+ break;
+ }
+ }
+ } else {
+ super.notifyChanged(notification);
+ }
+ }
+
+ @Override
+ protected void setTarget(Resource innerTarget) {
+ basicSetTarget(innerTarget);
+ }
+
+ @Override
+ protected void unsetTarget(Resource innerTarget) {
+ basicUnsetTarget(innerTarget);
+ }
+
+ };
+
+ /**
+ * Handles activation of the editor or it's associated views.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected void handleActivate() {
+ setCurrentViewer(selectionViewer);
+ // Recompute the read only state.
+ if (editingDomain.getResourceToReadOnlyMap() != null) {
+ editingDomain.getResourceToReadOnlyMap().clear();
+ // Refresh any actions that may become enabled or disabled.
+ setSelection(getSelection());
+ }
+ if (resourceHasBeenRemoved) {
+ getSite().getShell().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ if (isDirty() == false || handleDirtyConflict()) {
+ getSite().getPage().closeEditor(FcoreEditor.this, false);
+ }
+ }
+ });
+ } else if (resourceHasBeenExternallyChanged) {
+ handleChangedResource();
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public void resourceMoved(Resource movedResource, final URI oldURI) {
+ if (movedResource == getResource()) {
+ resourceHasBeenExternallyChanged = false;
+ resourceHasBeenRemoved = false;
+ userHasSavedResource = false;
+ getSite().getShell().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ if (AdapterFactoryEditingDomain.isStale(editorSelection)) {
+ setSelection(StructuredSelection.EMPTY);
+ }
+ selectionViewer.setSelection(new StructuredSelection(getResource()), true);
+ if (currentViewerPane != null) {
+ currentViewerPane.setTitle(getResource());
+ }
+ setTitleToolTip(getResource().toString());
+ }
+ });
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public void resourceDeleted(Resource deletedResource) {
+ // Handle current resource
+ if (deletedResource == getResource()) {
+ if (isDirty() == false) {
+ // just close now without prompt
+ getSite().getShell().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ getSite().getPage().closeEditor(FcoreEditor.this, false);
+ }
+ });
+ return;
+ }
+ // Dirty editor with a deleted resource
+ resourceHasBeenRemoved = true;
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public void resourceReloaded(Resource reloadedResource) {
+ if (reloadedResource == getResource()) {
+ resourceHasBeenExternallyChanged = false;
+ resourceHasBeenRemoved = false;
+ userHasSavedResource = false;
+ getSite().getShell().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ if (AdapterFactoryEditingDomain.isStale(editorSelection)) {
+ setSelection(StructuredSelection.EMPTY);
+ }
+ getOperationHistory().dispose(undoContext, true, true, true);
+ selectionViewer.setInput(getResource());
+ selectionViewer.setSelection(new StructuredSelection(getResource()), true);
+ currentViewerPane.setTitle(getResource());
+ updateProblemIndication = true;
+ }
+ });
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean userHasSavedResource() {
+ return userHasSavedResource;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean resourceHasBeenExternallyChanged() {
+ return resourceHasBeenExternallyChanged;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public void externalUpdate(Resource changedResource) {
+ if (changedResource == getResource()) {
+ resourceHasBeenExternallyChanged = true;
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public void internalUpdate(Resource changedResource) {
+ if (changedResource == getResource()) {
+ resourceHasBeenExternallyChanged = false;
+ resourceHasBeenRemoved = false;
+ userHasSavedResource = false;
+ }
+ getSite().getShell().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+ }
+ });
+ }
+
+ /**
+ * Handles what to do with changed resource on activation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected void handleChangedResource() {
+ if (isDirty() == false || handleDirtyConflict()) {
+ EGFResourceLoadedListener.RESOURCE_MANAGER.reloadResource(getResource());
+ }
+ }
+
+ /**
+ * Updates the problems indication with the information described in the
+ * specified diagnostic.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected void updateProblemIndication() {
+ if (updateProblemIndication) {
+ BasicDiagnostic diagnostic = new BasicDiagnostic(Diagnostic.OK, EGFCorePlugin.FCORE_EDITOR_ID, 0, null, new Object[] { getResource() });
+ for (URI uri : resourceToDiagnosticMap.keySet()) {
+ Diagnostic childDiagnostic = resourceToDiagnosticMap.get(uri);
+ if (childDiagnostic.getSeverity() != Diagnostic.OK) {
+ diagnostic.add(childDiagnostic);
+ }
+ }
+ int lastEditorPage = getPageCount() - 1;
+ if (lastEditorPage >= 0 && getEditor(lastEditorPage) instanceof ProblemEditorPart) {
+ ((ProblemEditorPart) getEditor(lastEditorPage)).setDiagnostic(diagnostic);
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ setActivePage(lastEditorPage);
+ } else {
+ removePage(lastEditorPage);
+ setActivePage(0);
+ if (tabFolderGuard == false) {
+ tabFolderGuard = true;
+ hideTabs();
+ tabFolderGuard = false;
+ }
+ }
+ } else if (diagnostic.getSeverity() != Diagnostic.OK) {
+ ProblemEditorPart problemEditorPart = new ProblemEditorPart();
+ problemEditorPart.setDiagnostic(diagnostic);
+ problemEditorPart.setMarkerHelper(markerHelper);
+ try {
+ addPage(++lastEditorPage, problemEditorPart, getEditorInput());
+ setPageText(lastEditorPage, problemEditorPart.getPartName());
+ setActivePage(lastEditorPage);
+ showTabs();
+ } catch (PartInitException exception) {
+ EGFModelEditorPlugin.INSTANCE.log(exception);
+ }
+ }
+ for (URI uri : resourceToDiagnosticMap.keySet()) {
+ Diagnostic childDiagnostic = resourceToDiagnosticMap.get(uri);
+ if (childDiagnostic.getSeverity() != Diagnostic.OK) {
+ diagnostic.add(childDiagnostic);
+ }
+ }
+ if (markerHelper.hasMarkers(getResource())) {
+ markerHelper.deleteMarkers(getResource());
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ try {
+ markerHelper.createMarkers(diagnostic);
+ } catch (CoreException exception) {
+ EGFModelEditorPlugin.INSTANCE.log(exception);
+ }
+ }
+ }
+
+ }
+ }
+
+ /**
+ * Shows a dialog that asks if conflicting changes should be discarded.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected boolean handleDirtyConflict() {
+ return MessageDialog.openQuestion(getSite().getShell(), getString("_UI_FileConflict_label"), //$NON-NLS-1$
+ getString("_WARN_FileConflict")); //$NON-NLS-1$
+ }
+
+ /**
+ * This creates a model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public FcoreEditor() {
+ super();
+ initializeEditingDomain();
+ }
+
+ /**
+ * This sets up the editing domain for the model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected void initializeEditingDomain() {
+ // Create an adapter factory that yields item providers.
+ adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
+ adapterFactory.addAdapterFactory(new FcoreResourceItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
+ // Create an adapter factory that yields item providers for properties.
+ propertyAdapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
+ propertyAdapterFactory.addAdapterFactory(new FcoreResourceItemProviderAdapterFactory());
+ propertyAdapterFactory.addAdapterFactory(new FprodCustomItemProviderAdapterFactory());
+ propertyAdapterFactory.addAdapterFactory(new FcoreCustomItemProviderAdapterFactory());
+ propertyAdapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
+ // Get the registered TransactionalEditingDomain
+ editingDomain = (AdapterFactoryEditingDomain) TransactionalEditingDomain.Registry.INSTANCE.getEditingDomain(EGFCorePlugin.EDITING_DOMAIN_ID);
+ // Create an UndoContext
+ undoContext = new ObjectUndoContext(this, EGFModelEditorPlugin.getPlugin().getString("_UI_FcoreEditor_label")); //$NON-NLS-1$
+ // add an history listener
+ getOperationHistory().addOperationHistoryListener(historyListener);
+ }
+
+ /**
+ * This is here for the listener to be able to call it.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void firePropertyChange(int action) {
+ super.firePropertyChange(action);
+ }
+
+ /**
+ * This sets the selection into whichever viewer is active.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public void setSelectionToViewer(Collection<?> collection) {
+ if (collection == null || collection.isEmpty()) {
+ return;
+ }
+ final Collection<EObject> theSelection = new UniqueEList<EObject>(collection.size());
+ // Solve EObject against our resource set
+ for (Object object : collection) {
+ if (object instanceof EObject == false) {
+ continue;
+ }
+ URI uri = null;
+ try {
+ uri = EcoreUtil.getURI((EObject) object);
+ EObject eObject = editingDomain.getResourceSet().getEObject(uri, true);
+ if (eObject != null) {
+ theSelection.add(eObject);
+ }
+ } catch (Throwable t) {
+ // Got some FileNotFoundException here, a more accurate tracing is needed to track it
+ if (uri != null) {
+ EGFModelEditorPlugin.getPlugin().logError(uri.toString(), t);
+ } else {
+ EGFModelEditorPlugin.getPlugin().logError(object.toString(), t);
+ }
+ }
+ }
+ Runnable runnable = new Runnable() {
+ public void run() {
+ // Try to select the items in the current content viewer of the editor.
+ if (currentViewer != null) {
+ currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true);
+ }
+ }
+ };
+ getSite().getShell().getDisplay().asyncExec(runnable);
+ }
+
+ /**
+ * This returns the editing domain as required by the {@link IEditingDomainProvider} interface.
+ * This is important for implementing the static methods of {@link AdapterFactoryEditingDomain} and for supporting {@link org.eclipse.emf.edit.ui.action.CommandAction}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TransactionalEditingDomain getEditingDomain() {
+ return (TransactionalEditingDomain) editingDomain;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public class ReverseAdapterFactoryContentProvider extends TransactionalAdapterFactoryContentProvider {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public ReverseAdapterFactoryContentProvider(AdapterFactory adapterFactory) {
+ super(getEditingDomain(), adapterFactory);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object[] getElements(Object object) {
+ Object parent = super.getParent(object);
+ return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object[] getChildren(Object object) {
+ Object parent = super.getParent(object);
+ return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean hasChildren(Object object) {
+ Object parent = super.getParent(object);
+ return parent != null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object getParent(Object object) {
+ return null;
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setCurrentViewerPane(ViewerPane viewerPane) {
+ if (currentViewerPane != viewerPane) {
+ if (currentViewerPane != null) {
+ currentViewerPane.showFocus(false);
+ }
+ currentViewerPane = viewerPane;
+ }
+ setCurrentViewer(currentViewerPane.getViewer());
+ }
+
+ /**
+ * This makes sure that one content viewer, either for the current page or
+ * the outline view, if it
+ * has focus,
+ * is the current one.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setCurrentViewer(Viewer viewer) {
+ // If it is changing...
+ //
+ if (currentViewer != viewer) {
+ if (selectionChangedListener == null) {
+ // Create the listener on demand.
+ //
+ selectionChangedListener = new ISelectionChangedListener() {
+ // This just notifies those things that are affected by the
+ // section.
+ //
+ public void selectionChanged(SelectionChangedEvent selectionChangedEvent) {
+ setSelection(selectionChangedEvent.getSelection());
+ }
+ };
+ }
+
+ // Stop listening to the old one.
+ //
+ if (currentViewer != null) {
+ currentViewer.removeSelectionChangedListener(selectionChangedListener);
+ }
+
+ // Start listening to the new one.
+ //
+ if (viewer != null) {
+ viewer.addSelectionChangedListener(selectionChangedListener);
+ }
+
+ // Remember it.
+ //
+ currentViewer = viewer;
+
+ // Set the editors selection based on the current viewer's
+ // selection.
+ //
+ setSelection(currentViewer == null ? StructuredSelection.EMPTY : currentViewer.getSelection());
+ }
+ }
+
+ /**
+ * This returns the viewer as required by the {@link IViewerProvider} interface.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Viewer getViewer() {
+ return currentViewer;
+ }
+
+ /**
+ * This creates a context menu for the viewer and adds a listener as well
+ * registering the menu for
+ * extension.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected void createContextMenuFor(StructuredViewer viewer) {
+ MenuManager contextMenu = new MenuManager("#PopUp"); //$NON-NLS-1$
+ contextMenu.add(new Separator("additions")); //$NON-NLS-1$
+ contextMenu.setRemoveAllWhenShown(true);
+ contextMenu.addMenuListener(this);
+ Menu menu = contextMenu.createContextMenu(viewer.getControl());
+ viewer.getControl().setMenu(menu);
+ getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer));
+
+ int dndOperations = DND.DROP_COPY | DND.DROP_MOVE;
+ Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance() };
+ viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer));
+ viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(getEditingDomain(), viewer));
+ }
+
+ /**
+ * This is the method called to load a resource into the editing domain's
+ * resource set based on the editor's input.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public void createModel() {
+ URI uri = EditorHelper.getURI(getEditorInput());
+ Exception exception = null;
+ resource = null;
+ try {
+ // Load the resource through the editing domain.
+ //
+ resource = editingDomain.getResourceSet().getResource(uri, true);
+ } catch (Exception e) {
+ exception = e;
+ resource = editingDomain.getResourceSet().getResource(uri, false);
+ }
+ resourceHasBeenExternallyChanged = EGFResourceLoadedListener.RESOURCE_MANAGER.resourceHasBeenExternallyChanged(resource);
+ Diagnostic diagnostic = ResourceHelper.analyzeResourceProblems(resource, exception, EGFCorePlugin.FCORE_EDITOR_ID);
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ resourceToDiagnosticMap.put(resource.getURI(), diagnostic);
+ }
+ editingDomain.getResourceSet().eAdapters().add(editorResourceAdapter);
+ egfAdapters.add(new PatternBundleAdapter(resource, getSite()));
+ egfAdapters.add(new TaskBundleAdapter(resource, getSite()));
+ getEditingDomain().getResourceSet().eAdapters().addAll(egfAdapters);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public ResourceListener getListener() {
+ return this;
+ }
+
+ /**
+ * Obtains the single resource that I edit.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public Resource getResource() {
+ return resource;
+ }
+
+ /**
+ * This is the method used by the framework to install your own controls.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public void createPages() {
+
+ // Only creates the other pages if there is something that can be edited
+ if (getResource() != null) {
+
+ ViewerPane viewerPane = new ViewerPane(getSite().getPage(), FcoreEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ Tree tree = new Tree(composite, SWT.MULTI);
+ TreeViewer newTreeViewer = new TreeViewer(tree);
+ return newTreeViewer;
+ }
+
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+
+ // Create a page for the selection tree view.
+ selectionViewer = (TreeViewer) viewerPane.getViewer();
+
+ selectionViewer.setContentProvider(new FcoreContentProvider(getEditingDomain(), adapterFactory));
+ selectionViewer.setLabelProvider(new TransactionalAdapterFactoryLabelProvider(getEditingDomain(), adapterFactory));
+
+ selectionViewer.setInput(getResource());
+ selectionViewer.setSelection(new StructuredSelection(getResource()), true);
+ viewerPane.setTitle(getResource());
+
+ new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory);
+
+ createContextMenuFor(selectionViewer);
+ for (IConfigurationElement element : Platform.getExtensionRegistry().getConfigurationElementsFor(ListenerContributor.EXTENSION_ID)) {
+ try {
+ ListenerContributor contributor = (ListenerContributor) element.createExecutableExtension("class"); //$NON-NLS-1$
+ contributor.addListeners(getEditorSite().getPage(), selectionViewer);
+ } catch (CoreException e) {
+ EGFCoreUIPlugin.getDefault().logError(e);
+ }
+ }
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_SelectionPage_label")); //$NON-NLS-1$
+
+ }
+
+ // Ensures that this editor will only display the page's tab
+ // area if there are more than one page
+ getContainer().addControlListener(new ControlAdapter() {
+ @Override
+ public void controlResized(ControlEvent event) {
+ if (tabFolderGuard == false) {
+ tabFolderGuard = true;
+ hideTabs();
+ tabFolderGuard = false;
+ }
+ }
+ });
+
+ getSite().getShell().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ updateProblemIndication();
+ }
+ });
+
+ }
+
+ /**
+ * If there is just one page in the multi-page editor part,
+ * this hides the single tab at the bottom.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void hideTabs() {
+ if (getPageCount() <= 1) {
+ setPageText(0, ""); //$NON-NLS-1$
+ if (getContainer() instanceof CTabFolder) {
+ ((CTabFolder) getContainer()).setTabHeight(1);
+ Point point = getContainer().getSize();
+ getContainer().setSize(point.x, point.y + 6);
+ }
+ }
+ }
+
+ /**
+ * If there is more than one page in the multi-page editor part,
+ * this shows the tabs at the bottom.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void showTabs() {
+ if (getPageCount() > 1) {
+ setPageText(0, getString("_UI_SelectionPage_label")); //$NON-NLS-1$
+ if (getContainer() instanceof CTabFolder) {
+ ((CTabFolder) getContainer()).setTabHeight(SWT.DEFAULT);
+ Point point = getContainer().getSize();
+ getContainer().setSize(point.x, point.y - 6);
+ }
+ }
+ }
+
+ /**
+ * This is used to track the active viewer.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void pageChange(int pageIndex) {
+ super.pageChange(pageIndex);
+ if (contentOutlinePage != null) {
+ handleContentOutlineSelection(contentOutlinePage.getSelection());
+ }
+ }
+
+ /**
+ * This is how the framework determines which interfaces we implement.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public Object getAdapter(Class key) {
+ if (key.equals(IContentOutlinePage.class)) {
+ return showOutlineView() ? getContentOutlinePage() : null;
+ } else if (key.equals(IPropertySheetPage.class)) {
+ return getPropertySheetPage();
+ } else if (key.equals(IGotoMarker.class)) {
+ return this;
+ } else if (key.equals(IUndoContext.class)) {
+ return undoContext;
+ } else {
+ return super.getAdapter(key);
+ }
+ }
+
+ /**
+ * This accesses a cached version of the content outliner.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public IContentOutlinePage getContentOutlinePage() {
+ if (contentOutlinePage == null) {
+ // The content outline is just a tree.
+ class MyContentOutlinePage extends ContentOutlinePage {
+ @Override
+ public void createControl(Composite parent) {
+ super.createControl(parent);
+ contentOutlineViewer = getTreeViewer();
+ contentOutlineViewer.addSelectionChangedListener(this);
+
+ // Set up the tree viewer.
+ contentOutlineViewer.setContentProvider(new FcoreContentProvider(getEditingDomain(), adapterFactory));
+ contentOutlineViewer.setLabelProvider(new TransactionalAdapterFactoryLabelProvider(getEditingDomain(), adapterFactory));
+ contentOutlineViewer.setInput(getResource());
+
+ // Make sure our popups work.
+ createContextMenuFor(contentOutlineViewer);
+
+ if (editingDomain.getResourceSet().getResources().isEmpty() == false) {
+ // Select the root object in the view.
+ ArrayList<Object> selection = new ArrayList<Object>();
+ selection.add(getResource());
+ contentOutlineViewer.setSelection(new StructuredSelection(selection), true);
+ }
+ }
+
+ @Override
+ public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
+ super.makeContributions(menuManager, toolBarManager, statusLineManager);
+ contentOutlineStatusLineManager = statusLineManager;
+ }
+
+ @Override
+ public void setActionBars(IActionBars actionBars) {
+ super.setActionBars(actionBars);
+ getActionBarContributor().shareGlobalActions(this, actionBars);
+ }
+ }
+
+ contentOutlinePage = new MyContentOutlinePage();
+
+ // Listen to selection so that we can handle it is a special way.
+ //
+ contentOutlinePage.addSelectionChangedListener(new ISelectionChangedListener() {
+ // This ensures that we handle selections correctly.
+ //
+ public void selectionChanged(SelectionChangedEvent event) {
+ handleContentOutlineSelection(event.getSelection());
+ }
+ });
+ }
+
+ return contentOutlinePage;
+ }
+
+ /**
+ * This accesses a cached version of the property sheet.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public IPropertySheetPage getPropertySheetPage() {
+ if (propertySheetPage == null) {
+ propertySheetPage = new FcorePropertySheetPage((AdapterFactoryEditingDomain) getEditingDomain()) {
+ @Override
+ public void setSelectionToViewer(List<?> selection) {
+ FcoreEditor.this.setSelectionToViewer(selection);
+ FcoreEditor.this.setFocus();
+ }
+
+ @Override
+ public void setActionBars(IActionBars actionBars) {
+ super.setActionBars(actionBars);
+ getActionBarContributor().shareGlobalActions(this, actionBars);
+ }
+
+ @Override
+ public void dispose() {
+ super.dispose();
+ propertySheetPage = null;
+ }
+ };
+ propertySheetPage.setPropertySourceProvider(new FcoreContentProvider(getEditingDomain(), propertyAdapterFactory));
+ }
+
+ return propertySheetPage;
+ }
+
+ /**
+ * This deals with how we want selection in the outliner to affect the other
+ * views.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void handleContentOutlineSelection(ISelection selection) {
+ if (selectionViewer != null && !selection.isEmpty() && selection instanceof IStructuredSelection) {
+ Iterator<?> selectedElements = ((IStructuredSelection) selection).iterator();
+ if (selectedElements.hasNext()) {
+ // Get the first selected element.
+ //
+ Object selectedElement = selectedElements.next();
+
+ ArrayList<Object> selectionList = new ArrayList<Object>();
+ selectionList.add(selectedElement);
+ while (selectedElements.hasNext()) {
+ selectionList.add(selectedElements.next());
+ }
+
+ // Set the selection to the widget.
+ //
+ selectionViewer.setSelection(new StructuredSelection(selectionList));
+ }
+ }
+ }
+
+ /**
+ * This is for implementing {@link IEditorPart} and simply tests the command stack.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public boolean isDirty() {
+ if (getResource() == null) {
+ return false;
+ }
+ return getResource().isModified();
+ }
+
+ /**
+ * This is for implementing {@link IEditorPart} and simply saves the model
+ * file.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public void doSave(IProgressMonitor progressMonitor) {
+ // Do the work within an operation because this is a long running
+ // activity that modifies the
+ // workbench.
+ WorkspaceModifyOperation operation = new WorkspaceModifyOperation() {
+ // This is the method that gets invoked when the operation runs.
+ @Override
+ public void execute(IProgressMonitor monitor) {
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+ public void run() {
+ Resource resourceToSave = getResource();
+ try {
+ // Save the resource to the file system.
+ long timeStamp = resourceToSave.getTimeStamp();
+ resourceToSave.save(Collections.EMPTY_MAP);
+ if (resourceToSave.getTimeStamp() != timeStamp) {
+ userHasSavedResource = true;
+ }
+ } catch (Exception exception) {
+ resourceToDiagnosticMap.put(resource.getURI(), ResourceHelper.analyzeResourceProblems(resource, exception, EGFCorePlugin.FCORE_EDITOR_ID));
+ }
+ }
+ });
+ } catch (Throwable t) {
+ ThrowableHandler.handleThrowable(EGFModelEditorPlugin.getPlugin().getSymbolicName(), t);
+ }
+ }
+ };
+
+ updateProblemIndication = false;
+ try {
+ // This runs the options, and shows progress.
+ new ProgressMonitorDialog(getSite().getShell()).run(true, false, operation);
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+ } catch (Throwable t) {
+ ThrowableHandler.handleThrowable(EGFModelEditorPlugin.getPlugin().getSymbolicName(), t);
+ }
+ updateProblemIndication = true;
+ updateProblemIndication();
+ }
+
+ /**
+ * This returns whether something has been persisted to the URI of the
+ * specified resource.
+ * The implementation uses the URI converter from the editor's resource set
+ * to try to open an
+ * input stream.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected boolean isPersisted(Resource innerResource) {
+ boolean result = false;
+ try {
+ InputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(innerResource.getURI());
+ if (stream != null) {
+ result = true;
+ stream.close();
+ }
+ } catch (IOException e) {
+ // Ignore
+ }
+ return result;
+ }
+
+ /**
+ * This always returns true because it is not currently supported.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean isSaveAsAllowed() {
+ return true;
+ }
+
+ /**
+ * This also changes the editor's input.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void doSaveAs() {
+ SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell());
+ saveAsDialog.open();
+ IPath path = saveAsDialog.getResult();
+ if (path != null) {
+ IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
+ if (file != null) {
+ doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file));
+ }
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected void doSaveAs(final URI uri, final IEditorInput editorInput) {
+ // changing the URI is, conceptually, a write operation. However, it does
+ // not affect the abstract state of the model, so we only need exclusive
+ // (read) access
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+ public void run() {
+ getResource().setURI(uri);
+ setInputWithNotify(editorInput);
+ setPartName(editorInput.getName());
+ }
+ });
+ } catch (InterruptedException ie) {
+ // just log it
+ EGFModelEditorPlugin.getPlugin().logError(ie);
+ // don't follow through with the save because we were interrupted while
+ // trying to start the transaction, so our URI is not actually changed
+ return;
+ }
+
+ IProgressMonitor progressMonitor = getActionBars().getStatusLineManager() != null ? getActionBars().getStatusLineManager().getProgressMonitor() : new NullProgressMonitor();
+ doSave(progressMonitor);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public void gotoMarker(IMarker marker) {
+ try {
+ if (marker.getType().equals(EValidator.MARKER)) {
+ final String uriAttribute = marker.getAttribute(EValidator.URI_ATTRIBUTE, null);
+ if (uriAttribute != null) {
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+ public void run() {
+ URI uri = URI.createURI(uriAttribute);
+ EObject eObject = editingDomain.getResourceSet().getEObject(uri, true);
+ if (eObject != null) {
+ setSelectionToViewer(Collections.singleton(editingDomain.getWrapper(eObject)));
+ }
+ }
+ });
+ } catch (InterruptedException ie) {
+ // just log it
+ EGFModelEditorPlugin.getPlugin().logError(ie);
+ }
+ }
+ }
+ } catch (CoreException ce) {
+ EGFModelEditorPlugin.getPlugin().logError(ce);
+ }
+ }
+
+ /**
+ * This is called during startup.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public void init(IEditorSite site, IEditorInput editorInput) {
+ setSite(site);
+ setInputWithNotify(editorInput);
+ setPartName(editorInput.getName());
+ site.setSelectionProvider(this);
+ site.getPage().addPartListener(partListener);
+ createModel();
+ EGFResourceLoadedListener.RESOURCE_MANAGER.addObserver(this);
+ // populate operation history if applicable
+ EGFResourceLoadedListener.RESOURCE_MANAGER.populateUndoContext(getOperationHistory(), undoContext, getResource());
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public void setFocus() {
+ selectionViewer.getControl().setFocus();
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void addSelectionChangedListener(ISelectionChangedListener listener) {
+ selectionChangedListeners.add(listener);
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void removeSelectionChangedListener(ISelectionChangedListener listener) {
+ selectionChangedListeners.remove(listener);
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to
+ * return this editor's
+ * overall selection.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ISelection getSelection() {
+ return editorSelection;
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to
+ * set this editor's
+ * overall selection.
+ * Calling this result will notify the listeners.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setSelection(ISelection selection) {
+ editorSelection = selection;
+
+ for (ISelectionChangedListener listener : selectionChangedListeners) {
+ listener.selectionChanged(new SelectionChangedEvent(this, selection));
+ }
+ setStatusLineManager(selection);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setStatusLineManager(ISelection selection) {
+ IStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ? contentOutlineStatusLineManager : getActionBars().getStatusLineManager();
+
+ if (statusLineManager != null) {
+ if (selection instanceof IStructuredSelection) {
+ Collection<?> collection = ((IStructuredSelection) selection).toList();
+ switch (collection.size()) {
+ case 0: {
+ statusLineManager.setMessage(getString("_UI_NoObjectSelected")); //$NON-NLS-1$
+ break;
+ }
+ case 1: {
+ String text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next());
+ statusLineManager.setMessage(getString("_UI_SingleObjectSelected", text)); //$NON-NLS-1$
+ break;
+ }
+ default: {
+ statusLineManager.setMessage(getString("_UI_MultiObjectSelected", Integer.toString(collection.size()))); //$NON-NLS-1$
+ break;
+ }
+ }
+ } else {
+ statusLineManager.setMessage(""); //$NON-NLS-1$
+ }
+ }
+ }
+
+ /**
+ * This looks up a string in the plugin's plugin.properties file.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static String getString(String key) {
+ return EGFModelEditorPlugin.INSTANCE.getString(key);
+ }
+
+ /**
+ * This looks up a string in plugin.properties, making a substitution.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static String getString(String key, Object s1) {
+ return EGFModelEditorPlugin.INSTANCE.getString(key, new Object[] { s1 });
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.action.IMenuListener} to help
+ * fill the context menus
+ * with contributions from the Edit menu.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void menuAboutToShow(IMenuManager menuManager) {
+ ((IMenuListener) getEditorSite().getActionBarContributor()).menuAboutToShow(menuManager);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EditingDomainActionBarContributor getActionBarContributor() {
+ return (EditingDomainActionBarContributor) getEditorSite().getActionBarContributor();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public IActionBars getActionBars() {
+ return getActionBarContributor().getActionBars();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public AdapterFactory getAdapterFactory() {
+ return adapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public IOperationHistory getOperationHistory() {
+ return ((IWorkspaceCommandStack) editingDomain.getCommandStack()).getOperationHistory();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public void dispose() {
+
+ // No more problem feedback
+ updateProblemIndication = false;
+
+ // We have operation history stuff to clean up
+ getOperationHistory().removeOperationHistoryListener(historyListener);
+ getOperationHistory().dispose(getUndoContext(), true, true, true);
+
+ // Remove observer
+ EGFResourceLoadedListener.RESOURCE_MANAGER.removeObserver(this);
+
+ // Remove our adapters
+ editingDomain.getResourceSet().eAdapters().remove(editorResourceAdapter);
+ for (EContentAdapter adapter : egfAdapters) {
+ editingDomain.getResourceSet().eAdapters().remove(adapter);
+ }
+
+ // Remove our listeners
+ getSite().getPage().removePartListener(partListener);
+
+ // Dispose
+ adapterFactory.dispose();
+ if (getActionBarContributor().getActiveEditor() == this) {
+ getActionBarContributor().setActiveEditor(null);
+ }
+ if (propertySheetPage != null) {
+ propertySheetPage.dispose();
+ }
+ if (contentOutlinePage != null) {
+ contentOutlinePage.dispose();
+ }
+
+ super.dispose();
+
+ }
+
+ /**
+ * Returns whether the outline view should be presented to the user.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected boolean showOutlineView() {
+ return true;
+ }
+}
diff --git a/org.eclipse.egf.model.editor/generated/org/eclipse/egf/model/fcore/presentation/FcoreModelWizard.java b/org.eclipse.egf.model.editor/generated/org/eclipse/egf/model/fcore/presentation/FcoreModelWizard.java
new file mode 100644
index 0000000..3b6c6ec
--- /dev/null
+++ b/org.eclipse.egf.model.editor/generated/org/eclipse/egf/model/fcore/presentation/FcoreModelWizard.java
@@ -0,0 +1,586 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.presentation;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.MissingResourceException;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.egf.common.ui.helper.ThrowableHandler;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.core.pde.tools.ConvertProjectOperation;
+import org.eclipse.egf.core.ui.wizard.WizardNewFileCreationPage;
+import org.eclipse.egf.model.editor.EGFModelEditorPlugin;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.provider.FcoreResourceItemProviderAdapterFactory;
+import org.eclipse.emf.common.CommonPlugin;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.part.ISetSelectionTarget;
+
+/**
+ * This is a simple wizard for creating a new model file.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+public class FcoreModelWizard extends Wizard implements INewWizard {
+ /**
+ * The supported extensions for created files.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final List<String> FILE_EXTENSIONS = Collections.unmodifiableList(Arrays.asList(EGFModelEditorPlugin.INSTANCE.getString("_UI_FcoreEditorFilenameExtensions").split("\\s*,\\s*"))); //$NON-NLS-1$ //$NON-NLS-2$
+
+ /**
+ * A formatted list of supported file extensions, suitable for display.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final String FORMATTED_FILE_EXTENSIONS = EGFModelEditorPlugin.INSTANCE.getString("_UI_FcoreEditorFilenameExtensions").replaceAll("\\s*,\\s*", ", "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+ /**
+ * This is the file creation page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected FcoreModelWizardNewFileCreationPage newFileCreationPage;
+
+ /**
+ * This is the initial object creation page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected FcoreModelWizardInitialObjectCreationPage initialObjectCreationPage;
+
+ /**
+ * Remember the selection during initialization for populating the default
+ * container.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected IStructuredSelection selection;
+
+ /**
+ * Remember the workbench during initialization.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected IWorkbench workbench;
+
+ /**
+ * Caches the names of the types that can be created as the root object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected List<String> initialObjectNames;
+
+ /**
+ * Caches the types that can be created as the root object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Map<String, EClass> roots = new HashMap<String, EClass>();
+
+ /**
+ *
+ */
+ protected FcoreResourceItemProviderAdapterFactory factory;
+
+ /**
+ * This just records the information.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public void init(IWorkbench innerWorkbench, IStructuredSelection innerSelection) {
+ this.workbench = innerWorkbench;
+ this.selection = innerSelection;
+ setWindowTitle(EGFModelEditorPlugin.INSTANCE.getString("_UI_Wizard_label")); //$NON-NLS-1$
+ setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(EGFModelEditorPlugin.INSTANCE.getImage("full/wizban/NewFcore"))); //$NON-NLS-1$
+ setNeedsProgressMonitor(true);
+ factory = new FcoreResourceItemProviderAdapterFactory();
+ for (EClass eClass : factory.getRoots()) {
+ roots.put(eClass.getName(), eClass);
+ }
+ }
+
+ /**
+ * Returns the names of the types that can be created as the root object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected Collection<String> getInitialObjectNames() {
+ if (initialObjectNames == null) {
+ initialObjectNames = new ArrayList<String>();
+ initialObjectNames.addAll(roots.keySet());
+ Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
+ }
+ return initialObjectNames;
+ }
+
+ /**
+ * Create a new model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected EObject createInitialModel() {
+ EClass eClass = roots.get(initialObjectCreationPage.getInitialObjectName());
+ EObject eObject = eClass.getEPackage().getEFactoryInstance().create(eClass);
+ eObject.eSet(FcorePackage.Literals.NAMED_MODEL_ELEMENT__NAME, getModelFile().getFullPath().removeFileExtension().lastSegment().toString());
+ return eObject;
+ }
+
+ /**
+ * Do the work after everything is specified.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public boolean performFinish() {
+
+ // Variables
+ final IFile modelFile = getModelFile();
+ final Throwable[] throwable = new Throwable[1];
+ final EObject rootObject = createInitialModel();
+
+ // Convert and Process current Project
+ WorkspaceModifyOperation convertOperation = new ConvertProjectOperation(modelFile.getProject(), rootObject instanceof FactoryComponent == false, false) {
+ @Override
+ public List<String> addDependencies() {
+ List<String> dependencies = new ArrayList<String>(1);
+ dependencies.add("org.eclipse.egf.model.ftask"); //$NON-NLS-1$
+ return dependencies;
+ }
+
+ @Override
+ public List<String> addSourceFolders() {
+ List<String> sourceFolders = new ArrayList<String>(1);
+ sourceFolders.add("src"); //$NON-NLS-1$
+ return sourceFolders;
+ }
+ };
+ try {
+ getContainer().run(false, false, convertOperation);
+ } catch (Throwable t) {
+ throwable[0] = t;
+ }
+
+ // Save resource
+ if (throwable[0] == null) {
+ WorkspaceModifyOperation operation = new WorkspaceModifyOperation() {
+ @Override
+ protected void execute(IProgressMonitor monitor) {
+ SubMonitor.convert(monitor, EGFModelEditorPlugin.INSTANCE.getString("_UI_Wizard_createActivity"), 200); //$NON-NLS-1$
+ // Retrieve our editing domain
+ final TransactionalEditingDomain editingDomain = TransactionalEditingDomain.Registry.INSTANCE.getEditingDomain(EGFCorePlugin.EDITING_DOMAIN_ID);
+ try {
+ // Feed our URIConverter
+ URI platformPluginURI = URI.createPlatformPluginURI(modelFile.getFullPath().toString(), false);
+ URI platformResourceURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true);
+ editingDomain.getResourceSet().getURIConverter().getURIMap().put(platformPluginURI, platformResourceURI);
+ // Create a resource for this file.
+ final Resource resource = editingDomain.getResourceSet().createResource(platformPluginURI);
+ // Add the initial model object to the contents.
+ if (rootObject != null) {
+ editingDomain.getCommandStack().execute(new RecordingCommand(editingDomain) {
+ @Override
+ protected void doExecute() {
+ resource.getContents().add(rootObject);
+ }
+ });
+ }
+ editingDomain.runExclusive(new Runnable() {
+ public void run() {
+ try {
+ resource.save(Collections.EMPTY_MAP);
+ } catch (Throwable t) {
+ throwable[0] = t;
+ }
+ }
+ });
+ } catch (InterruptedException ie) {
+ throwable[0] = ie;
+ }
+ }
+ };
+ try {
+ getContainer().run(false, true, operation);
+ } catch (Throwable t) {
+ throwable[0] = t;
+ }
+ }
+
+ // Select the new file resource in the current view.
+ if (throwable[0] == null) {
+ IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow();
+ IWorkbenchPage page = workbenchWindow.getActivePage();
+ final IWorkbenchPart activePart = page.getActivePart();
+ if (activePart instanceof ISetSelectionTarget) {
+ final ISelection targetSelection = new StructuredSelection(modelFile);
+ getShell().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ ((ISetSelectionTarget) activePart).selectReveal(targetSelection);
+ }
+ });
+ }
+ // Open an editor on the new file.
+ try {
+ page.openEditor(new FileEditorInput(modelFile), workbench.getEditorRegistry().getDefaultEditor(modelFile.getFullPath().toString()).getId());
+ } catch (Throwable t) {
+ throwable[0] = t;
+ }
+ }
+
+ if (throwable[0] != null && throwable[0] instanceof InterruptedException == false) {
+ ThrowableHandler.handleThrowable(EGFModelEditorPlugin.getPlugin().getBundle().getSymbolicName(), throwable[0]);
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * This is the one page of the wizard.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public class FcoreModelWizardNewFileCreationPage extends WizardNewFileCreationPage {
+ /**
+ * Pass in the selection.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public FcoreModelWizardNewFileCreationPage(String pageId, IStructuredSelection selection) {
+ super(pageId, selection);
+ }
+
+ /**
+ * The framework calls this to see if the file is correct.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean validatePage() {
+ if (super.validatePage()) {
+ String extension = new Path(getFileName()).getFileExtension();
+ if (extension == null || !FILE_EXTENSIONS.contains(extension)) {
+ String key = FILE_EXTENSIONS.size() > 1 ? "_WARN_FilenameExtensions" : "_WARN_FilenameExtension"; //$NON-NLS-1$ //$NON-NLS-2$
+ setErrorMessage(EGFModelEditorPlugin.INSTANCE.getString(key, new Object[] { FORMATTED_FILE_EXTENSIONS }));
+ return false;
+ }
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public IFile getModelFile() {
+ return ResourcesPlugin.getWorkspace().getRoot().getFile(getContainerFullPath().append(getFileName()));
+ }
+ }
+
+ /**
+ * This is the page where the type of object to create is selected.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public class FcoreModelWizardInitialObjectCreationPage extends WizardPage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected Combo initialObjectField;
+
+ /**
+ * Pass in the selection.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public FcoreModelWizardInitialObjectCreationPage(String pageId) {
+ super(pageId);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void createControl(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NONE);
+ {
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 1;
+ layout.verticalSpacing = 12;
+ composite.setLayout(layout);
+
+ GridData data = new GridData();
+ data.verticalAlignment = GridData.FILL;
+ data.grabExcessVerticalSpace = true;
+ data.horizontalAlignment = GridData.FILL;
+ composite.setLayoutData(data);
+ }
+
+ Label containerLabel = new Label(composite, SWT.LEFT);
+ {
+ containerLabel.setText(EGFModelEditorPlugin.INSTANCE.getString("_UI_ModelObject")); //$NON-NLS-1$
+
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ containerLabel.setLayoutData(data);
+ }
+
+ initialObjectField = new Combo(composite, SWT.BORDER);
+ {
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ data.grabExcessHorizontalSpace = true;
+ initialObjectField.setLayoutData(data);
+ }
+
+ for (String objectName : getInitialObjectNames()) {
+ initialObjectField.add(getLabel(objectName));
+ }
+
+ initialObjectField.select(0);
+ initialObjectField.addModifyListener(validator);
+
+ setPageComplete(validatePage());
+ setControl(composite);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ModifyListener validator = new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ setPageComplete(validatePage());
+ }
+ };
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected boolean validatePage() {
+ return getInitialObjectName() != null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setVisible(boolean visible) {
+ super.setVisible(visible);
+ if (visible) {
+ if (initialObjectField.getItemCount() == 1) {
+ initialObjectField.clearSelection();
+ } else {
+ initialObjectField.setFocus();
+ }
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String getInitialObjectName() {
+ String label = initialObjectField.getText();
+ for (String name : getInitialObjectNames()) {
+ if (getLabel(name).equals(label)) {
+ return name;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the label for the specified type name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected String getLabel(String typeName) {
+ try {
+ return factory.getResourceLocator().getString("_UI_" + typeName + "_type"); //$NON-NLS-1$ //$NON-NLS-2$
+ } catch (MissingResourceException mre) {
+ EGFModelEditorPlugin.INSTANCE.log(mre);
+ }
+ return typeName;
+ }
+
+ }
+
+ /**
+ * The framework calls this to create the contents of the wizard.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void addPages() {
+ // Create a page, set the title, and the initial model file name.
+ //
+ newFileCreationPage = new FcoreModelWizardNewFileCreationPage("Whatever", selection); //$NON-NLS-1$
+ newFileCreationPage.setTitle(EGFModelEditorPlugin.INSTANCE.getString("_UI_FcoreModelWizard_label")); //$NON-NLS-1$
+ newFileCreationPage.setDescription(EGFModelEditorPlugin.INSTANCE.getString("_UI_FcoreModelWizard_description")); //$NON-NLS-1$
+ newFileCreationPage.setFileName(EGFModelEditorPlugin.INSTANCE.getString("_UI_FcoreEditorFilenameDefaultBase") + "." + FILE_EXTENSIONS.get(0)); //$NON-NLS-1$ //$NON-NLS-2$
+ addPage(newFileCreationPage);
+
+ // Try and get the resource selection to determine a current directory
+ // for the file dialog.
+ //
+ if (selection != null && !selection.isEmpty()) {
+ // Get the resource...
+ //
+ Object selectedElement = selection.iterator().next();
+ if (selectedElement instanceof IResource) {
+ // Get the resource parent, if its a file.
+ //
+ IResource selectedResource = (IResource) selectedElement;
+ if (selectedResource.getType() == IResource.FILE) {
+ selectedResource = selectedResource.getParent();
+ }
+
+ // This gives us a directory...
+ //
+ if (selectedResource instanceof IFolder || selectedResource instanceof IProject) {
+ // Set this for the container.
+ //
+ newFileCreationPage.setContainerFullPath(selectedResource.getFullPath());
+
+ // Make up a unique new name here.
+ //
+ String defaultModelBaseFilename = EGFModelEditorPlugin.INSTANCE.getString("_UI_FcoreEditorFilenameDefaultBase"); //$NON-NLS-1$
+ String defaultModelFilenameExtension = FILE_EXTENSIONS.get(0);
+ String modelFilename = defaultModelBaseFilename + "." + defaultModelFilenameExtension; //$NON-NLS-1$
+ for (int i = 1; ((IContainer) selectedResource).findMember(modelFilename) != null; ++i) {
+ modelFilename = defaultModelBaseFilename + i + "." + defaultModelFilenameExtension; //$NON-NLS-1$
+ }
+ newFileCreationPage.setFileName(modelFilename);
+ }
+ }
+ }
+ initialObjectCreationPage = new FcoreModelWizardInitialObjectCreationPage("Whatever2"); //$NON-NLS-1$
+ initialObjectCreationPage.setTitle(EGFModelEditorPlugin.INSTANCE.getString("_UI_FcoreModelWizard_label")); //$NON-NLS-1$
+ initialObjectCreationPage.setDescription(EGFModelEditorPlugin.INSTANCE.getString("_UI_Wizard_initial_object_description")); //$NON-NLS-1$
+ addPage(initialObjectCreationPage);
+ }
+
+ /**
+ * Get the file from the page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public IFile getModelFile() {
+ return newFileCreationPage.getModelFile();
+ }
+
+}
diff --git a/org.eclipse.egf.model.editor/icons/full/obj16/Activity.gif b/org.eclipse.egf.model.editor/icons/full/obj16/Activity.gif
new file mode 100644
index 0000000..6810e4e
--- /dev/null
+++ b/org.eclipse.egf.model.editor/icons/full/obj16/Activity.gif
Binary files differ
diff --git a/org.eclipse.egf.model.editor/icons/full/obj16/Fcore.gif b/org.eclipse.egf.model.editor/icons/full/obj16/Fcore.gif
new file mode 100644
index 0000000..b276cac
--- /dev/null
+++ b/org.eclipse.egf.model.editor/icons/full/obj16/Fcore.gif
Binary files differ
diff --git a/org.eclipse.egf.model.editor/icons/full/wizban/NewFcore.gif b/org.eclipse.egf.model.editor/icons/full/wizban/NewFcore.gif
new file mode 100644
index 0000000..9bef2cb
--- /dev/null
+++ b/org.eclipse.egf.model.editor/icons/full/wizban/NewFcore.gif
Binary files differ
diff --git a/org.eclipse.egf.model.editor/icons/full/wizban/run_wiz.png b/org.eclipse.egf.model.editor/icons/full/wizban/run_wiz.png
new file mode 100644
index 0000000..16edc87
--- /dev/null
+++ b/org.eclipse.egf.model.editor/icons/full/wizban/run_wiz.png
Binary files differ
diff --git a/org.eclipse.egf.model.editor/plugin.properties b/org.eclipse.egf.model.editor/plugin.properties
new file mode 100644
index 0000000..7aea598
--- /dev/null
+++ b/org.eclipse.egf.model.editor/plugin.properties
@@ -0,0 +1,72 @@
+
+# <copyright>
+##
+# 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
+##
+# </copyright>
+#
+# $Id$
+
+pluginName = EGF Core Editor (Incubation)
+providerName = Eclipse Modeling Project
+
+_UI_CreateChild_menu_item = &New Child
+_UI_CreateSibling_menu_item = N&ew Sibling
+
+_UI_ShowPropertiesView_menu_item = Show &Properties View
+_UI_RefreshViewer_menu_item = &Refresh
+
+_UI_SelectionPage_label = Selection
+
+_UI_NoObjectSelected = Selected Nothing
+_UI_SingleObjectSelected = Selected Object: {0}
+_UI_MultiObjectSelected = Selected {0} Objects
+
+_UI_OpenEditorError_label = Open Editor
+
+_UI_CreateModelError_message = Problems encountered in file "{0}"
+
+_UI_FcoreModelWizard_label = EGF Activity
+_UI_FcoreModelWizard_description = Create a new EGF Activity
+
+_UI_FcoreEditor_label = EGF Fcore Editor
+
+_UI_FcoreEditorFilenameDefaultBase = default
+_UI_FcoreEditorFilenameExtensions = fcore
+
+_UI_Wizard_label = New
+_UI_Wizard_createActivity= Create Activity
+
+_UI_Wizard_Invoke_Activity_label = Invoke Activity
+
+_UI_EGF_Wizard_Category = EGF
+
+_WARN_FilenameExtension = The file name must end in ''.{0}''
+_WARN_FilenameExtensions = The file name must have one of the following extensions: {0}
+
+_UI_ModelObject = &Model Object
+_UI_Wizard_initial_object_description = Select a model object to create
+
+_UI_FileConflict_label = File Conflict
+_WARN_FileConflict = There are unsaved changes that conflict with changes made outside the editor. Do you wish to discard this editor's changes?
+
+_UI_Wizard_category = Example EMF Model Creation Wizards
+
+_UI_BrowseRegisteredFcores_label = Browse &Registered EGF Activities...
+
+EGFActivityActionSet_label= EGF Activity
+EGFActivityActionSet_description= EGF Activity Action Set
+
+openActivity.label= Open EGF Activity&...
+openActivity.description= Opens an EGF Activity
+
+ActionDefinition_openActivity_name = Open EGF Activity
+ActionDefinition_openActivity_description= Open an EGF Activity in the Workbench
+
diff --git a/org.eclipse.egf.model.editor/plugin.xml b/org.eclipse.egf.model.editor/plugin.xml
new file mode 100644
index 0000000..37a7de3
--- /dev/null
+++ b/org.eclipse.egf.model.editor/plugin.xml
@@ -0,0 +1,173 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+
+<!--
+
+ 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>
+
+ <!-- ================================================================================= -->
+ <!-- Wizards -->
+ <!-- ================================================================================= -->
+
+ <extension
+ point="org.eclipse.ui.newWizards"
+ >
+ <category
+ id="org.eclipse.egf.category.wizards"
+ name="%_UI_EGF_Wizard_Category"
+ />
+ <wizard
+ id="org.eclipse.egf.model.fcore.presentation.FcoreModelWizardID"
+ name="%_UI_FcoreModelWizard_label"
+ class="org.eclipse.egf.model.fcore.presentation.FcoreModelWizard"
+ category="org.eclipse.egf.category.wizards"
+ icon="$nl$/icons/full/obj16/Fcore.gif"
+ >
+ <description>%_UI_FcoreModelWizard_description</description>
+ <selection class="org.eclipse.core.resources.IResource"/>
+ </wizard>
+ </extension>
+
+ <!-- ================================================================================= -->
+ <!-- Editors -->
+ <!-- ================================================================================= -->
+
+ <extension
+ point="org.eclipse.ui.editors"
+ >
+ <editor
+ id="org.eclipse.egf.model.fcore.tree.editor"
+ name="%_UI_FcoreEditor_label"
+ icon="$nl$/icons/full/obj16/Fcore.gif"
+ extensions="fcore"
+ class="org.eclipse.egf.model.fcore.presentation.FcoreEditor"
+ contributorClass="org.eclipse.egf.model.fcore.presentation.FcoreActionBarContributor"
+ default="true"
+ />
+ </extension>
+
+ <!-- ================================================================================= -->
+ <!-- Menu Contributor -->
+ <!-- ================================================================================= -->
+
+ <extension
+ point="org.eclipse.egf.core.ui.editor.menu.contributor"
+ >
+ <contribution
+ class="org.eclipse.egf.model.editor.contributions.OpenActivityMenuContributor"
+ />
+ <contribution
+ class="org.eclipse.egf.model.editor.contributions.OpenInvocationContractMenuContributor"
+ />
+ <contribution
+ class="org.eclipse.egf.model.editor.contributions.OpenURIMenuContributor"
+ />
+ <contribution
+ class="org.eclipse.egf.model.editor.contributions.OpenSuperTaskMenuContributor"
+ />
+ <contribution
+ class="org.eclipse.egf.model.editor.contributions.InvokeActivityMenuContributor"
+ />
+ </extension>
+
+ <!-- ================================================================================= -->
+ <!-- Property Contributor -->
+ <!-- ================================================================================= -->
+
+ <extension
+ point="org.eclipse.egf.core.ui.editor.property.contributor"
+ >
+ <contribution
+ class="org.eclipse.egf.model.editor.contributions.TypeEditorContributor"
+ />
+ <contribution
+ class="org.eclipse.egf.model.editor.contributions.InvocationEditorContributor"
+ />
+ <contribution
+ class="org.eclipse.egf.model.editor.contributions.SuperTaskEditorContributor"/>
+ </extension>
+
+ <!-- ================================================================================= -->
+ <!-- ActionSets -->
+ <!-- ================================================================================= -->
+
+ <extension
+ point="org.eclipse.ui.actionSets"
+ >
+
+ <actionSet
+ label="%EGFActivityActionSet_label"
+ description="%EGFActivityActionSet_description"
+ visible="true"
+ id="org.eclipse.egf.model.editor.activity.actionSet"
+ >
+
+ <action
+ toolbarPath="org.eclipse.search.searchActionSet/Search"
+ definitionId="org.eclipse.egf.model.editor.activity.actionSet.open.activity.action.definition"
+ icon="$nl$/icons/full/obj16/Activity.gif"
+ label="%openActivity.label"
+ class="org.eclipse.egf.model.editor.actions.OpenActivityAction"
+ tooltip="%openActivity.description"
+ menubarPath="navigate/open.ext4"
+ id="org.eclipse.egf.model.editor.activity.actionSet.open.activity.action"
+ />
+
+ </actionSet>
+
+ </extension>
+
+ <!-- ================================================================================= -->
+ <!-- Command Run -->
+ <!-- ================================================================================= -->
+
+ <extension
+ point="org.eclipse.ui.commands"
+ >
+
+ <command
+ name="%ActionDefinition_openActivity_name"
+ description="%ActionDefinition_openActivity_description"
+ categoryId="org.eclipse.ui.category.file"
+ id="org.eclipse.egf.model.editor.activity.actionSet.open.activity.action.definition"
+ />
+
+ </extension>
+
+ <!-- ================================================================================= -->
+ <!-- Bindings -->
+ <!-- ================================================================================= -->
+
+ <extension
+ point="org.eclipse.ui.bindings"
+ >
+
+ <!-- ================================================================================= -->
+ <!-- win32: M1=CTRL, M2=SHIFT, M3=ALT, M4=- -->
+ <!-- carbon: M1=COMMAND, M2=SHIFT, M3=ALT, M4=CTRL -->
+ <!-- ================================================================================= -->
+
+ <!-- ================================================================================= -->
+ <!-- Key Run -->
+ <!-- ================================================================================= -->
+
+ <key
+ sequence="M1+M3+Q"
+ commandId="org.eclipse.egf.model.editor.activity.actionSet.open.activity.action.definition"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ />
+
+ </extension>
+
+</plugin>
diff --git a/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/actions/FcoreResourcePasteAction.java b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/actions/FcoreResourcePasteAction.java
new file mode 100644
index 0000000..89e20fa
--- /dev/null
+++ b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/actions/FcoreResourcePasteAction.java
@@ -0,0 +1,54 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.egf.model.editor.actions;
+
+import java.util.Collection;
+
+import org.eclipse.egf.model.fcore.commands.FcoreResourcePasteFromClipboardCommand;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.UnexecutableCommand;
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
+import org.eclipse.emf.edit.ui.action.PasteAction;
+import org.eclipse.ui.IWorkbenchPart;
+
+/**
+ * Multi-rooted resources support.
+ * This action allows the user to paste a valid element at the resource level.
+ */
+public class FcoreResourcePasteAction extends PasteAction {
+
+ /**
+ * Constructor
+ */
+ public FcoreResourcePasteAction() {
+ super();
+ }
+
+ /**
+ * @since 2.1.0
+ */
+ @Override
+ public void setActiveWorkbenchPart(IWorkbenchPart workbenchPart) {
+ super.setActiveWorkbenchPart(workbenchPart);
+ domain = null;
+ if (workbenchPart instanceof IEditingDomainProvider) {
+ domain = ((IEditingDomainProvider) workbenchPart).getEditingDomain();
+ }
+ }
+
+ /**
+ * @see org.eclipse.emf.edit.ui.action.CommandActionHandler#createCommand(java.util.Collection)
+ */
+ @Override
+ public Command createCommand(Collection<?> selection) {
+ if (selection == null || selection.size() != 1) {
+ return UnexecutableCommand.INSTANCE;
+ }
+ return FcoreResourcePasteFromClipboardCommand.create(domain, selection.iterator().next(), null);
+ }
+
+}
diff --git a/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/actions/OpenActivityAction.java b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/actions/OpenActivityAction.java
new file mode 100644
index 0000000..3301b03
--- /dev/null
+++ b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/actions/OpenActivityAction.java
@@ -0,0 +1,119 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.model.editor.actions;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.egf.common.ui.helper.EditorHelper;
+import org.eclipse.egf.model.editor.dialogs.ActivitySelectionDialog;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+
+/**
+ * Standard action for opening an editor on EGF Fcores.
+ * <p>
+ * This class may be instantiated; it is not intended to be subclassed.
+ * </p>
+ */
+public class OpenActivityAction extends Action implements IWorkbenchWindowActionDelegate {
+
+ private Shell _shell;
+
+ /**
+ * Creates a new action for opening an EGF Fcore
+ */
+ public OpenActivityAction() {
+ setEnabled(true);
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose()
+ */
+ public void dispose() {
+ _shell = null;
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
+ */
+ public void init(IWorkbenchWindow window) {
+ _shell = window.getShell();
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+ */
+ public void run(IAction action) {
+ run();
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
+ */
+ public void selectionChanged(IAction action, ISelection selection) {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.action.Action#run()
+ */
+ @Override
+ public void run() {
+ ActivitySelectionDialog activityDialog = new ActivitySelectionDialog(_shell, true);
+ int result = activityDialog.open();
+ if (result != IDialogConstants.OK_ID) {
+ return;
+ }
+ final Object[] objects = activityDialog.getResult();
+ if (objects == null) {
+ return;
+ }
+ // Build a map of selected activities per resources
+ Map<Resource, List<EObject>> resources = new HashMap<Resource, List<EObject>>();
+ for (Object object : objects) {
+ if (object instanceof Activity == false) {
+ continue;
+ }
+ Activity activity = (Activity) object;
+ if (activity.eResource() == null) {
+ continue;
+ }
+ List<EObject> activities = resources.get(activity.eResource());
+ if (activities == null) {
+ activities = new ArrayList<EObject>();
+ resources.put(activity.eResource(), activities);
+ }
+ activities.add(activity);
+ }
+ // Open and select
+ EditorHelper.openEditorsAndSelect(resources);
+ }
+}
diff --git a/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/adapter/PatternBundleAdapter.java b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/adapter/PatternBundleAdapter.java
new file mode 100644
index 0000000..e566877
--- /dev/null
+++ b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/adapter/PatternBundleAdapter.java
@@ -0,0 +1,97 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.model.editor.adapter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.egf.common.ui.helper.ThrowableHandler;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.core.fcore.IPlatformFcore;
+import org.eclipse.egf.core.pde.tools.ConvertProjectOperation;
+import org.eclipse.egf.model.editor.EGFModelEditorPlugin;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.impl.ResourceImpl;
+import org.eclipse.emf.ecore.util.EContentAdapter;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchPartSite;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class PatternBundleAdapter extends EContentAdapter {
+
+ private Resource _resource;
+
+ private Shell _shell;
+
+ public PatternBundleAdapter(Resource resource) {
+ _shell = EGFModelEditorPlugin.getActiveWorkbenchShell();
+ _resource = resource;
+ }
+
+ public PatternBundleAdapter(Resource resource, IWorkbenchPartSite site) {
+ _shell = site != null ? site.getShell() : EGFModelEditorPlugin.getActiveWorkbenchShell();
+ _resource = resource;
+ }
+
+ @Override
+ public void notifyChanged(Notification notification) {
+ super.notifyChanged(notification);
+ if (notification.getNewValue() != null && notification.getNewValue() instanceof Pattern) {
+ handleNotification(notification);
+ }
+ }
+
+ private void handleNotification(Notification notification) {
+ if (notification.getEventType() == Notification.ADD) {
+ Pattern pattern = (Pattern) notification.getNewValue();
+ Resource resource = pattern.eResource();
+ if (resource != _resource || ((ResourceImpl) resource).isLoading()) {
+ return;
+ }
+ final IPlatformFcore fcore = EGFCorePlugin.getPlatformFcore(pattern.eResource());
+ if (fcore == null || fcore.getPlatformBundle().getProject() == null) {
+ return;
+ }
+ IRunnableWithProgress operation = new ConvertProjectOperation(fcore.getPlatformBundle().getProject(), true, true) {
+ @Override
+ public List<String> addDependencies() {
+ List<String> dependencies = new ArrayList<String>(1);
+ dependencies.add("org.eclipse.egf.pattern"); //$NON-NLS-1$
+ dependencies.add("org.eclipse.egf.pattern.ftask"); //$NON-NLS-1$
+ return dependencies;
+ }
+
+ @Override
+ public List<String> addSourceFolders() {
+ List<String> sourceFolders = new ArrayList<String>(1);
+ sourceFolders.add("generated"); //$NON-NLS-1$
+ return sourceFolders;
+ }
+ };
+ // asynchronous operation
+ try {
+ new ProgressMonitorDialog(_shell).run(true, false, operation);
+ } catch (InterruptedException ie) {
+ // Nothing to do
+ } catch (Exception e) {
+ ThrowableHandler.handleThrowable(EGFModelEditorPlugin.getPlugin().getSymbolicName(), e);
+ }
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/adapter/TaskBundleAdapter.java b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/adapter/TaskBundleAdapter.java
new file mode 100644
index 0000000..3c01aa2
--- /dev/null
+++ b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/adapter/TaskBundleAdapter.java
@@ -0,0 +1,101 @@
+/**
+ * Copyright (c) 2009 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
+ */
+package org.eclipse.egf.model.editor.adapter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.egf.common.ui.helper.ThrowableHandler;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.core.fcore.IPlatformFcore;
+import org.eclipse.egf.core.pde.tools.ConvertProjectOperation;
+import org.eclipse.egf.model.editor.EGFModelEditorPlugin;
+import org.eclipse.egf.model.ftask.Task;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.impl.ResourceImpl;
+import org.eclipse.emf.ecore.util.EContentAdapter;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchPartSite;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class TaskBundleAdapter extends EContentAdapter {
+
+ private Resource _resource;
+ private Shell _shell;
+
+ public TaskBundleAdapter(Resource resource) {
+ _shell = EGFModelEditorPlugin.getActiveWorkbenchShell();
+ _resource = resource;
+ }
+
+ public TaskBundleAdapter(Resource resource, IWorkbenchPartSite site) {
+ _shell = site != null ? site.getShell() : EGFModelEditorPlugin.getActiveWorkbenchShell();
+ _resource = resource;
+ }
+
+ @Override
+ public void notifyChanged(Notification notification) {
+ super.notifyChanged(notification);
+ if (notification.getNewValue() != null && notification.getNewValue() instanceof Task) {
+ handleTaskNotification(notification);
+ }
+ }
+
+ private void handleTaskNotification(Notification notification) {
+ if (notification.getEventType() == Notification.ADD) {
+ Task task = (Task) notification.getNewValue();
+ Resource resource = task.eResource();
+ if (resource != _resource || ((ResourceImpl) resource).isLoading()) {
+ return;
+ }
+ final IPlatformFcore fcore = EGFCorePlugin.getPlatformFcore(_resource);
+ if (fcore == null || fcore.getPlatformBundle().getProject() == null) {
+ return;
+ }
+ // Prevent excessive convertion
+ for (Object object : _resource.getContents()) {
+ if (object instanceof Task && object != task) {
+ return;
+ }
+ }
+ IRunnableWithProgress operation = new ConvertProjectOperation(fcore.getPlatformBundle().getProject(), true, true) {
+ @Override
+ public List<String> addDependencies() {
+ List<String> dependencies = new ArrayList<String>(1);
+ dependencies.add("org.eclipse.egf.model.ftask"); //$NON-NLS-1$
+ return dependencies;
+ }
+
+ @Override
+ public List<String> addSourceFolders() {
+ List<String> sourceFolders = new ArrayList<String>(1);
+ sourceFolders.add("src"); //$NON-NLS-1$
+ return sourceFolders;
+ }
+ };
+ // asynchronous operation
+ try {
+ new ProgressMonitorDialog(_shell).run(true, false, operation);
+ } catch (InterruptedException ie) {
+ // Nothing to do
+ } catch (Exception e) {
+ ThrowableHandler.handleThrowable(EGFModelEditorPlugin.getPlugin().getSymbolicName(), e);
+ }
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/commands/InvokeActivityCommand.java b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/commands/InvokeActivityCommand.java
new file mode 100644
index 0000000..c50ed6f
--- /dev/null
+++ b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/commands/InvokeActivityCommand.java
@@ -0,0 +1,108 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.editor.commands;
+
+import org.eclipse.egf.model.editor.l10n.ModelEditorMessages;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.Contract;
+import org.eclipse.egf.model.fcore.FcoreFactory;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.model.fcore.InvocationContractContainer;
+import org.eclipse.egf.model.fprod.FprodFactory;
+import org.eclipse.egf.model.fprod.FprodPackage;
+import org.eclipse.egf.model.fprod.ProductionPlan;
+import org.eclipse.egf.model.fprod.ProductionPlanInvocation;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.edit.domain.EditingDomain;
+
+public final class InvokeActivityCommand extends CompoundCommand {
+
+ /**
+ * This caches the label.
+ */
+ protected static final String LABEL = ModelEditorMessages._UI_InvokeCommand_label;
+
+ /**
+ * This caches the description.
+ */
+ protected static final String DESCRIPTION = ModelEditorMessages._UI_InvokeCommand_description;
+
+ /**
+ * Current Editing Domain.
+ */
+ private EditingDomain _editingDomain;
+
+ /**
+ * Current ProductionPlan
+ */
+ private ProductionPlan _productionPlan;
+
+ /**
+ * The new Activity
+ */
+ private Activity _activity;
+
+ /**
+ * Constructor.
+ *
+ * @param editingDomain
+ * @param productionPlan
+ * @param activity
+ */
+ public InvokeActivityCommand(EditingDomain editingDomain, ProductionPlan productionPlan, Activity activity) {
+ this(LABEL, DESCRIPTION, editingDomain, productionPlan, activity);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param label
+ * @param description
+ * @param editingDomain
+ * @param productionPlan
+ * @param activity
+ */
+ public InvokeActivityCommand(String label, String description, EditingDomain editingDomain, ProductionPlan productionPlan, Activity activity) {
+ super(label, description);
+ _editingDomain = editingDomain;
+ _productionPlan = productionPlan;
+ _activity = activity;
+ }
+
+ @Override
+ protected boolean prepare() {
+ // Usual tests
+ if (_productionPlan == null || _productionPlan.getInvocations() == null || _activity == null) {
+ return false;
+ }
+ // Create an AddCommand to create a ProductionPlanInvocation to our ProductionPlan
+ ProductionPlanInvocation invocation = FprodFactory.eINSTANCE.createProductionPlanInvocation();
+ invocation.setInvokedActivity(_activity);
+ // Populate this ProductionPlanInvocation with the activity contracts
+ if (_activity.getContracts() != null && _activity.getContracts().size() > 0) {
+ // Create an InvocationContractContainer
+ InvocationContractContainer container = FcoreFactory.eINSTANCE.createInvocationContractContainer();
+ invocation.setInvocationContractContainer(container);
+ for (Contract contract : _activity.getContracts()) {
+ InvocationContract innerContract = FcoreFactory.eINSTANCE.createInvocationContract();
+ innerContract.setInvokedContract(contract);
+ container.getInvocationContracts().add(innerContract);
+ }
+ }
+ // Finally add invocation in productionPlan
+ append(new AddCommand(_editingDomain, _productionPlan, FprodPackage.Literals.PRODUCTION_PLAN__INVOCATIONS, invocation));
+ return super.prepare();
+ }
+
+}
diff --git a/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/contributions/AbstractTypeEditorContributor.java b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/contributions/AbstractTypeEditorContributor.java
new file mode 100644
index 0000000..bd77c0d
--- /dev/null
+++ b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/contributions/AbstractTypeEditorContributor.java
@@ -0,0 +1,65 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.model.editor.contributions;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.egf.core.ui.contributor.DefaultPropertyEditorContributor;
+import org.eclipse.egf.core.ui.dialogs.TypeSelectionDialog;
+import org.eclipse.emf.common.ui.celleditor.ExtendedDialogCellEditor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public abstract class AbstractTypeEditorContributor extends DefaultPropertyEditorContributor {
+
+ public abstract boolean canApply(Object object, IItemPropertyDescriptor descriptor);
+
+ public CellEditor createPropertyEditor(final Composite composite, Object object, IItemPropertyDescriptor descriptor) {
+
+ final String value = getCurrentClassname(object);
+ final Class<?> type = getType(object);
+
+ final IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(((EObject) object).eResource().getURI().segment(1));
+ if (project == null)
+ throw new IllegalStateException();
+
+ return new ExtendedDialogCellEditor(composite, getLabelProvider(object, descriptor)) {
+ @Override
+ protected Object openDialogBox(Control cellEditorWindow) {
+ TypeSelectionDialog dialog = new TypeSelectionDialog(composite.getShell(), project, type, value, null, false);
+ dialog.open();
+ Object[] innerResult = dialog.getResult();
+ if (innerResult != null && innerResult.length > 0 && innerResult[0] instanceof IType) {
+ return ((IType) innerResult[0]).getFullyQualifiedName();
+ }
+ return value;
+ }
+ };
+ }
+
+ protected abstract Class<?> getType(Object object);
+
+ protected abstract String getCurrentClassname(Object object);
+
+}
diff --git a/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/contributions/InvocationEditorContributor.java b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/contributions/InvocationEditorContributor.java
new file mode 100644
index 0000000..5622244
--- /dev/null
+++ b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/contributions/InvocationEditorContributor.java
@@ -0,0 +1,60 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.model.editor.contributions;
+
+import org.eclipse.egf.core.ui.contributor.DefaultPropertyEditorContributor;
+import org.eclipse.egf.model.editor.EGFModelEditorPlugin;
+import org.eclipse.egf.model.editor.dialogs.ActivitySelectionDialog;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.emf.common.ui.celleditor.ExtendedDialogCellEditor;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class InvocationEditorContributor extends DefaultPropertyEditorContributor {
+
+ public boolean canApply(Object object, IItemPropertyDescriptor descriptor) {
+ return checkFeature(object, descriptor, FcorePackage.Literals.INVOCATION__INVOKED_ACTIVITY) && object instanceof Invocation;
+ }
+
+ public CellEditor createPropertyEditor(Composite composite, Object object, IItemPropertyDescriptor descriptor) {
+ final Invocation invocation = (Invocation) object;
+ return new ExtendedDialogCellEditor(composite, getLabelProvider(object, descriptor)) {
+ @Override
+ protected Object openDialogBox(Control cellEditorWindow) {
+ ActivitySelectionDialog dialog = new ActivitySelectionDialog(EGFModelEditorPlugin.getActiveWorkbenchShell(), invocation.getInvokedActivity(), false);
+ dialog.open();
+ Object[] innerResult = dialog.getResult();
+ if (innerResult != null && innerResult.length > 0 && innerResult[0] instanceof Activity) {
+ // Force a load resource on the current ResourceSet
+ Activity activity = (Activity) innerResult[0];
+ invocation.eResource().getResourceSet().getResource(activity.eResource().getURI(), true);
+ // Return selected value
+ return innerResult[0];
+ }
+ return invocation.getInvokedActivity();
+ }
+ };
+ }
+
+}
diff --git a/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/contributions/InvokeActivityMenuContributor.java b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/contributions/InvokeActivityMenuContributor.java
new file mode 100644
index 0000000..3526a59
--- /dev/null
+++ b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/contributions/InvokeActivityMenuContributor.java
@@ -0,0 +1,107 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.model.editor.contributions;
+
+import org.eclipse.egf.common.ui.constant.EGFCommonUIConstants;
+import org.eclipse.egf.core.ui.contributor.MenuContributor;
+import org.eclipse.egf.model.editor.dialogs.EGFWizardDialog;
+import org.eclipse.egf.model.editor.l10n.ModelEditorMessages;
+import org.eclipse.egf.model.editor.wizards.InvokeActivityWizard;
+import org.eclipse.egf.model.fprod.ProductionPlan;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.viewers.IStructuredSelection;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class InvokeActivityMenuContributor extends MenuContributor {
+
+ public static final String INVOKE_ACTIVITY_ACTION_ID = "invoke-activity"; //$NON-NLS-1$
+
+ private final InvokeActivityAction _invokeActivityAction = new InvokeActivityAction();
+
+ @Override
+ public void menuAboutToShow(IMenuManager menuManager) {
+ IStructuredSelection selection2 = (IStructuredSelection) selection;
+ if (selection2.size() == 1) {
+ if (selection2.getFirstElement() instanceof ProductionPlan) {
+ _invokeActivityAction.setEnabled(_invokeActivityAction.isEnabled());
+ menuManager.insertBefore(EGFCommonUIConstants.OPEN_MENU_GROUP, _invokeActivityAction);
+ }
+ }
+ }
+
+ private class InvokeActivityAction extends Action {
+
+ public InvokeActivityAction() {
+ super(ModelEditorMessages.ActivityMenuContributor_invokeAction_label);
+ setId(INVOKE_ACTIVITY_ACTION_ID);
+ }
+
+ @Override
+ public boolean isEnabled() {
+ EObject eObject = getProductionPlan();
+ if (eObject == null) {
+ return false;
+ }
+ EditingDomain domain = AdapterFactoryEditingDomain.getEditingDomainFor(eObject);
+ if (eObject.eResource() == null || domain == null) {
+ return false;
+ }
+ if (domain.isReadOnly(eObject.eResource())) {
+ return false;
+ }
+ return true;
+ }
+
+ protected ProductionPlan getProductionPlan() {
+ if (selection == null) {
+ return null;
+ }
+ IStructuredSelection sselection = (IStructuredSelection) selection;
+ if (sselection.size() != 1) {
+ return null;
+ }
+ Object object = sselection.getFirstElement();
+ if (object instanceof ProductionPlan) {
+ return (ProductionPlan) object;
+ }
+ return null;
+ }
+
+ @Override
+ public void run() {
+ ProductionPlan productionPlan = getProductionPlan();
+ if (productionPlan == null) {
+ return;
+ }
+ // Instantiates and initializes the wizard
+ InvokeActivityWizard wizard = new InvokeActivityWizard();
+ wizard.init(activeEditorPart.getSite().getWorkbenchWindow().getWorkbench(), (IStructuredSelection) selection);
+ // Instantiates the wizard container with the wizard and opens it
+ EGFWizardDialog dialog = new EGFWizardDialog(activeEditorPart.getSite().getShell(), wizard);
+ dialog.create();
+ dialog.open();
+ }
+
+ }
+
+}
diff --git a/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/contributions/OpenActivityMenuContributor.java b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/contributions/OpenActivityMenuContributor.java
new file mode 100644
index 0000000..ac48c6a
--- /dev/null
+++ b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/contributions/OpenActivityMenuContributor.java
@@ -0,0 +1,63 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.model.editor.contributions;
+
+import org.eclipse.egf.model.editor.l10n.ModelEditorMessages;
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.viewers.IStructuredSelection;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class OpenActivityMenuContributor extends OpenEObjectMenuContributor {
+
+ public static final String OPEN_ACTIVITY_ACTION_ID = "open-activity"; //$NON-NLS-1$
+
+ private final OpenAction _openAction = new OpenAction(OPEN_ACTIVITY_ACTION_ID) {
+ @Override
+ protected EObject getEObject() {
+ if (selection == null) {
+ return null;
+ }
+ IStructuredSelection sselection = (IStructuredSelection) selection;
+ if (sselection.size() != 1) {
+ return null;
+ }
+ Object object = sselection.getFirstElement();
+ if (object instanceof Invocation) {
+ Invocation invocation = (Invocation) object;
+ return invocation.getInvokedActivity();
+ }
+ return null;
+ }
+ };
+
+ @Override
+ protected String getText() {
+ if (getOpenAction().isAlreadyOpenedEditor()) {
+ return ModelEditorMessages.ActivityMenuContributor_selectAction_label;
+ }
+ return ModelEditorMessages.ActivityMenuContributor_openAction_label;
+ }
+
+ @Override
+ protected OpenAction getOpenAction() {
+ return _openAction;
+ }
+
+}
diff --git a/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/contributions/OpenEObjectMenuContributor.java b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/contributions/OpenEObjectMenuContributor.java
new file mode 100644
index 0000000..c8513fa
--- /dev/null
+++ b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/contributions/OpenEObjectMenuContributor.java
@@ -0,0 +1,117 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.model.editor.contributions;
+
+import org.eclipse.egf.common.ui.constant.EGFCommonUIConstants;
+import org.eclipse.egf.common.ui.helper.EditorHelper;
+import org.eclipse.egf.core.ui.contributor.MenuContributor;
+import org.eclipse.egf.model.editor.EGFModelEditorPlugin;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.resource.URIConverter;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PartInitException;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public abstract class OpenEObjectMenuContributor extends MenuContributor {
+
+ protected abstract OpenAction getOpenAction();
+
+ protected abstract String getText();
+
+ protected abstract class OpenAction extends Action {
+
+ public OpenAction(String id) {
+ setId(id);
+ }
+
+ @Override
+ public boolean isEnabled() {
+ EObject eObject = getEObject();
+ if (eObject == null) {
+ return false;
+ }
+ if (eObject instanceof InternalEObject) {
+ return ((InternalEObject) eObject).eIsProxy() == false;
+ }
+ return false;
+ }
+
+ public boolean isAlreadyOpenedEditor() {
+ return EditorHelper.isAlreadyOpenedEditor(getURI());
+ }
+
+ protected abstract EObject getEObject();
+
+ protected URI getURI() {
+ EObject eObject = getEObject();
+ if (eObject == null) {
+ return null;
+ }
+ return EcoreUtil.getURI(eObject);
+ }
+
+ protected URIConverter getURIConverter() {
+ EObject eObject = getEObject();
+ if (eObject == null) {
+ return null;
+ }
+ if (eObject.eResource() != null && eObject.eResource().getResourceSet() != null && eObject.eResource().getResourceSet().getURIConverter() != null) {
+ return eObject.eResource().getResourceSet().getURIConverter();
+ }
+ return null;
+ }
+
+ protected URI normalize(URI uri) {
+ if (uri == null || getURIConverter() == null) {
+ return uri;
+ }
+ return getURIConverter().normalize(uri);
+ }
+
+ @Override
+ public void run() {
+ try {
+ URI uri = getURI();
+ // Try to open it if any
+ if (uri != null) {
+ IEditorPart part = EditorHelper.openEditor(normalize(uri));
+ if (part != null && part instanceof IEditingDomainProvider) {
+ EditorHelper.setSelectionToViewer(part, uri);
+ }
+ }
+ } catch (PartInitException pie) {
+ EGFModelEditorPlugin.getPlugin().logError(pie);
+ }
+ }
+
+ }
+
+ @Override
+ public void menuAboutToShow(IMenuManager menuManager) {
+ IStructuredSelection innerSelection = (IStructuredSelection) selection;
+ if (innerSelection.size() == 1 && getOpenAction().getEObject() != null) {
+ getOpenAction().setText(getText());
+ getOpenAction().setEnabled(getOpenAction().isEnabled());
+ menuManager.insertBefore(EGFCommonUIConstants.OPEN_MENU_GROUP, getOpenAction());
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/contributions/OpenInvocationContractMenuContributor.java b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/contributions/OpenInvocationContractMenuContributor.java
new file mode 100644
index 0000000..235f5be
--- /dev/null
+++ b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/contributions/OpenInvocationContractMenuContributor.java
@@ -0,0 +1,63 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.model.editor.contributions;
+
+import org.eclipse.egf.model.editor.l10n.ModelEditorMessages;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.viewers.IStructuredSelection;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class OpenInvocationContractMenuContributor extends OpenEObjectMenuContributor {
+
+ public static final String OPEN_INVOCATION_CONTRACT_ACTION_ID = "open-invocation-contract"; //$NON-NLS-1$
+
+ private final OpenAction _openAction = new OpenAction(OPEN_INVOCATION_CONTRACT_ACTION_ID) {
+ @Override
+ protected EObject getEObject() {
+ if (selection == null) {
+ return null;
+ }
+ IStructuredSelection sselection = (IStructuredSelection) selection;
+ if (sselection.size() != 1) {
+ return null;
+ }
+ Object object = sselection.getFirstElement();
+ if (object instanceof InvocationContract) {
+ InvocationContract invocationContract = (InvocationContract) object;
+ return invocationContract.getInvokedContract();
+ }
+ return null;
+ }
+ };
+
+ @Override
+ protected String getText() {
+ if (getOpenAction().isAlreadyOpenedEditor()) {
+ return ModelEditorMessages.ContractMenuContributor_selectAction_label;
+ }
+ return ModelEditorMessages.ContractMenuContributor_openAction_label;
+ }
+
+ @Override
+ protected OpenAction getOpenAction() {
+ return _openAction;
+ }
+
+}
diff --git a/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/contributions/OpenSuperTaskMenuContributor.java b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/contributions/OpenSuperTaskMenuContributor.java
new file mode 100644
index 0000000..4103561
--- /dev/null
+++ b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/contributions/OpenSuperTaskMenuContributor.java
@@ -0,0 +1,63 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.model.editor.contributions;
+
+import org.eclipse.egf.model.editor.l10n.ModelEditorMessages;
+import org.eclipse.egf.model.ftask.Task;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.viewers.IStructuredSelection;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class OpenSuperTaskMenuContributor extends OpenEObjectMenuContributor {
+
+ public static final String OPEN_SUPER_TASK_ACTION_ID = "open-super-task"; //$NON-NLS-1$
+
+ private final OpenAction _openAction = new OpenAction(OPEN_SUPER_TASK_ACTION_ID) {
+ @Override
+ protected EObject getEObject() {
+ if (selection == null) {
+ return null;
+ }
+ IStructuredSelection sselection = (IStructuredSelection) selection;
+ if (sselection.size() != 1) {
+ return null;
+ }
+ Object object = sselection.getFirstElement();
+ if (object instanceof Task) {
+ Task task = (Task) object;
+ return task.getSuperTask();
+ }
+ return null;
+ }
+ };
+
+ @Override
+ protected String getText() {
+ if (getOpenAction().isAlreadyOpenedEditor()) {
+ return ModelEditorMessages.TaskMenuContributor_selectAction_label;
+ }
+ return ModelEditorMessages.TaskMenuContributor_openAction_label;
+ }
+
+ @Override
+ protected OpenAction getOpenAction() {
+ return _openAction;
+ }
+
+}
diff --git a/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/contributions/OpenURIMenuContributor.java b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/contributions/OpenURIMenuContributor.java
new file mode 100644
index 0000000..1f93bdd
--- /dev/null
+++ b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/contributions/OpenURIMenuContributor.java
@@ -0,0 +1,86 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.model.editor.contributions;
+
+import org.eclipse.egf.model.domain.DomainURI;
+import org.eclipse.egf.model.domain.TypeDomainURI;
+import org.eclipse.egf.model.editor.l10n.ModelEditorMessages;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.viewers.IStructuredSelection;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class OpenURIMenuContributor extends OpenEObjectMenuContributor {
+
+ public static final String OPEN_URI_ACTION_ID = "open-uri"; //$NON-NLS-1$
+
+ private final OpenAction _openAction = new OpenAction(OPEN_URI_ACTION_ID) {
+ @Override
+ public boolean isEnabled() {
+ return true;
+ }
+
+ @Override
+ protected EObject getEObject() {
+ if (selection == null) {
+ return null;
+ }
+ IStructuredSelection sselection = (IStructuredSelection) selection;
+ if (sselection.size() != 1) {
+ return null;
+ }
+ Object object = sselection.getFirstElement();
+ if (object instanceof DomainURI) {
+ return (DomainURI) object;
+ } else if (object instanceof TypeDomainURI) {
+ return (TypeDomainURI) object;
+ }
+ return null;
+ }
+
+ @Override
+ protected URI getURI() {
+ EObject eObject = getEObject();
+ if (eObject == null) {
+ return null;
+ }
+ URI uri = null;
+ if (eObject instanceof DomainURI) {
+ uri = ((DomainURI) eObject).getUri();
+ } else if (eObject instanceof TypeDomainURI) {
+ uri = ((TypeDomainURI) eObject).getValue();
+ }
+ return uri;
+ }
+ };
+
+ @Override
+ protected String getText() {
+ if (getOpenAction().isAlreadyOpenedEditor()) {
+ return ModelEditorMessages.URIMenuContributor_selectAction_label;
+ }
+ return ModelEditorMessages.URIMenuContributor_openAction_label;
+ }
+
+ @Override
+ protected OpenAction getOpenAction() {
+ return _openAction;
+ }
+
+}
diff --git a/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/contributions/SuperTaskEditorContributor.java b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/contributions/SuperTaskEditorContributor.java
new file mode 100644
index 0000000..5c2d9b2
--- /dev/null
+++ b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/contributions/SuperTaskEditorContributor.java
@@ -0,0 +1,60 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.model.editor.contributions;
+
+import org.eclipse.egf.core.ui.contributor.DefaultPropertyEditorContributor;
+import org.eclipse.egf.model.editor.EGFModelEditorPlugin;
+import org.eclipse.egf.model.editor.dialogs.TaskSelectionDialog;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.ftask.FtaskPackage;
+import org.eclipse.egf.model.ftask.Task;
+import org.eclipse.emf.common.ui.celleditor.ExtendedDialogCellEditor;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class SuperTaskEditorContributor extends DefaultPropertyEditorContributor {
+
+ public boolean canApply(Object object, IItemPropertyDescriptor descriptor) {
+ return checkFeature(object, descriptor, FtaskPackage.Literals.TASK__SUPER_TASK) && object instanceof Task;
+ }
+
+ public CellEditor createPropertyEditor(Composite composite, Object object, IItemPropertyDescriptor descriptor) {
+ final Task task = (Task) object;
+ return new ExtendedDialogCellEditor(composite, getLabelProvider(object, descriptor)) {
+ @Override
+ protected Object openDialogBox(Control cellEditorWindow) {
+ TaskSelectionDialog dialog = new TaskSelectionDialog(EGFModelEditorPlugin.getActiveWorkbenchShell(), task.getSuperTask(), false);
+ dialog.open();
+ Object[] innerResult = dialog.getResult();
+ if (innerResult != null && innerResult.length > 0 && innerResult[0] instanceof Task) {
+ // Force a load resource on the current ResourceSet
+ Activity activity = (Activity) innerResult[0];
+ task.eResource().getResourceSet().getResource(activity.eResource().getURI(), true);
+ // Return selected value
+ return innerResult[0];
+ }
+ return task.getSuperTask();
+ }
+ };
+ }
+
+}
diff --git a/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/contributions/TypeEditorContributor.java b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/contributions/TypeEditorContributor.java
new file mode 100644
index 0000000..e668112
--- /dev/null
+++ b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/contributions/TypeEditorContributor.java
@@ -0,0 +1,47 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.model.editor.contributions;
+
+import org.eclipse.egf.model.types.TypeAbstractClass;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class TypeEditorContributor extends AbstractTypeEditorContributor {
+
+ @Override
+ public boolean canApply(Object object, IItemPropertyDescriptor descriptor) {
+ if (checkFeature(object, descriptor, TypesPackage.Literals.TYPE_ABSTRACT_CLASS__VALUE) && object instanceof TypeAbstractClass) {
+ TypeAbstractClass typeAbstractClass = (TypeAbstractClass) object;
+ return typeAbstractClass.getType() != null;
+ }
+ return false;
+ }
+
+ @Override
+ protected Class<Object> getType(Object object) {
+ return ((TypeAbstractClass) object).getType();
+ }
+
+ @Override
+ protected String getCurrentClassname(Object object) {
+ return ((TypeAbstractClass) object).getValue();
+ }
+
+}
diff --git a/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/dialogs/ActivitySelectionDialog.java b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/dialogs/ActivitySelectionDialog.java
new file mode 100644
index 0000000..c1ad6f9
--- /dev/null
+++ b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/dialogs/ActivitySelectionDialog.java
@@ -0,0 +1,396 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.model.editor.dialogs;
+
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.core.fcore.IPlatformFcore;
+import org.eclipse.egf.core.ui.l10n.CoreUIMessages;
+import org.eclipse.egf.model.editor.EGFModelEditorPlugin;
+import org.eclipse.egf.model.editor.l10n.ModelEditorMessages;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.provider.FcoreItemProviderAdapterFactory;
+import org.eclipse.egf.model.fcore.provider.FcoreResourceItemProviderAdapterFactory;
+import org.eclipse.egf.model.fprod.provider.FprodItemProviderAdapterFactory;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.dialogs.FilteredItemsSelectionDialog;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class ActivitySelectionDialog extends FilteredItemsSelectionDialog {
+
+ private static final String DIALOG_SETTINGS = "org.eclipse.egf.model.editor.dialogs.ActivitySelectionDialog"; //$NON-NLS-1$
+
+ private Activity _activity;
+
+ private EditingDomain _editingDomain;
+
+ private ComposedAdapterFactory _adapterFactory;
+
+ private IPlatformFcore[] _fcores = EGFCorePlugin.getPlatformFcores();
+
+ /**
+ * <code>ActivitySelectionHistory</code> provides behavior specific to
+ * Activity - storing and restoring <code>Activity</code>s state
+ * to/from XML (memento).
+ */
+ private class ActivitySelectionHistory extends SelectionHistory {
+
+ private static final String TAG_URI = "path"; //$NON-NLS-1$
+
+ public ActivitySelectionHistory() {
+ super();
+ }
+
+ @Override
+ protected Object restoreItemFromMemento(IMemento memento) {
+ // Restore
+ String tag = memento.getString(TAG_URI);
+ if (tag == null) {
+ return null;
+ }
+ try {
+ _activity = (Activity) _editingDomain.getResourceSet().getEObject(URI.createURI(tag), true);
+ // Check whether or not this activity belongs to our fcores
+ IPlatformFcore fcore = EGFCorePlugin.getPlatformFcore(_activity.eResource());
+ if (fcore != null) {
+ for (IPlatformFcore innerFcore : _fcores) {
+ if (innerFcore.equals(fcore)) {
+ return _activity;
+ }
+ }
+ }
+ } catch (Exception e) {
+ // Just ignore, a retrieved activity could have been deleted,
+ } finally {
+ _activity = null;
+ }
+ return null;
+ }
+
+ @Override
+ protected void storeItemToMemento(Object item, IMemento element) {
+ // Save
+ if (getReturnCode() == OK) {
+ Object[] items = getHistoryItems();
+ for (int i = 0; i < items.length; i++) {
+ element.putString(TAG_URI, EcoreUtil.getURI((Activity) items[i]).toString());
+ }
+ } else if (_activity != null) {
+ element.putString(TAG_URI, EcoreUtil.getURI(_activity).toString());
+ }
+ }
+
+ }
+
+ private class ActivitySearchItemsFilter extends ItemsFilter {
+
+ @Override
+ public boolean matchItem(Object item) {
+ if (item instanceof Activity == false) {
+ return false;
+ }
+ Activity activity = (Activity) item;
+ if (activity.getName() == null) {
+ return true;
+ }
+ return (matches(activity.getName()));
+ }
+
+ @Override
+ public boolean isConsistentItem(Object item) {
+ if (item instanceof Activity) {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean isSubFilter(ItemsFilter filter) {
+ if (super.isSubFilter(filter) == false) {
+ return false;
+ }
+ if (filter instanceof ActivitySearchItemsFilter) {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean equalsFilter(ItemsFilter filter) {
+ if (super.equalsFilter(filter) == false) {
+ return false;
+ }
+ if (filter instanceof ActivitySearchItemsFilter) {
+ return true;
+ }
+ return false;
+ }
+
+ }
+
+ private class ActivitySearchComparator implements Comparator<Activity> {
+ public int compare(Activity a1, Activity a2) {
+ if (a1.getName() == null && a2.getName() == null) {
+ return 0;
+ }
+ if (a1.getName() != null && a2.getName() == null) {
+ return -1;
+ }
+ if (a1.getName() == null && a2.getName() != null) {
+ return 1;
+ }
+ return a1.getName().compareTo(a2.getName());
+ }
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.egf.core.ui.dialogs.AbstractCheckboxSelectionDialog#getLabelProvider()
+ */
+ protected ILabelProvider getLabelProvider() {
+ return new LabelProvider() {
+ ILabelProvider _labelProvider = new AdapterFactoryLabelProvider(_adapterFactory);
+
+ @Override
+ public String getText(Object object) {
+ return _labelProvider.getText(object);
+ }
+
+ @Override
+ public Image getImage(Object object) {
+ return _labelProvider.getImage(object);
+ }
+ };
+ }
+
+ protected ILabelProvider getDetailsLabelProvider() {
+ return new LabelProvider() {
+ ILabelProvider _labelProvider = new AdapterFactoryLabelProvider(_adapterFactory);
+
+ @Override
+ public Image getImage(Object object) {
+ return _labelProvider.getImage(object);
+ }
+
+ @Override
+ public String getText(Object element) {
+ // This shouldn't happen
+ if (element instanceof Activity == false) {
+ return super.getText(element);
+ }
+ // In memory activity, in case of...
+ Activity activity = (Activity) element;
+ if (activity.eResource() == null) {
+ return super.getText(element);
+ }
+ // Retrieve Fcore
+ IPlatformFcore fc = EGFCorePlugin.getPlatformFcore(activity.eResource());
+ if (fc == null) {
+ return super.getText(element);
+ }
+ StringBuffer buffer = new StringBuffer(fc.getURI() == null ? "" : URI.decode(fc.getURI().toString())); //$NON-NLS-1$
+ if (fc.getPlatformBundle().isTarget()) {
+ buffer.append(" [Target]"); //$NON-NLS-1$
+ } else {
+ buffer.append(" [Workspace]"); //$NON-NLS-1$
+ }
+ buffer.append(" ["); //$NON-NLS-1$
+ buffer.append(fc.getPlatformBundle().getBundleLocation());
+ buffer.append("]"); //$NON-NLS-1$
+ return buffer.toString();
+ }
+ };
+ }
+
+ public ActivitySelectionDialog(Shell parentShell, boolean multipleSelection) {
+ super(parentShell, multipleSelection);
+ // Retrieve our EditingDomain
+ _editingDomain = TransactionalEditingDomain.Registry.INSTANCE.getEditingDomain(EGFCorePlugin.EDITING_DOMAIN_ID);
+ // Create an adapter factory that yields item providers.
+ _adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
+ _adapterFactory.addAdapterFactory(new FcoreResourceItemProviderAdapterFactory());
+ _adapterFactory.addAdapterFactory(new FprodItemProviderAdapterFactory());
+ _adapterFactory.addAdapterFactory(new FcoreItemProviderAdapterFactory());
+ _adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
+ setTitle(NLS.bind(ModelEditorMessages._UI_ActivitySelectionDialog_dialogTitle, Activity.class.getSimpleName()));
+ setMessage(NLS.bind(ModelEditorMessages._UI_ActivitySelectionDialog_dialogMessage, Activity.class.getSimpleName()));
+ setListLabelProvider(getLabelProvider());
+ setDetailsLabelProvider(getDetailsLabelProvider());
+ setSelectionHistory(new ActivitySelectionHistory());
+ setSeparatorLabel(CoreUIMessages._UI_FilteredItemsSelectionDialog_platformSeparatorLabel);
+ }
+
+ public ActivitySelectionDialog(Shell parentShell, IPlatformFcore fcore, boolean multipleSelection) {
+ this(parentShell, multipleSelection);
+ if (fcore != null) {
+ _fcores = new IPlatformFcore[] { fcore };
+ setSeparatorLabel(NLS.bind(CoreUIMessages._UI_FilteredItemsSelectionDialog_separatorLabel, fcore.getPlatformBundle().getBundleId()));
+ }
+ }
+
+ public ActivitySelectionDialog(Shell parentShell, Activity activity, boolean multipleSelection) {
+ super(parentShell, multipleSelection);
+ // Retrieve our EditingDomain
+ _editingDomain = TransactionalEditingDomain.Registry.INSTANCE.getEditingDomain(EGFCorePlugin.EDITING_DOMAIN_ID);
+ if (activity != null) {
+ _activity = (Activity) _editingDomain.getResourceSet().getEObject(EcoreUtil.getURI(activity), true);
+ }
+ // Create an adapter factory that yields item providers.
+ _adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
+ _adapterFactory.addAdapterFactory(new FcoreResourceItemProviderAdapterFactory());
+ _adapterFactory.addAdapterFactory(new FprodItemProviderAdapterFactory());
+ _adapterFactory.addAdapterFactory(new FcoreItemProviderAdapterFactory());
+ _adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
+ setTitle(NLS.bind(ModelEditorMessages._UI_ActivitySelectionDialog_dialogTitle, Activity.class.getSimpleName()));
+ setMessage(NLS.bind(ModelEditorMessages._UI_ActivitySelectionDialog_dialogMessage, Activity.class.getSimpleName()));
+ setListLabelProvider(getLabelProvider());
+ setDetailsLabelProvider(getDetailsLabelProvider());
+ setSelectionHistory(new ActivitySelectionHistory());
+ if (_activity != null && _activity.eResource() != null) {
+ IPlatformFcore fc = EGFCorePlugin.getPlatformFcore(_activity.eResource());
+ setSeparatorLabel(NLS.bind(CoreUIMessages._UI_FilteredItemsSelectionDialog_separatorLabel, fc.getPlatformBundle().getBundleId()));
+ } else {
+ setSeparatorLabel(CoreUIMessages._UI_FilteredItemsSelectionDialog_platformSeparatorLabel);
+ }
+ }
+
+ @Override
+ public Object[] getResult() {
+ Object[] result = super.getResult();
+ if (result == null) {
+ return null;
+ }
+ List<Activity> resultToReturn = new ArrayList<Activity>();
+ for (int i = 0; i < result.length; i++) {
+ if (result[i] instanceof Activity) {
+ resultToReturn.add(((Activity) result[i]));
+ }
+ }
+ return resultToReturn.toArray();
+ }
+
+ @Override
+ protected Control createExtendedContentArea(Composite parent) {
+ return null;
+ }
+
+ @Override
+ protected ItemsFilter createFilter() {
+ return new ActivitySearchItemsFilter();
+ }
+
+ @Override
+ protected void fillContentProvider(AbstractContentProvider contentProvider, ItemsFilter itemsFilter, IProgressMonitor progressMonitor) throws CoreException {
+ try {
+ for (IPlatformFcore fc : _fcores) {
+ // Load Fcore
+ Resource resource = null;
+ try {
+ // Retrieve the in-memory resource if any or load it from disk
+ resource = _editingDomain.getResourceSet().getResource(fc.getURI(), true);
+ } catch (OperationCanceledException e) {
+ return;
+ } catch (Exception e) {
+ EGFModelEditorPlugin.getPlugin().logError(e);
+ continue;
+ }
+ if (resource == null) {
+ continue;
+ }
+ // Analyse top contents for Activities
+ for (EObject eObject : resource.getContents()) {
+ // Ignore current
+ if (_activity != null && EcoreUtil.getURI(_activity).equals(EcoreUtil.getURI(eObject))) {
+ continue;
+ }
+ // Process
+ try {
+ if (selectElement(eObject)) {
+ contentProvider.add(eObject, itemsFilter);
+ }
+ } catch (OperationCanceledException e) {
+ return;
+ } catch (ClassCastException cce) {
+ // Ignore
+ continue;
+ }
+ }
+ progressMonitor.worked(1);
+ }
+ } catch (OperationCanceledException e) {
+ return;
+ } finally {
+ progressMonitor.done();
+ }
+ }
+
+ protected boolean selectElement(EObject eObject) {
+ return true;
+ }
+
+ @Override
+ protected IDialogSettings getDialogSettings() {
+ IDialogSettings settings = EGFModelEditorPlugin.getPlugin().getDialogSettings().getSection(DIALOG_SETTINGS);
+ if (settings == null) {
+ settings = EGFModelEditorPlugin.getPlugin().getDialogSettings().addNewSection(DIALOG_SETTINGS);
+ }
+ return settings;
+ }
+
+ @Override
+ public String getElementName(Object item) {
+ if (item instanceof IPlatformFcore) {
+ IPlatformFcore fc = (IPlatformFcore) item;
+ return fc.getURI().toString();
+ }
+ return null;
+ }
+
+ @Override
+ protected Comparator<Activity> getItemsComparator() {
+ return new ActivitySearchComparator();
+ }
+
+ @Override
+ protected IStatus validateItem(Object item) {
+ return new Status(IStatus.OK, EGFModelEditorPlugin.getPlugin().getBundle().getSymbolicName(), 0, "", null); //$NON-NLS-1$
+ }
+
+}
diff --git a/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/dialogs/EGFWizardDialog.java b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/dialogs/EGFWizardDialog.java
new file mode 100644
index 0000000..1afb813
--- /dev/null
+++ b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/dialogs/EGFWizardDialog.java
@@ -0,0 +1,31 @@
+/**
+ * Copyright (c) 2009 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
+ */
+package org.eclipse.egf.model.editor.dialogs;
+
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class EGFWizardDialog extends WizardDialog {
+
+ public EGFWizardDialog(Shell parentShell, IWizard newWizard) {
+ super(parentShell, newWizard);
+ }
+
+ public void finishDialog() {
+ finishPressed();
+ }
+
+}
diff --git a/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/dialogs/FactoryComponentSelectionDialog.java b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/dialogs/FactoryComponentSelectionDialog.java
new file mode 100644
index 0000000..db86444
--- /dev/null
+++ b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/dialogs/FactoryComponentSelectionDialog.java
@@ -0,0 +1,42 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.model.editor.dialogs;
+
+import org.eclipse.egf.model.editor.l10n.ModelEditorMessages;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class FactoryComponentSelectionDialog extends ActivitySelectionDialog {
+
+ public FactoryComponentSelectionDialog(Shell parentShell, Activity activity, boolean multipleSelection) {
+ super(parentShell, activity, multipleSelection);
+ setTitle(NLS.bind(ModelEditorMessages._UI_ActivitySelectionDialog_dialogTitle, FactoryComponent.class.getSimpleName()));
+ setMessage(NLS.bind(ModelEditorMessages._UI_ActivitySelectionDialog_dialogMessage, FactoryComponent.class.getSimpleName()));
+ }
+
+ @Override
+ protected boolean selectElement(EObject eObject) {
+ return eObject instanceof FactoryComponent;
+ }
+
+}
diff --git a/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/dialogs/TaskSelectionDialog.java b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/dialogs/TaskSelectionDialog.java
new file mode 100644
index 0000000..ce18111
--- /dev/null
+++ b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/dialogs/TaskSelectionDialog.java
@@ -0,0 +1,42 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.model.editor.dialogs;
+
+import org.eclipse.egf.model.editor.l10n.ModelEditorMessages;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.ftask.Task;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class TaskSelectionDialog extends ActivitySelectionDialog {
+
+ public TaskSelectionDialog(Shell parentShell, Activity activity, boolean multipleSelection) {
+ super(parentShell, activity, multipleSelection);
+ setTitle(NLS.bind(ModelEditorMessages._UI_ActivitySelectionDialog_dialogTitle, Task.class.getSimpleName()));
+ setMessage(NLS.bind(ModelEditorMessages._UI_ActivitySelectionDialog_dialogMessage, Task.class.getSimpleName()));
+ }
+
+ @Override
+ protected boolean selectElement(EObject eObject) {
+ return eObject instanceof Task;
+ }
+
+}
diff --git a/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/l10n/ModelEditorMessages.java b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/l10n/ModelEditorMessages.java
new file mode 100644
index 0000000..8a62bf5
--- /dev/null
+++ b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/l10n/ModelEditorMessages.java
@@ -0,0 +1,53 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.editor.l10n;
+
+import org.eclipse.osgi.util.NLS;
+
+public class ModelEditorMessages {
+
+ private static final String BUNDLE_NAME = "org.eclipse.egf.model.editor.l10n.messages"; //$NON-NLS-1$
+
+ private ModelEditorMessages() {
+ // Do not instantiate
+ }
+
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, ModelEditorMessages.class);
+ }
+
+ public static String _UI_ActivitySelectionDialog_dialogTitle;
+ public static String _UI_ActivitySelectionDialog_dialogMessage;
+
+ public static String ActivityMenuContributor_openAction_label;
+ public static String ActivityMenuContributor_selectAction_label;
+ public static String ActivityMenuContributor_invokeAction_label;
+
+ public static String ContractMenuContributor_openAction_label;
+ public static String ContractMenuContributor_selectAction_label;
+
+ public static String TaskMenuContributor_openAction_label;
+ public static String TaskMenuContributor_selectAction_label;
+
+ public static String URIMenuContributor_openAction_label;
+ public static String URIMenuContributor_selectAction_label;
+
+ public static String InvokeActivityWizard_Activity_title;
+ public static String InvokeActivityWizard_Activity_description;
+ public static String FilteredItemsSelectionDialog_patternLabel;
+
+ public static String _UI_InvokeCommand_label;
+ public static String _UI_InvokeCommand_description;
+
+}
diff --git a/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/l10n/messages.properties b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/l10n/messages.properties
new file mode 100644
index 0000000..3b51152
--- /dev/null
+++ b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/l10n/messages.properties
@@ -0,0 +1,34 @@
+##
+# 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
+##
+
+_UI_ActivitySelectionDialog_dialogTitle= EGF ''{0}'' Selection
+_UI_ActivitySelectionDialog_dialogMessage= &Select an EGF ''{0}'' (? = any character, * = any string):
+
+ActivityMenuContributor_openAction_label=Open Activity
+ActivityMenuContributor_selectAction_label=Select Activity
+ActivityMenuContributor_invokeAction_label=Invoke Activity
+
+ContractMenuContributor_openAction_label=Open Contract
+ContractMenuContributor_selectAction_label=Select Contract
+
+TaskMenuContributor_openAction_label=Open Super Task
+TaskMenuContributor_selectAction_label=Select Super Task
+
+URIMenuContributor_openAction_label=Open URI
+URIMenuContributor_selectAction_label=Select URI
+
+InvokeActivityWizard_Activity_title= EGF Invoke Activity
+InvokeActivityWizard_Activity_description= Populate the ProductionPlan with an invoked Activity.
+
+FilteredItemsSelectionDialog_patternLabel = &Select an Activity to invoke (? = any character, * = any string):
+
+_UI_InvokeCommand_label = Invoke
+_UI_InvokeCommand_description = Invoke the value to the feature of the owner
diff --git a/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/provider/FcoreContentProvider.java b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/provider/FcoreContentProvider.java
new file mode 100644
index 0000000..f36977b
--- /dev/null
+++ b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/provider/FcoreContentProvider.java
@@ -0,0 +1,34 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.model.editor.provider;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.ui.provider.TransactionalAdapterFactoryContentProvider;
+import org.eclipse.ui.views.properties.IPropertySource;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class FcoreContentProvider extends TransactionalAdapterFactoryContentProvider {
+
+ public FcoreContentProvider(TransactionalEditingDomain editingDomain, AdapterFactory adapterFactory) {
+ super(editingDomain, adapterFactory);
+ }
+
+ @Override
+ protected IPropertySource createPropertySource(Object object, IItemPropertySource itemPropertySource) {
+ return new FcorePropertySource(object, itemPropertySource);
+ }
+
+}
diff --git a/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/provider/FcorePropertyDescriptor.java b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/provider/FcorePropertyDescriptor.java
new file mode 100644
index 0000000..55588dc
--- /dev/null
+++ b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/provider/FcorePropertyDescriptor.java
@@ -0,0 +1,46 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.model.editor.provider;
+
+import org.eclipse.egf.core.ui.contributor.PropertyEditorContributor;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.ui.provider.PropertyDescriptor;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class FcorePropertyDescriptor extends PropertyDescriptor {
+
+ public FcorePropertyDescriptor(Object object, IItemPropertyDescriptor itemPropertyDescriptor) {
+ super(object, itemPropertyDescriptor);
+ }
+
+ /**
+ * This returns the cell editor that will be used to edit the value of this property.
+ * This default implementation determines the type of cell editor from the nature of the structural feature.
+ */
+ @Override
+ public CellEditor createPropertyEditor(Composite composite) {
+ if (itemPropertyDescriptor.canSetProperty(object) == false) {
+ return null;
+ }
+ // Contribution
+ PropertyEditorContributor propertyEditorContributor = PropertyEditorContributor.HELPER.selectPropertyEditor(object, itemPropertyDescriptor);
+ if (propertyEditorContributor != null) {
+ return propertyEditorContributor.createPropertyEditor(composite, object, itemPropertyDescriptor);
+ }
+ return super.createPropertyEditor(composite);
+ }
+
+}
diff --git a/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/provider/FcorePropertySheetPage.java b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/provider/FcorePropertySheetPage.java
new file mode 100644
index 0000000..4cd722a
--- /dev/null
+++ b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/provider/FcorePropertySheetPage.java
@@ -0,0 +1,74 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.model.editor.provider;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.egf.common.ui.helper.EditorHelper;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.ui.EMFEditUIPlugin;
+import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
+import org.eclipse.emf.transaction.ui.view.ExtendedPropertySheetPage;
+import org.eclipse.jface.action.Action;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class FcorePropertySheetPage extends ExtendedPropertySheetPage {
+
+ protected class FcoreLocateValueAction extends Action {
+
+ public FcoreLocateValueAction() {
+ setText(EMFEditUIPlugin.INSTANCE.getString("_UI_LocateValue_action")); //$NON-NLS-1$
+ setToolTipText(EMFEditUIPlugin.INSTANCE.getString("_UI_LocateValue_action_tool_tip")); //$NON-NLS-1$
+ setImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(EMFEditUIPlugin.INSTANCE.getImage("full/elcl16/LocateValue"))); //$NON-NLS-1$
+ setDisabledImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(EMFEditUIPlugin.INSTANCE.getImage("full/dlcl16/LocateValue"))); //$NON-NLS-1$
+ }
+
+ @Override
+ public void run() {
+ // Process Selection
+ Map<Resource, List<EObject>> resources = new HashMap<Resource, List<EObject>>();
+ for (Object object : objectsToSelect) {
+ EObject eObject = (EObject) editingDomain.getWrapper(object);
+ Resource resource = eObject.eResource();
+ if (resource != null) {
+ List<EObject> eObjects = resources.get(resource);
+ if (eObjects == null) {
+ eObjects = new ArrayList<EObject>();
+ resources.put(resource, eObjects);
+ }
+ eObjects.add(eObject);
+ }
+ }
+ // Open and select
+ EditorHelper.openEditorsAndSelect(resources);
+ }
+ }
+
+ /**
+ * Initializes me with the editing domain in which I create transactions.
+ *
+ * @param editingDomain
+ * my editing domain
+ */
+ public FcorePropertySheetPage(AdapterFactoryEditingDomain editingDomain) {
+ super(editingDomain);
+ locateValueAction = new FcoreLocateValueAction();
+ }
+
+}
diff --git a/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/provider/FcorePropertySource.java b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/provider/FcorePropertySource.java
new file mode 100644
index 0000000..687c81b
--- /dev/null
+++ b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/provider/FcorePropertySource.java
@@ -0,0 +1,36 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.model.editor.provider;
+
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.ui.provider.PropertySource;
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class FcorePropertySource extends PropertySource {
+
+ /**
+ * An instance is constructed from an object and its item property source.
+ */
+ public FcorePropertySource(Object object, IItemPropertySource itemPropertySource) {
+ super(object, itemPropertySource);
+ }
+
+ @Override
+ protected IPropertyDescriptor createPropertyDescriptor(IItemPropertyDescriptor itemPropertyDescriptor) {
+ return new FcorePropertyDescriptor(object, itemPropertyDescriptor);
+ }
+
+}
diff --git a/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/wizards/ActivitySelectionWizardPage.java b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/wizards/ActivitySelectionWizardPage.java
new file mode 100644
index 0000000..8f4f692
--- /dev/null
+++ b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/wizards/ActivitySelectionWizardPage.java
@@ -0,0 +1,369 @@
+/**
+ * Copyright (c) 2009 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
+ */
+package org.eclipse.egf.model.editor.wizards;
+
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.core.fcore.IPlatformFcore;
+import org.eclipse.egf.core.ui.l10n.CoreUIMessages;
+import org.eclipse.egf.core.ui.wizard.FilteredItemsSelectionWizardPage;
+import org.eclipse.egf.model.editor.EGFModelEditorPlugin;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.provider.FcoreItemProviderAdapterFactory;
+import org.eclipse.egf.model.fcore.provider.FcoreResourceItemProviderAdapterFactory;
+import org.eclipse.egf.model.fprod.provider.FprodItemProviderAdapterFactory;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IMemento;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class ActivitySelectionWizardPage extends FilteredItemsSelectionWizardPage {
+
+ private static final String PAGE_ID = "org.eclipse.egf.model.editor.wizards.ActivitySelectionWizardPage"; //$NON-NLS-1$
+
+ private static final String DIALOG_SETTINGS = "org.eclipse.egf.model.editor.dialogs.ActivitySelectionDialog"; //$NON-NLS-1$
+
+ private Resource _context;
+
+ private Activity _activity;
+
+ private ResourceSet _resourceSet;
+
+ private ComposedAdapterFactory _adapterFactory;
+
+ private IPlatformFcore[] _fcores = EGFCorePlugin.getPlatformFcores();
+
+ /**
+ * <code>ActivitySelectionHistory</code> provides behavior specific to
+ * Activity - storing and restoring <code>Activity</code>s state
+ * to/from XML (memento).
+ */
+ private class ActivitySelectionHistory extends SelectionHistory {
+
+ private static final String TAG_URI = "path"; //$NON-NLS-1$
+
+ public ActivitySelectionHistory() {
+ super();
+ }
+
+ @Override
+ protected Object restoreItemFromMemento(IMemento memento) {
+ // Restore
+ String tag = memento.getString(TAG_URI);
+ if (tag == null) {
+ return null;
+ }
+ try {
+ _activity = (Activity) _resourceSet.getEObject(URI.createURI(tag), true);
+ // Check whether or not this activity belongs to our fcores
+ IPlatformFcore fcore = EGFCorePlugin.getPlatformFcore(_activity.eResource());
+ if (fcore != null) {
+ for (IPlatformFcore innerFcore : _fcores) {
+ if (innerFcore.equals(fcore)) {
+ return _activity;
+ }
+ }
+ }
+ } catch (Exception e) {
+ // Just ignore, a retrieved activity could have been deleted,
+ } finally {
+ _activity = null;
+ }
+ return null;
+ }
+
+ @Override
+ protected void storeItemToMemento(Object item, IMemento element) {
+ // Save
+ if (((InvokeActivityWizard) getWizard())._isCanceled == false) {
+ Object[] items = getHistoryItems();
+ for (int i = 0; i < items.length; i++) {
+ element.putString(TAG_URI, EcoreUtil.getURI((Activity) items[i]).toString());
+ }
+ } else if (_activity != null) {
+ element.putString(TAG_URI, EcoreUtil.getURI(_activity).toString());
+ }
+ }
+
+ }
+
+ private class ActivitySearchItemsFilter extends ItemsFilter {
+
+ @Override
+ public boolean matchItem(Object item) {
+ if (item instanceof Activity == false) {
+ return false;
+ }
+ Activity activity = (Activity) item;
+ if (activity.getName() == null) {
+ return true;
+ }
+ return (matches(activity.getName()));
+ }
+
+ @Override
+ public boolean isConsistentItem(Object item) {
+ if (item instanceof Activity) {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean isSubFilter(ItemsFilter filter) {
+ if (super.isSubFilter(filter) == false) {
+ return false;
+ }
+ if (filter instanceof ActivitySearchItemsFilter) {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean equalsFilter(ItemsFilter filter) {
+ if (super.equalsFilter(filter) == false) {
+ return false;
+ }
+ if (filter instanceof ActivitySearchItemsFilter) {
+ return true;
+ }
+ return false;
+ }
+
+ }
+
+ private class ActivitySearchComparator implements Comparator<Activity> {
+ public int compare(Activity a1, Activity a2) {
+ if (a1.getName() == null && a2.getName() == null) {
+ return 0;
+ }
+ if (a1.getName() != null && a2.getName() == null) {
+ return -1;
+ }
+ if (a1.getName() == null && a2.getName() != null) {
+ return 1;
+ }
+ return a1.getName().compareTo(a2.getName());
+ }
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.egf.core.ui.dialogs.AbstractCheckboxSelectionDialog#getLabelProvider()
+ */
+ protected ILabelProvider getLabelProvider() {
+ return new LabelProvider() {
+ ILabelProvider _labelProvider = new AdapterFactoryLabelProvider(_adapterFactory);
+
+ @Override
+ public String getText(Object object) {
+ return _labelProvider.getText(object);
+ }
+
+ @Override
+ public Image getImage(Object object) {
+ return _labelProvider.getImage(object);
+ }
+ };
+ }
+
+ protected ILabelProvider getDetailsLabelProvider() {
+ return new LabelProvider() {
+ ILabelProvider _labelProvider = new AdapterFactoryLabelProvider(_adapterFactory);
+
+ @Override
+ public Image getImage(Object object) {
+ return _labelProvider.getImage(object);
+ }
+
+ @Override
+ public String getText(Object element) {
+ // This shouldn't happen
+ if (element instanceof Activity == false) {
+ return super.getText(element);
+ }
+ // In memory activity, in case of...
+ Activity activity = (Activity) element;
+ if (activity.eResource() == null) {
+ return super.getText(element);
+ }
+ // Retrieve Fcore
+ IPlatformFcore fc = EGFCorePlugin.getPlatformFcore(activity.eResource());
+ if (fc == null) {
+ return super.getText(element);
+ }
+ StringBuffer buffer = new StringBuffer(fc.getURI() == null ? "" : URI.decode(fc.getURI().toString())); //$NON-NLS-1$
+ if (fc.getPlatformBundle().isTarget()) {
+ buffer.append(" [Target]"); //$NON-NLS-1$
+ } else {
+ buffer.append(" [Workspace]"); //$NON-NLS-1$
+ }
+ buffer.append(" ["); //$NON-NLS-1$
+ buffer.append(fc.getPlatformBundle().getBundleLocation());
+ buffer.append("]"); //$NON-NLS-1$
+ return buffer.toString();
+ }
+ };
+ }
+
+ public ActivitySelectionWizardPage() {
+ super(PAGE_ID, false);
+ // Create and init a resourceSet
+ _resourceSet = new ResourceSetImpl();
+ // Assign a fresh platform aware URIConverter
+ _resourceSet.getURIConverter().getURIMap().putAll(EGFCorePlugin.computePlatformURIMap());
+ // Create an adapter factory that yields item providers.
+ _adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
+ _adapterFactory.addAdapterFactory(new FcoreResourceItemProviderAdapterFactory());
+ _adapterFactory.addAdapterFactory(new FprodItemProviderAdapterFactory());
+ _adapterFactory.addAdapterFactory(new FcoreItemProviderAdapterFactory());
+ _adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
+ setListLabelProvider(getLabelProvider());
+ setDetailsLabelProvider(getDetailsLabelProvider());
+ setSelectionHistory(new ActivitySelectionHistory());
+ setSeparatorLabel(CoreUIMessages._UI_FilteredItemsSelectionDialog_platformSeparatorLabel);
+ }
+
+ @Override
+ public Object[] getResult() {
+ computeResult();
+ Object[] result = super.getResult();
+ if (result == null) {
+ return null;
+ }
+ List<Activity> resultToReturn = new ArrayList<Activity>();
+ for (int i = 0; i < result.length; i++) {
+ if (result[i] instanceof Activity) {
+ resultToReturn.add(((Activity) result[i]));
+ }
+ }
+ return resultToReturn.toArray();
+ }
+
+ @Override
+ protected Control createExtendedContentArea(Composite parent) {
+ return null;
+ }
+
+ @Override
+ protected ItemsFilter createFilter() {
+ return new ActivitySearchItemsFilter();
+ }
+
+ @Override
+ protected void fillContentProvider(AbstractContentProvider contentProvider, ItemsFilter itemsFilter, IProgressMonitor progressMonitor) throws CoreException {
+ try {
+ for (IPlatformFcore fc : _fcores) {
+ // Load Fcore
+ Resource resource = null;
+ try {
+ // Analyse existing in memory resource if applicable
+ if (_context != null && _context.getResourceSet() != null) {
+ resource = _context.getResourceSet().getResource(fc.getURI(), false);
+ }
+ // If no memory resource are found
+ if (resource == null) {
+ resource = _resourceSet.getResource(fc.getURI(), true);
+ }
+ } catch (OperationCanceledException e) {
+ return;
+ } catch (Exception e) {
+ EGFModelEditorPlugin.getPlugin().logError(e);
+ continue;
+ }
+ // Analyse top contents for Activities
+ for (EObject eObject : resource.getContents()) {
+ // Ignore current
+ if (_activity != null && EcoreUtil.getURI(_activity).equals(EcoreUtil.getURI(eObject))) {
+ continue;
+ }
+ // Process
+ try {
+ contentProvider.add(eObject, itemsFilter);
+ } catch (OperationCanceledException e) {
+ return;
+ } catch (ClassCastException cce) {
+ // Ignore
+ continue;
+ }
+ }
+ progressMonitor.worked(1);
+ }
+ } catch (OperationCanceledException e) {
+ return;
+ } finally {
+ progressMonitor.done();
+ }
+ }
+
+ @Override
+ protected void handleDoubleClick() {
+ computeResult();
+ if (getWizard().canFinish() && getWizard() instanceof InvokeActivityWizard) {
+ ((InvokeActivityWizard) getWizard()).finishWizardDialog();
+ }
+ }
+
+ @Override
+ protected IDialogSettings getDialogSettings() {
+ IDialogSettings settings = EGFModelEditorPlugin.getPlugin().getDialogSettings().getSection(DIALOG_SETTINGS);
+ if (settings == null) {
+ settings = EGFModelEditorPlugin.getPlugin().getDialogSettings().addNewSection(DIALOG_SETTINGS);
+ }
+ return settings;
+ }
+
+ @Override
+ public String getElementName(Object item) {
+ if (item instanceof IPlatformFcore) {
+ IPlatformFcore fc = (IPlatformFcore) item;
+ return fc.getURI().toString();
+ }
+ return null;
+ }
+
+ @Override
+ protected Comparator<Activity> getItemsComparator() {
+ return new ActivitySearchComparator();
+ }
+
+ @Override
+ protected IStatus validateItem(Object item) {
+ return new Status(IStatus.OK, EGFModelEditorPlugin.getPlugin().getBundle().getSymbolicName(), 0, "", null); //$NON-NLS-1$
+ }
+
+}
diff --git a/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/wizards/InvokeActivityWizard.java b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/wizards/InvokeActivityWizard.java
new file mode 100644
index 0000000..fba8d25
--- /dev/null
+++ b/org.eclipse.egf.model.editor/src/org/eclipse/egf/model/editor/wizards/InvokeActivityWizard.java
@@ -0,0 +1,156 @@
+/**
+ * Copyright (c) 2009 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
+ */
+package org.eclipse.egf.model.editor.wizards;
+
+import org.eclipse.egf.model.editor.EGFModelEditorPlugin;
+import org.eclipse.egf.model.editor.commands.InvokeActivityCommand;
+import org.eclipse.egf.model.editor.dialogs.EGFWizardDialog;
+import org.eclipse.egf.model.editor.l10n.ModelEditorMessages;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fprod.ProductionPlan;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class InvokeActivityWizard extends Wizard implements INewWizard {
+
+ /**
+ * Remember the selection during initialization for populating the default
+ * container.
+ */
+ protected IStructuredSelection _selection;
+
+ /**
+ * Remember the workbench during initialization.
+ */
+ protected IWorkbench _workbench;
+
+ /**
+ * This is the file creation page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ActivitySelectionWizardPage _activitySelectionWizardPage;
+
+ public boolean _isCanceled;
+
+ protected ProductionPlan getProductionPlan() {
+ if (_selection == null || _selection.size() != 1) {
+ return null;
+ }
+ Object object = _selection.getFirstElement();
+ if (object instanceof ProductionPlan) {
+ return (ProductionPlan) object;
+ }
+ return null;
+ }
+
+ /**
+ * This just records the information.
+ */
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ _workbench = workbench;
+ _selection = selection;
+ setWindowTitle(EGFModelEditorPlugin.INSTANCE.getString("_UI_Wizard_Invoke_Activity_label")); //$NON-NLS-1$
+ setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(EGFModelEditorPlugin.INSTANCE.getImage("full/wizban/NewFcore"))); //$NON-NLS-1$
+ setNeedsProgressMonitor(true);
+ }
+
+ /**
+ * The <code>Wizard</code> implementation of this <code>IWizard</code>
+ * method does nothing and returns <code>true</code>. Subclasses should
+ * reimplement this method if they need to perform any special cancel
+ * processing for their wizard.
+ */
+ @Override
+ public boolean performCancel() {
+ _isCanceled = true;
+ return true;
+ }
+
+ public void finishWizardDialog() {
+ if (getContainer() instanceof EGFWizardDialog) {
+ ((EGFWizardDialog) getContainer()).finishDialog();
+ }
+ // DO nothing
+ return;
+ }
+
+ /**
+ * The framework calls this to create the contents of the wizard.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void addPages() {
+ _activitySelectionWizardPage = new ActivitySelectionWizardPage() {
+ @Override
+ protected String getHeaderMessage() {
+ return ModelEditorMessages.FilteredItemsSelectionDialog_patternLabel;
+ }
+ };
+ _activitySelectionWizardPage.setTitle(ModelEditorMessages.InvokeActivityWizard_Activity_title);
+ _activitySelectionWizardPage.setDescription(ModelEditorMessages.InvokeActivityWizard_Activity_description);
+ addPage(_activitySelectionWizardPage);
+ }
+
+ /**
+ * Do the work after everything is specified.
+ */
+ @Override
+ public boolean performFinish() {
+ // Activity to import
+ Object[] result = _activitySelectionWizardPage.getResult();
+ if (result == null || result.length == 0) {
+ return true;
+ }
+ Activity activity = (Activity) result[0];
+ // Target
+ ProductionPlan productionPlan = getProductionPlan();
+ if (productionPlan == null) {
+ return true;
+ }
+ // Current Editing Domain
+ EditingDomain domain = AdapterFactoryEditingDomain.getEditingDomainFor(productionPlan);
+ if (domain == null) {
+ return false;
+ }
+ final Command[] command = new Command[] { new InvokeActivityCommand(domain, productionPlan, (Activity) domain.getResourceSet().getEObject(EcoreUtil.getURI(activity), true)) };
+ // Are we facing a TransactionalEditingDomain ?
+ if (domain instanceof TransactionalEditingDomain) {
+ domain.getCommandStack().execute(new RecordingCommand((TransactionalEditingDomain) domain) {
+ @Override
+ protected void doExecute() {
+ // Nothing to do
+ }
+ }.chain(command[0]));
+ } else {
+ domain.getCommandStack().execute(command[0]);
+ }
+ return true;
+ }
+}
diff --git a/org.eclipse.egf.model.fprod.edit/.classpath b/org.eclipse.egf.model.fprod.edit/.classpath
new file mode 100644
index 0000000..f701972
--- /dev/null
+++ b/org.eclipse.egf.model.fprod.edit/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="generated"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.egf.model.fprod.edit/.project b/org.eclipse.egf.model.fprod.edit/.project
new file mode 100644
index 0000000..cc013c1
--- /dev/null
+++ b/org.eclipse.egf.model.fprod.edit/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.model.fprod.edit</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.model.fprod.edit/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egf.model.fprod.edit/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..9ae67c1
--- /dev/null
+++ b/org.eclipse.egf.model.fprod.edit/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:52:12 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.egf.model.fprod.edit/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egf.model.fprod.edit/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..6920446
--- /dev/null
+++ b/org.eclipse.egf.model.fprod.edit/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Tue Jun 23 10:17:52 CEST 2009
+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/org.eclipse.egf.model.fprod.edit/META-INF/MANIFEST.MF b/org.eclipse.egf.model.fprod.edit/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..49c7a61
--- /dev/null
+++ b/org.eclipse.egf.model.fprod.edit/META-INF/MANIFEST.MF
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.model.fprod.edit;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.egf.model.edit.EGFFprodEditPlugin$Implementation
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package:
+ org.eclipse.egf.model.edit,
+ org.eclipse.egf.model.fprod.provider
+Require-Bundle:
+ org.eclipse.core.runtime,
+ org.eclipse.emf.edit;visibility:=reexport,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.emf.ecore.edit;visibility:=reexport,
+ org.eclipse.egf.model;visibility:=reexport,
+ org.eclipse.egf.model.edit;visibility:=reexport,
+ org.eclipse.egf.model.fprod;visibility:=reexport
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.egf.model.fprod.edit/about.html b/org.eclipse.egf.model.fprod.edit/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/org.eclipse.egf.model.fprod.edit/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/org.eclipse.egf.model.fprod.edit/build.properties b/org.eclipse.egf.model.fprod.edit/build.properties
new file mode 100644
index 0000000..ff2e511
--- /dev/null
+++ b/org.eclipse.egf.model.fprod.edit/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+source.. = generated/,\
+ src/
+output.. = bin/
+bin.includes = .,\
+ icons/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties
+src.includes = about.html
diff --git a/org.eclipse.egf.model.fprod.edit/generated/org/eclipse/egf/model/edit/EGFFprodEditPlugin.java b/org.eclipse.egf.model.fprod.edit/generated/org/eclipse/egf/model/edit/EGFFprodEditPlugin.java
new file mode 100644
index 0000000..48c6233
--- /dev/null
+++ b/org.eclipse.egf.model.fprod.edit/generated/org/eclipse/egf/model/edit/EGFFprodEditPlugin.java
@@ -0,0 +1,101 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.edit;
+
+import org.eclipse.egf.common.activator.EGFEclipsePlugin;
+
+import org.eclipse.emf.common.EMFPlugin;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.provider.EcoreEditPlugin;
+
+/**
+ * This is the central singleton for the Fprod edit plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class EGFFprodEditPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final EGFFprodEditPlugin INSTANCE = new EGFFprodEditPlugin();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EGFFprodEditPlugin() {
+ super(new ResourceLocator[] { EcoreEditPlugin.INSTANCE, EGFModelEditPlugin.INSTANCE, });
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends EGFEclipsePlugin {
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.model.fprod.edit/generated/org/eclipse/egf/model/fprod/provider/FprodItemProviderAdapterFactory.java b/org.eclipse.egf.model.fprod.edit/generated/org/eclipse/egf/model/fprod/provider/FprodItemProviderAdapterFactory.java
new file mode 100644
index 0000000..338a50a
--- /dev/null
+++ b/org.eclipse.egf.model.fprod.edit/generated/org/eclipse/egf/model/fprod/provider/FprodItemProviderAdapterFactory.java
@@ -0,0 +1,376 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fprod.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.edit.EGFFprodEditPlugin;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.util.FcoreSwitch;
+import org.eclipse.egf.model.fprod.FprodFactory;
+import org.eclipse.egf.model.fprod.FprodPackage;
+import org.eclipse.egf.model.fprod.util.FprodAdapterFactory;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.CommandParameter;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ChildCreationExtenderManager;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IChildCreationExtender;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class FprodItemProviderAdapterFactory extends FprodAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable, IChildCreationExtender {
+ /**
+ * This keeps track of the root adapter factory that delegates to this adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ComposedAdapterFactory parentAdapterFactory;
+
+ /**
+ * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+ /**
+ * This helps manage the child creation extenders.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ChildCreationExtenderManager childCreationExtenderManager = new ChildCreationExtenderManager(EGFFprodEditPlugin.INSTANCE, FprodPackage.eNS_URI);
+
+ /**
+ * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+ /**
+ * This constructs an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FprodItemProviderAdapterFactory() {
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ supportedTypes.add(IItemPropertySource.class);
+ supportedTypes.add(ITableItemLabelProvider.class);
+ supportedTypes.add(ITableItemColorProvider.class);
+ supportedTypes.add(ITableItemFontProvider.class);
+ supportedTypes.add(IItemColorProvider.class);
+ supportedTypes.add(IItemFontProvider.class);
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.fprod.ProductionPlan} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ProductionPlanItemProvider productionPlanItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.fprod.ProductionPlan}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createProductionPlanAdapter() {
+ if (productionPlanItemProvider == null) {
+ productionPlanItemProvider = new ProductionPlanItemProvider(this);
+ }
+
+ return productionPlanItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.fprod.ProductionPlanInvocation} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ProductionPlanInvocationItemProvider productionPlanInvocationItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.fprod.ProductionPlanInvocation}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createProductionPlanInvocationAdapter() {
+ if (productionPlanInvocationItemProvider == null) {
+ productionPlanInvocationItemProvider = new ProductionPlanInvocationItemProvider(this);
+ }
+
+ return productionPlanInvocationItemProvider;
+ }
+
+ /**
+ * This returns the root adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ComposeableAdapterFactory getRootAdapterFactory() {
+ return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+ }
+
+ /**
+ * This sets the composed adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
+ this.parentAdapterFactory = parentAdapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return supportedTypes.contains(type) || super.isFactoryForType(type);
+ }
+
+ /**
+ * This implementation substitutes the factory itself as the key for the adapter.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter adapt(Notifier notifier, Object type) {
+ return super.adapt(notifier, this);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object adapt(Object object, Object type) {
+ if (isFactoryForType(type)) {
+ Object adapter = super.adapt(object, type);
+ if (!(type instanceof Class<?>) || (((Class<?>) type).isInstance(adapter))) {
+ return adapter;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List<IChildCreationExtender> getChildCreationExtenders() {
+ return childCreationExtenderManager.getChildCreationExtenders();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Collection<?> getNewChildDescriptors(Object object, EditingDomain editingDomain) {
+ return childCreationExtenderManager.getNewChildDescriptors(object, editingDomain);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceLocator getResourceLocator() {
+ return childCreationExtenderManager;
+ }
+
+ /**
+ * This adds a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void addListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void fireNotifyChanged(Notification notification) {
+ changeNotifier.fireNotifyChanged(notification);
+
+ if (parentAdapterFactory != null) {
+ parentAdapterFactory.fireNotifyChanged(notification);
+ }
+ }
+
+ /**
+ * This disposes all of the item providers created by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void dispose() {
+ if (productionPlanItemProvider != null)
+ productionPlanItemProvider.dispose();
+ if (productionPlanInvocationItemProvider != null)
+ productionPlanInvocationItemProvider.dispose();
+ }
+
+ /**
+ * A child creation extender for the {@link FcorePackage}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class FcoreChildCreationExtender implements IChildCreationExtender {
+ /**
+ * The switch for creating child descriptors specific to each extended class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static class CreationSwitch extends FcoreSwitch<Object> {
+ /**
+ * The child descriptors being populated.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected List<Object> newChildDescriptors;
+
+ /**
+ * The domain in which to create the children.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EditingDomain editingDomain;
+
+ /**
+ * Creates the a switch for populating child descriptors in the given domain.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ CreationSwitch(List<Object> newChildDescriptors, EditingDomain editingDomain) {
+ this.newChildDescriptors = newChildDescriptors;
+ this.editingDomain = editingDomain;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object caseFactoryComponent(FactoryComponent object) {
+ newChildDescriptors.add(createChildParameter(FcorePackage.Literals.FACTORY_COMPONENT__ORCHESTRATION, FprodFactory.eINSTANCE.createProductionPlan()));
+
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CommandParameter createChildParameter(Object feature, Object child) {
+ return new CommandParameter(null, feature, child);
+ }
+
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Collection<Object> getNewChildDescriptors(Object object, EditingDomain editingDomain) {
+ ArrayList<Object> result = new ArrayList<Object>();
+ new CreationSwitch(result, editingDomain).doSwitch((EObject) object);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceLocator getResourceLocator() {
+ return EGFFprodEditPlugin.INSTANCE;
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.model.fprod.edit/generated/org/eclipse/egf/model/fprod/provider/ProductionPlanInvocationItemProvider.java b/org.eclipse.egf.model.fprod.edit/generated/org/eclipse/egf/model/fprod/provider/ProductionPlanInvocationItemProvider.java
new file mode 100644
index 0000000..9380c5d
--- /dev/null
+++ b/org.eclipse.egf.model.fprod.edit/generated/org/eclipse/egf/model/fprod/provider/ProductionPlanInvocationItemProvider.java
@@ -0,0 +1,131 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fprod.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.common.helper.EMFHelper;
+import org.eclipse.egf.model.fcore.provider.InvocationItemProvider;
+import org.eclipse.egf.model.fprod.ProductionPlanInvocation;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.fprod.ProductionPlanInvocation} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ProductionPlanInvocationItemProvider extends InvocationItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider,
+ IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ProductionPlanInvocationItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns ProductionPlanInvocation.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ProductionPlanInvocation")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ ProductionPlanInvocation productionPlanInvocation = (ProductionPlanInvocation) object;
+ // Name
+ String name = productionPlanInvocation.getName();
+ // Invoked Activity
+ String invoked = null;
+ if (productionPlanInvocation.getInvokedActivity() != null) {
+ invoked = EMFHelper.getText(productionPlanInvocation.getInvokedActivity());
+ }
+ String label = "[" + getString("_UI_ProductionPlanInvocation_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ if (name != null) {
+ label = name + " " + label; //$NON-NLS-1$
+ }
+ if (invoked != null) {
+ label = label + " -> " + invoked; //$NON-NLS-1$
+ }
+ return label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/org.eclipse.egf.model.fprod.edit/generated/org/eclipse/egf/model/fprod/provider/ProductionPlanItemProvider.java b/org.eclipse.egf.model.fprod.edit/generated/org/eclipse/egf/model/fprod/provider/ProductionPlanItemProvider.java
new file mode 100644
index 0000000..94b70b3
--- /dev/null
+++ b/org.eclipse.egf.model.fprod.edit/generated/org/eclipse/egf/model/fprod/provider/ProductionPlanItemProvider.java
@@ -0,0 +1,157 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fprod.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.fcore.provider.OrchestrationItemProvider;
+import org.eclipse.egf.model.fprod.FprodFactory;
+import org.eclipse.egf.model.fprod.FprodPackage;
+import org.eclipse.egf.model.fprod.ProductionPlan;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.fprod.ProductionPlan} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ProductionPlanItemProvider extends OrchestrationItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider,
+ IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ProductionPlanItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(FprodPackage.Literals.PRODUCTION_PLAN__INVOCATIONS);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns ProductionPlan.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ProductionPlan")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ return "[" + getString("_UI_ProductionPlan_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(ProductionPlan.class)) {
+ case FprodPackage.PRODUCTION_PLAN__INVOCATIONS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add(createChildParameter(FprodPackage.Literals.PRODUCTION_PLAN__INVOCATIONS, FprodFactory.eINSTANCE.createProductionPlanInvocation()));
+ }
+
+}
diff --git a/org.eclipse.egf.model.fprod.edit/icons/full/ctool16/CreateFactoryComponent_orchestration_ProductionPlan.gif b/org.eclipse.egf.model.fprod.edit/icons/full/ctool16/CreateFactoryComponent_orchestration_ProductionPlan.gif
new file mode 100644
index 0000000..167f07b
--- /dev/null
+++ b/org.eclipse.egf.model.fprod.edit/icons/full/ctool16/CreateFactoryComponent_orchestration_ProductionPlan.gif
Binary files differ
diff --git a/org.eclipse.egf.model.fprod.edit/icons/full/ctool16/CreateProductionPlan_invocations_ProductionPlanInvocation.gif b/org.eclipse.egf.model.fprod.edit/icons/full/ctool16/CreateProductionPlan_invocations_ProductionPlanInvocation.gif
new file mode 100644
index 0000000..6c8f4bb
--- /dev/null
+++ b/org.eclipse.egf.model.fprod.edit/icons/full/ctool16/CreateProductionPlan_invocations_ProductionPlanInvocation.gif
Binary files differ
diff --git a/org.eclipse.egf.model.fprod.edit/icons/full/obj16/ProductionPlan.gif b/org.eclipse.egf.model.fprod.edit/icons/full/obj16/ProductionPlan.gif
new file mode 100644
index 0000000..90ec34f
--- /dev/null
+++ b/org.eclipse.egf.model.fprod.edit/icons/full/obj16/ProductionPlan.gif
Binary files differ
diff --git a/org.eclipse.egf.model.fprod.edit/icons/full/obj16/ProductionPlanInvocation.gif b/org.eclipse.egf.model.fprod.edit/icons/full/obj16/ProductionPlanInvocation.gif
new file mode 100644
index 0000000..eed8dcf
--- /dev/null
+++ b/org.eclipse.egf.model.fprod.edit/icons/full/obj16/ProductionPlanInvocation.gif
Binary files differ
diff --git a/org.eclipse.egf.model.fprod.edit/plugin.properties b/org.eclipse.egf.model.fprod.edit/plugin.properties
new file mode 100644
index 0000000..5491802
--- /dev/null
+++ b/org.eclipse.egf.model.fprod.edit/plugin.properties
Binary files differ
diff --git a/org.eclipse.egf.model.fprod.edit/plugin.xml b/org.eclipse.egf.model.fprod.edit/plugin.xml
new file mode 100644
index 0000000..17891ce
--- /dev/null
+++ b/org.eclipse.egf.model.fprod.edit/plugin.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+
+<!--
+
+ 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>
+
+ <!-- ================================================================================= -->
+ <!-- ProductionPlan Model -->
+ <!-- ================================================================================= -->
+
+ <extension
+ point="org.eclipse.emf.edit.itemProviderAdapterFactories"
+ >
+ <factory
+ uri="http://www.eclipse.org/egf/1.0.0/fprod"
+ class="org.eclipse.egf.model.fprod.provider.FprodItemProviderAdapterFactory"
+ supportedTypes=
+ "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+ org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+ org.eclipse.emf.edit.provider.ITreeItemContentProvider
+ org.eclipse.emf.edit.provider.IItemLabelProvider
+ org.eclipse.emf.edit.provider.IItemPropertySource
+ org.eclipse.emf.edit.provider.ITableItemLabelProvider
+ org.eclipse.emf.edit.provider.ITableItemColorProvider
+ org.eclipse.emf.edit.provider.ITableItemFontProvider
+ org.eclipse.emf.edit.provider.IItemColorProvider
+ org.eclipse.emf.edit.provider.IItemFontProvider"
+ />
+ </extension>
+
+ <extension
+ point="org.eclipse.emf.edit.childCreationExtenders"
+ >
+ <extender
+ uri="http://www.eclipse.org/egf/1.0.0/fcore"
+ class="org.eclipse.egf.model.fprod.provider.FprodItemProviderAdapterFactory$FcoreChildCreationExtender"
+ />
+ </extension>
+
+ <!-- ================================================================================= -->
+ <!-- Fprod Extenders -->
+ <!-- ================================================================================= -->
+
+ <extension
+ point="org.eclipse.emf.edit.childCreationExtenders"
+ >
+ <extender
+ uri="http://www.eclipse.org/egf/1.0.0/fprod"
+ class="org.eclipse.egf.model.domain.provider.DomainItemProviderAdapterFactory$FcoreChildCreationExtender"
+ />
+ </extension>
+
+ <extension
+ point="org.eclipse.emf.edit.childCreationExtenders"
+ >
+ <extender
+ uri="http://www.eclipse.org/egf/1.0.0/fprod"
+ class="org.eclipse.egf.model.pattern.provider.PatternItemProviderAdapterFactory$FcoreChildCreationExtender"
+ />
+ </extension>
+
+</plugin>
diff --git a/org.eclipse.egf.model.fprod.edit/src/org/eclipse/egf/model/fprod/provider/FprodCustomItemProviderAdapterFactory.java b/org.eclipse.egf.model.fprod.edit/src/org/eclipse/egf/model/fprod/provider/FprodCustomItemProviderAdapterFactory.java
new file mode 100644
index 0000000..a623178
--- /dev/null
+++ b/org.eclipse.egf.model.fprod.edit/src/org/eclipse/egf/model/fprod/provider/FprodCustomItemProviderAdapterFactory.java
@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2009 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
+ */
+package org.eclipse.egf.model.fprod.provider;
+
+import org.eclipse.emf.common.notify.Adapter;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class FprodCustomItemProviderAdapterFactory extends FprodItemProviderAdapterFactory {
+
+ /**
+ * This constructs an instance.
+ */
+ public FprodCustomItemProviderAdapterFactory() {
+ super();
+ }
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.fprod.ProductionPlanInvocation}.
+ */
+ @Override
+ public Adapter createProductionPlanInvocationAdapter() {
+ if (productionPlanInvocationItemProvider == null) {
+ productionPlanInvocationItemProvider = new ProductionPlanInvocationCustomItemProvider(this);
+ }
+ return productionPlanInvocationItemProvider;
+ }
+
+}
diff --git a/org.eclipse.egf.model.fprod.edit/src/org/eclipse/egf/model/fprod/provider/ProductionPlanInvocationCustomItemProvider.java b/org.eclipse.egf.model.fprod.edit/src/org/eclipse/egf/model/fprod/provider/ProductionPlanInvocationCustomItemProvider.java
new file mode 100644
index 0000000..9a70316
--- /dev/null
+++ b/org.eclipse.egf.model.fprod.edit/src/org/eclipse/egf/model/fprod/provider/ProductionPlanInvocationCustomItemProvider.java
@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2009 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
+ */
+package org.eclipse.egf.model.fprod.provider;
+
+import org.eclipse.egf.model.fprod.ProductionPlanInvocation;
+import org.eclipse.emf.common.notify.AdapterFactory;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class ProductionPlanInvocationCustomItemProvider extends ProductionPlanInvocationItemProvider {
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ */
+ public ProductionPlanInvocationCustomItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((ProductionPlanInvocation) object).getName();
+ return label == null || label.length() == 0 ? "[" + getString("_UI_ProductionPlanInvocation_type") + "]" : //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ label + " [" + getString("_UI_ProductionPlanInvocation_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+}
diff --git a/org.eclipse.egf.model.fprod/.classpath b/org.eclipse.egf.model.fprod/.classpath
new file mode 100644
index 0000000..f701972
--- /dev/null
+++ b/org.eclipse.egf.model.fprod/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="generated"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.egf.model.fprod/.project b/org.eclipse.egf.model.fprod/.project
new file mode 100644
index 0000000..635e563
--- /dev/null
+++ b/org.eclipse.egf.model.fprod/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.model.fprod</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.model.fprod/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egf.model.fprod/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..82d4dd5
--- /dev/null
+++ b/org.eclipse.egf.model.fprod/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:52:04 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.egf.model.fprod/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egf.model.fprod/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..558175e
--- /dev/null
+++ b/org.eclipse.egf.model.fprod/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Tue Jun 23 10:09:24 CEST 2009
+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/org.eclipse.egf.model.fprod/META-INF/MANIFEST.MF b/org.eclipse.egf.model.fprod/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..212c1a7
--- /dev/null
+++ b/org.eclipse.egf.model.fprod/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.model.fprod;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.egf.model.EGFFprodPlugin$Implementation
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package:
+ org.eclipse.egf.model,
+ org.eclipse.egf.model.fprod,
+ org.eclipse.egf.model.fprod.impl,
+ org.eclipse.egf.model.fprod.util
+Require-Bundle:
+ org.eclipse.egf.model;visibility:=reexport
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.egf.model.fprod/about.html b/org.eclipse.egf.model.fprod/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/org.eclipse.egf.model.fprod/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/org.eclipse.egf.model.fprod/build.properties b/org.eclipse.egf.model.fprod/build.properties
new file mode 100644
index 0000000..9e1be25
--- /dev/null
+++ b/org.eclipse.egf.model.fprod/build.properties
@@ -0,0 +1,20 @@
+##
+# 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
+##
+source.. = generated/,\
+ src/
+output.. = bin/
+bin.includes = .,\
+ model/,\
+ META-INF/,\
+ about.html,\
+ plugin.xml,\
+ plugin.properties
+src.includes = about.html
diff --git a/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/EGFFprodPlugin.java b/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/EGFFprodPlugin.java
new file mode 100644
index 0000000..be2118b
--- /dev/null
+++ b/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/EGFFprodPlugin.java
@@ -0,0 +1,97 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model;
+
+import org.eclipse.egf.common.activator.EGFEclipsePlugin;
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * This is the central singleton for the Fprod model plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class EGFFprodPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final EGFFprodPlugin INSTANCE = new EGFFprodPlugin();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EGFFprodPlugin() {
+ super(new ResourceLocator[] {});
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends EGFEclipsePlugin {
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/FprodFactory.java b/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/FprodFactory.java
new file mode 100644
index 0000000..f61c8a9
--- /dev/null
+++ b/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/FprodFactory.java
@@ -0,0 +1,61 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fprod;
+
+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.egf.model.fprod.FprodPackage
+ * @generated
+ */
+public interface FprodFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ FprodFactory eINSTANCE = org.eclipse.egf.model.fprod.impl.FprodFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Production Plan</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Production Plan</em>'.
+ * @generated
+ */
+ ProductionPlan createProductionPlan();
+
+ /**
+ * Returns a new object of class '<em>Production Plan Invocation</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Production Plan Invocation</em>'.
+ * @generated
+ */
+ ProductionPlanInvocation createProductionPlanInvocation();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ FprodPackage getFprodPackage();
+
+} //FprodFactory
diff --git a/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/FprodPackage.java b/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/FprodPackage.java
new file mode 100644
index 0000000..10e7f10
--- /dev/null
+++ b/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/FprodPackage.java
@@ -0,0 +1,311 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fprod;
+
+import org.eclipse.egf.model.fcore.FcorePackage;
+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 enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fprod.FprodFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface FprodPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "fprod"; //$NON-NLS-1$
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/egf/1.0.0/fprod"; //$NON-NLS-1$
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "fprod"; //$NON-NLS-1$
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ FprodPackage eINSTANCE = org.eclipse.egf.model.fprod.impl.FprodPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.fprod.impl.ProductionPlanImpl <em>Production Plan</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fprod.impl.ProductionPlanImpl
+ * @see org.eclipse.egf.model.fprod.impl.FprodPackageImpl#getProductionPlan()
+ * @generated
+ */
+ int PRODUCTION_PLAN = 0;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PRODUCTION_PLAN__ID = FcorePackage.ORCHESTRATION__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PRODUCTION_PLAN__DESCRIPTION = FcorePackage.ORCHESTRATION__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Factory Component</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PRODUCTION_PLAN__FACTORY_COMPONENT = FcorePackage.ORCHESTRATION__FACTORY_COMPONENT;
+
+ /**
+ * The feature id for the '<em><b>Orchestration Parameter Container</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PRODUCTION_PLAN__ORCHESTRATION_PARAMETER_CONTAINER = FcorePackage.ORCHESTRATION__ORCHESTRATION_PARAMETER_CONTAINER;
+
+ /**
+ * The feature id for the '<em><b>Invocations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PRODUCTION_PLAN__INVOCATIONS = FcorePackage.ORCHESTRATION_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Production Plan</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PRODUCTION_PLAN_FEATURE_COUNT = FcorePackage.ORCHESTRATION_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.fprod.impl.ProductionPlanInvocationImpl <em>Production Plan Invocation</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fprod.impl.ProductionPlanInvocationImpl
+ * @see org.eclipse.egf.model.fprod.impl.FprodPackageImpl#getProductionPlanInvocation()
+ * @generated
+ */
+ int PRODUCTION_PLAN_INVOCATION = 1;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PRODUCTION_PLAN_INVOCATION__ID = FcorePackage.INVOCATION__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PRODUCTION_PLAN_INVOCATION__DESCRIPTION = FcorePackage.INVOCATION__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PRODUCTION_PLAN_INVOCATION__NAME = FcorePackage.INVOCATION__NAME;
+
+ /**
+ * The feature id for the '<em><b>Invocation Contract Container</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PRODUCTION_PLAN_INVOCATION__INVOCATION_CONTRACT_CONTAINER = FcorePackage.INVOCATION__INVOCATION_CONTRACT_CONTAINER;
+
+ /**
+ * The feature id for the '<em><b>Invoked Activity</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PRODUCTION_PLAN_INVOCATION__INVOKED_ACTIVITY = FcorePackage.INVOCATION__INVOKED_ACTIVITY;
+
+ /**
+ * The feature id for the '<em><b>Production Plan</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PRODUCTION_PLAN_INVOCATION__PRODUCTION_PLAN = FcorePackage.INVOCATION_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Production Plan Invocation</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PRODUCTION_PLAN_INVOCATION_FEATURE_COUNT = FcorePackage.INVOCATION_FEATURE_COUNT + 1;
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.fprod.ProductionPlan <em>Production Plan</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Production Plan</em>'.
+ * @see org.eclipse.egf.model.fprod.ProductionPlan
+ * @generated
+ */
+ EClass getProductionPlan();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.egf.model.fprod.ProductionPlan#getInvocations <em>Invocations</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Invocations</em>'.
+ * @see org.eclipse.egf.model.fprod.ProductionPlan#getInvocations()
+ * @see #getProductionPlan()
+ * @generated
+ */
+ EReference getProductionPlan_Invocations();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.fprod.ProductionPlanInvocation <em>Production Plan Invocation</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Production Plan Invocation</em>'.
+ * @see org.eclipse.egf.model.fprod.ProductionPlanInvocation
+ * @generated
+ */
+ EClass getProductionPlanInvocation();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.egf.model.fprod.ProductionPlanInvocation#getProductionPlan <em>Production Plan</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Production Plan</em>'.
+ * @see org.eclipse.egf.model.fprod.ProductionPlanInvocation#getProductionPlan()
+ * @see #getProductionPlanInvocation()
+ * @generated
+ */
+ EReference getProductionPlanInvocation_ProductionPlan();
+
+ /**
+ * 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
+ */
+ FprodFactory getFprodFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.fprod.impl.ProductionPlanImpl <em>Production Plan</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fprod.impl.ProductionPlanImpl
+ * @see org.eclipse.egf.model.fprod.impl.FprodPackageImpl#getProductionPlan()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass PRODUCTION_PLAN = eINSTANCE.getProductionPlan();
+
+ /**
+ * The meta object literal for the '<em><b>Invocations</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference PRODUCTION_PLAN__INVOCATIONS = eINSTANCE.getProductionPlan_Invocations();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.fprod.impl.ProductionPlanInvocationImpl <em>Production Plan Invocation</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fprod.impl.ProductionPlanInvocationImpl
+ * @see org.eclipse.egf.model.fprod.impl.FprodPackageImpl#getProductionPlanInvocation()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass PRODUCTION_PLAN_INVOCATION = eINSTANCE.getProductionPlanInvocation();
+
+ /**
+ * The meta object literal for the '<em><b>Production Plan</b></em>' container reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference PRODUCTION_PLAN_INVOCATION__PRODUCTION_PLAN = eINSTANCE.getProductionPlanInvocation_ProductionPlan();
+
+ }
+
+} // FprodPackage
diff --git a/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/ProductionPlan.java b/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/ProductionPlan.java
new file mode 100644
index 0000000..3711f52
--- /dev/null
+++ b/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/ProductionPlan.java
@@ -0,0 +1,54 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fprod;
+
+import org.eclipse.egf.model.fcore.Orchestration;
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Production Plan</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.fprod.ProductionPlan#getInvocations <em>Invocations</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.fprod.FprodPackage#getProductionPlan()
+ * @model
+ * @generated
+ */
+public interface ProductionPlan extends Orchestration {
+
+ /**
+ * Returns the value of the '<em><b>Invocations</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.egf.model.fprod.ProductionPlanInvocation}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.fprod.ProductionPlanInvocation#getProductionPlan <em>Production Plan</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Invocations</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>Invocations</em>' containment reference list.
+ * @see org.eclipse.egf.model.fprod.FprodPackage#getProductionPlan_Invocations()
+ * @see org.eclipse.egf.model.fprod.ProductionPlanInvocation#getProductionPlan
+ * @model opposite="productionPlan" containment="true" required="true"
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ EList<ProductionPlanInvocation> getInvocations();
+} // ProductionPlan
diff --git a/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/ProductionPlanInvocation.java b/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/ProductionPlanInvocation.java
new file mode 100644
index 0000000..11e55bf
--- /dev/null
+++ b/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/ProductionPlanInvocation.java
@@ -0,0 +1,71 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fprod;
+
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.Invocation;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Production Plan Invocation</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.fprod.ProductionPlanInvocation#getProductionPlan <em>Production Plan</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.fprod.FprodPackage#getProductionPlanInvocation()
+ * @model
+ * @generated
+ */
+public interface ProductionPlanInvocation extends Invocation {
+
+ /**
+ * Returns the value of the '<em><b>Production Plan</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.fprod.ProductionPlan#getInvocations <em>Invocations</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Production Plan</em>' container reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Production Plan</em>' container reference.
+ * @see #setProductionPlan(ProductionPlan)
+ * @see org.eclipse.egf.model.fprod.FprodPackage#getProductionPlanInvocation_ProductionPlan()
+ * @see org.eclipse.egf.model.fprod.ProductionPlan#getInvocations
+ * @model opposite="invocations" resolveProxies="false" required="true" transient="false"
+ * @generated
+ */
+ ProductionPlan getProductionPlan();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.fprod.ProductionPlanInvocation#getProductionPlan <em>Production Plan</em>}' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Production Plan</em>' container reference.
+ * @see #getProductionPlan()
+ * @generated
+ */
+ void setProductionPlan(ProductionPlan value);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation" required="true"
+ * @generated
+ */
+ FactoryComponent getFactoryComponent();
+} // ProductionPlanInvocation
diff --git a/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/impl/FprodFactoryImpl.java b/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/impl/FprodFactoryImpl.java
new file mode 100644
index 0000000..2838d46
--- /dev/null
+++ b/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/impl/FprodFactoryImpl.java
@@ -0,0 +1,117 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fprod.impl;
+
+import org.eclipse.egf.model.fprod.*;
+
+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;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class FprodFactoryImpl extends EFactoryImpl implements FprodFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static FprodFactory init() {
+ try {
+ FprodFactory theFprodFactory = (FprodFactory) EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/egf/1.0.0/fprod"); //$NON-NLS-1$
+ if (theFprodFactory != null) {
+ return theFprodFactory;
+ }
+ } catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new FprodFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FprodFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case FprodPackage.PRODUCTION_PLAN:
+ return createProductionPlan();
+ case FprodPackage.PRODUCTION_PLAN_INVOCATION:
+ return createProductionPlanInvocation();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ProductionPlan createProductionPlan() {
+ ProductionPlanImpl productionPlan = new ProductionPlanImpl();
+ return productionPlan;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ProductionPlanInvocation createProductionPlanInvocation() {
+ ProductionPlanInvocationImpl productionPlanInvocation = new ProductionPlanInvocationImpl();
+ return productionPlanInvocation;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FprodPackage getFprodPackage() {
+ return (FprodPackage) getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static FprodPackage getPackage() {
+ return FprodPackage.eINSTANCE;
+ }
+
+} //FprodFactoryImpl
diff --git a/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/impl/FprodPackageImpl.java b/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/impl/FprodPackageImpl.java
new file mode 100644
index 0000000..2e5579a
--- /dev/null
+++ b/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/impl/FprodPackageImpl.java
@@ -0,0 +1,232 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fprod.impl;
+
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fprod.FprodFactory;
+import org.eclipse.egf.model.fprod.FprodPackage;
+import org.eclipse.egf.model.fprod.ProductionPlan;
+import org.eclipse.egf.model.fprod.ProductionPlanInvocation;
+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;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class FprodPackageImpl extends EPackageImpl implements FprodPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass productionPlanEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass productionPlanInvocationEClass = 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.egf.model.fprod.FprodPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private FprodPackageImpl() {
+ super(eNS_URI, FprodFactory.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 FprodPackage#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 FprodPackage init() {
+ if (isInited)
+ return (FprodPackage) EPackage.Registry.INSTANCE.getEPackage(FprodPackage.eNS_URI);
+
+ // Obtain or create and register package
+ FprodPackageImpl theFprodPackage = (FprodPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof FprodPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new FprodPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ FcorePackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theFprodPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theFprodPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theFprodPackage.freeze();
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(FprodPackage.eNS_URI, theFprodPackage);
+ return theFprodPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getProductionPlan() {
+ return productionPlanEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getProductionPlan_Invocations() {
+ return (EReference) productionPlanEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getProductionPlanInvocation() {
+ return productionPlanInvocationEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getProductionPlanInvocation_ProductionPlan() {
+ return (EReference) productionPlanInvocationEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FprodFactory getFprodFactory() {
+ return (FprodFactory) 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
+ productionPlanEClass = createEClass(PRODUCTION_PLAN);
+ createEReference(productionPlanEClass, PRODUCTION_PLAN__INVOCATIONS);
+
+ productionPlanInvocationEClass = createEClass(PRODUCTION_PLAN_INVOCATION);
+ createEReference(productionPlanInvocationEClass, PRODUCTION_PLAN_INVOCATION__PRODUCTION_PLAN);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized)
+ return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ FcorePackage theFcorePackage = (FcorePackage) EPackage.Registry.INSTANCE.getEPackage(FcorePackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ productionPlanEClass.getESuperTypes().add(theFcorePackage.getOrchestration());
+ productionPlanInvocationEClass.getESuperTypes().add(theFcorePackage.getInvocation());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(productionPlanEClass, ProductionPlan.class, "ProductionPlan", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getProductionPlan_Invocations(), this.getProductionPlanInvocation(), this.getProductionPlanInvocation_ProductionPlan(),
+ "invocations", null, 1, -1, ProductionPlan.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(productionPlanInvocationEClass, ProductionPlanInvocation.class, "ProductionPlanInvocation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getProductionPlanInvocation_ProductionPlan(), this.getProductionPlan(), this.getProductionPlan_Invocations(),
+ "productionPlan", null, 1, 1, ProductionPlanInvocation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ addEOperation(productionPlanInvocationEClass, theFcorePackage.getFactoryComponent(), "getFactoryComponent", 1, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} // FprodPackageImpl
diff --git a/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/impl/ProductionPlanImpl.java b/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/impl/ProductionPlanImpl.java
new file mode 100644
index 0000000..a5dafd8
--- /dev/null
+++ b/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/impl/ProductionPlanImpl.java
@@ -0,0 +1,183 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fprod.impl;
+
+import java.util.Collection;
+
+import org.eclipse.egf.model.fcore.impl.OrchestrationImpl;
+import org.eclipse.egf.model.fprod.FprodPackage;
+import org.eclipse.egf.model.fprod.ProductionPlan;
+import org.eclipse.egf.model.fprod.ProductionPlanInvocation;
+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.EObjectContainmentWithInverseEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Production Plan</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.fprod.impl.ProductionPlanImpl#getInvocations <em>Invocations</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ProductionPlanImpl extends OrchestrationImpl implements ProductionPlan {
+ /**
+ * A set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected int eFlags = 0;
+
+ /**
+ * The cached value of the '{@link #getInvocations() <em>Invocations</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getInvocations()
+ * @generated
+ * @ordered
+ */
+ protected EList<ProductionPlanInvocation> invocations;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ProductionPlanImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FprodPackage.Literals.PRODUCTION_PLAN;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public EList<ProductionPlanInvocation> getInvocations() {
+ if (invocations == null) {
+ invocations = new EObjectContainmentWithInverseEList<ProductionPlanInvocation>(ProductionPlanInvocation.class, this, FprodPackage.PRODUCTION_PLAN__INVOCATIONS, FprodPackage.PRODUCTION_PLAN_INVOCATION__PRODUCTION_PLAN);
+ }
+ return invocations;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FprodPackage.PRODUCTION_PLAN__INVOCATIONS:
+ return ((InternalEList<InternalEObject>) (InternalEList<?>) getInvocations()).basicAdd(otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FprodPackage.PRODUCTION_PLAN__INVOCATIONS:
+ return ((InternalEList<?>) getInvocations()).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 FprodPackage.PRODUCTION_PLAN__INVOCATIONS:
+ return getInvocations();
+ }
+ 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 FprodPackage.PRODUCTION_PLAN__INVOCATIONS:
+ getInvocations().clear();
+ getInvocations().addAll((Collection<? extends ProductionPlanInvocation>) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FprodPackage.PRODUCTION_PLAN__INVOCATIONS:
+ getInvocations().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FprodPackage.PRODUCTION_PLAN__INVOCATIONS:
+ return invocations != null && !invocations.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // ProductionPlanImpl
diff --git a/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/impl/ProductionPlanInvocationImpl.java b/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/impl/ProductionPlanInvocationImpl.java
new file mode 100644
index 0000000..b025bf0
--- /dev/null
+++ b/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/impl/ProductionPlanInvocationImpl.java
@@ -0,0 +1,230 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fprod.impl;
+
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.impl.InvocationImpl;
+import org.eclipse.egf.model.fprod.FprodPackage;
+import org.eclipse.egf.model.fprod.ProductionPlan;
+import org.eclipse.egf.model.fprod.ProductionPlanInvocation;
+import org.eclipse.egf.model.fprod.adapter.ProductionPlanInvocationAdapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Production Plan Invocation</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.fprod.impl.ProductionPlanInvocationImpl#getProductionPlan <em>Production Plan</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ProductionPlanInvocationImpl extends InvocationImpl implements ProductionPlanInvocation {
+ /**
+ * A set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected int eFlags = 0;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected ProductionPlanInvocationImpl() {
+ super();
+ new ProductionPlanInvocationAdapter(this);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FprodPackage.Literals.PRODUCTION_PLAN_INVOCATION;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public FactoryComponent getFactoryComponent() {
+ if (getProductionPlan() != null) {
+ return getProductionPlan().getFactoryComponent();
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ProductionPlan getProductionPlan() {
+ if (eContainerFeatureID() != FprodPackage.PRODUCTION_PLAN_INVOCATION__PRODUCTION_PLAN)
+ return null;
+ return (ProductionPlan) eContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetProductionPlan(ProductionPlan newProductionPlan, NotificationChain msgs) {
+ msgs = eBasicSetContainer((InternalEObject) newProductionPlan, FprodPackage.PRODUCTION_PLAN_INVOCATION__PRODUCTION_PLAN, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setProductionPlan(ProductionPlan newProductionPlan) {
+ if (newProductionPlan != eInternalContainer() || (eContainerFeatureID() != FprodPackage.PRODUCTION_PLAN_INVOCATION__PRODUCTION_PLAN && newProductionPlan != null)) {
+ if (EcoreUtil.isAncestor(this, newProductionPlan))
+ throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); //$NON-NLS-1$
+ NotificationChain msgs = null;
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ if (newProductionPlan != null)
+ msgs = ((InternalEObject) newProductionPlan).eInverseAdd(this, FprodPackage.PRODUCTION_PLAN__INVOCATIONS, ProductionPlan.class, msgs);
+ msgs = basicSetProductionPlan(newProductionPlan, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ } else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FprodPackage.PRODUCTION_PLAN_INVOCATION__PRODUCTION_PLAN, newProductionPlan, newProductionPlan));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FprodPackage.PRODUCTION_PLAN_INVOCATION__PRODUCTION_PLAN:
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ return basicSetProductionPlan((ProductionPlan) otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FprodPackage.PRODUCTION_PLAN_INVOCATION__PRODUCTION_PLAN:
+ return basicSetProductionPlan(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
+ switch (eContainerFeatureID()) {
+ case FprodPackage.PRODUCTION_PLAN_INVOCATION__PRODUCTION_PLAN:
+ return eInternalContainer().eInverseRemove(this, FprodPackage.PRODUCTION_PLAN__INVOCATIONS, ProductionPlan.class, msgs);
+ }
+ return super.eBasicRemoveFromContainerFeature(msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FprodPackage.PRODUCTION_PLAN_INVOCATION__PRODUCTION_PLAN:
+ return getProductionPlan();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case FprodPackage.PRODUCTION_PLAN_INVOCATION__PRODUCTION_PLAN:
+ setProductionPlan((ProductionPlan) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FprodPackage.PRODUCTION_PLAN_INVOCATION__PRODUCTION_PLAN:
+ setProductionPlan((ProductionPlan) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FprodPackage.PRODUCTION_PLAN_INVOCATION__PRODUCTION_PLAN:
+ return getProductionPlan() != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // ProductionPlanInvocationImpl
diff --git a/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/util/FprodAdapterFactory.java b/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/util/FprodAdapterFactory.java
new file mode 100644
index 0000000..453a5d8
--- /dev/null
+++ b/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/util/FprodAdapterFactory.java
@@ -0,0 +1,242 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fprod.util;
+
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.egf.model.fcore.ModelElement;
+import org.eclipse.egf.model.fcore.NamedModelElement;
+import org.eclipse.egf.model.fcore.Orchestration;
+import org.eclipse.egf.model.fprod.FprodPackage;
+import org.eclipse.egf.model.fprod.ProductionPlan;
+import org.eclipse.egf.model.fprod.ProductionPlanInvocation;
+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;
+
+/**
+ * <!-- 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.egf.model.fprod.FprodPackage
+ * @generated
+ */
+public class FprodAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static FprodPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public FprodAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = FprodPackage.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 FprodSwitch<Adapter> modelSwitch = new FprodSwitch<Adapter>() {
+ @Override
+ public Adapter caseProductionPlan(ProductionPlan object) {
+ return createProductionPlanAdapter();
+ }
+
+ @Override
+ public Adapter caseProductionPlanInvocation(ProductionPlanInvocation object) {
+ return createProductionPlanInvocationAdapter();
+ }
+
+ @Override
+ public Adapter caseModelElement(ModelElement object) {
+ return createModelElementAdapter();
+ }
+
+ @Override
+ public Adapter caseOrchestration(Orchestration object) {
+ return createOrchestrationAdapter();
+ }
+
+ @Override
+ public Adapter caseNamedModelElement(NamedModelElement object) {
+ return createNamedModelElementAdapter();
+ }
+
+ @Override
+ public Adapter caseInvocation(Invocation object) {
+ return createInvocationAdapter();
+ }
+
+ @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.egf.model.fprod.ProductionPlan <em>Production Plan</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.egf.model.fprod.ProductionPlan
+ * @generated
+ */
+ public Adapter createProductionPlanAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fprod.ProductionPlanInvocation <em>Production Plan Invocation</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.egf.model.fprod.ProductionPlanInvocation
+ * @generated
+ */
+ public Adapter createProductionPlanInvocationAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fcore.ModelElement <em>Model Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.egf.model.fcore.ModelElement
+ * @generated
+ */
+ public Adapter createModelElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fcore.Orchestration <em>Orchestration</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.egf.model.fcore.Orchestration
+ * @generated
+ */
+ public Adapter createOrchestrationAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fcore.NamedModelElement <em>Named Model Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.egf.model.fcore.NamedModelElement
+ * @generated
+ */
+ public Adapter createNamedModelElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fcore.Invocation <em>Invocation</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.egf.model.fcore.Invocation
+ * @generated
+ */
+ public Adapter createInvocationAdapter() {
+ 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;
+ }
+
+} // FprodAdapterFactory
diff --git a/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/util/FprodResourceFactoryImpl.java b/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/util/FprodResourceFactoryImpl.java
new file mode 100644
index 0000000..f7afcbf
--- /dev/null
+++ b/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/util/FprodResourceFactoryImpl.java
@@ -0,0 +1,51 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fprod.util;
+
+import org.eclipse.emf.common.util.URI;
+
+import org.eclipse.emf.ecore.resource.Resource;
+
+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource Factory</b> associated with the package.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fprod.util.FprodResourceImpl
+ * @generated
+ */
+public class FprodResourceFactoryImpl extends ResourceFactoryImpl {
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FprodResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ Resource result = new FprodResourceImpl(uri);
+ return result;
+ }
+
+} //FprodResourceFactoryImpl
diff --git a/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/util/FprodResourceImpl.java b/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/util/FprodResourceImpl.java
new file mode 100644
index 0000000..fcd271e
--- /dev/null
+++ b/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/util/FprodResourceImpl.java
@@ -0,0 +1,168 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fprod.util;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.egf.model.uri.ModelSchemeAware;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.xmi.XMIResource;
+import org.eclipse.emf.ecore.xmi.XMLParserPool;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+import org.eclipse.emf.ecore.xmi.XMLSave.XMLTypeInfo;
+import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl;
+import org.eclipse.emf.ecore.xmi.impl.XMLParserPoolImpl;
+import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource </b> associated with the package.
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.egf.model.fprod.util.FprodResourceFactoryImpl
+ * @generated
+ */
+public class FprodResourceImpl extends XMIResourceImpl {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private List<Object> lookupTable = new ArrayList<Object>();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private XMLParserPool parserPool = new XMLParserPoolImpl();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private Map<Object, Object> nameToFeatureMap = new HashMap<Object, Object>();
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param uri
+ * the URI of the new resource.
+ * @generated
+ */
+ public FprodResourceImpl(URI uri) {
+ super(uri);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean useIDAttributes() {
+ return false;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean useUUIDs() {
+ return true;
+ }
+
+ /**
+ * Called when the object is unloaded.
+ * This implementation {@link InternalEObject#eSetProxyURI sets} the object to be a proxy
+ * and clears the {@link #eAdapters adapters}.
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=292866
+ * Fix available in HEAD: 2.6.0.I200911020144
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void unloaded(InternalEObject internalEObject) {
+ // Ensure that an unresolved containment proxy's URI isn't reset.
+ //
+ if (!internalEObject.eIsProxy()) {
+ internalEObject.eSetProxyURI(uri.appendFragment(getURIFragment(internalEObject)));
+ }
+ internalEObject.eAdapters().clear();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void init() {
+ super.init();
+ setTrackingModification(true);
+ setEncoding("UTF-8"); //$NON-NLS-1$
+ setXMIVersion("2.1"); //$NON-NLS-1$
+ // Save Options
+ getDefaultSaveOptions().put(XMLResource.OPTION_DISABLE_NOTIFY, Boolean.TRUE);
+ getDefaultSaveOptions().put(XMLResource.OPTION_CONFIGURATION_CACHE, Boolean.TRUE);
+ getDefaultSaveOptions().put(XMLResource.OPTION_USE_CACHED_LOOKUP_TABLE, lookupTable);
+ getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ getDefaultSaveOptions().put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
+ getDefaultSaveOptions().put(XMLResource.OPTION_SAVE_TYPE_INFORMATION, new XMLTypeInfo() {
+ public boolean shouldSaveType(EClass objectType, EClassifier featureType, EStructuralFeature feature) {
+ return objectType != featureType && objectType != XMLTypePackage.Literals.ANY_TYPE;
+ }
+
+ public boolean shouldSaveType(EClass objectType, EClass featureType, EStructuralFeature feature) {
+ return objectType != featureType && objectType != XMLTypePackage.Literals.ANY_TYPE;
+ }
+ });
+ getDefaultSaveOptions().put(XMLResource.OPTION_LINE_WIDTH, new Integer(80));
+ // Avoid relative paths from workspace resources to plugin resources.
+ getDefaultSaveOptions().put(XMLResource.OPTION_URI_HANDLER, new ModelSchemeAware());
+ getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ getDefaultSaveOptions().put(XMIResource.OPTION_USE_XMI_TYPE, Boolean.TRUE);
+ // Load Options
+ getDefaultLoadOptions().put(XMLResource.OPTION_DEFER_ATTACHMENT, Boolean.FALSE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_DEFER_IDREF_RESOLUTION, Boolean.FALSE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_DISABLE_NOTIFY, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_DEPRECATED_METHODS, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_PARSER_POOL, parserPool);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_XML_NAME_TO_FEATURE_MAP, nameToFeatureMap);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ }
+
+} // FprodResourceImpl
diff --git a/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/util/FprodSwitch.java b/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/util/FprodSwitch.java
new file mode 100644
index 0000000..248e8e6
--- /dev/null
+++ b/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/util/FprodSwitch.java
@@ -0,0 +1,252 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fprod.util;
+
+import java.util.List;
+
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.egf.model.fcore.ModelElement;
+import org.eclipse.egf.model.fcore.NamedModelElement;
+import org.eclipse.egf.model.fcore.Orchestration;
+import org.eclipse.egf.model.fprod.FprodPackage;
+import org.eclipse.egf.model.fprod.ProductionPlan;
+import org.eclipse.egf.model.fprod.ProductionPlanInvocation;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- 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.egf.model.fprod.FprodPackage
+ * @generated
+ */
+public class FprodSwitch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static FprodPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public FprodSwitch() {
+ if (modelPackage == null) {
+ modelPackage = FprodPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * 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
+ */
+ public T doSwitch(EObject theEObject) {
+ return doSwitch(theEObject.eClass(), theEObject);
+ }
+
+ /**
+ * 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
+ */
+ @SuppressWarnings("all")
+ protected T doSwitch(EClass theEClass, EObject theEObject) {
+ if (theEClass.eContainer() == modelPackage) {
+ return doSwitch(theEClass.getClassifierID(), theEObject);
+ } else {
+ List<EClass> eSuperTypes = theEClass.getESuperTypes();
+ return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject);
+ }
+ }
+
+ /**
+ * 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
+ */
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case FprodPackage.PRODUCTION_PLAN: {
+ ProductionPlan productionPlan = (ProductionPlan) theEObject;
+ T result = caseProductionPlan(productionPlan);
+ if (result == null)
+ result = caseOrchestration(productionPlan);
+ if (result == null)
+ result = caseModelElement(productionPlan);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case FprodPackage.PRODUCTION_PLAN_INVOCATION: {
+ ProductionPlanInvocation productionPlanInvocation = (ProductionPlanInvocation) theEObject;
+ T result = caseProductionPlanInvocation(productionPlanInvocation);
+ if (result == null)
+ result = caseInvocation(productionPlanInvocation);
+ if (result == null)
+ result = caseNamedModelElement(productionPlanInvocation);
+ if (result == null)
+ result = caseModelElement(productionPlanInvocation);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ default:
+ return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Production Plan</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>Production Plan</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseProductionPlan(ProductionPlan object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Production Plan Invocation</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>Production Plan Invocation</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseProductionPlanInvocation(ProductionPlanInvocation object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Model Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Model Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseModelElement(ModelElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Orchestration</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>Orchestration</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseOrchestration(Orchestration object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Named Model Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Named Model Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseNamedModelElement(NamedModelElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Invocation</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>Invocation</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseInvocation(Invocation 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
+ */
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} // FprodSwitch
diff --git a/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/util/FprodValidator.java b/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/util/FprodValidator.java
new file mode 100644
index 0000000..73df5d9
--- /dev/null
+++ b/org.eclipse.egf.model.fprod/generated/org/eclipse/egf/model/fprod/util/FprodValidator.java
@@ -0,0 +1,288 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fprod.util;
+
+import java.util.Map;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.egf.model.EGFFprodPlugin;
+import org.eclipse.egf.model.fcore.util.FcoreValidator;
+import org.eclipse.egf.model.fprod.FprodPackage;
+import org.eclipse.egf.model.fprod.ProductionPlan;
+import org.eclipse.egf.model.fprod.ProductionPlanInvocation;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.DiagnosticChain;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.util.EObjectValidator;
+import org.eclipse.emf.validation.model.EvaluationMode;
+import org.eclipse.emf.validation.model.IConstraintStatus;
+import org.eclipse.emf.validation.service.IBatchValidator;
+import org.eclipse.emf.validation.service.ModelValidationService;
+import org.eclipse.emf.validation.service.ITraversalStrategy.Recursive;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Validator</b> for the model.
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.egf.model.fprod.FprodPackage
+ * @generated
+ */
+public class FprodValidator extends EObjectValidator {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ public static final FprodValidator INSTANCE = new FprodValidator();
+
+ /**
+ * A constant for the {@link org.eclipse.emf.common.util.Diagnostic#getSource() source} of
+ * diagnostic {@link org.eclipse.emf.common.util.Diagnostic#getCode() codes} from this package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.common.util.Diagnostic#getSource()
+ * @see org.eclipse.emf.common.util.Diagnostic#getCode()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ public static final String DIAGNOSTIC_SOURCE = "org.eclipse.egf.model.fprod"; //$NON-NLS-1$
+
+ /**
+ * A constant with a fixed name that can be used as the base value for additional hand written
+ * constants.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static final int GENERATED_DIAGNOSTIC_CODE_COUNT = 0;
+
+ /**
+ * A constant with a fixed name that can be used as the base value for additional hand written
+ * constants in a derived class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static final int DIAGNOSTIC_CODE_COUNT = GENERATED_DIAGNOSTIC_CODE_COUNT;
+
+ /**
+ * Model Validation Service interface for batch validation of EMF elements.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private final IBatchValidator batchValidator;
+
+ /**
+ * The cached base package validator.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected FcoreValidator fcoreValidator;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public FprodValidator() {
+ super();
+ fcoreValidator = FcoreValidator.INSTANCE;
+ batchValidator = (IBatchValidator) ModelValidationService.getInstance().newValidator(EvaluationMode.BATCH);
+ batchValidator.setTraversalStrategy(new Recursive());
+ batchValidator.setIncludeLiveConstraints(true);
+ batchValidator.setReportSuccesses(false);
+ }
+
+ /**
+ * Returns the package of this validator switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EPackage getEPackage() {
+ return FprodPackage.eINSTANCE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean validate(EClass eClass, EObject eObject, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ IStatus status = Status.OK_STATUS;
+ // do whatever the basic EcoreValidator does
+ super.validate(eClass, eObject, diagnostics, context);
+ // no point in validating if we can't report results
+ if (diagnostics != null) {
+ // if EMF Mode Validation Service already covered the sub-tree,
+ // which it does for efficient computation and error reporting,
+ // then don't repeat (the Diagnostician does the recursion
+ // externally). If there is no context map, then we can't
+ // help it
+ if (hasProcessed(eObject, context) == false) {
+ status = batchValidator.validate(eObject, new NullProgressMonitor());
+ processed(eObject, context, status);
+ appendDiagnostics(status, diagnostics);
+ }
+ }
+ return status.isOK();
+ }
+
+ /**
+ * Calls <code>validateXXX</code> for the corresponding classifier of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean validate(int classifierID, Object value, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ switch (classifierID) {
+ case FprodPackage.PRODUCTION_PLAN:
+ return validateProductionPlan((ProductionPlan) value, diagnostics, context);
+ case FprodPackage.PRODUCTION_PLAN_INVOCATION:
+ return validateProductionPlanInvocation((ProductionPlanInvocation) value, diagnostics, context);
+ default:
+ return true;
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateProductionPlan(ProductionPlan productionPlan, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(productionPlan, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateProductionPlanInvocation(ProductionPlanInvocation productionPlanInvocation, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(productionPlanInvocation, diagnostics, context);
+ }
+
+ /**
+ * Returns the resource locator that will be used to fetch messages for this validator's
+ * diagnostics.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EGFFprodPlugin.INSTANCE;
+ }
+
+ /**
+ * If we have a context map, record this object's <code>status</code> in it
+ * so that we will know later that we have processed it and its sub-tree.
+ *
+ * @param eObject
+ * an element that we have validated
+ * @param context
+ * the context (may be <code>null</code>)
+ * @param status
+ * the element's validation status
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private void processed(EObject eObject, Map<Object, Object> context, IStatus status) {
+ if (context != null) {
+ context.put(eObject, status);
+ }
+ }
+
+ /**
+ * Determines whether we have processed this <code>eObject</code> before,
+ * by automatic recursion of the EMF Model Validation Service. This is
+ * only possible if we do, indeed, have a context.
+ *
+ * @param eObject
+ * an element to be validated (we hope not)
+ * @param context
+ * the context (may be <code>null</code>)
+ * @return <code>true</code> if the context is not <code>null</code> and
+ * the <code>eObject</code> or one of its containers has already been
+ * validated; <code>false</code>, otherwise
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean hasProcessed(EObject eObject, Map<Object, Object> context) {
+ boolean result = false;
+ if (context != null) {
+ // this is O(NlogN) but there's no helping it
+ while (eObject != null) {
+ if (context.containsKey(eObject)) {
+ result = true;
+ eObject = null;
+ } else {
+ eObject = eObject.eContainer();
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Converts a status result from the EMF validation service to diagnostics.
+ *
+ * @param status
+ * the EMF validation service's status result
+ * @param diagnostics
+ * a diagnostic chain to accumulate results on
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private void appendDiagnostics(IStatus status, DiagnosticChain diagnostics) {
+ if (status.isMultiStatus()) {
+ IStatus[] children = status.getChildren();
+ for (int i = 0; i < children.length; i++) {
+ appendDiagnostics(children[i], diagnostics);
+ }
+ } else if (status instanceof IConstraintStatus) {
+ diagnostics.add(new BasicDiagnostic(status.getSeverity(), status.getPlugin(), status.getCode(), status.getMessage(), ((IConstraintStatus) status).getResultLocus().toArray()));
+ }
+ }
+} // FprodValidator
diff --git a/org.eclipse.egf.model.fprod/model/Fprod.ecore b/org.eclipse.egf.model.fprod/model/Fprod.ecore
new file mode 100644
index 0000000..c7bf130
--- /dev/null
+++ b/org.eclipse.egf.model.fprod/model/Fprod.ecore
@@ -0,0 +1,16 @@
+<?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="fprod"
+ nsURI="http://www.eclipse.org/egf/1.0.0/fprod" nsPrefix="fprod">
+ <eClassifiers xsi:type="ecore:EClass" name="ProductionPlan" eSuperTypes="../../org.eclipse.egf.model/model/Fcore.ecore#//Orchestration">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="invocations" lowerBound="1"
+ upperBound="-1" eType="#//ProductionPlanInvocation" containment="true" resolveProxies="false"
+ eOpposite="#//ProductionPlanInvocation/productionPlan"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ProductionPlanInvocation" eSuperTypes="../../org.eclipse.egf.model/model/Fcore.ecore#//Invocation">
+ <eOperations name="getFactoryComponent" lowerBound="1" eType="ecore:EClass ../../org.eclipse.egf.model/model/Fcore.ecore#//FactoryComponent"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="productionPlan" lowerBound="1"
+ eType="#//ProductionPlan" resolveProxies="false" eOpposite="#//ProductionPlan/invocations"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/org.eclipse.egf.model.fprod/model/Fprod.genmodel b/org.eclipse.egf.model.fprod/model/Fprod.genmodel
new file mode 100644
index 0000000..4a20e89
--- /dev/null
+++ b/org.eclipse.egf.model.fprod/model/Fprod.genmodel
@@ -0,0 +1,29 @@
+<?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.egf.model.fprod/generated"
+ editDirectory="/org.eclipse.egf.model.fprod.edit/generated" editorDirectory="/org.eclipse.egf.model.fprod.editor/generated"
+ modelPluginID="org.eclipse.egf.model.fprod" templateDirectory="/org.eclipse.egf.model/templates"
+ dynamicTemplates="true" modelName="Fprod" modelPluginClass="org.eclipse.egf.model.EGFFprodPlugin"
+ editPluginClass="org.eclipse.egf.model.edit.EGFFprodEditPlugin" editorPluginClass="org.eclipse.egf.model.editor.EGFFprodEditorPlugin"
+ nonNLSMarkers="true" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl.Container"
+ codeFormatting="true" testsDirectory="/org.eclipse.egf.model.tests/generated"
+ booleanFlagsField="eFlags" importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0"
+ copyrightFields="false" editPluginID="org.eclipse.egf.model.fprod.edit" editorPluginID="org.eclipse.egf.model.fprod.editor"
+ optimizedHasChildren="true" tableProviders="true" colorProviders="true" fontProviders="true"
+ packedEnums="true" usedGenPackages="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore ../../org.eclipse.egf.model/model/Fcore.genmodel#//fcore ../../org.eclipse.egf.model/model/Types.genmodel#//types">
+ <foreignModel>Fprod.ecore</foreignModel>
+ <templatePluginVariables>org.eclipse.egf.model</templatePluginVariables>
+ <genPackages prefix="Fprod" basePackage="org.eclipse.egf.model" resource="XMI" disposableProviderFactory="true"
+ generateExampleClass="false" dataTypeConverters="true" multipleEditorPages="false"
+ extensibleProviderFactory="true" childCreationExtenders="true" contentTypeIdentifier=""
+ fileExtensions="fprod" ecorePackage="Fprod.ecore#/">
+ <genClasses ecoreClass="Fprod.ecore#//ProductionPlan">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Fprod.ecore#//ProductionPlan/invocations"/>
+ </genClasses>
+ <genClasses ecoreClass="Fprod.ecore#//ProductionPlanInvocation">
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference Fprod.ecore#//ProductionPlanInvocation/productionPlan"/>
+ <genOperations ecoreOperation="Fprod.ecore#//ProductionPlanInvocation/getFactoryComponent"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/org.eclipse.egf.model.fprod/plugin.properties b/org.eclipse.egf.model.fprod/plugin.properties
new file mode 100644
index 0000000..e18fab9
--- /dev/null
+++ b/org.eclipse.egf.model.fprod/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 Factory Production Model (Incubation)
+providerName = Eclipse Modeling Project
diff --git a/org.eclipse.egf.model.fprod/plugin.xml b/org.eclipse.egf.model.fprod/plugin.xml
new file mode 100644
index 0000000..f271695
--- /dev/null
+++ b/org.eclipse.egf.model.fprod/plugin.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+
+<!--
+
+ 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>
+
+ <!-- ================================================================================= -->
+ <!-- Factory Production Model -->
+ <!-- ================================================================================= -->
+
+ <extension
+ point="org.eclipse.emf.ecore.generated_package"
+ >
+ <package
+ uri="http://www.eclipse.org/egf/1.0.0/fprod"
+ class="org.eclipse.egf.model.fprod.FprodPackage"
+ genModel="model/Fprod.genmodel"
+ />
+ </extension>
+
+ <extension
+ point="org.eclipse.emf.ecore.extension_parser"
+ >
+ <parser
+ type="fprod"
+ class="org.eclipse.egf.model.fprod.util.FprodResourceFactoryImpl"
+ />
+ </extension>
+
+</plugin>
diff --git a/org.eclipse.egf.model.fprod/src/org/eclipse/egf/model/fprod/adapter/ProductionPlanInvocationAdapter.java b/org.eclipse.egf.model.fprod/src/org/eclipse/egf/model/fprod/adapter/ProductionPlanInvocationAdapter.java
new file mode 100644
index 0000000..2f01e8d
--- /dev/null
+++ b/org.eclipse.egf.model.fprod/src/org/eclipse/egf/model/fprod/adapter/ProductionPlanInvocationAdapter.java
@@ -0,0 +1,142 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.model.fprod.adapter;
+
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.core.fcore.IPlatformFcore;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fprod.ProductionPlanInvocation;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.common.notify.impl.NotificationImpl;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.impl.ResourceImpl;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class ProductionPlanInvocationAdapter extends AdapterImpl {
+
+ private ProductionPlanInvocation _productionPlanInvocation;
+
+ private Activity _activity;
+
+ private EStructuralFeature _nameFeature = FcorePackage.Literals.NAMED_MODEL_ELEMENT__NAME;
+
+ private EStructuralFeature _invocationInvokedActivityFeature = FcorePackage.Literals.INVOCATION__INVOKED_ACTIVITY;
+
+ private AdapterImpl _activityAdapter = new AdapterImpl() {
+ @Override
+ public void notifyChanged(Notification notification) {
+ if (notification.getEventType() == Notification.SET && notification.getFeature().equals(_nameFeature)) {
+ _productionPlanInvocation.eNotify(new ENotificationImpl((InternalEObject) _productionPlanInvocation, -1, _invocationInvokedActivityFeature, null, null) {
+ @Override
+ public boolean isTouch() {
+ return true;
+ }
+ });
+ }
+ // else if (notification.getEventType() == Notification.REMOVING_ADAPTER) {
+ // if (_activity != null) {
+ // // Unload this proxy
+ // ((InternalEObject) _activity).eSetProxyURI(EcoreUtil.getURI(_activity));
+ // }
+ // }
+ }
+ };
+
+ private AdapterImpl _activityResourceAdapter = new AdapterImpl() {
+ @Override
+ public void notifyChanged(final Notification notification) {
+ // URI update while moving a resource
+ if (notification.getEventType() == Notification.SET) {
+ switch (notification.getFeatureID(Resource.class)) {
+ case Resource.RESOURCE__URI: {
+ if (_productionPlanInvocation.eResource() != null) {
+ final ResourceImpl resource = (ResourceImpl) _productionPlanInvocation.eResource();
+ IPlatformFcore fcore = EGFCorePlugin.getPlatformFcore(resource);
+ // target fcore can't be modified, give a chance to read only workspace resource to do something
+ if (fcore != null && fcore.getPlatformBundle().isTarget() == false) {
+ resource.setModified(true);
+ if (resource.eNotificationRequired()) {
+ Notification innerNotification = new NotificationImpl(Notification.SET, notification.getOldValue(), notification.getOldValue()) {
+ @Override
+ public Object getFeature() {
+ return notification.getNotifier();
+ }
+
+ @Override
+ public Object getNotifier() {
+ return resource;
+ }
+
+ @Override
+ public int getFeatureID(Class<?> expectedClass) {
+ return Resource.RESOURCE__URI;
+ }
+ };
+ resource.eNotify(innerNotification);
+ }
+ }
+ }
+ break;
+ }
+ }
+ }
+ }
+ };
+
+ public ProductionPlanInvocationAdapter(ProductionPlanInvocation productionPlanInvocation) {
+ super();
+ _productionPlanInvocation = productionPlanInvocation;
+ _productionPlanInvocation.eAdapters().add(this);
+ }
+
+ @Override
+ public void notifyChanged(Notification notification) {
+ if (notification.getFeature() == null || notification.getFeature().equals(_invocationInvokedActivityFeature)) {
+ switch (notification.getEventType()) {
+ case Notification.RESOLVE:
+ final Activity newValue = (Activity) notification.getNewValue();
+ final Activity oldValue = (Activity) notification.getOldValue();
+ if (oldValue != null) {
+ if (oldValue.eResource() != null) {
+ oldValue.eResource().eAdapters().remove(_activityResourceAdapter);
+ }
+ oldValue.eAdapters().remove(_activityAdapter);
+ }
+ if (newValue != null) {
+ if (newValue.eResource() != null && newValue.eResource().eAdapters().contains(_activityResourceAdapter) == false) {
+ newValue.eResource().eAdapters().add(_activityResourceAdapter);
+ }
+ if (newValue.eAdapters().contains(_activityAdapter) == false) {
+ newValue.eAdapters().add(_activityAdapter);
+ }
+ }
+ _activity = newValue;
+ break;
+ case Notification.REMOVING_ADAPTER:
+ if (_activity != null) {
+ _activity.eAdapters().remove(_activityAdapter);
+ }
+ break;
+ default:
+ return; // No notification
+ }
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.model.ftask.edit/.classpath b/org.eclipse.egf.model.ftask.edit/.classpath
new file mode 100644
index 0000000..bb091d7
--- /dev/null
+++ b/org.eclipse.egf.model.ftask.edit/.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/org.eclipse.egf.model.ftask.edit/.project b/org.eclipse.egf.model.ftask.edit/.project
new file mode 100644
index 0000000..4c3df00
--- /dev/null
+++ b/org.eclipse.egf.model.ftask.edit/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.model.ftask.edit</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.model.ftask.edit/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egf.model.ftask.edit/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..6db7233
--- /dev/null
+++ b/org.eclipse.egf.model.ftask.edit/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:52:35 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.egf.model.ftask.edit/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egf.model.ftask.edit/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..72800f8
--- /dev/null
+++ b/org.eclipse.egf.model.ftask.edit/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Wed Jan 06 14:49:15 CET 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/org.eclipse.egf.model.ftask.edit/META-INF/MANIFEST.MF b/org.eclipse.egf.model.ftask.edit/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..681f005
--- /dev/null
+++ b/org.eclipse.egf.model.ftask.edit/META-INF/MANIFEST.MF
@@ -0,0 +1,20 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.model.ftask.edit;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.egf.model.edit.EGFFtaskEditPlugin$Implementation
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.egf.model.edit,
+ org.eclipse.egf.model.ftask.provider
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.egf.model.ftask;visibility:=reexport,
+ org.eclipse.emf.edit;visibility:=reexport,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.emf.ecore.edit;visibility:=reexport,
+ org.eclipse.egf.model;visibility:=reexport,
+ org.eclipse.egf.model.edit;visibility:=reexport
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.egf.model.ftask.edit/about.html b/org.eclipse.egf.model.ftask.edit/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/org.eclipse.egf.model.ftask.edit/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/org.eclipse.egf.model.ftask.edit/build.properties b/org.eclipse.egf.model.ftask.edit/build.properties
new file mode 100644
index 0000000..bf49c84
--- /dev/null
+++ b/org.eclipse.egf.model.ftask.edit/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+source.. = generated/,\
+ src/
+output.. = bin/
+bin.includes = .,\
+ icons/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties
+src.includes = about.html
diff --git a/org.eclipse.egf.model.ftask.edit/generated/org/eclipse/egf/model/edit/EGFFtaskEditPlugin.java b/org.eclipse.egf.model.ftask.edit/generated/org/eclipse/egf/model/edit/EGFFtaskEditPlugin.java
new file mode 100644
index 0000000..f8626ec
--- /dev/null
+++ b/org.eclipse.egf.model.ftask.edit/generated/org/eclipse/egf/model/edit/EGFFtaskEditPlugin.java
@@ -0,0 +1,101 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.edit;
+
+import org.eclipse.egf.common.activator.EGFEclipsePlugin;
+
+import org.eclipse.emf.common.EMFPlugin;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.provider.EcoreEditPlugin;
+
+/**
+ * This is the central singleton for the Ftask edit plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class EGFFtaskEditPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final EGFFtaskEditPlugin INSTANCE = new EGFFtaskEditPlugin();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EGFFtaskEditPlugin() {
+ super(new ResourceLocator[] { EcoreEditPlugin.INSTANCE, EGFModelEditPlugin.INSTANCE, });
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends EGFEclipsePlugin {
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.model.ftask.edit/generated/org/eclipse/egf/model/ftask/provider/FtaskItemProviderAdapterFactory.java b/org.eclipse.egf.model.ftask.edit/generated/org/eclipse/egf/model/ftask/provider/FtaskItemProviderAdapterFactory.java
new file mode 100644
index 0000000..75b36c7
--- /dev/null
+++ b/org.eclipse.egf.model.ftask.edit/generated/org/eclipse/egf/model/ftask/provider/FtaskItemProviderAdapterFactory.java
@@ -0,0 +1,266 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.ftask.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.edit.EGFFtaskEditPlugin;
+
+import org.eclipse.egf.model.ftask.FtaskPackage;
+
+import org.eclipse.egf.model.ftask.util.FtaskAdapterFactory;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.domain.EditingDomain;
+
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ChildCreationExtenderManager;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IChildCreationExtender;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class FtaskItemProviderAdapterFactory extends FtaskAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable, IChildCreationExtender {
+ /**
+ * This keeps track of the root adapter factory that delegates to this adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ComposedAdapterFactory parentAdapterFactory;
+
+ /**
+ * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+ /**
+ * This helps manage the child creation extenders.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ChildCreationExtenderManager childCreationExtenderManager = new ChildCreationExtenderManager(EGFFtaskEditPlugin.INSTANCE, FtaskPackage.eNS_URI);
+
+ /**
+ * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+ /**
+ * This constructs an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FtaskItemProviderAdapterFactory() {
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ supportedTypes.add(IItemPropertySource.class);
+ supportedTypes.add(ITableItemLabelProvider.class);
+ supportedTypes.add(ITableItemColorProvider.class);
+ supportedTypes.add(ITableItemFontProvider.class);
+ supportedTypes.add(IItemColorProvider.class);
+ supportedTypes.add(IItemFontProvider.class);
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.ftask.Task} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TaskItemProvider taskItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.ftask.Task}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createTaskAdapter() {
+ if (taskItemProvider == null) {
+ taskItemProvider = new TaskItemProvider(this);
+ }
+
+ return taskItemProvider;
+ }
+
+ /**
+ * This returns the root adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ComposeableAdapterFactory getRootAdapterFactory() {
+ return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+ }
+
+ /**
+ * This sets the composed adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
+ this.parentAdapterFactory = parentAdapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return supportedTypes.contains(type) || super.isFactoryForType(type);
+ }
+
+ /**
+ * This implementation substitutes the factory itself as the key for the adapter.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter adapt(Notifier notifier, Object type) {
+ return super.adapt(notifier, this);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object adapt(Object object, Object type) {
+ if (isFactoryForType(type)) {
+ Object adapter = super.adapt(object, type);
+ if (!(type instanceof Class<?>) || (((Class<?>) type).isInstance(adapter))) {
+ return adapter;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List<IChildCreationExtender> getChildCreationExtenders() {
+ return childCreationExtenderManager.getChildCreationExtenders();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Collection<?> getNewChildDescriptors(Object object, EditingDomain editingDomain) {
+ return childCreationExtenderManager.getNewChildDescriptors(object, editingDomain);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceLocator getResourceLocator() {
+ return childCreationExtenderManager;
+ }
+
+ /**
+ * This adds a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void addListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void fireNotifyChanged(Notification notification) {
+ changeNotifier.fireNotifyChanged(notification);
+
+ if (parentAdapterFactory != null) {
+ parentAdapterFactory.fireNotifyChanged(notification);
+ }
+ }
+
+ /**
+ * This disposes all of the item providers created by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void dispose() {
+ if (taskItemProvider != null)
+ taskItemProvider.dispose();
+ }
+
+}
diff --git a/org.eclipse.egf.model.ftask.edit/generated/org/eclipse/egf/model/ftask/provider/TaskItemProvider.java b/org.eclipse.egf.model.ftask.edit/generated/org/eclipse/egf/model/ftask/provider/TaskItemProvider.java
new file mode 100644
index 0000000..7e79044
--- /dev/null
+++ b/org.eclipse.egf.model.ftask.edit/generated/org/eclipse/egf/model/ftask/provider/TaskItemProvider.java
@@ -0,0 +1,207 @@
+/**
+ *
+ * Copyright (c) 2009 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
+ *
+ */
+package org.eclipse.egf.model.ftask.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.common.helper.StringHelper;
+import org.eclipse.egf.model.fcore.provider.ActivityItemProvider;
+import org.eclipse.egf.model.ftask.FtaskPackage;
+import org.eclipse.egf.model.ftask.Task;
+import org.eclipse.egf.model.ftask.task.TaskHook;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.edit.command.CreateChildCommand;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.ftask.Task} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TaskItemProvider extends ActivityItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TaskItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addKindPropertyDescriptor(object);
+ addImplementationPropertyDescriptor(object);
+ addSuperTaskPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Kind feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected void addKindPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Task_kind_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Task_kind_feature", "_UI_Task_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ FtaskPackage.Literals.TASK__KIND, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null) {
+ @Override
+ public Collection<String> getChoiceOfValues(Object innerObject) {
+ Collection<String> result = TaskHook.HELPER.getKinds();
+ if (result.contains(null) == false) {
+ result.add(null);
+ }
+ return result;
+ }
+ });
+ }
+
+ /**
+ * This adds a property descriptor for the Implementation feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addImplementationPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Task_implementation_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Task_implementation_feature", "_UI_Task_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ FtaskPackage.Literals.TASK__IMPLEMENTATION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Super Task feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addSuperTaskPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Task_superTask_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Task_superTask_feature", "_UI_Task_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ FtaskPackage.Literals.TASK__SUPER_TASK, true, false, true, null, null, null));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ Task task = (Task) object;
+ String label = task.getName();
+ String type = "[" + getString("_UI_Task_type"); //$NON-NLS-1$ //$NON-NLS-2$
+ if (task.getKind() != null && task.getKind().trim().length() > 0) {
+ type = type + " " + StringHelper.toUpperFirst(task.getKind()); //$NON-NLS-1$
+ }
+ type = type + "]"; //$NON-NLS-1$
+ return label == null || label.length() == 0 ? type : label + " " + type; //$NON-NLS-1$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Task.class)) {
+ case FtaskPackage.TASK__KIND:
+ case FtaskPackage.TASK__IMPLEMENTATION:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * This returns Task.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Task")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label for {@link CreateChildCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) {
+ if (owner instanceof Resource) {
+ Task task = (Task) child;
+ String label = task.getName();
+ String type = getString("_UI_Task_type"); //$NON-NLS-1$
+ if (task.getKind() != null && task.getKind().trim().length() > 0) {
+ type = type + " " + StringHelper.toUpperFirst(task.getKind()); //$NON-NLS-1$
+ }
+ return label == null || label.length() == 0 ? type : label + " " + type; //$NON-NLS-1$ }
+ }
+ return super.getCreateChildText(owner, feature, child, selection);
+
+ }
+
+}
diff --git a/org.eclipse.egf.model.ftask.edit/icons/full/ctool16/CreateTask.gif b/org.eclipse.egf.model.ftask.edit/icons/full/ctool16/CreateTask.gif
new file mode 100644
index 0000000..4cba78e
--- /dev/null
+++ b/org.eclipse.egf.model.ftask.edit/icons/full/ctool16/CreateTask.gif
Binary files differ
diff --git a/org.eclipse.egf.model.ftask.edit/icons/full/obj16/Task.gif b/org.eclipse.egf.model.ftask.edit/icons/full/obj16/Task.gif
new file mode 100644
index 0000000..39ee592
--- /dev/null
+++ b/org.eclipse.egf.model.ftask.edit/icons/full/obj16/Task.gif
Binary files differ
diff --git a/org.eclipse.egf.model.ftask.edit/plugin.properties b/org.eclipse.egf.model.ftask.edit/plugin.properties
new file mode 100644
index 0000000..b077f0d
--- /dev/null
+++ b/org.eclipse.egf.model.ftask.edit/plugin.properties
@@ -0,0 +1,36 @@
+
+##
+# 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 Factory Task Model Edit (Incubation)
+providerName = Eclipse Modeling Project
+
+_UI_CreateChild_text = {0}
+_UI_CreateChild_text2 = {1} {0}
+_UI_CreateChild_text3 = {1}
+_UI_CreateChild_tooltip = Create New {0} Under {1} Feature
+_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}.
+_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
+
+_UI_PropertyDescriptor_description = The {0} of the {1}
+
+_UI_Task_type = Task
+_UI_Unknown_type = Object
+
+_UI_Unknown_datatype= Value
+
+_UI_TaskJava_value_feature = Value
+_UI_Unknown_feature = Unspecified
+
+_UI_DataPropertyCategory = Data
+_UI_Task_kind_feature = Kind
+_UI_Task_implementation_feature = Implementation
+_UI_Task_superTask_feature = Super Task
diff --git a/org.eclipse.egf.model.ftask.edit/plugin.xml b/org.eclipse.egf.model.ftask.edit/plugin.xml
new file mode 100644
index 0000000..e7baea8
--- /dev/null
+++ b/org.eclipse.egf.model.ftask.edit/plugin.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+
+<!--
+
+ 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
+
+ $Id$
+-->
+
+<plugin>
+
+ <extension
+ point="org.eclipse.emf.edit.itemProviderAdapterFactories"
+ >
+ <factory
+ uri="http://www.eclipse.org/egf/1.0.0/ftask"
+ class="org.eclipse.egf.model.ftask.provider.FtaskItemProviderAdapterFactory"
+ supportedTypes=
+ "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+ org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+ org.eclipse.emf.edit.provider.ITreeItemContentProvider
+ org.eclipse.emf.edit.provider.IItemLabelProvider
+ org.eclipse.emf.edit.provider.IItemPropertySource
+ org.eclipse.emf.edit.provider.ITableItemLabelProvider
+ org.eclipse.emf.edit.provider.ITableItemColorProvider
+ org.eclipse.emf.edit.provider.ITableItemFontProvider
+ org.eclipse.emf.edit.provider.IItemColorProvider
+ org.eclipse.emf.edit.provider.IItemFontProvider"
+ />
+ </extension>
+
+ <extension
+ point="org.eclipse.emf.edit.childCreationExtenders"
+ >
+ <extender
+ uri="org.eclipse.egf.model.fcore.util"
+ class="org.eclipse.egf.model.ftask.provider.FcoreResourceChildCreationExtender"
+ />
+ </extension>
+
+</plugin>
diff --git a/org.eclipse.egf.model.ftask.edit/src/org/eclipse/egf/model/ftask/provider/FcoreResourceChildCreationExtender.java b/org.eclipse.egf.model.ftask.edit/src/org/eclipse/egf/model/ftask/provider/FcoreResourceChildCreationExtender.java
new file mode 100644
index 0000000..8f4d635
--- /dev/null
+++ b/org.eclipse.egf.model.ftask.edit/src/org/eclipse/egf/model/ftask/provider/FcoreResourceChildCreationExtender.java
@@ -0,0 +1,65 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.model.ftask.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.egf.model.edit.EGFFtaskEditPlugin;
+import org.eclipse.egf.model.fcore.provider.IResourceChildCreationExtender;
+import org.eclipse.egf.model.fcore.util.FcoreResourceImpl;
+import org.eclipse.egf.model.ftask.FtaskFactory;
+import org.eclipse.egf.model.ftask.FtaskPackage;
+import org.eclipse.egf.model.ftask.Task;
+import org.eclipse.egf.model.ftask.task.TaskHook;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.common.util.UniqueEList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.edit.command.CommandParameter;
+import org.eclipse.emf.edit.domain.EditingDomain;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+/**
+ * A child creation extender for the {@link FcoreResourceImpl}.
+ */
+public class FcoreResourceChildCreationExtender implements IResourceChildCreationExtender {
+
+ protected Collection<EClass> _roots;
+
+ public Collection<EClass> getRoots() {
+ if (_roots == null) {
+ _roots = new UniqueEList<EClass>();
+ _roots.add(FtaskPackage.Literals.TASK);
+ }
+ return _roots;
+ }
+
+ public Collection<Object> getNewChildDescriptors(Object object, EditingDomain editingDomain) {
+ ArrayList<Object> newChildDescriptors = new ArrayList<Object>();
+ for (String kind : TaskHook.HELPER.getKinds()) {
+ Task task = FtaskFactory.eINSTANCE.createTask();
+ task.setKind(kind);
+ newChildDescriptors.add(createChildParameter(FtaskPackage.Literals.TASK, task));
+ }
+ return newChildDescriptors;
+ }
+
+ protected CommandParameter createChildParameter(Object feature, Object child) {
+ return new CommandParameter(null, feature, child);
+ }
+
+ public ResourceLocator getResourceLocator() {
+ return EGFFtaskEditPlugin.INSTANCE;
+ }
+}
diff --git a/org.eclipse.egf.model.ftask/.classpath b/org.eclipse.egf.model.ftask/.classpath
new file mode 100644
index 0000000..b9259d1
--- /dev/null
+++ b/org.eclipse.egf.model.ftask/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="generated"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.egf.model.ftask/.project b/org.eclipse.egf.model.ftask/.project
new file mode 100644
index 0000000..bbda9d3
--- /dev/null
+++ b/org.eclipse.egf.model.ftask/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.model.ftask</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.model.ftask/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egf.model.ftask/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..43d0a94
--- /dev/null
+++ b/org.eclipse.egf.model.ftask/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:52:26 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.egf.model.ftask/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egf.model.ftask/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..558175e
--- /dev/null
+++ b/org.eclipse.egf.model.ftask/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Tue Jun 23 10:09:24 CEST 2009
+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/org.eclipse.egf.model.ftask/META-INF/MANIFEST.MF b/org.eclipse.egf.model.ftask/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..bda1541
--- /dev/null
+++ b/org.eclipse.egf.model.ftask/META-INF/MANIFEST.MF
@@ -0,0 +1,26 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.model.ftask;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.egf.model.EGFFtaskPlugin$Implementation
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package:
+ org.eclipse.egf.ftask.producer.context,
+ org.eclipse.egf.ftask.producer.invocation,
+ org.eclipse.egf.model,
+ org.eclipse.egf.model.ftask,
+ org.eclipse.egf.model.ftask.impl,
+ org.eclipse.egf.model.ftask.util,
+ org.eclipse.egf.model.ftask.task
+Require-Bundle:
+ org.eclipse.core.runtime,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.emf.ecore.xmi;visibility:=reexport,
+ org.eclipse.egf.core;visibility:=reexport,
+ org.eclipse.egf.model;visibility:=reexport,
+ org.eclipse.egf.producer;visibility:=reexport
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.egf.model.ftask/about.html b/org.eclipse.egf.model.ftask/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/org.eclipse.egf.model.ftask/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/org.eclipse.egf.model.ftask/build.properties b/org.eclipse.egf.model.ftask/build.properties
new file mode 100644
index 0000000..7281526
--- /dev/null
+++ b/org.eclipse.egf.model.ftask/build.properties
@@ -0,0 +1,21 @@
+##
+# 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
+##
+source.. = generated/,\
+ src/
+output.. = bin/
+bin.includes = .,\
+ model/,\
+ schema/,\
+ META-INF/,\
+ about.html,\
+ plugin.xml,\
+ plugin.properties
+src.includes = about.html
diff --git a/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/EGFFtaskPlugin.java b/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/EGFFtaskPlugin.java
new file mode 100644
index 0000000..6cba2ec
--- /dev/null
+++ b/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/EGFFtaskPlugin.java
@@ -0,0 +1,99 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model;
+
+import org.eclipse.egf.common.activator.EGFEclipsePlugin;
+
+import org.eclipse.emf.common.EMFPlugin;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * This is the central singleton for the Ftask model plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class EGFFtaskPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final EGFFtaskPlugin INSTANCE = new EGFFtaskPlugin();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EGFFtaskPlugin() {
+ super(new ResourceLocator[] {});
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends EGFEclipsePlugin {
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/ftask/FtaskFactory.java b/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/ftask/FtaskFactory.java
new file mode 100644
index 0000000..be2f879
--- /dev/null
+++ b/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/ftask/FtaskFactory.java
@@ -0,0 +1,52 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.ftask;
+
+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.egf.model.ftask.FtaskPackage
+ * @generated
+ */
+public interface FtaskFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ FtaskFactory eINSTANCE = org.eclipse.egf.model.ftask.impl.FtaskFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Task</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Task</em>'.
+ * @generated
+ */
+ Task createTask();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ FtaskPackage getFtaskPackage();
+
+} //FtaskFactory
diff --git a/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/ftask/FtaskPackage.java b/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/ftask/FtaskPackage.java
new file mode 100644
index 0000000..8d74c29
--- /dev/null
+++ b/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/ftask/FtaskPackage.java
@@ -0,0 +1,256 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.ftask;
+
+import org.eclipse.egf.model.fcore.FcorePackage;
+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 enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.ftask.FtaskFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface FtaskPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "ftask"; //$NON-NLS-1$
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/egf/1.0.0/ftask"; //$NON-NLS-1$
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "ftask"; //$NON-NLS-1$
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ FtaskPackage eINSTANCE = org.eclipse.egf.model.ftask.impl.FtaskPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.ftask.impl.TaskImpl <em>Task</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.ftask.impl.TaskImpl
+ * @see org.eclipse.egf.model.ftask.impl.FtaskPackageImpl#getTask()
+ * @generated
+ */
+ int TASK = 0;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TASK__ID = FcorePackage.ACTIVITY__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TASK__DESCRIPTION = FcorePackage.ACTIVITY__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TASK__NAME = FcorePackage.ACTIVITY__NAME;
+
+ /**
+ * The feature id for the '<em><b>Contract Container</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TASK__CONTRACT_CONTAINER = FcorePackage.ACTIVITY__CONTRACT_CONTAINER;
+
+ /**
+ * The feature id for the '<em><b>Kind</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TASK__KIND = FcorePackage.ACTIVITY_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Implementation</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TASK__IMPLEMENTATION = FcorePackage.ACTIVITY_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Super Task</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TASK__SUPER_TASK = FcorePackage.ACTIVITY_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the '<em>Task</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TASK_FEATURE_COUNT = FcorePackage.ACTIVITY_FEATURE_COUNT + 3;
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.ftask.Task <em>Task</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Task</em>'.
+ * @see org.eclipse.egf.model.ftask.Task
+ * @generated
+ */
+ EClass getTask();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.egf.model.ftask.Task#getKind <em>Kind</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Kind</em>'.
+ * @see org.eclipse.egf.model.ftask.Task#getKind()
+ * @see #getTask()
+ * @generated
+ */
+ EAttribute getTask_Kind();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.egf.model.ftask.Task#getImplementation <em>Implementation</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Implementation</em>'.
+ * @see org.eclipse.egf.model.ftask.Task#getImplementation()
+ * @see #getTask()
+ * @generated
+ */
+ EAttribute getTask_Implementation();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.egf.model.ftask.Task#getSuperTask <em>Super Task</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Super Task</em>'.
+ * @see org.eclipse.egf.model.ftask.Task#getSuperTask()
+ * @see #getTask()
+ * @generated
+ */
+ EReference getTask_SuperTask();
+
+ /**
+ * 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
+ */
+ FtaskFactory getFtaskFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.ftask.impl.TaskImpl <em>Task</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.ftask.impl.TaskImpl
+ * @see org.eclipse.egf.model.ftask.impl.FtaskPackageImpl#getTask()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass TASK = eINSTANCE.getTask();
+
+ /**
+ * The meta object literal for the '<em><b>Kind</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EAttribute TASK__KIND = eINSTANCE.getTask_Kind();
+
+ /**
+ * The meta object literal for the '<em><b>Implementation</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EAttribute TASK__IMPLEMENTATION = eINSTANCE.getTask_Implementation();
+
+ /**
+ * The meta object literal for the '<em><b>Super Task</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference TASK__SUPER_TASK = eINSTANCE.getTask_SuperTask();
+
+ }
+
+} // FtaskPackage
diff --git a/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/ftask/Task.java b/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/ftask/Task.java
new file mode 100644
index 0000000..fee3e85
--- /dev/null
+++ b/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/ftask/Task.java
@@ -0,0 +1,131 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.ftask;
+
+import org.eclipse.egf.model.fcore.Activity;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Task</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.ftask.Task#getKind <em>Kind</em>}</li>
+ * <li>{@link org.eclipse.egf.model.ftask.Task#getImplementation <em>Implementation</em>}</li>
+ * <li>{@link org.eclipse.egf.model.ftask.Task#getSuperTask <em>Super Task</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.ftask.FtaskPackage#getTask()
+ * @model annotation="http://www.eclipse.org/emf/2002/Ecore constraints='ValidKind UselessTask LoadableImplementation ValidImplementation'"
+ * @generated
+ */
+public interface Task extends Activity {
+
+ /**
+ * Returns the value of the '<em><b>Kind</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Kind</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Kind</em>' attribute.
+ * @see #setKind(String)
+ * @see org.eclipse.egf.model.ftask.FtaskPackage#getTask_Kind()
+ * @model required="true"
+ * @generated
+ */
+ String getKind();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.ftask.Task#getKind <em>Kind</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Kind</em>' attribute.
+ * @see #getKind()
+ * @generated
+ */
+ void setKind(String value);
+
+ /**
+ * Returns the value of the '<em><b>Implementation</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Implementation</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Implementation</em>' attribute.
+ * @see #setImplementation(String)
+ * @see org.eclipse.egf.model.ftask.FtaskPackage#getTask_Implementation()
+ * @model
+ * @generated
+ */
+ String getImplementation();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.ftask.Task#getImplementation <em>Implementation</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Implementation</em>' attribute.
+ * @see #getImplementation()
+ * @generated
+ */
+ void setImplementation(String value);
+
+ /**
+ * Returns the value of the '<em><b>Super Task</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Super Task</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Super Task</em>' reference.
+ * @see #setSuperTask(Task)
+ * @see org.eclipse.egf.model.ftask.FtaskPackage#getTask_SuperTask()
+ * @model
+ * @generated
+ */
+ Task getSuperTask();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.ftask.Task#getSuperTask <em>Super Task</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Super Task</em>' reference.
+ * @see #getSuperTask()
+ * @generated
+ */
+ void setSuperTask(Task value);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation"
+ * @generated
+ */
+ String getKindValue();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation"
+ * @generated
+ */
+ String getImplementationValue();
+
+} // Task
diff --git a/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/ftask/impl/FtaskFactoryImpl.java b/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/ftask/impl/FtaskFactoryImpl.java
new file mode 100644
index 0000000..23dc6e2
--- /dev/null
+++ b/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/ftask/impl/FtaskFactoryImpl.java
@@ -0,0 +1,105 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.ftask.impl;
+
+import org.eclipse.egf.model.ftask.*;
+
+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;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class FtaskFactoryImpl extends EFactoryImpl implements FtaskFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static FtaskFactory init() {
+ try {
+ FtaskFactory theFtaskFactory = (FtaskFactory) EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/egf/1.0.0/ftask"); //$NON-NLS-1$
+ if (theFtaskFactory != null) {
+ return theFtaskFactory;
+ }
+ } catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new FtaskFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FtaskFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case FtaskPackage.TASK:
+ return createTask();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Task createTask() {
+ TaskImpl task = new TaskImpl();
+ return task;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FtaskPackage getFtaskPackage() {
+ return (FtaskPackage) getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static FtaskPackage getPackage() {
+ return FtaskPackage.eINSTANCE;
+ }
+
+} //FtaskFactoryImpl
diff --git a/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/ftask/impl/FtaskPackageImpl.java b/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/ftask/impl/FtaskPackageImpl.java
new file mode 100644
index 0000000..c037657
--- /dev/null
+++ b/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/ftask/impl/FtaskPackageImpl.java
@@ -0,0 +1,251 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.ftask.impl;
+
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.ftask.FtaskFactory;
+import org.eclipse.egf.model.ftask.FtaskPackage;
+import org.eclipse.egf.model.ftask.Task;
+import org.eclipse.egf.model.ftask.util.FtaskValidator;
+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.EValidator;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class FtaskPackageImpl extends EPackageImpl implements FtaskPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass taskEClass = 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.egf.model.ftask.FtaskPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private FtaskPackageImpl() {
+ super(eNS_URI, FtaskFactory.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 FtaskPackage#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 FtaskPackage init() {
+ if (isInited)
+ return (FtaskPackage) EPackage.Registry.INSTANCE.getEPackage(FtaskPackage.eNS_URI);
+
+ // Obtain or create and register package
+ FtaskPackageImpl theFtaskPackage = (FtaskPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof FtaskPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new FtaskPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ FcorePackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theFtaskPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theFtaskPackage.initializePackageContents();
+
+ // Register package validator
+ EValidator.Registry.INSTANCE.put(theFtaskPackage, new EValidator.Descriptor() {
+ public EValidator getEValidator() {
+ return FtaskValidator.INSTANCE;
+ }
+ });
+
+ // Mark meta-data to indicate it can't be changed
+ theFtaskPackage.freeze();
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(FtaskPackage.eNS_URI, theFtaskPackage);
+ return theFtaskPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTask() {
+ return taskEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getTask_Kind() {
+ return (EAttribute) taskEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getTask_Implementation() {
+ return (EAttribute) taskEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getTask_SuperTask() {
+ return (EReference) taskEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FtaskFactory getFtaskFactory() {
+ return (FtaskFactory) 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
+ taskEClass = createEClass(TASK);
+ createEAttribute(taskEClass, TASK__KIND);
+ createEAttribute(taskEClass, TASK__IMPLEMENTATION);
+ createEReference(taskEClass, TASK__SUPER_TASK);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized)
+ return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ FcorePackage theFcorePackage = (FcorePackage) EPackage.Registry.INSTANCE.getEPackage(FcorePackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ taskEClass.getESuperTypes().add(theFcorePackage.getActivity());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(taskEClass, Task.class, "Task", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getTask_Kind(), ecorePackage.getEString(), "kind", null, 1, 1, Task.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getTask_Implementation(), ecorePackage.getEString(), "implementation", null, 0, 1, Task.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getTask_SuperTask(), this.getTask(), null, "superTask", null, 0, 1, Task.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ addEOperation(taskEClass, ecorePackage.getEString(), "getKindValue", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ addEOperation(taskEClass, ecorePackage.getEString(), "getImplementationValue", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ // Create resource
+ createResource(eNS_URI);
+
+ // Create annotations
+ // http://www.eclipse.org/emf/2002/Ecore
+ createEcoreAnnotations();
+ }
+
+ /**
+ * Initializes the annotations for <b>http://www.eclipse.org/emf/2002/Ecore</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void createEcoreAnnotations() {
+ String source = "http://www.eclipse.org/emf/2002/Ecore"; //$NON-NLS-1$
+ addAnnotation(taskEClass, source, new String[] { "constraints", "ValidKind UselessTask LoadableImplementation ValidImplementation" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ }
+
+} // FtaskPackageImpl
diff --git a/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/ftask/impl/TaskImpl.java b/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/ftask/impl/TaskImpl.java
new file mode 100644
index 0000000..00bb689
--- /dev/null
+++ b/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/ftask/impl/TaskImpl.java
@@ -0,0 +1,419 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.ftask.impl;
+
+import org.eclipse.egf.model.fcore.Contract;
+import org.eclipse.egf.model.fcore.ContractMode;
+import org.eclipse.egf.model.fcore.impl.ActivityImpl;
+import org.eclipse.egf.model.ftask.FtaskPackage;
+import org.eclipse.egf.model.ftask.Task;
+import org.eclipse.egf.model.types.Type;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.UniqueEList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Task</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.ftask.impl.TaskImpl#getKind <em>Kind</em>}</li>
+ * <li>{@link org.eclipse.egf.model.ftask.impl.TaskImpl#getImplementation <em>
+ * Implementation</em>}</li>
+ * <li>{@link org.eclipse.egf.model.ftask.impl.TaskImpl#getSuperTask <em>Super
+ * Task</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class TaskImpl extends ActivityImpl implements Task {
+ /**
+ * A set of bit flags representing the values of boolean attributes and
+ * whether unsettable features have been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ protected int eFlags = 0;
+
+ /**
+ * The default value of the '{@link #getKind() <em>Kind</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getKind()
+ * @generated
+ * @ordered
+ */
+ protected static final String KIND_EDEFAULT = null;
+ /**
+ * The cached value of the '{@link #getKind() <em>Kind</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getKind()
+ * @generated
+ * @ordered
+ */
+ protected String kind = KIND_EDEFAULT;
+ /**
+ * The default value of the '{@link #getImplementation()
+ * <em>Implementation</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getImplementation()
+ * @generated
+ * @ordered
+ */
+ protected static final String IMPLEMENTATION_EDEFAULT = null;
+ /**
+ * The cached value of the '{@link #getImplementation()
+ * <em>Implementation</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getImplementation()
+ * @generated
+ * @ordered
+ */
+ protected String implementation = IMPLEMENTATION_EDEFAULT;
+ /**
+ * The cached value of the '{@link #getSuperTask() <em>Super Task</em>}'
+ * reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getSuperTask()
+ * @generated
+ * @ordered
+ */
+ protected Task superTask;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected TaskImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public EList<Contract> getContracts() {
+ EList<Contract> contracts = new UniqueEList<Contract>();
+ contracts.addAll(super.getContracts());
+ Task task = this;
+ while (task.getSuperTask() != null) {
+ task = task.getSuperTask();
+ contracts.addAll(task.getContracts());
+ }
+ return contracts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public EList<Contract> getContracts(Type innerType) {
+ EList<Contract> contracts = new UniqueEList<Contract>();
+ contracts.addAll(super.getContracts(innerType));
+ Task task = this;
+ while (task.getSuperTask() != null) {
+ task = task.getSuperTask();
+ contracts.addAll(task.getContracts(innerType));
+ }
+ return contracts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public EList<Contract> getContracts(ContractMode mode) {
+ EList<Contract> contracts = new UniqueEList<Contract>();
+ contracts.addAll(super.getContracts(mode));
+ Task task = this;
+ while (task.getSuperTask() != null) {
+ task = task.getSuperTask();
+ contracts.addAll(task.getContracts(mode));
+ }
+ return contracts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public EList<Contract> getContracts(Type innerType, ContractMode mode) {
+ EList<Contract> contracts = new UniqueEList<Contract>();
+ contracts.addAll(super.getContracts(innerType, mode));
+ Task task = this;
+ while (task.getSuperTask() != null) {
+ task = task.getSuperTask();
+ contracts.addAll(task.getContracts(innerType, mode));
+ }
+ return contracts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FtaskPackage.Literals.TASK;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String getKind() {
+ return kind;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setKind(String newKind) {
+ String oldKind = kind;
+ kind = newKind;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FtaskPackage.TASK__KIND, oldKind, kind));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String getImplementation() {
+ return implementation;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setImplementation(String newImplementation) {
+ String oldImplementation = implementation;
+ implementation = newImplementation;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FtaskPackage.TASK__IMPLEMENTATION, oldImplementation, implementation));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Task getSuperTask() {
+ if (superTask != null && superTask.eIsProxy()) {
+ InternalEObject oldSuperTask = (InternalEObject) superTask;
+ superTask = (Task) eResolveProxy(oldSuperTask);
+ if (superTask != oldSuperTask) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, FtaskPackage.TASK__SUPER_TASK, oldSuperTask, superTask));
+ }
+ }
+ return superTask;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Task basicGetSuperTask() {
+ return superTask;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setSuperTask(Task newSuperTask) {
+ Task oldSuperTask = superTask;
+ superTask = newSuperTask;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FtaskPackage.TASK__SUPER_TASK, oldSuperTask, superTask));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String getKindValue() {
+ if (getKind() == null && getSuperTask() != null)
+ return getSuperTask().getKindValue();
+ return getKind();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String getImplementationValue() {
+ if (getImplementation() == null && getSuperTask() != null)
+ return getSuperTask().getImplementationValue();
+ return getImplementation();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FtaskPackage.TASK__KIND:
+ return getKind();
+ case FtaskPackage.TASK__IMPLEMENTATION:
+ return getImplementation();
+ case FtaskPackage.TASK__SUPER_TASK:
+ if (resolve)
+ return getSuperTask();
+ return basicGetSuperTask();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case FtaskPackage.TASK__KIND:
+ setKind((String) newValue);
+ return;
+ case FtaskPackage.TASK__IMPLEMENTATION:
+ setImplementation((String) newValue);
+ return;
+ case FtaskPackage.TASK__SUPER_TASK:
+ setSuperTask((Task) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FtaskPackage.TASK__KIND:
+ setKind(KIND_EDEFAULT);
+ return;
+ case FtaskPackage.TASK__IMPLEMENTATION:
+ setImplementation(IMPLEMENTATION_EDEFAULT);
+ return;
+ case FtaskPackage.TASK__SUPER_TASK:
+ setSuperTask((Task) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FtaskPackage.TASK__KIND:
+ return KIND_EDEFAULT == null ? kind != null : !KIND_EDEFAULT.equals(kind);
+ case FtaskPackage.TASK__IMPLEMENTATION:
+ return IMPLEMENTATION_EDEFAULT == null ? implementation != null : !IMPLEMENTATION_EDEFAULT.equals(implementation);
+ case FtaskPackage.TASK__SUPER_TASK:
+ return superTask != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy())
+ return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (kind: "); //$NON-NLS-1$
+ result.append(kind);
+ result.append(", implementation: "); //$NON-NLS-1$
+ result.append(implementation);
+ result.append(')');
+ return result.toString();
+ }
+
+} // TaskImpl
diff --git a/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/ftask/util/FtaskAdapterFactory.java b/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/ftask/util/FtaskAdapterFactory.java
new file mode 100644
index 0000000..668d48b
--- /dev/null
+++ b/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/ftask/util/FtaskAdapterFactory.java
@@ -0,0 +1,190 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.ftask.util;
+
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.ModelElement;
+import org.eclipse.egf.model.fcore.NamedModelElement;
+
+import org.eclipse.egf.model.ftask.*;
+
+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;
+
+/**
+ * <!-- 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.egf.model.ftask.FtaskPackage
+ * @generated
+ */
+public class FtaskAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static FtaskPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FtaskAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = FtaskPackage.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 FtaskSwitch<Adapter> modelSwitch = new FtaskSwitch<Adapter>() {
+ @Override
+ public Adapter caseTask(Task object) {
+ return createTaskAdapter();
+ }
+
+ @Override
+ public Adapter caseModelElement(ModelElement object) {
+ return createModelElementAdapter();
+ }
+
+ @Override
+ public Adapter caseNamedModelElement(NamedModelElement object) {
+ return createNamedModelElementAdapter();
+ }
+
+ @Override
+ public Adapter caseActivity(Activity object) {
+ return createActivityAdapter();
+ }
+
+ @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.egf.model.ftask.Task <em>Task</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.egf.model.ftask.Task
+ * @generated
+ */
+ public Adapter createTaskAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fcore.ModelElement <em>Model Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.egf.model.fcore.ModelElement
+ * @generated
+ */
+ public Adapter createModelElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fcore.NamedModelElement <em>Named Model Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.egf.model.fcore.NamedModelElement
+ * @generated
+ */
+ public Adapter createNamedModelElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fcore.Activity <em>Activity</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.egf.model.fcore.Activity
+ * @generated
+ */
+ public Adapter createActivityAdapter() {
+ 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;
+ }
+
+} //FtaskAdapterFactory
diff --git a/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/ftask/util/FtaskResourceFactoryImpl.java b/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/ftask/util/FtaskResourceFactoryImpl.java
new file mode 100644
index 0000000..01cd174
--- /dev/null
+++ b/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/ftask/util/FtaskResourceFactoryImpl.java
@@ -0,0 +1,51 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.ftask.util;
+
+import org.eclipse.emf.common.util.URI;
+
+import org.eclipse.emf.ecore.resource.Resource;
+
+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource Factory</b> associated with the package.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.ftask.util.FtaskResourceImpl
+ * @generated
+ */
+public class FtaskResourceFactoryImpl extends ResourceFactoryImpl {
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FtaskResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ Resource result = new FtaskResourceImpl(uri);
+ return result;
+ }
+
+} //FtaskResourceFactoryImpl
diff --git a/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/ftask/util/FtaskResourceImpl.java b/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/ftask/util/FtaskResourceImpl.java
new file mode 100644
index 0000000..989db38
--- /dev/null
+++ b/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/ftask/util/FtaskResourceImpl.java
@@ -0,0 +1,166 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.ftask.util;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.egf.model.uri.ModelSchemeAware;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.xmi.XMIResource;
+import org.eclipse.emf.ecore.xmi.XMLParserPool;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+import org.eclipse.emf.ecore.xmi.XMLSave.XMLTypeInfo;
+import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl;
+import org.eclipse.emf.ecore.xmi.impl.XMLParserPoolImpl;
+import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource </b> associated with the package.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.ftask.util.FtaskResourceFactoryImpl
+ * @generated
+ */
+public class FtaskResourceImpl extends XMIResourceImpl {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private List<Object> lookupTable = new ArrayList<Object>();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private XMLParserPool parserPool = new XMLParserPoolImpl();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private Map<Object, Object> nameToFeatureMap = new HashMap<Object, Object>();
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param uri the URI of the new resource.
+ * @generated
+ */
+ public FtaskResourceImpl(URI uri) {
+ super(uri);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean useIDAttributes() {
+ return false;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean useUUIDs() {
+ return true;
+ }
+
+ /**
+ * Called when the object is unloaded.
+ * This implementation
+ * {@link InternalEObject#eSetProxyURI sets} the object to be a proxy
+ * and clears the {@link #eAdapters adapters}.
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=292866
+ * Fix available in HEAD: 2.6.0.I200911020144
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void unloaded(InternalEObject internalEObject) {
+ // Ensure that an unresolved containment proxy's URI isn't reset.
+ //
+ if (!internalEObject.eIsProxy()) {
+ internalEObject.eSetProxyURI(uri.appendFragment(getURIFragment(internalEObject)));
+ }
+ internalEObject.eAdapters().clear();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void init() {
+ super.init();
+ setTrackingModification(true);
+ setEncoding("UTF-8"); //$NON-NLS-1$
+ setXMIVersion("2.1"); //$NON-NLS-1$
+ // Save Options
+ getDefaultSaveOptions().put(XMLResource.OPTION_DISABLE_NOTIFY, Boolean.TRUE);
+ getDefaultSaveOptions().put(XMLResource.OPTION_CONFIGURATION_CACHE, Boolean.TRUE);
+ getDefaultSaveOptions().put(XMLResource.OPTION_USE_CACHED_LOOKUP_TABLE, lookupTable);
+ getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ getDefaultSaveOptions().put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
+ getDefaultSaveOptions().put(XMLResource.OPTION_SAVE_TYPE_INFORMATION, new XMLTypeInfo() {
+ public boolean shouldSaveType(EClass objectType, EClassifier featureType, EStructuralFeature feature) {
+ return objectType != featureType && objectType != XMLTypePackage.Literals.ANY_TYPE;
+ }
+
+ public boolean shouldSaveType(EClass objectType, EClass featureType, EStructuralFeature feature) {
+ return objectType != featureType && objectType != XMLTypePackage.Literals.ANY_TYPE;
+ }
+ });
+ getDefaultSaveOptions().put(XMLResource.OPTION_LINE_WIDTH, new Integer(80));
+ // Avoid relative paths from workspace resources to plugin resources.
+ getDefaultSaveOptions().put(XMLResource.OPTION_URI_HANDLER, new ModelSchemeAware());
+ getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ getDefaultSaveOptions().put(XMIResource.OPTION_USE_XMI_TYPE, Boolean.TRUE);
+ // Load Options
+ getDefaultLoadOptions().put(XMLResource.OPTION_DISABLE_NOTIFY, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_DEFER_ATTACHMENT, Boolean.FALSE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_DEFER_IDREF_RESOLUTION, Boolean.FALSE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_DEPRECATED_METHODS, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_PARSER_POOL, parserPool);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_XML_NAME_TO_FEATURE_MAP, nameToFeatureMap);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ }
+
+} // FtaskResourceImpl
diff --git a/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/ftask/util/FtaskSwitch.java b/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/ftask/util/FtaskSwitch.java
new file mode 100644
index 0000000..a6024c9
--- /dev/null
+++ b/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/ftask/util/FtaskSwitch.java
@@ -0,0 +1,206 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.ftask.util;
+
+import java.util.List;
+
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.ModelElement;
+import org.eclipse.egf.model.fcore.NamedModelElement;
+import org.eclipse.egf.model.ftask.FtaskPackage;
+import org.eclipse.egf.model.ftask.Task;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- 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.egf.model.ftask.FtaskPackage
+ * @generated
+ */
+public class FtaskSwitch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static FtaskPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public FtaskSwitch() {
+ if (modelPackage == null) {
+ modelPackage = FtaskPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * 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
+ */
+ public T doSwitch(EObject theEObject) {
+ return doSwitch(theEObject.eClass(), theEObject);
+ }
+
+ /**
+ * 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
+ */
+ @SuppressWarnings("all")
+ protected T doSwitch(EClass theEClass, EObject theEObject) {
+ if (theEClass.eContainer() == modelPackage) {
+ return doSwitch(theEClass.getClassifierID(), theEObject);
+ } else {
+ List<EClass> eSuperTypes = theEClass.getESuperTypes();
+ return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject);
+ }
+ }
+
+ /**
+ * 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
+ */
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case FtaskPackage.TASK: {
+ Task task = (Task) theEObject;
+ T result = caseTask(task);
+ if (result == null)
+ result = caseActivity(task);
+ if (result == null)
+ result = caseNamedModelElement(task);
+ if (result == null)
+ result = caseModelElement(task);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ default:
+ return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Task</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>Task</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTask(Task object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Model Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Model Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseModelElement(ModelElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Named Model Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Named Model Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseNamedModelElement(NamedModelElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Activity</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>Activity</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseActivity(Activity 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
+ */
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} // FtaskSwitch
diff --git a/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/ftask/util/FtaskValidator.java b/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/ftask/util/FtaskValidator.java
new file mode 100644
index 0000000..0ed74e2
--- /dev/null
+++ b/org.eclipse.egf.model.ftask/generated/org/eclipse/egf/model/ftask/util/FtaskValidator.java
@@ -0,0 +1,408 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.ftask.util;
+
+import java.util.Map;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.ftask.producer.invocation.ITaskProduction;
+import org.eclipse.egf.model.EGFFtaskPlugin;
+import org.eclipse.egf.model.fcore.util.FcoreValidator;
+import org.eclipse.egf.model.ftask.FtaskPackage;
+import org.eclipse.egf.model.ftask.Task;
+import org.eclipse.egf.model.ftask.helper.TaskValidationHelper;
+import org.eclipse.egf.model.ftask.task.TaskHook;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.DiagnosticChain;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.util.EObjectValidator;
+import org.eclipse.emf.validation.model.EvaluationMode;
+import org.eclipse.emf.validation.model.IConstraintStatus;
+import org.eclipse.emf.validation.service.IBatchValidator;
+import org.eclipse.emf.validation.service.ModelValidationService;
+import org.eclipse.emf.validation.service.ITraversalStrategy.Recursive;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Validator</b> for the model.
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.egf.model.ftask.FtaskPackage
+ * @generated
+ */
+public class FtaskValidator extends EObjectValidator {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ public static final FtaskValidator INSTANCE = new FtaskValidator();
+
+ /**
+ * A constant for the
+ * {@link org.eclipse.emf.common.util.Diagnostic#getSource() source} of
+ * diagnostic {@link org.eclipse.emf.common.util.Diagnostic#getCode() codes}
+ * from this package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.common.util.Diagnostic#getSource()
+ * @see org.eclipse.emf.common.util.Diagnostic#getCode()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ public static final String DIAGNOSTIC_SOURCE = "org.eclipse.egf.model.ftask"; //$NON-NLS-1$
+
+ /**
+ * A constant with a fixed name that can be used as the base value for
+ * additional hand written constants.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static final int GENERATED_DIAGNOSTIC_CODE_COUNT = 0;
+
+ /**
+ * A constant with a fixed name that can be used as the base value for
+ * additional hand written constants in a derived class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static final int DIAGNOSTIC_CODE_COUNT = GENERATED_DIAGNOSTIC_CODE_COUNT;
+
+ /**
+ * Model Validation Service interface for batch validation of EMF elements.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private final IBatchValidator batchValidator;
+
+ /**
+ * The cached base package validator.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected FcoreValidator fcoreValidator;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public FtaskValidator() {
+ super();
+ fcoreValidator = FcoreValidator.INSTANCE;
+ batchValidator = (IBatchValidator) ModelValidationService.getInstance().newValidator(EvaluationMode.BATCH);
+ batchValidator.setTraversalStrategy(new Recursive());
+ batchValidator.setIncludeLiveConstraints(true);
+ batchValidator.setReportSuccesses(false);
+ }
+
+ /**
+ * Returns the package of this validator switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EPackage getEPackage() {
+ return FtaskPackage.eINSTANCE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean validate(EClass eClass, EObject eObject, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ IStatus status = Status.OK_STATUS;
+ // do whatever the basic EcoreValidator does
+ super.validate(eClass, eObject, diagnostics, context);
+ // no point in validating if we can't report results
+ if (diagnostics != null) {
+ // if EMF Mode Validation Service already covered the sub-tree,
+ // which it does for efficient computation and error reporting,
+ // then don't repeat (the Diagnostician does the recursion
+ // externally). If there is no context map, then we can't
+ // help it
+ if (hasProcessed(eObject, context) == false) {
+ status = batchValidator.validate(eObject, new NullProgressMonitor());
+ processed(eObject, context, status);
+ appendDiagnostics(status, diagnostics);
+ }
+ }
+ return status.isOK();
+ }
+
+ /**
+ * Calls <code>validateXXX</code> for the corresponding classifier of the
+ * model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean validate(int classifierID, Object value, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ switch (classifierID) {
+ case FtaskPackage.TASK:
+ return validateTask((Task) value, diagnostics, context);
+ default:
+ return true;
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateTask(Task task, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(task, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(task, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(task, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(task, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(task, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(task, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(task, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= fcoreValidator.validateActivity_MandatoryName(task, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= fcoreValidator.validateActivity_ActivityCycle(task, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateTask_ValidKind(task, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateTask_UselessTask(task, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateTask_LoadableImplementation(task, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateTask_ValidImplementation(task, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * Validates the ValidKind constraint of '<em>Task</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validateTask_ValidKind(Task task, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (task.getKind() == null || task.getKind().trim().length() == 0) {
+ return true;
+ }
+ if (TaskValidationHelper.isValidKind(task.getKind()) == false) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "ValidKind", getObjectLabel(task, context), NLS.bind("This Task has an unknown kind ''{0}''", task.getKind().trim()) }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { task }, context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Validates the UselessTask constraint of '<em>Task</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validateTask_UselessTask(Task task, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (task.getImplementationValue() == null || task.getImplementationValue().trim().length() == 0) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.WARNING, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "UselessTask", getObjectLabel(task, context), "This Task has no implementation" }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { task }, context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Validates the LoadableImplementation constraint of '<em>Task</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validateTask_LoadableImplementation(Task task, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (task.getImplementationValue() == null || task.getImplementationValue().trim().length() == 0 || task.getKindValue() == null || task.getKindValue().trim().length() == 0) {
+ return true;
+ }
+ TaskHook hook = null;
+ try {
+ hook = TaskHook.HELPER.getHook(task);
+ } catch (InvocationException ie) {
+ return true;
+ }
+ if (hook.isLoadableImplementation(task, context) == false) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "LoadableImplementation", getObjectLabel(task, context), NLS.bind("Unable to load ''{0}''", task.getImplementation()) }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { task }, context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Validates the ValidImplementation constraint of '<em>Task</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validateTask_ValidImplementation(Task task, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (task.getImplementationValue() == null || task.getImplementationValue().trim().length() == 0 || task.getKindValue() == null || task.getKindValue().trim().length() == 0) {
+ return true;
+ }
+ TaskHook hook = null;
+ try {
+ hook = TaskHook.HELPER.getHook(task);
+ } catch (InvocationException ie) {
+ return true;
+ }
+ // Valid Value
+ if (hook.isValidImplementation(task, context) == false) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "ValidImplementation", getObjectLabel(task, context), NLS.bind("Type mismatch ''{0}'' with ''{1}''", ITaskProduction.class.getName(), task.getImplementation()) }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { task }, context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Returns the resource locator that will be used to fetch messages for this
+ * validator's diagnostics.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EGFFtaskPlugin.INSTANCE;
+ }
+
+ /**
+ * If we have a context map, record this object's <code>status</code> in it
+ * so that we will know later that we have processed it and its sub-tree.
+ *
+ * @param eObject
+ * an element that we have validated
+ * @param context
+ * the context (may be <code>null</code>)
+ * @param status
+ * the element's validation status
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private void processed(EObject eObject, Map<Object, Object> context, IStatus status) {
+ if (context != null) {
+ context.put(eObject, status);
+ }
+ }
+
+ /**
+ * Determines whether we have processed this <code>eObject</code> before,
+ * by automatic recursion of the EMF Model Validation Service. This is
+ * only possible if we do, indeed, have a context.
+ *
+ * @param eObject
+ * an element to be validated (we hope not)
+ * @param context
+ * the context (may be <code>null</code>)
+ * @return <code>true</code> if the context is not <code>null</code> and
+ * the <code>eObject</code> or one of its containers has already
+ * been
+ * validated; <code>false</code>, otherwise
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean hasProcessed(EObject eObject, Map<Object, Object> context) {
+ boolean result = false;
+ if (context != null) {
+ // this is O(NlogN) but there's no helping it
+ while (eObject != null) {
+ if (context.containsKey(eObject)) {
+ result = true;
+ eObject = null;
+ } else {
+ eObject = eObject.eContainer();
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Converts a status result from the EMF validation service to diagnostics.
+ *
+ * @param status
+ * the EMF validation service's status result
+ * @param diagnostics
+ * a diagnostic chain to accumulate results on
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private void appendDiagnostics(IStatus status, DiagnosticChain diagnostics) {
+ if (status.isMultiStatus()) {
+ IStatus[] children = status.getChildren();
+ for (int i = 0; i < children.length; i++) {
+ appendDiagnostics(children[i], diagnostics);
+ }
+ } else if (status instanceof IConstraintStatus) {
+ diagnostics.add(new BasicDiagnostic(status.getSeverity(), status.getPlugin(), status.getCode(), status.getMessage(), ((IConstraintStatus) status).getResultLocus().toArray()));
+ }
+ }
+} // FtaskValidator
diff --git a/org.eclipse.egf.model.ftask/model/Ftask.ecd b/org.eclipse.egf.model.ftask/model/Ftask.ecd
new file mode 100644
index 0000000..a21b0c7
--- /dev/null
+++ b/org.eclipse.egf.model.ftask/model/Ftask.ecd
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<editmodel:ClassDiagramEditModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editmodel="editmodel.xmi" xmlns:options="options.xmi" name="Ftask" size="1231,207" id="platform:/resource/org.eclipse.egf.model.ftask/model/Ftask.ecore#/" metadata="emf-1.0" initialized="true" tag="100" key="32303037303533312D313030206F72672E65636C697073652E6567662E6D6F64656C2E667461736B">
+ <children xsi:type="editmodel:ClassEditModel" name="Task" location="140,50" size="78,30" id="platform:/resource/org.eclipse.egf.model.ftask/model/Ftask.ecore#//Task" runTimeClassModel="">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <model href="Ftask.ecore#//Task"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <model href="Ftask.ecore#/"/>
+ <diagramOptions xsi:type="options:ClassDiagramOptions" properties="wireOptions=1;Product=eEmf"/>
+ <boardSetting snapToGeometry="true" gridEnabled="true" gridSpacing="15,15" gridOrigin="0,0" rulerUnit="pixel" gridVisibility="false">
+ <leftRuler/>
+ <topRuler/>
+ </boardSetting>
+ <classDiagramPreferences xsi:type="editmodel:EMFClassDiagramPreference" showPopupBars="true" showConnectionHandles="true" attributeSorter="Natural" methodSorter="Natural" showClassStereotype="true" showPackageStereotype="true"/>
+</editmodel:ClassDiagramEditModel>
diff --git a/org.eclipse.egf.model.ftask/model/Ftask.ecore b/org.eclipse.egf.model.ftask/model/Ftask.ecore
new file mode 100644
index 0000000..f46d11c
--- /dev/null
+++ b/org.eclipse.egf.model.ftask/model/Ftask.ecore
@@ -0,0 +1,16 @@
+<?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="ftask"
+ nsURI="http://www.eclipse.org/egf/1.0.0/ftask" nsPrefix="ftask">
+ <eClassifiers xsi:type="ecore:EClass" name="Task" eSuperTypes="../../org.eclipse.egf.model/model/Fcore.ecore#//Activity">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+ <details key="constraints" value="ValidKind UselessTask LoadableImplementation ValidImplementation"/>
+ </eAnnotations>
+ <eOperations name="getKindValue" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eOperations name="getImplementationValue" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="implementation" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="superTask" eType="#//Task"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/org.eclipse.egf.model.ftask/model/Ftask.genmodel b/org.eclipse.egf.model.ftask/model/Ftask.genmodel
new file mode 100644
index 0000000..5ea96ec
--- /dev/null
+++ b/org.eclipse.egf.model.ftask/model/Ftask.genmodel
@@ -0,0 +1,27 @@
+<?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.egf.model.ftask/generated"
+ editDirectory="/org.eclipse.egf.model.ftask.edit/generated" editorDirectory="/org.eclipse.egf.model.ftask.editor/generated"
+ modelPluginID="org.eclipse.egf.model.ftask" templateDirectory="/org.eclipse.egf.model/templates"
+ dynamicTemplates="true" modelName="Ftask" modelPluginClass="org.eclipse.egf.model.EGFFtaskPlugin"
+ editPluginClass="org.eclipse.egf.model.edit.EGFFtaskEditPlugin" editorPluginClass="org.eclipse.egf.model.editor.EGFFtaskEditorPlugin"
+ nonNLSMarkers="true" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl.Container"
+ codeFormatting="true" testsDirectory="/org.eclipse.egf.model.tests/generated"
+ booleanFlagsField="eFlags" importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0"
+ copyrightFields="false" editPluginID="org.eclipse.egf.model.ftask.edit" editorPluginID="org.eclipse.egf.model.ftask.editor"
+ optimizedHasChildren="true" tableProviders="true" colorProviders="true" fontProviders="true"
+ packedEnums="true" usedGenPackages="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore ../../org.eclipse.egf.model/model/Fcore.genmodel#//fcore ../../org.eclipse.egf.model/model/Types.genmodel#//types">
+ <foreignModel>Ftask.ecore</foreignModel>
+ <templatePluginVariables>org.eclipse.egf.model</templatePluginVariables>
+ <genPackages prefix="Ftask" basePackage="org.eclipse.egf.model" resource="XMI" disposableProviderFactory="true"
+ generateExampleClass="false" dataTypeConverters="true" multipleEditorPages="false"
+ extensibleProviderFactory="true" childCreationExtenders="true" contentTypeIdentifier=""
+ fileExtensions="ftask" ecorePackage="Ftask.ecore#/">
+ <genClasses ecoreClass="Ftask.ecore#//Task">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Ftask.ecore#//Task/kind"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Ftask.ecore#//Task/implementation"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference Ftask.ecore#//Task/superTask"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/org.eclipse.egf.model.ftask/plugin.properties b/org.eclipse.egf.model.ftask/plugin.properties
new file mode 100644
index 0000000..b35dd3d
--- /dev/null
+++ b/org.eclipse.egf.model.ftask/plugin.properties
@@ -0,0 +1,18 @@
+##
+# 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 Factory Task Model (Incubation)
+providerName = Eclipse Modeling Project
+
+TaskExtensionPoint=Task
+
+missing_invoker_message = No invoker for Task ''{0}''.
+_UI_EGFConstraint_diagnostic = Constraint ''{0}'' is violated on ''{1}''. {2}.
diff --git a/org.eclipse.egf.model.ftask/plugin.xml b/org.eclipse.egf.model.ftask/plugin.xml
new file mode 100644
index 0000000..cc4c9be
--- /dev/null
+++ b/org.eclipse.egf.model.ftask/plugin.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+
+<!--
+
+ 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 Points Definition -->
+ <!-- ================================================================================= -->
+
+ <extension-point
+ id="org.eclipse.egf.model.ftask.task"
+ name="%TaskExtensionPoint"
+ schema="schema/org.eclipse.egf.model.ftask.task.exsd"
+ />
+
+ <!-- ================================================================================= -->
+ <!-- Factory Task Model -->
+ <!-- ================================================================================= -->
+
+ <extension
+ point="org.eclipse.emf.ecore.generated_package"
+ >
+ <package
+ uri="http://www.eclipse.org/egf/1.0.0/ftask"
+ class="org.eclipse.egf.model.ftask.FtaskPackage"
+ genModel="model/Ftask.genmodel"
+ />
+ </extension>
+
+ <extension
+ point="org.eclipse.emf.ecore.extension_parser"
+ >
+ <parser
+ type="ftask"
+ class="org.eclipse.egf.model.ftask.util.FtaskResourceFactoryImpl"
+ />
+ </extension>
+
+</plugin>
diff --git a/org.eclipse.egf.model.ftask/schema/org.eclipse.egf.model.ftask.task.exsd b/org.eclipse.egf.model.ftask/schema/org.eclipse.egf.model.ftask.task.exsd
new file mode 100644
index 0000000..b76f7be
--- /dev/null
+++ b/org.eclipse.egf.model.ftask/schema/org.eclipse.egf.model.ftask.task.exsd
@@ -0,0 +1,102 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.egf.model.ftask" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.eclipse.egf.model.ftask" id="org.eclipse.egf.model.ftask.task" name="Task"/>
+ </appInfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appInfo>
+ <meta.element />
+ </appInfo>
+ </annotation>
+ <complexType>
+ <sequence minOccurs="1" maxOccurs="unbounded">
+ <element ref="hook"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="hook">
+ <complexType>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.egf.model.ftask.task.TaskHook"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiinfo"/>
+ </appInfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/org.eclipse.egf.model.ftask/src/org/eclipse/egf/ftask/producer/context/ITaskProductionContext.java b/org.eclipse.egf.model.ftask/src/org/eclipse/egf/ftask/producer/context/ITaskProductionContext.java
new file mode 100644
index 0000000..58160ef
--- /dev/null
+++ b/org.eclipse.egf.model.ftask/src/org/eclipse/egf/ftask/producer/context/ITaskProductionContext.java
@@ -0,0 +1,22 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.ftask.producer.context;
+
+import org.eclipse.egf.model.ftask.Task;
+import org.eclipse.egf.producer.context.IActivityProductionContext;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public interface ITaskProductionContext extends IActivityProductionContext<Task> {
+ // Nothing to do
+}
diff --git a/org.eclipse.egf.model.ftask/src/org/eclipse/egf/ftask/producer/invocation/ITaskProduction.java b/org.eclipse.egf.model.ftask/src/org/eclipse/egf/ftask/producer/invocation/ITaskProduction.java
new file mode 100644
index 0000000..687a21f
--- /dev/null
+++ b/org.eclipse.egf.model.ftask/src/org/eclipse/egf/ftask/producer/invocation/ITaskProduction.java
@@ -0,0 +1,44 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.ftask.producer.invocation;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public interface ITaskProduction {
+
+ /**
+ * Pre execute this task.
+ *
+ * @param monitor_p
+ */
+ public void preExecute(final ITaskProductionContext productionContext, final IProgressMonitor monitor) throws InvocationException;
+
+ /**
+ * Do execute this task.
+ *
+ * @param monitor_p
+ */
+ public void doExecute(final ITaskProductionContext productionContext, final IProgressMonitor monitor) throws InvocationException;
+
+ /**
+ * Post execute this task.
+ *
+ * @param monitor_p
+ */
+ public void postExecute(final ITaskProductionContext productionContext, final IProgressMonitor monitor) throws InvocationException;
+
+}
diff --git a/org.eclipse.egf.model.ftask/src/org/eclipse/egf/model/ftask/helper/TaskValidationHelper.java b/org.eclipse.egf.model.ftask/src/org/eclipse/egf/model/ftask/helper/TaskValidationHelper.java
new file mode 100644
index 0000000..4a45336
--- /dev/null
+++ b/org.eclipse.egf.model.ftask/src/org/eclipse/egf/model/ftask/helper/TaskValidationHelper.java
@@ -0,0 +1,35 @@
+/**
+ * Copyright (c) 2009 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
+ */
+package org.eclipse.egf.model.ftask.helper;
+
+import org.eclipse.egf.model.ftask.task.TaskHook;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class TaskValidationHelper {
+
+ private TaskValidationHelper() {
+ // Prevent Instantiation
+ }
+
+ public static boolean isValidKind(String kind) {
+ if (kind == null || kind.trim().length() == 0) {
+ return false;
+ }
+ if (TaskHook.HELPER.getKinds().contains(kind.trim()) == false) {
+ return false;
+ }
+ return true;
+ }
+
+}
diff --git a/org.eclipse.egf.model.ftask/src/org/eclipse/egf/model/ftask/l10n/EGFFtaskMessages.java b/org.eclipse.egf.model.ftask/src/org/eclipse/egf/model/ftask/l10n/EGFFtaskMessages.java
new file mode 100644
index 0000000..4854305
--- /dev/null
+++ b/org.eclipse.egf.model.ftask/src/org/eclipse/egf/model/ftask/l10n/EGFFtaskMessages.java
@@ -0,0 +1,38 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.model.ftask.l10n;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class EGFFtaskMessages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.egf.model.ftask.l10n.messages"; //$NON-NLS-1$
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, EGFFtaskMessages.class);
+ }
+
+ public static String missing_task_message;
+
+ public static String missing_kind_message;
+
+ public static String missing_hook_message;
+
+}
diff --git a/org.eclipse.egf.model.ftask/src/org/eclipse/egf/model/ftask/l10n/messages.properties b/org.eclipse.egf.model.ftask/src/org/eclipse/egf/model/ftask/l10n/messages.properties
new file mode 100644
index 0000000..d5fb554
--- /dev/null
+++ b/org.eclipse.egf.model.ftask/src/org/eclipse/egf/model/ftask/l10n/messages.properties
@@ -0,0 +1,14 @@
+##
+# 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
+##
+
+missing_task_message = Missing Task.
+missing_kind_message = Missing kind for Task ''{0}''.
+missing_hook_message = No hook for Task ''{0}''.
diff --git a/org.eclipse.egf.model.ftask/src/org/eclipse/egf/model/ftask/task/TaskHook.java b/org.eclipse.egf.model.ftask/src/org/eclipse/egf/model/ftask/task/TaskHook.java
new file mode 100644
index 0000000..c10114a
--- /dev/null
+++ b/org.eclipse.egf.model.ftask/src/org/eclipse/egf/model/ftask/task/TaskHook.java
@@ -0,0 +1,125 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+package org.eclipse.egf.model.ftask.task;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.egf.common.helper.EMFHelper;
+import org.eclipse.egf.common.helper.ExtensionPointHelper;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+import org.eclipse.egf.model.EGFFtaskPlugin;
+import org.eclipse.egf.model.ftask.Task;
+import org.eclipse.egf.model.ftask.l10n.EGFFtaskMessages;
+import org.eclipse.osgi.util.NLS;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public interface TaskHook {
+
+ // TODO pas sur que le ctx en ITaskProductionContext soit une bonne idee
+ public void invoke(Bundle bundle, ITaskProductionContext context, Task task, IProgressMonitor monitor) throws InvocationException;
+
+ public String getKind();
+
+ public boolean isLoadableImplementation(Task task, Map<Object, Object> context);
+
+ public boolean isValidImplementation(Task task, Map<Object, Object> context);
+
+ /**
+ * Define a constant for the Task extension-point id.
+ */
+ public static String EXTENSION_ID = "org.eclipse.egf.model.ftask.task"; //$NON-NLS-1$
+
+ /**
+ * Define a constant for the 'class' attribute.
+ */
+ public static final String INVOKER_ATT_CLASS = "class"; //$NON-NLS-1$
+
+ class Helper {
+
+ public List<String> getKinds() {
+ return new ArrayList<String>(kind2hooks.keySet());
+ }
+
+ public TaskHook getHook(Task task) throws InvocationException {
+ if (task == null) {
+ throw new InvocationException(EGFFtaskMessages.missing_task_message);
+ }
+ if (task.getKindValue() == null || task.getKindValue().trim().length() == 0) {
+ throw new InvocationException(NLS.bind(EGFFtaskMessages.missing_kind_message, EMFHelper.getText(task)));
+ }
+ TaskHook taskHook = kind2hooks.get(task.getKindValue().trim());
+ if (taskHook == null) {
+ throw new InvocationException(NLS.bind(EGFFtaskMessages.missing_hook_message, task.getKindValue().trim()));
+ }
+ return taskHook;
+ }
+
+ private Helper() {
+ for (IConfigurationElement element : Platform.getExtensionRegistry().getConfigurationElementsFor(EXTENSION_ID)) {
+ try {
+ // Extension retrieval
+ String extension = ExtensionPointHelper.getAttributeValue(element, INVOKER_ATT_CLASS);
+ // Ignore
+ if (extension == null || extension.trim().length() == 0) {
+ continue;
+ }
+ extension = extension.trim();
+ Object object = element.createExecutableExtension(INVOKER_ATT_CLASS);
+ if (object == null) {
+ continue;
+ }
+ if (object instanceof TaskHook == false) {
+ EGFFtaskPlugin.getPlugin().logError(NLS.bind("Wrong Class {0}", object.getClass().getName())); //$NON-NLS-1$
+ EGFFtaskPlugin.getPlugin().logInfo(NLS.bind("Class should be an implementation of ''{0}''.", TaskHook.class.getName()), 1); //$NON-NLS-1$
+ EGFFtaskPlugin.getPlugin().logInfo(NLS.bind("Bundle ''{0}''", ExtensionPointHelper.getNamespace(element)), 1); //$NON-NLS-1$
+ EGFFtaskPlugin.getPlugin().logInfo(NLS.bind("Extension-Point ''{0}''", element.getName()), 1); //$NON-NLS-1$
+ EGFFtaskPlugin.getPlugin().logInfo(NLS.bind("extension ''{0}''", extension), 1); //$NON-NLS-1$
+ continue;
+ }
+ TaskHook contributor = (TaskHook) object;
+ if (contributor.getKind() == null || contributor.getKind().trim().length() == 0) {
+ continue;
+ }
+ String kind = contributor.getKind().trim();
+ if (kind2hooks.get(kind) != null) {
+ EGFFtaskPlugin.getPlugin().logError(NLS.bind("Duplicate Kind ''{0}''", kind)); //$NON-NLS-1$
+ EGFFtaskPlugin.getPlugin().logInfo(NLS.bind("Extension-Point ''{0}''", element.getName()), 1); //$NON-NLS-1$
+ EGFFtaskPlugin.getPlugin().logInfo(NLS.bind("Bundle ''{0}''", ExtensionPointHelper.getNamespace(element)), 1); //$NON-NLS-1$
+ }
+ kind2hooks.put(contributor.getKind(), contributor);
+ } catch (CoreException e) {
+ EGFFtaskPlugin.getPlugin().logError(e);
+ }
+ }
+
+ }
+
+ private final Map<String, TaskHook> kind2hooks = new HashMap<String, TaskHook>();
+ }
+
+ Helper HELPER = new Helper();
+}
diff --git a/org.eclipse.egf.model.javapattern.edit/.classpath b/org.eclipse.egf.model.javapattern.edit/.classpath
new file mode 100644
index 0000000..d711987
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern.edit/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="generated"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.egf.model.javapattern.edit/.project b/org.eclipse.egf.model.javapattern.edit/.project
new file mode 100644
index 0000000..1f6ac20
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern.edit/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.model.javapattern.edit</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.model.javapattern.edit/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egf.model.javapattern.edit/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..17a04aa
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern.edit/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:52:56 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.egf.model.javapattern.edit/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egf.model.javapattern.edit/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..cf462ca
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern.edit/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Wed Jul 15 16:44:02 CEST 2009
+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/org.eclipse.egf.model.javapattern.edit/META-INF/MANIFEST.MF b/org.eclipse.egf.model.javapattern.edit/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..81168c4
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern.edit/META-INF/MANIFEST.MF
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.model.javapattern.edit;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.egf.model.edit.EGFJavaPatternEditPlugin$Implementation
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package:
+ org.eclipse.egf.model.edit,
+ org.eclipse.egf.model.javapattern.provider
+Require-Bundle:
+ org.eclipse.core.runtime,
+ org.eclipse.egf.model.javapattern;visibility:=reexport,
+ org.eclipse.emf.edit;visibility:=reexport,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.emf.ecore.edit;visibility:=reexport,
+ org.eclipse.egf.model;visibility:=reexport,
+ org.eclipse.egf.model.edit;visibility:=reexport
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.egf.model.javapattern.edit/about.html b/org.eclipse.egf.model.javapattern.edit/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern.edit/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/org.eclipse.egf.model.javapattern.edit/build.properties b/org.eclipse.egf.model.javapattern.edit/build.properties
new file mode 100644
index 0000000..062769e
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern.edit/build.properties
@@ -0,0 +1,18 @@
+##
+# 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
+##
+source.. = generated/
+output.. = bin/
+bin.includes = .,\
+ icons/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties
+src.includes = about.html
diff --git a/org.eclipse.egf.model.javapattern.edit/generated/org/eclipse/egf/model/edit/EGFJavaPatternEditPlugin.java b/org.eclipse.egf.model.javapattern.edit/generated/org/eclipse/egf/model/edit/EGFJavaPatternEditPlugin.java
new file mode 100644
index 0000000..ba8b5ee
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern.edit/generated/org/eclipse/egf/model/edit/EGFJavaPatternEditPlugin.java
@@ -0,0 +1,101 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.edit;
+
+import org.eclipse.egf.common.activator.EGFEclipsePlugin;
+
+import org.eclipse.emf.common.EMFPlugin;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.provider.EcoreEditPlugin;
+
+/**
+ * This is the central singleton for the JavaPattern edit plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class EGFJavaPatternEditPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final EGFJavaPatternEditPlugin INSTANCE = new EGFJavaPatternEditPlugin();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EGFJavaPatternEditPlugin() {
+ super(new ResourceLocator[] { EcoreEditPlugin.INSTANCE, EGFModelEditPlugin.INSTANCE, });
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends EGFEclipsePlugin {
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.model.javapattern.edit/generated/org/eclipse/egf/model/javapattern/provider/JavaNatureItemProvider.java b/org.eclipse.egf.model.javapattern.edit/generated/org/eclipse/egf/model/javapattern/provider/JavaNatureItemProvider.java
new file mode 100644
index 0000000..613bddb
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern.edit/generated/org/eclipse/egf/model/javapattern/provider/JavaNatureItemProvider.java
@@ -0,0 +1,132 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.javapattern.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.edit.EGFJavaPatternEditPlugin;
+import org.eclipse.egf.model.javapattern.JavaNature;
+
+import org.eclipse.egf.model.pattern.provider.PatternNatureItemProvider;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.javapattern.JavaNature} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class JavaNatureItemProvider extends PatternNatureItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public JavaNatureItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns JavaNature.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/JavaNature")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((JavaNature) object).getName();
+ return label == null || label.length() == 0 ? "[" + getString("_UI_JavaNature_type") + "]" : //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ label + " [" + getString("_UI_JavaNature_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EGFJavaPatternEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/org.eclipse.egf.model.javapattern.edit/generated/org/eclipse/egf/model/javapattern/provider/JavaPatternItemProviderAdapterFactory.java b/org.eclipse.egf.model.javapattern.edit/generated/org/eclipse/egf/model/javapattern/provider/JavaPatternItemProviderAdapterFactory.java
new file mode 100644
index 0000000..150d543
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern.edit/generated/org/eclipse/egf/model/javapattern/provider/JavaPatternItemProviderAdapterFactory.java
@@ -0,0 +1,323 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.javapattern.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.edit.EGFJavaPatternEditPlugin;
+import org.eclipse.egf.model.javapattern.JavaPatternFactory;
+
+import org.eclipse.egf.model.javapattern.util.JavaPatternAdapterFactory;
+
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternPackage;
+
+import org.eclipse.egf.model.pattern.util.PatternSwitch;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.emf.edit.command.CommandParameter;
+
+import org.eclipse.emf.edit.domain.EditingDomain;
+
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IChildCreationExtender;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class JavaPatternItemProviderAdapterFactory extends JavaPatternAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
+ /**
+ * This keeps track of the root adapter factory that delegates to this adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ComposedAdapterFactory parentAdapterFactory;
+
+ /**
+ * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+ /**
+ * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+ /**
+ * This constructs an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public JavaPatternItemProviderAdapterFactory() {
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ supportedTypes.add(IItemPropertySource.class);
+ supportedTypes.add(ITableItemLabelProvider.class);
+ supportedTypes.add(ITableItemColorProvider.class);
+ supportedTypes.add(ITableItemFontProvider.class);
+ supportedTypes.add(IItemColorProvider.class);
+ supportedTypes.add(IItemFontProvider.class);
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.javapattern.JavaNature} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected JavaNatureItemProvider javaNatureItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.javapattern.JavaNature}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createJavaNatureAdapter() {
+ if (javaNatureItemProvider == null) {
+ javaNatureItemProvider = new JavaNatureItemProvider(this);
+ }
+
+ return javaNatureItemProvider;
+ }
+
+ /**
+ * This returns the root adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ComposeableAdapterFactory getRootAdapterFactory() {
+ return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+ }
+
+ /**
+ * This sets the composed adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
+ this.parentAdapterFactory = parentAdapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return supportedTypes.contains(type) || super.isFactoryForType(type);
+ }
+
+ /**
+ * This implementation substitutes the factory itself as the key for the adapter.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter adapt(Notifier notifier, Object type) {
+ return super.adapt(notifier, this);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object adapt(Object object, Object type) {
+ if (isFactoryForType(type)) {
+ Object adapter = super.adapt(object, type);
+ if (!(type instanceof Class<?>) || (((Class<?>) type).isInstance(adapter))) {
+ return adapter;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * This adds a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void addListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void fireNotifyChanged(Notification notification) {
+ changeNotifier.fireNotifyChanged(notification);
+
+ if (parentAdapterFactory != null) {
+ parentAdapterFactory.fireNotifyChanged(notification);
+ }
+ }
+
+ /**
+ * This disposes all of the item providers created by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void dispose() {
+ if (javaNatureItemProvider != null)
+ javaNatureItemProvider.dispose();
+ }
+
+ /**
+ * A child creation extender for the {@link PatternPackage}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class PatternChildCreationExtender implements IChildCreationExtender {
+ /**
+ * The switch for creating child descriptors specific to each extended class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static class CreationSwitch extends PatternSwitch<Object> {
+ /**
+ * The child descriptors being populated.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected List<Object> newChildDescriptors;
+
+ /**
+ * The domain in which to create the children.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EditingDomain editingDomain;
+
+ /**
+ * Creates the a switch for populating child descriptors in the given domain.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ CreationSwitch(List<Object> newChildDescriptors, EditingDomain editingDomain) {
+ this.newChildDescriptors = newChildDescriptors;
+ this.editingDomain = editingDomain;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object casePattern(Pattern object) {
+ newChildDescriptors.add(createChildParameter(PatternPackage.Literals.PATTERN__NATURE, JavaPatternFactory.eINSTANCE.createJavaNature()));
+
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CommandParameter createChildParameter(Object feature, Object child) {
+ return new CommandParameter(null, feature, child);
+ }
+
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Collection<Object> getNewChildDescriptors(Object object, EditingDomain editingDomain) {
+ ArrayList<Object> result = new ArrayList<Object>();
+ new CreationSwitch(result, editingDomain).doSwitch((EObject) object);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceLocator getResourceLocator() {
+ return EGFJavaPatternEditPlugin.INSTANCE;
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.model.javapattern.edit/icons/full/ctool16/CreatePattern_nature_JavaNature.gif b/org.eclipse.egf.model.javapattern.edit/icons/full/ctool16/CreatePattern_nature_JavaNature.gif
new file mode 100644
index 0000000..cc38dd7
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern.edit/icons/full/ctool16/CreatePattern_nature_JavaNature.gif
Binary files differ
diff --git a/org.eclipse.egf.model.javapattern.edit/icons/full/obj16/JavaEngine.gif b/org.eclipse.egf.model.javapattern.edit/icons/full/obj16/JavaEngine.gif
new file mode 100644
index 0000000..4365960
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern.edit/icons/full/obj16/JavaEngine.gif
Binary files differ
diff --git a/org.eclipse.egf.model.javapattern.edit/icons/full/obj16/JavaNature.gif b/org.eclipse.egf.model.javapattern.edit/icons/full/obj16/JavaNature.gif
new file mode 100644
index 0000000..ef56c14
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern.edit/icons/full/obj16/JavaNature.gif
Binary files differ
diff --git a/org.eclipse.egf.model.javapattern.edit/icons/full/obj16/JavaRunner.gif b/org.eclipse.egf.model.javapattern.edit/icons/full/obj16/JavaRunner.gif
new file mode 100644
index 0000000..badaab0
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern.edit/icons/full/obj16/JavaRunner.gif
Binary files differ
diff --git a/org.eclipse.egf.model.javapattern.edit/plugin.properties b/org.eclipse.egf.model.javapattern.edit/plugin.properties
new file mode 100644
index 0000000..4f39b19
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern.edit/plugin.properties
@@ -0,0 +1,33 @@
+##
+# 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 Java Pattern Edit Support (Incubation)
+providerName = Eclipse Modeling Project
+
+_UI_CreateChild_text = {0}
+_UI_CreateChild_text2 = {1} | {0}
+_UI_CreateChild_text3 = {1}
+_UI_CreateChild_tooltip = Create New {0} Under {1} Feature
+_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}.
+_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
+
+_UI_PropertyDescriptor_description = The {0} of the {1}
+
+_UI_JavaNature_type = Java Nature
+_UI_JavaRunner_type = Java Runner
+_UI_Unknown_type = Object
+
+_UI_Unknown_datatype= Value
+
+_UI_JavaNature_className_feature = Class Name
+_UI_Unknown_feature = Unspecified
+
+_UI_JavaEngine_type = Java Engine
diff --git a/org.eclipse.egf.model.javapattern.edit/plugin.xml b/org.eclipse.egf.model.javapattern.edit/plugin.xml
new file mode 100644
index 0000000..5f4e782
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern.edit/plugin.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+
+<!--
+
+ 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>
+
+ <!-- ================================================================================= -->
+ <!-- JetPattern Model -->
+ <!-- ================================================================================= -->
+
+ <extension
+ point="org.eclipse.emf.edit.itemProviderAdapterFactories"
+ >
+ <factory
+ uri="http://www.eclipse.org/egf/1.0.0/javapattern"
+ class="org.eclipse.egf.model.javapattern.provider.JavaPatternItemProviderAdapterFactory"
+ supportedTypes=
+ "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+ org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+ org.eclipse.emf.edit.provider.ITreeItemContentProvider
+ org.eclipse.emf.edit.provider.IItemLabelProvider
+ org.eclipse.emf.edit.provider.IItemPropertySource
+ org.eclipse.emf.edit.provider.ITableItemLabelProvider
+ org.eclipse.emf.edit.provider.ITableItemColorProvider
+ org.eclipse.emf.edit.provider.ITableItemFontProvider
+ org.eclipse.emf.edit.provider.IItemColorProvider
+ org.eclipse.emf.edit.provider.IItemFontProvider"
+ />
+ </extension>
+
+ <extension
+ point="org.eclipse.emf.edit.childCreationExtenders"
+ >
+ <extender
+ uri="http://www.eclipse.org/egf/1.0.0/pattern"
+ class="org.eclipse.egf.model.javapattern.provider.JavaPatternItemProviderAdapterFactory$PatternChildCreationExtender"
+ />
+ </extension>
+
+</plugin>
diff --git a/org.eclipse.egf.model.javapattern/.classpath b/org.eclipse.egf.model.javapattern/.classpath
new file mode 100644
index 0000000..d711987
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="generated"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.egf.model.javapattern/.project b/org.eclipse.egf.model.javapattern/.project
new file mode 100644
index 0000000..53044c1
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.model.javapattern</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.model.javapattern/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egf.model.javapattern/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..ff28689
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:52:46 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.egf.model.javapattern/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egf.model.javapattern/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..ecdafb5
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Tue Jun 30 14:10:26 CEST 2009
+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/org.eclipse.egf.model.javapattern/META-INF/MANIFEST.MF b/org.eclipse.egf.model.javapattern/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..83b4ade
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern/META-INF/MANIFEST.MF
@@ -0,0 +1,20 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.model.javapattern;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.egf.model.EGFJavaPatternPlugin$Implementation
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package:
+ org.eclipse.egf.model.javapattern,
+ org.eclipse.egf.model.javapattern.impl,
+ org.eclipse.egf.model.javapattern.util
+Require-Bundle:
+ org.eclipse.core.runtime,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.emf.ecore.xmi;visibility:=reexport,
+ org.eclipse.egf.model;visibility:=reexport
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.egf.model.javapattern/about.html b/org.eclipse.egf.model.javapattern/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern/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/org.eclipse.egf.model.javapattern/build.properties b/org.eclipse.egf.model.javapattern/build.properties
new file mode 100644
index 0000000..15c41c2
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern/build.properties
@@ -0,0 +1,18 @@
+##
+# 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
+##
+source.. = generated/
+output.. = bin/
+bin.includes = .,\
+ model/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties
+src.includes = about.html
diff --git a/org.eclipse.egf.model.javapattern/generated/org/eclipse/egf/model/EGFJavaPatternPlugin.java b/org.eclipse.egf.model.javapattern/generated/org/eclipse/egf/model/EGFJavaPatternPlugin.java
new file mode 100644
index 0000000..06a596e
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern/generated/org/eclipse/egf/model/EGFJavaPatternPlugin.java
@@ -0,0 +1,99 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model;
+
+import org.eclipse.egf.common.activator.EGFEclipsePlugin;
+
+import org.eclipse.emf.common.EMFPlugin;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * This is the central singleton for the JavaPattern model plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class EGFJavaPatternPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final EGFJavaPatternPlugin INSTANCE = new EGFJavaPatternPlugin();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EGFJavaPatternPlugin() {
+ super(new ResourceLocator[] {});
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends EGFEclipsePlugin {
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.model.javapattern/generated/org/eclipse/egf/model/javapattern/JavaNature.java b/org.eclipse.egf.model.javapattern/generated/org/eclipse/egf/model/javapattern/JavaNature.java
new file mode 100644
index 0000000..e4d4874
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern/generated/org/eclipse/egf/model/javapattern/JavaNature.java
@@ -0,0 +1,28 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.javapattern;
+
+import org.eclipse.egf.model.pattern.PatternNature;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Java Nature</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.egf.model.javapattern.JavaPatternPackage#getJavaNature()
+ * @model
+ * @generated
+ */
+public interface JavaNature extends PatternNature {
+} // JavaNature
diff --git a/org.eclipse.egf.model.javapattern/generated/org/eclipse/egf/model/javapattern/JavaPatternFactory.java b/org.eclipse.egf.model.javapattern/generated/org/eclipse/egf/model/javapattern/JavaPatternFactory.java
new file mode 100644
index 0000000..e28ab8a
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern/generated/org/eclipse/egf/model/javapattern/JavaPatternFactory.java
@@ -0,0 +1,52 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.javapattern;
+
+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.egf.model.javapattern.JavaPatternPackage
+ * @generated
+ */
+public interface JavaPatternFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ JavaPatternFactory eINSTANCE = org.eclipse.egf.model.javapattern.impl.JavaPatternFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Java Nature</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Java Nature</em>'.
+ * @generated
+ */
+ JavaNature createJavaNature();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ JavaPatternPackage getJavaPatternPackage();
+
+} //JavaPatternFactory
diff --git a/org.eclipse.egf.model.javapattern/generated/org/eclipse/egf/model/javapattern/JavaPatternPackage.java b/org.eclipse.egf.model.javapattern/generated/org/eclipse/egf/model/javapattern/JavaPatternPackage.java
new file mode 100644
index 0000000..5029f26
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern/generated/org/eclipse/egf/model/javapattern/JavaPatternPackage.java
@@ -0,0 +1,158 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.javapattern;
+
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.javapattern.JavaPatternFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface JavaPatternPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "javapattern"; //$NON-NLS-1$
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/egf/1.0.0/javapattern"; //$NON-NLS-1$
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "javapattern"; //$NON-NLS-1$
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ JavaPatternPackage eINSTANCE = org.eclipse.egf.model.javapattern.impl.JavaPatternPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.javapattern.impl.JavaNatureImpl <em>Java Nature</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.javapattern.impl.JavaNatureImpl
+ * @see org.eclipse.egf.model.javapattern.impl.JavaPatternPackageImpl#getJavaNature()
+ * @generated
+ */
+ int JAVA_NATURE = 0;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int JAVA_NATURE__ID = PatternPackage.PATTERN_NATURE__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int JAVA_NATURE__DESCRIPTION = PatternPackage.PATTERN_NATURE__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int JAVA_NATURE__NAME = PatternPackage.PATTERN_NATURE__NAME;
+
+ /**
+ * The number of structural features of the '<em>Java Nature</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int JAVA_NATURE_FEATURE_COUNT = PatternPackage.PATTERN_NATURE_FEATURE_COUNT + 0;
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.javapattern.JavaNature <em>Java Nature</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Java Nature</em>'.
+ * @see org.eclipse.egf.model.javapattern.JavaNature
+ * @generated
+ */
+ EClass getJavaNature();
+
+ /**
+ * 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
+ */
+ JavaPatternFactory getJavaPatternFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.javapattern.impl.JavaNatureImpl <em>Java Nature</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.javapattern.impl.JavaNatureImpl
+ * @see org.eclipse.egf.model.javapattern.impl.JavaPatternPackageImpl#getJavaNature()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass JAVA_NATURE = eINSTANCE.getJavaNature();
+
+ }
+
+} // JavaPatternPackage
diff --git a/org.eclipse.egf.model.javapattern/generated/org/eclipse/egf/model/javapattern/impl/JavaNatureImpl.java b/org.eclipse.egf.model.javapattern/generated/org/eclipse/egf/model/javapattern/impl/JavaNatureImpl.java
new file mode 100644
index 0000000..92a7031
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern/generated/org/eclipse/egf/model/javapattern/impl/JavaNatureImpl.java
@@ -0,0 +1,60 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.javapattern.impl;
+
+import org.eclipse.egf.model.javapattern.JavaNature;
+import org.eclipse.egf.model.javapattern.JavaPatternPackage;
+import org.eclipse.egf.model.pattern.impl.PatternNatureImpl;
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Java Nature</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class JavaNatureImpl extends PatternNatureImpl implements JavaNature {
+ /**
+ * A set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected int eFlags = 0;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected JavaNatureImpl() {
+ super();
+ setName("Java"); //$NON-NLS-1$
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return JavaPatternPackage.Literals.JAVA_NATURE;
+ }
+
+} // JavaNatureImpl
diff --git a/org.eclipse.egf.model.javapattern/generated/org/eclipse/egf/model/javapattern/impl/JavaPatternFactoryImpl.java b/org.eclipse.egf.model.javapattern/generated/org/eclipse/egf/model/javapattern/impl/JavaPatternFactoryImpl.java
new file mode 100644
index 0000000..46e5f2a
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern/generated/org/eclipse/egf/model/javapattern/impl/JavaPatternFactoryImpl.java
@@ -0,0 +1,105 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.javapattern.impl;
+
+import org.eclipse.egf.model.javapattern.*;
+
+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;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class JavaPatternFactoryImpl extends EFactoryImpl implements JavaPatternFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static JavaPatternFactory init() {
+ try {
+ JavaPatternFactory theJavaPatternFactory = (JavaPatternFactory) EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/egf/1.0.0/javapattern"); //$NON-NLS-1$
+ if (theJavaPatternFactory != null) {
+ return theJavaPatternFactory;
+ }
+ } catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new JavaPatternFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public JavaPatternFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case JavaPatternPackage.JAVA_NATURE:
+ return createJavaNature();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public JavaNature createJavaNature() {
+ JavaNatureImpl javaNature = new JavaNatureImpl();
+ return javaNature;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public JavaPatternPackage getJavaPatternPackage() {
+ return (JavaPatternPackage) getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static JavaPatternPackage getPackage() {
+ return JavaPatternPackage.eINSTANCE;
+ }
+
+} //JavaPatternFactoryImpl
diff --git a/org.eclipse.egf.model.javapattern/generated/org/eclipse/egf/model/javapattern/impl/JavaPatternPackageImpl.java b/org.eclipse.egf.model.javapattern/generated/org/eclipse/egf/model/javapattern/impl/JavaPatternPackageImpl.java
new file mode 100644
index 0000000..a34c1eb
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern/generated/org/eclipse/egf/model/javapattern/impl/JavaPatternPackageImpl.java
@@ -0,0 +1,187 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.javapattern.impl;
+
+import org.eclipse.egf.model.javapattern.JavaNature;
+import org.eclipse.egf.model.javapattern.JavaPatternFactory;
+import org.eclipse.egf.model.javapattern.JavaPatternPackage;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class JavaPatternPackageImpl extends EPackageImpl implements JavaPatternPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass javaNatureEClass = 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.egf.model.javapattern.JavaPatternPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private JavaPatternPackageImpl() {
+ super(eNS_URI, JavaPatternFactory.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 JavaPatternPackage#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 JavaPatternPackage init() {
+ if (isInited)
+ return (JavaPatternPackage) EPackage.Registry.INSTANCE.getEPackage(JavaPatternPackage.eNS_URI);
+
+ // Obtain or create and register package
+ JavaPatternPackageImpl theJavaPatternPackage = (JavaPatternPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof JavaPatternPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new JavaPatternPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ PatternPackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theJavaPatternPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theJavaPatternPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theJavaPatternPackage.freeze();
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(JavaPatternPackage.eNS_URI, theJavaPatternPackage);
+ return theJavaPatternPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getJavaNature() {
+ return javaNatureEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public JavaPatternFactory getJavaPatternFactory() {
+ return (JavaPatternFactory) 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
+ javaNatureEClass = createEClass(JAVA_NATURE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized)
+ return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ PatternPackage thePatternPackage = (PatternPackage) EPackage.Registry.INSTANCE.getEPackage(PatternPackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ javaNatureEClass.getESuperTypes().add(thePatternPackage.getPatternNature());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(javaNatureEClass, JavaNature.class, "JavaNature", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} // JavaPatternPackageImpl
diff --git a/org.eclipse.egf.model.javapattern/generated/org/eclipse/egf/model/javapattern/util/JavaPatternAdapterFactory.java b/org.eclipse.egf.model.javapattern/generated/org/eclipse/egf/model/javapattern/util/JavaPatternAdapterFactory.java
new file mode 100644
index 0000000..4d160fa
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern/generated/org/eclipse/egf/model/javapattern/util/JavaPatternAdapterFactory.java
@@ -0,0 +1,207 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.javapattern.util;
+
+import org.eclipse.egf.model.fcore.ModelElement;
+import org.eclipse.egf.model.fcore.NamedModelElement;
+import org.eclipse.egf.model.javapattern.JavaNature;
+import org.eclipse.egf.model.javapattern.JavaPatternPackage;
+import org.eclipse.egf.model.pattern.PatternNature;
+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;
+
+/**
+ * <!-- 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.egf.model.javapattern.JavaPatternPackage
+ * @generated
+ */
+public class JavaPatternAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static JavaPatternPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public JavaPatternAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = JavaPatternPackage.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 JavaPatternSwitch<Adapter> modelSwitch = new JavaPatternSwitch<Adapter>() {
+ @Override
+ public Adapter caseJavaNature(JavaNature object) {
+ return createJavaNatureAdapter();
+ }
+
+ @Override
+ public Adapter caseModelElement(ModelElement object) {
+ return createModelElementAdapter();
+ }
+
+ @Override
+ public Adapter caseNamedModelElement(NamedModelElement object) {
+ return createNamedModelElementAdapter();
+ }
+
+ @Override
+ public Adapter casePatternNature(PatternNature object) {
+ return createPatternNatureAdapter();
+ }
+
+ @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.egf.model.javapattern.JavaNature <em>Java Nature</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.egf.model.javapattern.JavaNature
+ * @generated
+ */
+ public Adapter createJavaNatureAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fcore.ModelElement <em>Model Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore
+ * cases;
+ * it's useful to ignore a case when inheritance will catch all the cases
+ * anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.egf.model.fcore.ModelElement
+ * @generated
+ */
+ public Adapter createModelElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fcore.NamedModelElement <em>Named Model Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.egf.model.fcore.NamedModelElement
+ * @generated
+ */
+ public Adapter createNamedModelElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.pattern.PatternNature <em>Nature</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.egf.model.pattern.PatternNature
+ * @generated
+ */
+ public Adapter createPatternNatureAdapter() {
+ 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;
+ }
+
+} // JavaPatternAdapterFactory
diff --git a/org.eclipse.egf.model.javapattern/generated/org/eclipse/egf/model/javapattern/util/JavaPatternResourceFactoryImpl.java b/org.eclipse.egf.model.javapattern/generated/org/eclipse/egf/model/javapattern/util/JavaPatternResourceFactoryImpl.java
new file mode 100644
index 0000000..d8857e4
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern/generated/org/eclipse/egf/model/javapattern/util/JavaPatternResourceFactoryImpl.java
@@ -0,0 +1,51 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.javapattern.util;
+
+import org.eclipse.emf.common.util.URI;
+
+import org.eclipse.emf.ecore.resource.Resource;
+
+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource Factory</b> associated with the package.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.javapattern.util.JavaPatternResourceImpl
+ * @generated
+ */
+public class JavaPatternResourceFactoryImpl extends ResourceFactoryImpl {
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public JavaPatternResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ Resource result = new JavaPatternResourceImpl(uri);
+ return result;
+ }
+
+} //JavaPatternResourceFactoryImpl
diff --git a/org.eclipse.egf.model.javapattern/generated/org/eclipse/egf/model/javapattern/util/JavaPatternResourceImpl.java b/org.eclipse.egf.model.javapattern/generated/org/eclipse/egf/model/javapattern/util/JavaPatternResourceImpl.java
new file mode 100644
index 0000000..6b69fbe
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern/generated/org/eclipse/egf/model/javapattern/util/JavaPatternResourceImpl.java
@@ -0,0 +1,168 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.javapattern.util;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.egf.model.uri.ModelSchemeAware;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.xmi.XMIResource;
+import org.eclipse.emf.ecore.xmi.XMLParserPool;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+import org.eclipse.emf.ecore.xmi.XMLSave.XMLTypeInfo;
+import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl;
+import org.eclipse.emf.ecore.xmi.impl.XMLParserPoolImpl;
+import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource </b> associated with the package.
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.egf.model.javapattern.util.JavaPatternResourceFactoryImpl
+ * @generated
+ */
+public class JavaPatternResourceImpl extends XMIResourceImpl {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private List<Object> lookupTable = new ArrayList<Object>();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private XMLParserPool parserPool = new XMLParserPoolImpl();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private Map<Object, Object> nameToFeatureMap = new HashMap<Object, Object>();
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param uri
+ * the URI of the new resource.
+ * @generated
+ */
+ public JavaPatternResourceImpl(URI uri) {
+ super(uri);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean useIDAttributes() {
+ return false;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean useUUIDs() {
+ return true;
+ }
+
+ /**
+ * Called when the object is unloaded.
+ * This implementation {@link InternalEObject#eSetProxyURI sets} the object to be a proxy
+ * and clears the {@link #eAdapters adapters}.
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=292866
+ * Fix available in HEAD: 2.6.0.I200911020144
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void unloaded(InternalEObject internalEObject) {
+ // Ensure that an unresolved containment proxy's URI isn't reset.
+ //
+ if (!internalEObject.eIsProxy()) {
+ internalEObject.eSetProxyURI(uri.appendFragment(getURIFragment(internalEObject)));
+ }
+ internalEObject.eAdapters().clear();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void init() {
+ super.init();
+ setTrackingModification(true);
+ setEncoding("UTF-8"); //$NON-NLS-1$
+ setXMIVersion("2.1"); //$NON-NLS-1$
+ // Save Options
+ getDefaultSaveOptions().put(XMLResource.OPTION_DISABLE_NOTIFY, Boolean.TRUE);
+ getDefaultSaveOptions().put(XMLResource.OPTION_CONFIGURATION_CACHE, Boolean.TRUE);
+ getDefaultSaveOptions().put(XMLResource.OPTION_USE_CACHED_LOOKUP_TABLE, lookupTable);
+ getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ getDefaultSaveOptions().put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
+ getDefaultSaveOptions().put(XMLResource.OPTION_SAVE_TYPE_INFORMATION, new XMLTypeInfo() {
+ public boolean shouldSaveType(EClass objectType, EClassifier featureType, EStructuralFeature feature) {
+ return objectType != featureType && objectType != XMLTypePackage.Literals.ANY_TYPE;
+ }
+
+ public boolean shouldSaveType(EClass objectType, EClass featureType, EStructuralFeature feature) {
+ return objectType != featureType && objectType != XMLTypePackage.Literals.ANY_TYPE;
+ }
+ });
+ getDefaultSaveOptions().put(XMLResource.OPTION_LINE_WIDTH, new Integer(80));
+ // Avoid relative paths from workspace resources to plugin resources.
+ getDefaultSaveOptions().put(XMLResource.OPTION_URI_HANDLER, new ModelSchemeAware());
+ getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ getDefaultSaveOptions().put(XMIResource.OPTION_USE_XMI_TYPE, Boolean.TRUE);
+ // Load Options
+ getDefaultLoadOptions().put(XMLResource.OPTION_DEFER_ATTACHMENT, Boolean.FALSE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_DEFER_IDREF_RESOLUTION, Boolean.FALSE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_DISABLE_NOTIFY, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_DEPRECATED_METHODS, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_PARSER_POOL, parserPool);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_XML_NAME_TO_FEATURE_MAP, nameToFeatureMap);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ }
+
+} // JavaPatternResourceImpl
diff --git a/org.eclipse.egf.model.javapattern/generated/org/eclipse/egf/model/javapattern/util/JavaPatternSwitch.java b/org.eclipse.egf.model.javapattern/generated/org/eclipse/egf/model/javapattern/util/JavaPatternSwitch.java
new file mode 100644
index 0000000..3921661
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern/generated/org/eclipse/egf/model/javapattern/util/JavaPatternSwitch.java
@@ -0,0 +1,206 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.javapattern.util;
+
+import java.util.List;
+
+import org.eclipse.egf.model.fcore.ModelElement;
+import org.eclipse.egf.model.fcore.NamedModelElement;
+import org.eclipse.egf.model.javapattern.JavaNature;
+import org.eclipse.egf.model.javapattern.JavaPatternPackage;
+import org.eclipse.egf.model.pattern.PatternNature;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- 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.egf.model.javapattern.JavaPatternPackage
+ * @generated
+ */
+public class JavaPatternSwitch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static JavaPatternPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public JavaPatternSwitch() {
+ if (modelPackage == null) {
+ modelPackage = JavaPatternPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * 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
+ */
+ public T doSwitch(EObject theEObject) {
+ return doSwitch(theEObject.eClass(), theEObject);
+ }
+
+ /**
+ * 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
+ */
+ @SuppressWarnings("all")
+ protected T doSwitch(EClass theEClass, EObject theEObject) {
+ if (theEClass.eContainer() == modelPackage) {
+ return doSwitch(theEClass.getClassifierID(), theEObject);
+ } else {
+ List<EClass> eSuperTypes = theEClass.getESuperTypes();
+ return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject);
+ }
+ }
+
+ /**
+ * 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
+ */
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case JavaPatternPackage.JAVA_NATURE: {
+ JavaNature javaNature = (JavaNature) theEObject;
+ T result = caseJavaNature(javaNature);
+ if (result == null)
+ result = casePatternNature(javaNature);
+ if (result == null)
+ result = caseNamedModelElement(javaNature);
+ if (result == null)
+ result = caseModelElement(javaNature);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ default:
+ return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Java Nature</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>Java Nature</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseJavaNature(JavaNature object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Model Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Model Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseModelElement(ModelElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Named Model Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Named Model Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseNamedModelElement(NamedModelElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Nature</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>Nature</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePatternNature(PatternNature 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
+ */
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} // JavaPatternSwitch
diff --git a/org.eclipse.egf.model.javapattern/model/JavaPattern.ecore b/org.eclipse.egf.model.javapattern/model/JavaPattern.ecore
new file mode 100644
index 0000000..a591e04
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern/model/JavaPattern.ecore
@@ -0,0 +1,7 @@
+<?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="javapattern"
+ nsURI="http://www.eclipse.org/egf/1.0.0/javapattern" nsPrefix="javapattern">
+ <eClassifiers xsi:type="ecore:EClass" name="JavaNature" eSuperTypes="platform:/plugin/org.eclipse.egf.model/model/Pattern.ecore#//PatternNature"/>
+</ecore:EPackage>
diff --git a/org.eclipse.egf.model.javapattern/model/JavaPattern.genmodel b/org.eclipse.egf.model.javapattern/model/JavaPattern.genmodel
new file mode 100644
index 0000000..e48015e
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern/model/JavaPattern.genmodel
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.egf.model.javapattern/generated"
+ creationSubmenus="true" editDirectory="/org.eclipse.egf.model.javapattern.edit/generated"
+ editorDirectory="/org.eclipse.egf.model.javapattern.editor/generated" modelPluginID="org.eclipse.egf.model.javapattern"
+ templateDirectory="/org.eclipse.egf.model/templates" dynamicTemplates="true" modelName="JavaPattern"
+ modelPluginClass="org.eclipse.egf.model.EGFJavaPatternPlugin" editPluginClass="org.eclipse.egf.model.edit.EGFJavaPatternEditPlugin"
+ editorPluginClass="org.eclipse.egf.model.editor.EGFJavaPatternEditorPlugin" nonNLSMarkers="true"
+ rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl.Container" codeFormatting="true"
+ testsDirectory="/org.eclipse.egf.model.javapattern.tests/generated" booleanFlagsField="eFlags"
+ importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0" copyrightFields="false"
+ optimizedHasChildren="true" tableProviders="true" colorProviders="true" fontProviders="true"
+ packedEnums="true" usedGenPackages="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore platform:/plugin/org.eclipse.egf.model/model/Fcore.genmodel#//fcore platform:/plugin/org.eclipse.egf.model/model/Pattern.genmodel#//pattern platform:/plugin/org.eclipse.egf.model/model/Types.genmodel#//types">
+ <foreignModel>JavaPattern.ecore</foreignModel>
+ <templatePluginVariables>org.eclipse.egf.model</templatePluginVariables>
+ <genPackages prefix="JavaPattern" basePackage="org.eclipse.egf.model" resource="XMI"
+ disposableProviderFactory="true" generateExampleClass="false" dataTypeConverters="true"
+ multipleEditorPages="false" childCreationExtenders="true" ecorePackage="JavaPattern.ecore#/">
+ <genClasses ecoreClass="JavaPattern.ecore#//JavaNature"/>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/org.eclipse.egf.model.javapattern/plugin.properties b/org.eclipse.egf.model.javapattern/plugin.properties
new file mode 100644
index 0000000..e36a847
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern/plugin.properties
@@ -0,0 +1,18 @@
+
+# <copyright>
+##
+# 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
+##
+# </copyright>
+#
+# $Id$
+
+pluginName = EGF Java Pattern Model (Incubation)
+providerName = Eclipse Modeling Project
diff --git a/org.eclipse.egf.model.javapattern/plugin.xml b/org.eclipse.egf.model.javapattern/plugin.xml
new file mode 100644
index 0000000..0c8b062
--- /dev/null
+++ b/org.eclipse.egf.model.javapattern/plugin.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+
+<!--
+
+ 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>
+
+ <!-- ================================================================================= -->
+ <!-- JetPattern Model -->
+ <!-- ================================================================================= -->
+
+ <extension
+ point="org.eclipse.emf.ecore.generated_package"
+ >
+ <package
+ uri="http://www.eclipse.org/egf/1.0.0/javapattern"
+ class="org.eclipse.egf.model.javapattern.JavaPatternPackage"
+ genModel="model/JavaPattern.genmodel"
+ />
+ </extension>
+
+ <extension
+ point="org.eclipse.emf.ecore.extension_parser"
+ >
+ <parser
+ type="javapattern"
+ class="org.eclipse.egf.model.javapattern.util.JavaPatternResourceFactoryImpl"
+ />
+ </extension>
+
+</plugin>
diff --git a/org.eclipse.egf.model.jetpattern.edit/.classpath b/org.eclipse.egf.model.jetpattern.edit/.classpath
new file mode 100644
index 0000000..d711987
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern.edit/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="generated"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.egf.model.jetpattern.edit/.project b/org.eclipse.egf.model.jetpattern.edit/.project
new file mode 100644
index 0000000..ba12fe9
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern.edit/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.model.jetpattern.edit</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.model.jetpattern.edit/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egf.model.jetpattern.edit/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..f7872c6
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern.edit/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:53:14 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.egf.model.jetpattern.edit/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egf.model.jetpattern.edit/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..8a496c4
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern.edit/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Tue Jun 23 10:17:19 CEST 2009
+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/org.eclipse.egf.model.jetpattern.edit/META-INF/MANIFEST.MF b/org.eclipse.egf.model.jetpattern.edit/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..6c50207
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern.edit/META-INF/MANIFEST.MF
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.model.jetpattern.edit;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.egf.model.edit.EGFJetPatternEditPlugin$Implementation
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package:
+ org.eclipse.egf.model.edit,
+ org.eclipse.egf.model.jetpattern.provider
+Require-Bundle:
+ org.eclipse.core.runtime,
+ org.eclipse.egf.model.jetpattern;visibility:=reexport,
+ org.eclipse.emf.edit;visibility:=reexport,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.emf.ecore.edit;visibility:=reexport,
+ org.eclipse.egf.model;visibility:=reexport,
+ org.eclipse.egf.model.edit;visibility:=reexport
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.egf.model.jetpattern.edit/about.html b/org.eclipse.egf.model.jetpattern.edit/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern.edit/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/org.eclipse.egf.model.jetpattern.edit/build.properties b/org.eclipse.egf.model.jetpattern.edit/build.properties
new file mode 100644
index 0000000..a8a3ec9
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern.edit/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+source.. = generated/
+output.. = bin/
+bin.includes = .,\
+ icons/,\
+ META-INF/,\
+ about.html,\
+ plugin.xml,\
+ plugin.properties
+src.includes = about.html
diff --git a/org.eclipse.egf.model.jetpattern.edit/generated/org/eclipse/egf/model/edit/EGFJetPatternEditPlugin.java b/org.eclipse.egf.model.jetpattern.edit/generated/org/eclipse/egf/model/edit/EGFJetPatternEditPlugin.java
new file mode 100644
index 0000000..d9891dd
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern.edit/generated/org/eclipse/egf/model/edit/EGFJetPatternEditPlugin.java
@@ -0,0 +1,101 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.edit;
+
+import org.eclipse.egf.common.activator.EGFEclipsePlugin;
+
+import org.eclipse.emf.common.EMFPlugin;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.provider.EcoreEditPlugin;
+
+/**
+ * This is the central singleton for the JetPattern edit plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class EGFJetPatternEditPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final EGFJetPatternEditPlugin INSTANCE = new EGFJetPatternEditPlugin();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EGFJetPatternEditPlugin() {
+ super(new ResourceLocator[] { EcoreEditPlugin.INSTANCE, EGFModelEditPlugin.INSTANCE, });
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends EGFEclipsePlugin {
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.model.jetpattern.edit/generated/org/eclipse/egf/model/jetpattern/provider/JetNatureItemProvider.java b/org.eclipse.egf.model.jetpattern.edit/generated/org/eclipse/egf/model/jetpattern/provider/JetNatureItemProvider.java
new file mode 100644
index 0000000..bde488f
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern.edit/generated/org/eclipse/egf/model/jetpattern/provider/JetNatureItemProvider.java
@@ -0,0 +1,133 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.jetpattern.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.edit.EGFJetPatternEditPlugin;
+
+import org.eclipse.egf.model.jetpattern.JetNature;
+
+import org.eclipse.egf.model.pattern.provider.PatternNatureItemProvider;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.egf.model.jetpattern.JetNature} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class JetNatureItemProvider extends PatternNatureItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource, ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public JetNatureItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns JetNature.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/JetNature")); //$NON-NLS-1$
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((JetNature) object).getName();
+ return label == null || label.length() == 0 ? "[" + getString("_UI_JetNature_type") + "]" : //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ label + " [" + getString("_UI_JetNature_type") + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EGFJetPatternEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/org.eclipse.egf.model.jetpattern.edit/generated/org/eclipse/egf/model/jetpattern/provider/JetPatternItemProviderAdapterFactory.java b/org.eclipse.egf.model.jetpattern.edit/generated/org/eclipse/egf/model/jetpattern/provider/JetPatternItemProviderAdapterFactory.java
new file mode 100644
index 0000000..73fa856
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern.edit/generated/org/eclipse/egf/model/jetpattern/provider/JetPatternItemProviderAdapterFactory.java
@@ -0,0 +1,324 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.jetpattern.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.egf.model.edit.EGFJetPatternEditPlugin;
+
+import org.eclipse.egf.model.jetpattern.JetPatternFactory;
+
+import org.eclipse.egf.model.jetpattern.util.JetPatternAdapterFactory;
+
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternPackage;
+
+import org.eclipse.egf.model.pattern.util.PatternSwitch;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.emf.edit.command.CommandParameter;
+
+import org.eclipse.emf.edit.domain.EditingDomain;
+
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IChildCreationExtender;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemColorProvider;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITableItemColorProvider;
+import org.eclipse.emf.edit.provider.ITableItemFontProvider;
+import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class JetPatternItemProviderAdapterFactory extends JetPatternAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
+ /**
+ * This keeps track of the root adapter factory that delegates to this adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ComposedAdapterFactory parentAdapterFactory;
+
+ /**
+ * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+ /**
+ * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+ /**
+ * This constructs an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public JetPatternItemProviderAdapterFactory() {
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ supportedTypes.add(IItemPropertySource.class);
+ supportedTypes.add(ITableItemLabelProvider.class);
+ supportedTypes.add(ITableItemColorProvider.class);
+ supportedTypes.add(ITableItemFontProvider.class);
+ supportedTypes.add(IItemColorProvider.class);
+ supportedTypes.add(IItemFontProvider.class);
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.egf.model.jetpattern.JetNature} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected JetNatureItemProvider jetNatureItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.egf.model.jetpattern.JetNature}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createJetNatureAdapter() {
+ if (jetNatureItemProvider == null) {
+ jetNatureItemProvider = new JetNatureItemProvider(this);
+ }
+
+ return jetNatureItemProvider;
+ }
+
+ /**
+ * This returns the root adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ComposeableAdapterFactory getRootAdapterFactory() {
+ return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+ }
+
+ /**
+ * This sets the composed adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
+ this.parentAdapterFactory = parentAdapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return supportedTypes.contains(type) || super.isFactoryForType(type);
+ }
+
+ /**
+ * This implementation substitutes the factory itself as the key for the adapter.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter adapt(Notifier notifier, Object type) {
+ return super.adapt(notifier, this);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object adapt(Object object, Object type) {
+ if (isFactoryForType(type)) {
+ Object adapter = super.adapt(object, type);
+ if (!(type instanceof Class<?>) || (((Class<?>) type).isInstance(adapter))) {
+ return adapter;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * This adds a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void addListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void fireNotifyChanged(Notification notification) {
+ changeNotifier.fireNotifyChanged(notification);
+
+ if (parentAdapterFactory != null) {
+ parentAdapterFactory.fireNotifyChanged(notification);
+ }
+ }
+
+ /**
+ * This disposes all of the item providers created by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void dispose() {
+ if (jetNatureItemProvider != null)
+ jetNatureItemProvider.dispose();
+ }
+
+ /**
+ * A child creation extender for the {@link PatternPackage}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class PatternChildCreationExtender implements IChildCreationExtender {
+ /**
+ * The switch for creating child descriptors specific to each extended class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static class CreationSwitch extends PatternSwitch<Object> {
+ /**
+ * The child descriptors being populated.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected List<Object> newChildDescriptors;
+
+ /**
+ * The domain in which to create the children.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EditingDomain editingDomain;
+
+ /**
+ * Creates the a switch for populating child descriptors in the given domain.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ CreationSwitch(List<Object> newChildDescriptors, EditingDomain editingDomain) {
+ this.newChildDescriptors = newChildDescriptors;
+ this.editingDomain = editingDomain;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object casePattern(Pattern object) {
+ newChildDescriptors.add(createChildParameter(PatternPackage.Literals.PATTERN__NATURE, JetPatternFactory.eINSTANCE.createJetNature()));
+
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CommandParameter createChildParameter(Object feature, Object child) {
+ return new CommandParameter(null, feature, child);
+ }
+
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Collection<Object> getNewChildDescriptors(Object object, EditingDomain editingDomain) {
+ ArrayList<Object> result = new ArrayList<Object>();
+ new CreationSwitch(result, editingDomain).doSwitch((EObject) object);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceLocator getResourceLocator() {
+ return EGFJetPatternEditPlugin.INSTANCE;
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.model.jetpattern.edit/icons/full/ctool16/CreatePattern_nature_JetNature.gif b/org.eclipse.egf.model.jetpattern.edit/icons/full/ctool16/CreatePattern_nature_JetNature.gif
new file mode 100644
index 0000000..c62191b
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern.edit/icons/full/ctool16/CreatePattern_nature_JetNature.gif
Binary files differ
diff --git a/org.eclipse.egf.model.jetpattern.edit/icons/full/obj16/JetEngine.gif b/org.eclipse.egf.model.jetpattern.edit/icons/full/obj16/JetEngine.gif
new file mode 100644
index 0000000..9041598
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern.edit/icons/full/obj16/JetEngine.gif
Binary files differ
diff --git a/org.eclipse.egf.model.jetpattern.edit/icons/full/obj16/JetNature.gif b/org.eclipse.egf.model.jetpattern.edit/icons/full/obj16/JetNature.gif
new file mode 100644
index 0000000..8f74869
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern.edit/icons/full/obj16/JetNature.gif
Binary files differ
diff --git a/org.eclipse.egf.model.jetpattern.edit/icons/full/obj16/JetRunner.gif b/org.eclipse.egf.model.jetpattern.edit/icons/full/obj16/JetRunner.gif
new file mode 100644
index 0000000..c51c2a5
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern.edit/icons/full/obj16/JetRunner.gif
Binary files differ
diff --git a/org.eclipse.egf.model.jetpattern.edit/plugin.properties b/org.eclipse.egf.model.jetpattern.edit/plugin.properties
new file mode 100644
index 0000000..01154c9
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern.edit/plugin.properties
@@ -0,0 +1,38 @@
+
+# <copyright>
+##
+# 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
+##
+# </copyright>
+#
+# $Id$
+
+pluginName = EGF Jet Pattern Edit (Incubation)
+providerName = Eclipse Modeling Project
+
+_UI_CreateChild_text = {0}
+_UI_CreateChild_text2 = {1} {0}
+_UI_CreateChild_text3 = {1}
+_UI_CreateChild_tooltip = Create New {0} Under {1} Feature
+_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}.
+_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
+
+_UI_PropertyDescriptor_description = The {0} of the {1}
+
+_UI_JetNature_type = Jet Nature
+_UI_JetRunner_type = Jet Runner
+_UI_Unknown_type = Object
+
+_UI_Unknown_datatype= Value
+
+_UI_Unknown_feature = Unspecified
+
+_UI_JetNature_templateClassName_feature = Template Class Name
+_UI_JetEngine_type = Jet Engine
diff --git a/org.eclipse.egf.model.jetpattern.edit/plugin.xml b/org.eclipse.egf.model.jetpattern.edit/plugin.xml
new file mode 100644
index 0000000..d6f70d2
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern.edit/plugin.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+
+<!--
+
+ 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>
+
+ <!-- ================================================================================= -->
+ <!-- JetPattern Model -->
+ <!-- ================================================================================= -->
+
+ <extension
+ point="org.eclipse.emf.edit.itemProviderAdapterFactories"
+ >
+ <factory
+ uri="http://www.eclipse.org/egf/1.0.0/jetpattern"
+ class="org.eclipse.egf.model.jetpattern.provider.JetPatternItemProviderAdapterFactory"
+ supportedTypes=
+ "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+ org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+ org.eclipse.emf.edit.provider.ITreeItemContentProvider
+ org.eclipse.emf.edit.provider.IItemLabelProvider
+ org.eclipse.emf.edit.provider.IItemPropertySource
+ org.eclipse.emf.edit.provider.ITableItemLabelProvider
+ org.eclipse.emf.edit.provider.ITableItemColorProvider
+ org.eclipse.emf.edit.provider.ITableItemFontProvider
+ org.eclipse.emf.edit.provider.IItemColorProvider
+ org.eclipse.emf.edit.provider.IItemFontProvider"
+ />
+ </extension>
+
+ <extension
+ point="org.eclipse.emf.edit.childCreationExtenders"
+ >
+ <extender
+ uri="http://www.eclipse.org/egf/1.0.0/pattern"
+ class="org.eclipse.egf.model.jetpattern.provider.JetPatternItemProviderAdapterFactory$PatternChildCreationExtender"
+ />
+ </extension>
+
+</plugin>
diff --git a/org.eclipse.egf.model.jetpattern/.classpath b/org.eclipse.egf.model.jetpattern/.classpath
new file mode 100644
index 0000000..d711987
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="generated"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.egf.model.jetpattern/.project b/org.eclipse.egf.model.jetpattern/.project
new file mode 100644
index 0000000..292cb7d
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.model.jetpattern</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.model.jetpattern/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egf.model.jetpattern/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..dba73a4
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:53:05 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.egf.model.jetpattern/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egf.model.jetpattern/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..59ae94b
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Tue Jun 23 09:53:47 CEST 2009
+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/org.eclipse.egf.model.jetpattern/META-INF/MANIFEST.MF b/org.eclipse.egf.model.jetpattern/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..38e89d7
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern/META-INF/MANIFEST.MF
@@ -0,0 +1,20 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.model.jetpattern;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.egf.model.EGFJetPatternPlugin$Implementation
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package:
+ org.eclipse.egf.model.jetpattern,
+ org.eclipse.egf.model.jetpattern.impl,
+ org.eclipse.egf.model.jetpattern.util
+Require-Bundle:
+ org.eclipse.core.runtime,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.emf.ecore.xmi;visibility:=reexport,
+ org.eclipse.egf.model;visibility:=reexport
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.egf.model.jetpattern/about.html b/org.eclipse.egf.model.jetpattern/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern/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/org.eclipse.egf.model.jetpattern/build.properties b/org.eclipse.egf.model.jetpattern/build.properties
new file mode 100644
index 0000000..9d8479a
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+source.. = generated/
+output.. = bin/
+bin.includes = .,\
+ model/,\
+ META-INF/,\
+ about.html,\
+ plugin.xml,\
+ plugin.properties
+src.includes = about.html
diff --git a/org.eclipse.egf.model.jetpattern/generated/org/eclipse/egf/model/EGFJetPatternPlugin.java b/org.eclipse.egf.model.jetpattern/generated/org/eclipse/egf/model/EGFJetPatternPlugin.java
new file mode 100644
index 0000000..3b92579
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern/generated/org/eclipse/egf/model/EGFJetPatternPlugin.java
@@ -0,0 +1,99 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model;
+
+import org.eclipse.egf.common.activator.EGFEclipsePlugin;
+
+import org.eclipse.emf.common.EMFPlugin;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * This is the central singleton for the JetPattern model plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class EGFJetPatternPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final EGFJetPatternPlugin INSTANCE = new EGFJetPatternPlugin();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EGFJetPatternPlugin() {
+ super(new ResourceLocator[] {});
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends EGFEclipsePlugin {
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.model.jetpattern/generated/org/eclipse/egf/model/jetpattern/JetNature.java b/org.eclipse.egf.model.jetpattern/generated/org/eclipse/egf/model/jetpattern/JetNature.java
new file mode 100644
index 0000000..450fefe
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern/generated/org/eclipse/egf/model/jetpattern/JetNature.java
@@ -0,0 +1,28 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.jetpattern;
+
+import org.eclipse.egf.model.pattern.PatternNature;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Jet Nature</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.egf.model.jetpattern.JetPatternPackage#getJetNature()
+ * @model
+ * @generated
+ */
+public interface JetNature extends PatternNature {
+} // JetNature
diff --git a/org.eclipse.egf.model.jetpattern/generated/org/eclipse/egf/model/jetpattern/JetPatternFactory.java b/org.eclipse.egf.model.jetpattern/generated/org/eclipse/egf/model/jetpattern/JetPatternFactory.java
new file mode 100644
index 0000000..fc85bc8
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern/generated/org/eclipse/egf/model/jetpattern/JetPatternFactory.java
@@ -0,0 +1,52 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.jetpattern;
+
+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.egf.model.jetpattern.JetPatternPackage
+ * @generated
+ */
+public interface JetPatternFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ JetPatternFactory eINSTANCE = org.eclipse.egf.model.jetpattern.impl.JetPatternFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Jet Nature</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Jet Nature</em>'.
+ * @generated
+ */
+ JetNature createJetNature();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ JetPatternPackage getJetPatternPackage();
+
+} //JetPatternFactory
diff --git a/org.eclipse.egf.model.jetpattern/generated/org/eclipse/egf/model/jetpattern/JetPatternPackage.java b/org.eclipse.egf.model.jetpattern/generated/org/eclipse/egf/model/jetpattern/JetPatternPackage.java
new file mode 100644
index 0000000..31dde10
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern/generated/org/eclipse/egf/model/jetpattern/JetPatternPackage.java
@@ -0,0 +1,158 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.jetpattern;
+
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.jetpattern.JetPatternFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface JetPatternPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "jetpattern"; //$NON-NLS-1$
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/egf/1.0.0/jetpattern"; //$NON-NLS-1$
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "jetpattern"; //$NON-NLS-1$
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ JetPatternPackage eINSTANCE = org.eclipse.egf.model.jetpattern.impl.JetPatternPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.jetpattern.impl.JetNatureImpl <em>Jet Nature</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.jetpattern.impl.JetNatureImpl
+ * @see org.eclipse.egf.model.jetpattern.impl.JetPatternPackageImpl#getJetNature()
+ * @generated
+ */
+ int JET_NATURE = 0;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int JET_NATURE__ID = PatternPackage.PATTERN_NATURE__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int JET_NATURE__DESCRIPTION = PatternPackage.PATTERN_NATURE__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int JET_NATURE__NAME = PatternPackage.PATTERN_NATURE__NAME;
+
+ /**
+ * The number of structural features of the '<em>Jet Nature</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int JET_NATURE_FEATURE_COUNT = PatternPackage.PATTERN_NATURE_FEATURE_COUNT + 0;
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.jetpattern.JetNature <em>Jet Nature</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Jet Nature</em>'.
+ * @see org.eclipse.egf.model.jetpattern.JetNature
+ * @generated
+ */
+ EClass getJetNature();
+
+ /**
+ * 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
+ */
+ JetPatternFactory getJetPatternFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.jetpattern.impl.JetNatureImpl <em>Jet Nature</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.jetpattern.impl.JetNatureImpl
+ * @see org.eclipse.egf.model.jetpattern.impl.JetPatternPackageImpl#getJetNature()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass JET_NATURE = eINSTANCE.getJetNature();
+
+ }
+
+} // JetPatternPackage
diff --git a/org.eclipse.egf.model.jetpattern/generated/org/eclipse/egf/model/jetpattern/impl/JetNatureImpl.java b/org.eclipse.egf.model.jetpattern/generated/org/eclipse/egf/model/jetpattern/impl/JetNatureImpl.java
new file mode 100644
index 0000000..8316f2e
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern/generated/org/eclipse/egf/model/jetpattern/impl/JetNatureImpl.java
@@ -0,0 +1,60 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.jetpattern.impl;
+
+import org.eclipse.egf.model.jetpattern.JetNature;
+import org.eclipse.egf.model.jetpattern.JetPatternPackage;
+import org.eclipse.egf.model.pattern.impl.PatternNatureImpl;
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Jet Nature</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class JetNatureImpl extends PatternNatureImpl implements JetNature {
+ /**
+ * A set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected int eFlags = 0;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected JetNatureImpl() {
+ super();
+ setName("JET"); //$NON-NLS-1$
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return JetPatternPackage.Literals.JET_NATURE;
+ }
+
+} // JetNatureImpl
diff --git a/org.eclipse.egf.model.jetpattern/generated/org/eclipse/egf/model/jetpattern/impl/JetPatternFactoryImpl.java b/org.eclipse.egf.model.jetpattern/generated/org/eclipse/egf/model/jetpattern/impl/JetPatternFactoryImpl.java
new file mode 100644
index 0000000..e371f7a
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern/generated/org/eclipse/egf/model/jetpattern/impl/JetPatternFactoryImpl.java
@@ -0,0 +1,105 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.jetpattern.impl;
+
+import org.eclipse.egf.model.jetpattern.*;
+
+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;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class JetPatternFactoryImpl extends EFactoryImpl implements JetPatternFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static JetPatternFactory init() {
+ try {
+ JetPatternFactory theJetPatternFactory = (JetPatternFactory) EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/egf/1.0.0/jetpattern"); //$NON-NLS-1$
+ if (theJetPatternFactory != null) {
+ return theJetPatternFactory;
+ }
+ } catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new JetPatternFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public JetPatternFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case JetPatternPackage.JET_NATURE:
+ return createJetNature();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public JetNature createJetNature() {
+ JetNatureImpl jetNature = new JetNatureImpl();
+ return jetNature;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public JetPatternPackage getJetPatternPackage() {
+ return (JetPatternPackage) getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static JetPatternPackage getPackage() {
+ return JetPatternPackage.eINSTANCE;
+ }
+
+} //JetPatternFactoryImpl
diff --git a/org.eclipse.egf.model.jetpattern/generated/org/eclipse/egf/model/jetpattern/impl/JetPatternPackageImpl.java b/org.eclipse.egf.model.jetpattern/generated/org/eclipse/egf/model/jetpattern/impl/JetPatternPackageImpl.java
new file mode 100644
index 0000000..506106f
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern/generated/org/eclipse/egf/model/jetpattern/impl/JetPatternPackageImpl.java
@@ -0,0 +1,187 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.jetpattern.impl;
+
+import org.eclipse.egf.model.jetpattern.JetNature;
+import org.eclipse.egf.model.jetpattern.JetPatternFactory;
+import org.eclipse.egf.model.jetpattern.JetPatternPackage;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class JetPatternPackageImpl extends EPackageImpl implements JetPatternPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass jetNatureEClass = 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.egf.model.jetpattern.JetPatternPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private JetPatternPackageImpl() {
+ super(eNS_URI, JetPatternFactory.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 JetPatternPackage#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 JetPatternPackage init() {
+ if (isInited)
+ return (JetPatternPackage) EPackage.Registry.INSTANCE.getEPackage(JetPatternPackage.eNS_URI);
+
+ // Obtain or create and register package
+ JetPatternPackageImpl theJetPatternPackage = (JetPatternPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof JetPatternPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new JetPatternPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ PatternPackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theJetPatternPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theJetPatternPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theJetPatternPackage.freeze();
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(JetPatternPackage.eNS_URI, theJetPatternPackage);
+ return theJetPatternPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getJetNature() {
+ return jetNatureEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public JetPatternFactory getJetPatternFactory() {
+ return (JetPatternFactory) 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
+ jetNatureEClass = createEClass(JET_NATURE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized)
+ return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ PatternPackage thePatternPackage = (PatternPackage) EPackage.Registry.INSTANCE.getEPackage(PatternPackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ jetNatureEClass.getESuperTypes().add(thePatternPackage.getPatternNature());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(jetNatureEClass, JetNature.class, "JetNature", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} // JetPatternPackageImpl
diff --git a/org.eclipse.egf.model.jetpattern/generated/org/eclipse/egf/model/jetpattern/util/JetPatternAdapterFactory.java b/org.eclipse.egf.model.jetpattern/generated/org/eclipse/egf/model/jetpattern/util/JetPatternAdapterFactory.java
new file mode 100644
index 0000000..c265134
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern/generated/org/eclipse/egf/model/jetpattern/util/JetPatternAdapterFactory.java
@@ -0,0 +1,207 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.jetpattern.util;
+
+import org.eclipse.egf.model.fcore.ModelElement;
+import org.eclipse.egf.model.fcore.NamedModelElement;
+import org.eclipse.egf.model.jetpattern.JetNature;
+import org.eclipse.egf.model.jetpattern.JetPatternPackage;
+import org.eclipse.egf.model.pattern.PatternNature;
+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;
+
+/**
+ * <!-- 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.egf.model.jetpattern.JetPatternPackage
+ * @generated
+ */
+public class JetPatternAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static JetPatternPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public JetPatternAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = JetPatternPackage.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 JetPatternSwitch<Adapter> modelSwitch = new JetPatternSwitch<Adapter>() {
+ @Override
+ public Adapter caseJetNature(JetNature object) {
+ return createJetNatureAdapter();
+ }
+
+ @Override
+ public Adapter caseModelElement(ModelElement object) {
+ return createModelElementAdapter();
+ }
+
+ @Override
+ public Adapter caseNamedModelElement(NamedModelElement object) {
+ return createNamedModelElementAdapter();
+ }
+
+ @Override
+ public Adapter casePatternNature(PatternNature object) {
+ return createPatternNatureAdapter();
+ }
+
+ @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.egf.model.jetpattern.JetNature <em>Jet Nature</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.egf.model.jetpattern.JetNature
+ * @generated
+ */
+ public Adapter createJetNatureAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fcore.ModelElement <em>Model Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore
+ * cases;
+ * it's useful to ignore a case when inheritance will catch all the cases
+ * anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.egf.model.fcore.ModelElement
+ * @generated
+ */
+ public Adapter createModelElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fcore.NamedModelElement <em>Named Model Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.egf.model.fcore.NamedModelElement
+ * @generated
+ */
+ public Adapter createNamedModelElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.pattern.PatternNature <em>Nature</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.egf.model.pattern.PatternNature
+ * @generated
+ */
+ public Adapter createPatternNatureAdapter() {
+ 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;
+ }
+
+} // JetPatternAdapterFactory
diff --git a/org.eclipse.egf.model.jetpattern/generated/org/eclipse/egf/model/jetpattern/util/JetPatternResourceFactoryImpl.java b/org.eclipse.egf.model.jetpattern/generated/org/eclipse/egf/model/jetpattern/util/JetPatternResourceFactoryImpl.java
new file mode 100644
index 0000000..82f9a0d
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern/generated/org/eclipse/egf/model/jetpattern/util/JetPatternResourceFactoryImpl.java
@@ -0,0 +1,51 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.jetpattern.util;
+
+import org.eclipse.emf.common.util.URI;
+
+import org.eclipse.emf.ecore.resource.Resource;
+
+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource Factory</b> associated with the package.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.jetpattern.util.JetPatternResourceImpl
+ * @generated
+ */
+public class JetPatternResourceFactoryImpl extends ResourceFactoryImpl {
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public JetPatternResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ Resource result = new JetPatternResourceImpl(uri);
+ return result;
+ }
+
+} //JetPatternResourceFactoryImpl
diff --git a/org.eclipse.egf.model.jetpattern/generated/org/eclipse/egf/model/jetpattern/util/JetPatternResourceImpl.java b/org.eclipse.egf.model.jetpattern/generated/org/eclipse/egf/model/jetpattern/util/JetPatternResourceImpl.java
new file mode 100644
index 0000000..cb8c5b4
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern/generated/org/eclipse/egf/model/jetpattern/util/JetPatternResourceImpl.java
@@ -0,0 +1,168 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.jetpattern.util;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.egf.model.uri.ModelSchemeAware;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.xmi.XMIResource;
+import org.eclipse.emf.ecore.xmi.XMLParserPool;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+import org.eclipse.emf.ecore.xmi.XMLSave.XMLTypeInfo;
+import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl;
+import org.eclipse.emf.ecore.xmi.impl.XMLParserPoolImpl;
+import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource </b> associated with the package.
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.egf.model.jetpattern.util.JetPatternResourceFactoryImpl
+ * @generated
+ */
+public class JetPatternResourceImpl extends XMIResourceImpl {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private List<Object> lookupTable = new ArrayList<Object>();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private XMLParserPool parserPool = new XMLParserPoolImpl();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private Map<Object, Object> nameToFeatureMap = new HashMap<Object, Object>();
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param uri
+ * the URI of the new resource.
+ * @generated
+ */
+ public JetPatternResourceImpl(URI uri) {
+ super(uri);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean useIDAttributes() {
+ return false;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean useUUIDs() {
+ return true;
+ }
+
+ /**
+ * Called when the object is unloaded.
+ * This implementation {@link InternalEObject#eSetProxyURI sets} the object to be a proxy
+ * and clears the {@link #eAdapters adapters}.
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=292866
+ * Fix available in HEAD: 2.6.0.I200911020144
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void unloaded(InternalEObject internalEObject) {
+ // Ensure that an unresolved containment proxy's URI isn't reset.
+ //
+ if (!internalEObject.eIsProxy()) {
+ internalEObject.eSetProxyURI(uri.appendFragment(getURIFragment(internalEObject)));
+ }
+ internalEObject.eAdapters().clear();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void init() {
+ super.init();
+ setTrackingModification(true);
+ setEncoding("UTF-8"); //$NON-NLS-1$
+ setXMIVersion("2.1"); //$NON-NLS-1$
+ // Save Options
+ getDefaultSaveOptions().put(XMLResource.OPTION_DISABLE_NOTIFY, Boolean.TRUE);
+ getDefaultSaveOptions().put(XMLResource.OPTION_CONFIGURATION_CACHE, Boolean.TRUE);
+ getDefaultSaveOptions().put(XMLResource.OPTION_USE_CACHED_LOOKUP_TABLE, lookupTable);
+ getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ getDefaultSaveOptions().put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
+ getDefaultSaveOptions().put(XMLResource.OPTION_SAVE_TYPE_INFORMATION, new XMLTypeInfo() {
+ public boolean shouldSaveType(EClass objectType, EClassifier featureType, EStructuralFeature feature) {
+ return objectType != featureType && objectType != XMLTypePackage.Literals.ANY_TYPE;
+ }
+
+ public boolean shouldSaveType(EClass objectType, EClass featureType, EStructuralFeature feature) {
+ return objectType != featureType && objectType != XMLTypePackage.Literals.ANY_TYPE;
+ }
+ });
+ getDefaultSaveOptions().put(XMLResource.OPTION_LINE_WIDTH, new Integer(80));
+ // Avoid relative paths from workspace resources to plugin resources.
+ getDefaultSaveOptions().put(XMLResource.OPTION_URI_HANDLER, new ModelSchemeAware());
+ getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ getDefaultSaveOptions().put(XMIResource.OPTION_USE_XMI_TYPE, Boolean.TRUE);
+ // Load Options
+ getDefaultLoadOptions().put(XMLResource.OPTION_DEFER_ATTACHMENT, Boolean.FALSE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_DEFER_IDREF_RESOLUTION, Boolean.FALSE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_DISABLE_NOTIFY, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_DEPRECATED_METHODS, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_PARSER_POOL, parserPool);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_XML_NAME_TO_FEATURE_MAP, nameToFeatureMap);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ }
+
+} // JetPatternResourceImpl
diff --git a/org.eclipse.egf.model.jetpattern/generated/org/eclipse/egf/model/jetpattern/util/JetPatternSwitch.java b/org.eclipse.egf.model.jetpattern/generated/org/eclipse/egf/model/jetpattern/util/JetPatternSwitch.java
new file mode 100644
index 0000000..c399f25
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern/generated/org/eclipse/egf/model/jetpattern/util/JetPatternSwitch.java
@@ -0,0 +1,206 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.jetpattern.util;
+
+import java.util.List;
+
+import org.eclipse.egf.model.fcore.ModelElement;
+import org.eclipse.egf.model.fcore.NamedModelElement;
+import org.eclipse.egf.model.jetpattern.JetNature;
+import org.eclipse.egf.model.jetpattern.JetPatternPackage;
+import org.eclipse.egf.model.pattern.PatternNature;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- 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.egf.model.jetpattern.JetPatternPackage
+ * @generated
+ */
+public class JetPatternSwitch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static JetPatternPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public JetPatternSwitch() {
+ if (modelPackage == null) {
+ modelPackage = JetPatternPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * 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
+ */
+ public T doSwitch(EObject theEObject) {
+ return doSwitch(theEObject.eClass(), theEObject);
+ }
+
+ /**
+ * 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
+ */
+ @SuppressWarnings("all")
+ protected T doSwitch(EClass theEClass, EObject theEObject) {
+ if (theEClass.eContainer() == modelPackage) {
+ return doSwitch(theEClass.getClassifierID(), theEObject);
+ } else {
+ List<EClass> eSuperTypes = theEClass.getESuperTypes();
+ return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject);
+ }
+ }
+
+ /**
+ * 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
+ */
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case JetPatternPackage.JET_NATURE: {
+ JetNature jetNature = (JetNature) theEObject;
+ T result = caseJetNature(jetNature);
+ if (result == null)
+ result = casePatternNature(jetNature);
+ if (result == null)
+ result = caseNamedModelElement(jetNature);
+ if (result == null)
+ result = caseModelElement(jetNature);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ default:
+ return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Jet Nature</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>Jet Nature</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseJetNature(JetNature object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Model Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Model Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseModelElement(ModelElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Named Model Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Named Model Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseNamedModelElement(NamedModelElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Nature</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>Nature</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePatternNature(PatternNature 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
+ */
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} // JetPatternSwitch
diff --git a/org.eclipse.egf.model.jetpattern/model/JetPattern.ecd b/org.eclipse.egf.model.jetpattern/model/JetPattern.ecd
new file mode 100644
index 0000000..96ce44d
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern/model/JetPattern.ecd
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<editmodel:ClassDiagramEditModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editmodel="editmodel.xmi" xmlns:options="options.xmi" name="pattern.jet" size="1233,502" id="platform:/resource/org.eclipse.egf.fc/model/JetPattern.ecore#/" metadata="emf-1.0" initialized="true" tag="100" key="32303037303533312D313030206F72672E65636C697073652E6567662E6663">
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.2/@sourceConnections.0" name="PatternNature" location="92,71" size="223,30" id="platform:/resource/org.eclipse.egf.fc/model/Pattern.ecore#//PatternNature" runTimeClassModel="">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <model href="Pattern.ecore#//PatternNature"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.3/@sourceConnections.0" name="PatternRunner" location="465,60" size="227,86" id="platform:/resource/org.eclipse.egf.fc/model/Pattern.ecore#//PatternRunner" runTimeClassModel=" run(), translate()">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="82,36">
+ <children xsi:type="editmodel:MethodEditModel" name="run" id="platform:/resource/org.eclipse.egf.fc/model/Pattern.ecore#//PatternRunner/run">
+ <model href="Pattern.ecore#//PatternRunner/run"/>
+ </children>
+ <children xsi:type="editmodel:MethodEditModel" name="translate" id="platform:/resource/org.eclipse.egf.fc/model/Pattern.ecore#//PatternRunner/translate">
+ <model href="Pattern.ecore#//PatternRunner/translate"/>
+ </children>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <model href="Pattern.ecore#//PatternRunner"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="JetNature" location="92,226" size="232,76" id="platform:/resource/org.eclipse.egf.fc/model/JetPattern.ecore#//JetNature" runTimeClassModel="templateFilePath,compileTemplate">
+ <children xsi:type="editmodel:CompartmentEditModel">
+ <children xsi:type="editmodel:AttributeEditModel" name="compileTemplate" id="platform:/resource/org.eclipse.egf.fc/model/JetPattern.ecore#//JetNature/compileTemplate">
+ <model href="JetPattern.ecore#//JetNature/compileTemplate"/>
+ </children>
+ <children xsi:type="editmodel:AttributeEditModel" name="templateFilePath" id="platform:/resource/org.eclipse.egf.fc/model/JetPattern.ecore#//JetNature/templateFilePath">
+ <model href="JetPattern.ecore#//JetNature/templateFilePath"/>
+ </children>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" source="//@children.2" target="//@children.0" targetEnd="//@children.2/@sourceConnections.0/@children.1" sourceEnd="//@children.2/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="111,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="111,30"/>
+ </sourceConnections>
+ <model href="JetPattern.ecore#//JetNature"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="JetRunner" location="508,226" size="119,30" id="platform:/resource/org.eclipse.egf.fc/model/JetPattern.ecore#//JetRunner" runTimeClassModel="">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" source="//@children.3" target="//@children.1" targetEnd="//@children.3/@sourceConnections.0/@children.1" sourceEnd="//@children.3/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="59,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="102,86"/>
+ </sourceConnections>
+ <model href="JetPattern.ecore#//JetRunner"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <model href="JetPattern.ecore#/"/>
+ <diagramOptions xsi:type="options:ClassDiagramOptions" properties="wireOptions=1;Product=eEmf"/>
+ <boardSetting rulersVisibility="false" snapToGeometry="true" gridEnabled="true" gridSpacing="15,15" gridOrigin="0,0" rulerUnit="pixel" gridVisibility="false">
+ <leftRuler/>
+ <topRuler/>
+ </boardSetting>
+ <classDiagramPreferences xsi:type="editmodel:EMFClassDiagramPreference" showPopupBars="true" showConnectionHandles="true" attributeSorter="Natural" methodSorter="Natural" showClassStereotype="true" showPackageStereotype="true"/>
+</editmodel:ClassDiagramEditModel>
diff --git a/org.eclipse.egf.model.jetpattern/model/JetPattern.ecore b/org.eclipse.egf.model.jetpattern/model/JetPattern.ecore
new file mode 100644
index 0000000..3d923c8
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern/model/JetPattern.ecore
@@ -0,0 +1,7 @@
+<?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="jetpattern"
+ nsURI="http://www.eclipse.org/egf/1.0.0/jetpattern" nsPrefix="jetpattern">
+ <eClassifiers xsi:type="ecore:EClass" name="JetNature" eSuperTypes="../../org.eclipse.egf.model/model/Pattern.ecore#//PatternNature"/>
+</ecore:EPackage>
diff --git a/org.eclipse.egf.model.jetpattern/model/JetPattern.genmodel b/org.eclipse.egf.model.jetpattern/model/JetPattern.genmodel
new file mode 100644
index 0000000..72bf192
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern/model/JetPattern.genmodel
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.egf.model.jetpattern/generated"
+ editDirectory="/org.eclipse.egf.model.jetpattern.edit/generated" editorDirectory="/org.eclipse.egf.model.jetpattern.editor/generated"
+ modelPluginID="org.eclipse.egf.model.jetpattern" templateDirectory="/org.eclipse.egf.model/templates"
+ dynamicTemplates="true" modelName="JetPattern" modelPluginClass="org.eclipse.egf.model.EGFJetPatternPlugin"
+ editPluginClass="org.eclipse.egf.model.edit.EGFJetPatternEditPlugin" editorPluginClass="org.eclipse.egf.model.editor.EGFJetPatternEditorPlugin"
+ nonNLSMarkers="true" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl.Container"
+ codeFormatting="true" testsDirectory="/org.eclipse.egf.model.tests/generated"
+ booleanFlagsField="eFlags" importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0"
+ copyrightFields="false" editPluginID="org.eclipse.egf.model.jetpattern.edit" editorPluginID="org.eclipse.egf.model.jetpattern.editor"
+ optimizedHasChildren="true" tableProviders="true" colorProviders="true" fontProviders="true"
+ packedEnums="true" usedGenPackages="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore ../../org.eclipse.egf.model/model/Fcore.genmodel#//fcore ../../org.eclipse.egf.model/model/Pattern.genmodel#//pattern ../../org.eclipse.egf.model/model/Types.genmodel#//types">
+ <foreignModel>JetPattern.ecore</foreignModel>
+ <templatePluginVariables>org.eclipse.egf.model</templatePluginVariables>
+ <genPackages prefix="JetPattern" basePackage="org.eclipse.egf.model" resource="XMI"
+ disposableProviderFactory="true" generateExampleClass="false" dataTypeConverters="true"
+ multipleEditorPages="false" childCreationExtenders="true" contentTypeIdentifier=""
+ ecorePackage="JetPattern.ecore#/">
+ <genClasses ecoreClass="JetPattern.ecore#//JetNature"/>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/org.eclipse.egf.model.jetpattern/plugin.properties b/org.eclipse.egf.model.jetpattern/plugin.properties
new file mode 100644
index 0000000..6eab2ee
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern/plugin.properties
@@ -0,0 +1,18 @@
+
+# <copyright>
+##
+# 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
+##
+# </copyright>
+#
+# $Id$
+
+pluginName = EGF Jet Pattern Model (Incubation)
+providerName = Eclipse Modeling Project
diff --git a/org.eclipse.egf.model.jetpattern/plugin.xml b/org.eclipse.egf.model.jetpattern/plugin.xml
new file mode 100644
index 0000000..fd73ffc
--- /dev/null
+++ b/org.eclipse.egf.model.jetpattern/plugin.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+
+<!--
+
+ 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>
+
+ <!-- ================================================================================= -->
+ <!-- JetPattern Model -->
+ <!-- ================================================================================= -->
+
+ <extension
+ point="org.eclipse.emf.ecore.generated_package"
+ >
+ <package
+ uri="http://www.eclipse.org/egf/1.0.0/jetpattern"
+ class="org.eclipse.egf.model.jetpattern.JetPatternPackage"
+ genModel="model/JetPattern.genmodel"
+ />
+ </extension>
+
+ <extension
+ point="org.eclipse.emf.ecore.extension_parser"
+ >
+ <parser
+ type="jetpattern"
+ class="org.eclipse.egf.model.jetpattern.util.JetPatternResourceFactoryImpl"
+ />
+ </extension>
+
+</plugin>
diff --git a/org.eclipse.egf.model/.classpath b/org.eclipse.egf.model/.classpath
new file mode 100644
index 0000000..b9259d1
--- /dev/null
+++ b/org.eclipse.egf.model/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="generated"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.egf.model/.euml2 b/org.eclipse.egf.model/.euml2
new file mode 100644
index 0000000..30c973c
--- /dev/null
+++ b/org.eclipse.egf.model/.euml2
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ASCII"?>
+<properties:ProjectDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:properties="properties.xmi" modelDir="" libraryDir="" profileDir="" templateDir="">
+ <profiles id="org.eclipse.uml2.uml.resources.StandardProfile" description="Standard Profile" uri="platform:/plugin/org.eclipse.uml2.uml.resources/profiles/Standard.profile.uml" exported="false" kind="system"/>
+ <profiles id="com.soyatec.uml.JavaProfile" description="Java Profile" uri="platform:/plugin/com.soyatec.core/profiles/Java.profile.uml" exported="false" kind="system"/>
+ <profiles id="com.soyatec.uml.SoyatecProfile" description="Soyatec Profile" uri="platform:/plugin/com.soyatec.core/profiles/Soyatec.profile.uml" exported="false" kind="system"/>
+ <profiles id="com.soyatec.uml.ArchetypeProfile" description="Archetype Profile" uri="platform:/plugin/com.soyatec.core/profiles/Archetype.profile.uml" exported="false" kind="system"/>
+</properties:ProjectDescription>
diff --git a/org.eclipse.egf.model/.project b/org.eclipse.egf.model/.project
new file mode 100644
index 0000000..f7dbc26
--- /dev/null
+++ b/org.eclipse.egf.model/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.model</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.model/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egf.model/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..ba5c71d
--- /dev/null
+++ b/org.eclipse.egf.model/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:51:23 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.egf.model/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egf.model/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..7031fee
--- /dev/null
+++ b/org.eclipse.egf.model/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Fri May 08 08:38:35 CEST 2009
+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/org.eclipse.egf.model/.umlproject b/org.eclipse.egf.model/.umlproject
new file mode 100644
index 0000000..30c973c
--- /dev/null
+++ b/org.eclipse.egf.model/.umlproject
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ASCII"?>
+<properties:ProjectDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:properties="properties.xmi" modelDir="" libraryDir="" profileDir="" templateDir="">
+ <profiles id="org.eclipse.uml2.uml.resources.StandardProfile" description="Standard Profile" uri="platform:/plugin/org.eclipse.uml2.uml.resources/profiles/Standard.profile.uml" exported="false" kind="system"/>
+ <profiles id="com.soyatec.uml.JavaProfile" description="Java Profile" uri="platform:/plugin/com.soyatec.core/profiles/Java.profile.uml" exported="false" kind="system"/>
+ <profiles id="com.soyatec.uml.SoyatecProfile" description="Soyatec Profile" uri="platform:/plugin/com.soyatec.core/profiles/Soyatec.profile.uml" exported="false" kind="system"/>
+ <profiles id="com.soyatec.uml.ArchetypeProfile" description="Archetype Profile" uri="platform:/plugin/com.soyatec.core/profiles/Archetype.profile.uml" exported="false" kind="system"/>
+</properties:ProjectDescription>
diff --git a/org.eclipse.egf.model/META-INF/MANIFEST.MF b/org.eclipse.egf.model/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..efff661
--- /dev/null
+++ b/org.eclipse.egf.model/META-INF/MANIFEST.MF
@@ -0,0 +1,37 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.model;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.egf.model.EGFModelPlugin$Implementation
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package:
+ org.eclipse.egf.model,
+ org.eclipse.egf.model.domain,
+ org.eclipse.egf.model.domain.impl,
+ org.eclipse.egf.model.domain.util,
+ org.eclipse.egf.model.fcore,
+ org.eclipse.egf.model.fcore.impl,
+ org.eclipse.egf.model.fcore.util,
+ org.eclipse.egf.model.helper,
+ org.eclipse.egf.model.mapping,
+ org.eclipse.egf.model.mapping.impl,
+ org.eclipse.egf.model.mapping.util,
+ org.eclipse.egf.model.pattern,
+ org.eclipse.egf.model.pattern.impl,
+ org.eclipse.egf.model.pattern.util,
+ org.eclipse.egf.model.types,
+ org.eclipse.egf.model.types.impl,
+ org.eclipse.egf.model.types.util,
+ org.eclipse.egf.model.uri
+Require-Bundle:
+ org.eclipse.core.runtime,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.emf.ecore.xmi;visibility:=reexport,
+ org.eclipse.emf.validation;visibility:=reexport,
+ org.eclipse.emf.transaction;visibility:=reexport,
+ org.eclipse.egf.core;visibility:=reexport
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.egf.model/about.html b/org.eclipse.egf.model/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/org.eclipse.egf.model/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/org.eclipse.egf.model/build.properties b/org.eclipse.egf.model/build.properties
new file mode 100644
index 0000000..20beb4c
--- /dev/null
+++ b/org.eclipse.egf.model/build.properties
@@ -0,0 +1,21 @@
+##
+# 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
+##
+source.. = generated/,\
+ src/
+output.. = bin/
+bin.includes = .,\
+ model/,\
+ META-INF/,\
+ about.html,\
+ plugin.xml,\
+ plugin.properties
+src.includes = templates/,\
+ about.html
diff --git a/org.eclipse.egf.model/generated/Dependencies.ucd b/org.eclipse.egf.model/generated/Dependencies.ucd
new file mode 100644
index 0000000..67b5ed2
--- /dev/null
+++ b/org.eclipse.egf.model/generated/Dependencies.ucd
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<editmodel:ClassDiagramEditModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editmodel="editmodel.xmi" xmlns:options="options.xmi" name="Dependencies" size="1613,957" id="." metadata="uml2-1.0" initialized="true" scrolledY="137" tag="100" key="32303037303533312D313030206F72672E65636C697073652E6567662E6D6F64656C">
+ <children xsi:type="editmodel:PackageEditModel" name="org.eclipse.egf.model.fcore" location="751,296" size="253,31" id="org.eclipse.egf.model.fcore">
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.eclipse.egf.model.fcore-Soyatec::Import->org.eclipse.egf.core.production.context" source="//@children.0" target="//@children.4" targetEnd="//@children.0/@sourceConnections.0/@children.2" label="//@children.0/@sourceConnections.0/@children.0" sourceEnd="//@children.0/@sourceConnections.0/@children.1" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«Import»" size="51,14" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="62,31" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="287,0"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:PackageEditModel" targetConnections="//@children.3/@sourceConnections.0" name="org.eclipse.egf.core" location="659,906" size="194,31" id="org.eclipse.egf.core"/>
+ <children xsi:type="editmodel:PackageEditModel" targetConnections="//@children.5/@sourceConnections.2" name="org.eclipse.egf.core.production.task" location="50,380" size="323,31" id="org.eclipse.egf.core.production.task"/>
+ <children xsi:type="editmodel:PackageEditModel" name="org.eclipse.egf.model.fcore.util" location="582,678" size="282,31" id="org.eclipse.egf.model.fcore.util">
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.eclipse.egf.model.fcore.util-Standard::Call->org.eclipse.egf.core" source="//@children.3" target="//@children.1" targetEnd="//@children.3/@sourceConnections.0/@children.2" label="//@children.3/@sourceConnections.0/@children.0" sourceEnd="//@children.3/@sourceConnections.0/@children.1" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«Call»" size="0,14" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="173,31" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="96,0"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.eclipse.egf.model.fcore.util-Soyatec::Import->org.eclipse.egf.core.production.context" source="//@children.3" target="//@children.4" targetEnd="//@children.3/@sourceConnections.1/@children.2" label="//@children.3/@sourceConnections.1/@children.0" sourceEnd="//@children.3/@sourceConnections.1/@children.1" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«Import»" size="51,14" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="140,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="196,31"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:PackageEditModel" targetConnections="//@children.3/@sourceConnections.1 //@children.5/@sourceConnections.0 //@children.0/@sourceConnections.0" name="org.eclipse.egf.core.production.context" location="526,428" size="350,31" id="org.eclipse.egf.core.production.context"/>
+ <children xsi:type="editmodel:PackageEditModel" name="org.eclipse.egf.model.fcore.impl" location="293,303" size="290,31" id="org.eclipse.egf.model.fcore.impl">
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.eclipse.egf.model.fcore.impl-Soyatec::Import->org.eclipse.egf.core.production.context" source="//@children.5" target="//@children.4" targetEnd="//@children.5/@sourceConnections.0/@children.2" label="//@children.5/@sourceConnections.0/@children.0" sourceEnd="//@children.5/@sourceConnections.0/@children.1" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«Import»" size="51,14" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="261,31" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="28,0"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.eclipse.egf.model.fcore.impl-Standard::Call->org.eclipse.egf.core.production" source="//@children.5" target="//@children.6" targetEnd="//@children.5/@sourceConnections.1/@children.2" label="//@children.5/@sourceConnections.1/@children.0" sourceEnd="//@children.5/@sourceConnections.1/@children.1" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«Call»" size="35,14" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="93,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="191,31"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.eclipse.egf.model.fcore.impl-Standard::Call->org.eclipse.egf.core.production.task" source="//@children.5" target="//@children.2" targetEnd="//@children.5/@sourceConnections.2/@children.2" label="//@children.5/@sourceConnections.2/@children.0" sourceEnd="//@children.5/@sourceConnections.2/@children.1" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«Call»" size="0,14" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="39,31" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="282,0"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:PackageEditModel" targetConnections="//@children.5/@sourceConnections.1" name="org.eclipse.egf.core.production" location="195,165" size="285,31" id="org.eclipse.egf.core.production"/>
+ <diagramOptions xsi:type="options:ClassDiagramOptions" interactive="false" properties="projectFilter=org.eclipse.egf.core.production;libraryFilter=org.eclipse.egf.core.production,;ModelFrozen=true;ComputedContent=true;displayOptions=1;open=org.eclipse.egf.model.fcore,org.eclipse.egf.model.fcore.impl,org.eclipse.egf.core.production.task,org.eclipse.egf.core,org.eclipse.egf.model.fcore.util,org.eclipse.egf.core.production.context,org.eclipse.egf.core.production;Product=eDepend;link=org.eclipse.egf.model.fcore.util-Standard::Call->org.eclipse.egf.core,org.eclipse.egf.model.fcore.util-Soyatec::Import->org.eclipse.egf.core.production.context,org.eclipse.egf.model.fcore.impl-Soyatec::Import->org.eclipse.egf.core.production.context,org.eclipse.egf.model.fcore.impl-Standard::Call->org.eclipse.egf.core.production,org.eclipse.egf.model.fcore.impl-Standard::Call->org.eclipse.egf.core.production.task,org.eclipse.egf.model.fcore-Soyatec::Import->org.eclipse.egf.core.production.context;shadowedElements=org.eclipse.egf.core.production.task,org.eclipse.egf.core,org.eclipse.egf.core.production.context,org.eclipse.egf.core.production;wireOptions=4"/>
+ <boardSetting snapToGeometry="true" gridEnabled="true" gridSpacing="15,15" gridOrigin="0,0" rulerUnit="pixel" gridVisibility="false">
+ <leftRuler/>
+ <topRuler/>
+ </boardSetting>
+ <classDiagramPreferences xsi:type="editmodel:UMLClassDiagramPreference" showPopupBars="true" showConnectionHandles="true" attributeSorter="Natural" methodSorter="Natural" showDependencyStereotype="true" showEnumerationStereotype="false" innerClassSorter="Natural" showPublicInnerClasses="true" showPackageInnerClasses="true" showStaticInnerClasses="true" packageIndication="3"/>
+</editmodel:ClassDiagramEditModel>
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/EGFModelPlugin.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/EGFModelPlugin.java
new file mode 100644
index 0000000..ca98776
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/EGFModelPlugin.java
@@ -0,0 +1,135 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.egf.common.activator.EGFEclipsePlugin;
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+
+/**
+ * This is the central singleton for the Fcore model plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class EGFModelPlugin extends EMFPlugin {
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final EGFModelPlugin INSTANCE = new EGFModelPlugin();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EGFModelPlugin() {
+ super(new ResourceLocator[] { EcorePlugin.INSTANCE, });
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends EGFEclipsePlugin {
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ *
+ * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ @Override
+ public void start(BundleContext context_p) throws Exception {
+ super.start(context_p);
+ // Force EGF Core Platform Plugin initialization
+ Bundle platformBundle = Platform.getBundle("org.eclipse.egf.core.platform"); //$NON-NLS-1$
+ if (platformBundle != null) {
+ try {
+ platformBundle.start(Bundle.START_TRANSIENT);
+ } catch (BundleException e) {
+ logError(e);
+ }
+ }
+ // Force EGF Core PDE Plugin initialization
+ Bundle pdeBundle = Platform.getBundle("org.eclipse.egf.core.pde"); //$NON-NLS-1$
+ if (pdeBundle != null) {
+ try {
+ pdeBundle.start(Bundle.START_TRANSIENT);
+ } catch (BundleException e) {
+ logError(e);
+ }
+ }
+ }
+
+ }
+
+}
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/Domain.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/Domain.java
new file mode 100644
index 0000000..8a50979
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/Domain.java
@@ -0,0 +1,29 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.domain;
+
+import org.eclipse.egf.model.fcore.ModelElement;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Domain</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.egf.model.domain.DomainPackage#getDomain()
+ * @model abstract="true"
+ * @generated
+ */
+public interface Domain extends ModelElement {
+
+} // Domain
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/DomainEPackage.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/DomainEPackage.java
new file mode 100644
index 0000000..3f34712
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/DomainEPackage.java
@@ -0,0 +1,60 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.domain;
+
+import org.eclipse.emf.ecore.EPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>EPackage</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.domain.DomainEPackage#getEPackage <em>EPackage</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.domain.DomainPackage#getDomainEPackage()
+ * @model annotation="http://www.eclipse.org/emf/2002/Ecore constraints='ValidPackage'"
+ * @generated
+ */
+public interface DomainEPackage extends Domain {
+ /**
+ * Returns the value of the '<em><b>EPackage</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>EPackage</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>EPackage</em>' reference.
+ * @see #setEPackage(EPackage)
+ * @see org.eclipse.egf.model.domain.DomainPackage#getDomainEPackage_EPackage()
+ * @model required="true"
+ * @generated
+ */
+ EPackage getEPackage();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.domain.DomainEPackage#getEPackage <em>EPackage</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>EPackage</em>' reference.
+ * @see #getEPackage()
+ * @generated
+ */
+ void setEPackage(EPackage value);
+
+} // DomainEPackage
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/DomainFactory.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/DomainFactory.java
new file mode 100644
index 0000000..d308c0a
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/DomainFactory.java
@@ -0,0 +1,88 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.domain;
+
+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.egf.model.domain.DomainPackage
+ * @generated
+ */
+public interface DomainFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ DomainFactory eINSTANCE = org.eclipse.egf.model.domain.impl.DomainFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Viewpoint</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Viewpoint</em>'.
+ * @generated
+ */
+ DomainViewpoint createDomainViewpoint();
+
+ /**
+ * Returns a new object of class '<em>EPackage</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>EPackage</em>'.
+ * @generated
+ */
+ DomainEPackage createDomainEPackage();
+
+ /**
+ * Returns a new object of class '<em>Type Domain EPackage</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Type Domain EPackage</em>'.
+ * @generated
+ */
+ TypeDomainEPackage createTypeDomainEPackage();
+
+ /**
+ * Returns a new object of class '<em>URI</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>URI</em>'.
+ * @generated
+ */
+ DomainURI createDomainURI();
+
+ /**
+ * Returns a new object of class '<em>Type Domain URI</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Type Domain URI</em>'.
+ * @generated
+ */
+ TypeDomainURI createTypeDomainURI();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ DomainPackage getDomainPackage();
+
+} // DomainFactory
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/DomainPackage.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/DomainPackage.java
new file mode 100644
index 0000000..ce3c81f
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/DomainPackage.java
@@ -0,0 +1,654 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.domain;
+
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.types.TypesPackage;
+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 enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.domain.DomainFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface DomainPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "domain"; //$NON-NLS-1$
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/egf/1.0.0/domain"; //$NON-NLS-1$
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "domain"; //$NON-NLS-1$
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ DomainPackage eINSTANCE = org.eclipse.egf.model.domain.impl.DomainPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.domain.impl.DomainViewpointImpl <em>Viewpoint</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.domain.impl.DomainViewpointImpl
+ * @see org.eclipse.egf.model.domain.impl.DomainPackageImpl#getDomainViewpoint()
+ * @generated
+ */
+ int DOMAIN_VIEWPOINT = 0;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOMAIN_VIEWPOINT__ID = FcorePackage.VIEWPOINT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOMAIN_VIEWPOINT__DESCRIPTION = FcorePackage.VIEWPOINT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Viewpoint Container</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOMAIN_VIEWPOINT__VIEWPOINT_CONTAINER = FcorePackage.VIEWPOINT__VIEWPOINT_CONTAINER;
+
+ /**
+ * The feature id for the '<em><b>Domains</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOMAIN_VIEWPOINT__DOMAINS = FcorePackage.VIEWPOINT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Viewpoint</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOMAIN_VIEWPOINT_FEATURE_COUNT = FcorePackage.VIEWPOINT_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.domain.impl.DomainImpl <em>Domain</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.domain.impl.DomainImpl
+ * @see org.eclipse.egf.model.domain.impl.DomainPackageImpl#getDomain()
+ * @generated
+ */
+ int DOMAIN = 1;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOMAIN__ID = FcorePackage.MODEL_ELEMENT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOMAIN__DESCRIPTION = FcorePackage.MODEL_ELEMENT__DESCRIPTION;
+
+ /**
+ * The number of structural features of the '<em>Domain</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOMAIN_FEATURE_COUNT = FcorePackage.MODEL_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.domain.impl.DomainEPackageImpl <em>EPackage</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.domain.impl.DomainEPackageImpl
+ * @see org.eclipse.egf.model.domain.impl.DomainPackageImpl#getDomainEPackage()
+ * @generated
+ */
+ int DOMAIN_EPACKAGE = 2;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOMAIN_EPACKAGE__ID = DOMAIN__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOMAIN_EPACKAGE__DESCRIPTION = DOMAIN__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>EPackage</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOMAIN_EPACKAGE__EPACKAGE = DOMAIN_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>EPackage</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOMAIN_EPACKAGE_FEATURE_COUNT = DOMAIN_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.domain.impl.TypeDomainEPackageImpl <em>Type Domain EPackage</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.domain.impl.TypeDomainEPackageImpl
+ * @see org.eclipse.egf.model.domain.impl.DomainPackageImpl#getTypeDomainEPackage()
+ * @generated
+ */
+ int TYPE_DOMAIN_EPACKAGE = 3;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_DOMAIN_EPACKAGE__ID = TypesPackage.TYPE_OBJECT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_DOMAIN_EPACKAGE__DESCRIPTION = TypesPackage.TYPE_OBJECT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Domain</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_DOMAIN_EPACKAGE__DOMAIN = TypesPackage.TYPE_OBJECT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_DOMAIN_EPACKAGE__VALUE = TypesPackage.TYPE_OBJECT_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Type Domain EPackage</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_DOMAIN_EPACKAGE_FEATURE_COUNT = TypesPackage.TYPE_OBJECT_FEATURE_COUNT + 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.domain.impl.DomainURIImpl <em>URI</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.domain.impl.DomainURIImpl
+ * @see org.eclipse.egf.model.domain.impl.DomainPackageImpl#getDomainURI()
+ * @generated
+ */
+ int DOMAIN_URI = 4;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOMAIN_URI__ID = DOMAIN__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOMAIN_URI__DESCRIPTION = DOMAIN__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Uri</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOMAIN_URI__URI = DOMAIN_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>URI</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOMAIN_URI_FEATURE_COUNT = DOMAIN_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.domain.impl.TypeDomainURIImpl <em>Type Domain URI</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.domain.impl.TypeDomainURIImpl
+ * @see org.eclipse.egf.model.domain.impl.DomainPackageImpl#getTypeDomainURI()
+ * @generated
+ */
+ int TYPE_DOMAIN_URI = 5;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_DOMAIN_URI__ID = TypesPackage.TYPE_OBJECT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_DOMAIN_URI__DESCRIPTION = TypesPackage.TYPE_OBJECT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Domain</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_DOMAIN_URI__DOMAIN = TypesPackage.TYPE_OBJECT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_DOMAIN_URI__VALUE = TypesPackage.TYPE_OBJECT_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Type Domain URI</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_DOMAIN_URI_FEATURE_COUNT = TypesPackage.TYPE_OBJECT_FEATURE_COUNT + 2;
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.domain.DomainViewpoint <em>Viewpoint</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Viewpoint</em>'.
+ * @see org.eclipse.egf.model.domain.DomainViewpoint
+ * @generated
+ */
+ EClass getDomainViewpoint();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.egf.model.domain.DomainViewpoint#getDomains <em>Domains</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Domains</em>'.
+ * @see org.eclipse.egf.model.domain.DomainViewpoint#getDomains()
+ * @see #getDomainViewpoint()
+ * @generated
+ */
+ EReference getDomainViewpoint_Domains();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.domain.Domain <em>Domain</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Domain</em>'.
+ * @see org.eclipse.egf.model.domain.Domain
+ * @generated
+ */
+ EClass getDomain();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.domain.DomainEPackage <em>EPackage</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>EPackage</em>'.
+ * @see org.eclipse.egf.model.domain.DomainEPackage
+ * @generated
+ */
+ EClass getDomainEPackage();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.egf.model.domain.DomainEPackage#getEPackage <em>EPackage</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>EPackage</em>'.
+ * @see org.eclipse.egf.model.domain.DomainEPackage#getEPackage()
+ * @see #getDomainEPackage()
+ * @generated
+ */
+ EReference getDomainEPackage_EPackage();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.domain.TypeDomainEPackage <em>Type Domain EPackage</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Type Domain EPackage</em>'.
+ * @see org.eclipse.egf.model.domain.TypeDomainEPackage
+ * @generated
+ */
+ EClass getTypeDomainEPackage();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.egf.model.domain.TypeDomainEPackage#getDomain <em>Domain</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Domain</em>'.
+ * @see org.eclipse.egf.model.domain.TypeDomainEPackage#getDomain()
+ * @see #getTypeDomainEPackage()
+ * @generated
+ */
+ EReference getTypeDomainEPackage_Domain();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.egf.model.domain.TypeDomainEPackage#getValue <em>Value</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Value</em>'.
+ * @see org.eclipse.egf.model.domain.TypeDomainEPackage#getValue()
+ * @see #getTypeDomainEPackage()
+ * @generated
+ */
+ EReference getTypeDomainEPackage_Value();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.domain.DomainURI <em>URI</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>URI</em>'.
+ * @see org.eclipse.egf.model.domain.DomainURI
+ * @generated
+ */
+ EClass getDomainURI();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.egf.model.domain.DomainURI#getUri <em>Uri</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Uri</em>'.
+ * @see org.eclipse.egf.model.domain.DomainURI#getUri()
+ * @see #getDomainURI()
+ * @generated
+ */
+ EAttribute getDomainURI_Uri();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.domain.TypeDomainURI <em>Type Domain URI</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Type Domain URI</em>'.
+ * @see org.eclipse.egf.model.domain.TypeDomainURI
+ * @generated
+ */
+ EClass getTypeDomainURI();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.egf.model.domain.TypeDomainURI#getDomain <em>Domain</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Domain</em>'.
+ * @see org.eclipse.egf.model.domain.TypeDomainURI#getDomain()
+ * @see #getTypeDomainURI()
+ * @generated
+ */
+ EReference getTypeDomainURI_Domain();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.egf.model.domain.TypeDomainURI#getValue <em>Value</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Value</em>'.
+ * @see org.eclipse.egf.model.domain.TypeDomainURI#getValue()
+ * @see #getTypeDomainURI()
+ * @generated
+ */
+ EAttribute getTypeDomainURI_Value();
+
+ /**
+ * 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
+ */
+ DomainFactory getDomainFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.domain.impl.DomainViewpointImpl <em>Viewpoint</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.domain.impl.DomainViewpointImpl
+ * @see org.eclipse.egf.model.domain.impl.DomainPackageImpl#getDomainViewpoint()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass DOMAIN_VIEWPOINT = eINSTANCE.getDomainViewpoint();
+
+ /**
+ * The meta object literal for the '<em><b>Domains</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference DOMAIN_VIEWPOINT__DOMAINS = eINSTANCE.getDomainViewpoint_Domains();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.domain.impl.DomainImpl <em>Domain</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.domain.impl.DomainImpl
+ * @see org.eclipse.egf.model.domain.impl.DomainPackageImpl#getDomain()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass DOMAIN = eINSTANCE.getDomain();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.domain.impl.DomainEPackageImpl <em>EPackage</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.domain.impl.DomainEPackageImpl
+ * @see org.eclipse.egf.model.domain.impl.DomainPackageImpl#getDomainEPackage()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass DOMAIN_EPACKAGE = eINSTANCE.getDomainEPackage();
+
+ /**
+ * The meta object literal for the '<em><b>EPackage</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference DOMAIN_EPACKAGE__EPACKAGE = eINSTANCE.getDomainEPackage_EPackage();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.domain.impl.TypeDomainEPackageImpl <em>Type Domain EPackage</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.domain.impl.TypeDomainEPackageImpl
+ * @see org.eclipse.egf.model.domain.impl.DomainPackageImpl#getTypeDomainEPackage()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass TYPE_DOMAIN_EPACKAGE = eINSTANCE.getTypeDomainEPackage();
+
+ /**
+ * The meta object literal for the '<em><b>Domain</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference TYPE_DOMAIN_EPACKAGE__DOMAIN = eINSTANCE.getTypeDomainEPackage_Domain();
+
+ /**
+ * The meta object literal for the '<em><b>Value</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference TYPE_DOMAIN_EPACKAGE__VALUE = eINSTANCE.getTypeDomainEPackage_Value();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.domain.impl.DomainURIImpl <em>URI</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.domain.impl.DomainURIImpl
+ * @see org.eclipse.egf.model.domain.impl.DomainPackageImpl#getDomainURI()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass DOMAIN_URI = eINSTANCE.getDomainURI();
+
+ /**
+ * The meta object literal for the '<em><b>Uri</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EAttribute DOMAIN_URI__URI = eINSTANCE.getDomainURI_Uri();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.domain.impl.TypeDomainURIImpl <em>Type Domain URI</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.domain.impl.TypeDomainURIImpl
+ * @see org.eclipse.egf.model.domain.impl.DomainPackageImpl#getTypeDomainURI()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass TYPE_DOMAIN_URI = eINSTANCE.getTypeDomainURI();
+
+ /**
+ * The meta object literal for the '<em><b>Domain</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference TYPE_DOMAIN_URI__DOMAIN = eINSTANCE.getTypeDomainURI_Domain();
+
+ /**
+ * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EAttribute TYPE_DOMAIN_URI__VALUE = eINSTANCE.getTypeDomainURI_Value();
+
+ }
+
+} // DomainPackage
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/DomainURI.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/DomainURI.java
new file mode 100644
index 0000000..8b772be
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/DomainURI.java
@@ -0,0 +1,60 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.domain;
+
+import org.eclipse.emf.common.util.URI;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>URI</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.domain.DomainURI#getUri <em>Uri</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.domain.DomainPackage#getDomainURI()
+ * @model annotation="http://www.eclipse.org/emf/2002/Ecore constraints='ValidURI'"
+ * @generated
+ */
+public interface DomainURI extends Domain {
+ /**
+ * Returns the value of the '<em><b>Uri</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Uri</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Uri</em>' attribute.
+ * @see #setUri(URI)
+ * @see org.eclipse.egf.model.domain.DomainPackage#getDomainURI_Uri()
+ * @model dataType="org.eclipse.egf.model.types.URI" required="true"
+ * @generated
+ */
+ URI getUri();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.domain.DomainURI#getUri <em>Uri</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Uri</em>' attribute.
+ * @see #getUri()
+ * @generated
+ */
+ void setUri(URI value);
+
+} // DomainURI
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/DomainViewpoint.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/DomainViewpoint.java
new file mode 100644
index 0000000..9c63ab0
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/DomainViewpoint.java
@@ -0,0 +1,51 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.domain;
+
+import org.eclipse.egf.model.fcore.Viewpoint;
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Viewpoint</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.domain.DomainViewpoint#getDomains <em>Domains</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.domain.DomainPackage#getDomainViewpoint()
+ * @model
+ * @generated
+ */
+public interface DomainViewpoint extends Viewpoint {
+ /**
+ * Returns the value of the '<em><b>Domains</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.egf.model.domain.Domain}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Domains</em>' reference list isn't clear, there
+ * really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Domains</em>' containment reference list.
+ * @see org.eclipse.egf.model.domain.DomainPackage#getDomainViewpoint_Domains()
+ * @model containment="true"
+ * @generated
+ */
+ EList<Domain> getDomains();
+
+} // DomainViewpoint
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/TypeDomainEPackage.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/TypeDomainEPackage.java
new file mode 100644
index 0000000..650b4cc
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/TypeDomainEPackage.java
@@ -0,0 +1,77 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.domain;
+
+import org.eclipse.egf.model.types.TypeObject;
+import org.eclipse.emf.ecore.EPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Type Domain EPackage</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.domain.TypeDomainEPackage#getDomain <em>Domain</em>}</li>
+ * <li>{@link org.eclipse.egf.model.domain.TypeDomainEPackage#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.domain.DomainPackage#getTypeDomainEPackage()
+ * @model
+ * @generated
+ */
+public interface TypeDomainEPackage extends TypeObject {
+ /**
+ * Returns the value of the '<em><b>Domain</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Domain</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Domain</em>' reference.
+ * @see #setDomain(DomainEPackage)
+ * @see org.eclipse.egf.model.domain.DomainPackage#getTypeDomainEPackage_Domain()
+ * @model resolveProxies="false"
+ * @generated
+ */
+ DomainEPackage getDomain();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.domain.TypeDomainEPackage#getDomain <em>Domain</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Domain</em>' reference.
+ * @see #getDomain()
+ * @generated
+ */
+ void setDomain(DomainEPackage value);
+
+ /**
+ * Returns the value of the '<em><b>Value</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Value</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Value</em>' reference.
+ * @see org.eclipse.egf.model.domain.DomainPackage#getTypeDomainEPackage_Value()
+ * @model transient="true" changeable="false" volatile="true" derived="true"
+ * @generated
+ */
+ EPackage getValue();
+
+} // TypeDomainEPackage
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/TypeDomainURI.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/TypeDomainURI.java
new file mode 100644
index 0000000..edabff2
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/TypeDomainURI.java
@@ -0,0 +1,77 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.domain;
+
+import org.eclipse.egf.model.types.TypeObject;
+import org.eclipse.emf.common.util.URI;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Type Domain URI</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.domain.TypeDomainURI#getDomain <em>Domain</em>}</li>
+ * <li>{@link org.eclipse.egf.model.domain.TypeDomainURI#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.domain.DomainPackage#getTypeDomainURI()
+ * @model annotation="http://www.eclipse.org/emf/2002/Ecore constraints='ValidDomainURI'"
+ * @generated
+ */
+public interface TypeDomainURI extends TypeObject {
+ /**
+ * Returns the value of the '<em><b>Domain</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Domain</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Domain</em>' reference.
+ * @see #setDomain(DomainURI)
+ * @see org.eclipse.egf.model.domain.DomainPackage#getTypeDomainURI_Domain()
+ * @model resolveProxies="false"
+ * @generated
+ */
+ DomainURI getDomain();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.domain.TypeDomainURI#getDomain <em>Domain</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Domain</em>' reference.
+ * @see #getDomain()
+ * @generated
+ */
+ void setDomain(DomainURI value);
+
+ /**
+ * Returns the value of the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Value</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Value</em>' attribute.
+ * @see org.eclipse.egf.model.domain.DomainPackage#getTypeDomainURI_Value()
+ * @model dataType="org.eclipse.egf.model.types.URI" transient="true" changeable="false" volatile="true" derived="true"
+ * @generated
+ */
+ URI getValue();
+
+} // TypeDomainURI
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/impl/DomainEPackageImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/impl/DomainEPackageImpl.java
new file mode 100644
index 0000000..7c4e230
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/impl/DomainEPackageImpl.java
@@ -0,0 +1,167 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.domain.impl;
+
+import org.eclipse.egf.model.domain.DomainEPackage;
+import org.eclipse.egf.model.domain.DomainPackage;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>EPackage</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.domain.impl.DomainEPackageImpl#getEPackage <em>EPackage</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class DomainEPackageImpl extends DomainImpl implements DomainEPackage {
+ /**
+ * The cached value of the '{@link #getEPackage() <em>EPackage</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getEPackage()
+ * @generated
+ * @ordered
+ */
+ protected EPackage ePackage;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected DomainEPackageImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return DomainPackage.Literals.DOMAIN_EPACKAGE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EPackage getEPackage() {
+ if (ePackage != null && ePackage.eIsProxy()) {
+ InternalEObject oldEPackage = (InternalEObject) ePackage;
+ ePackage = (EPackage) eResolveProxy(oldEPackage);
+ if (ePackage != oldEPackage) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, DomainPackage.DOMAIN_EPACKAGE__EPACKAGE, oldEPackage, ePackage));
+ }
+ }
+ return ePackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EPackage basicGetEPackage() {
+ return ePackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setEPackage(EPackage newEPackage) {
+ EPackage oldEPackage = ePackage;
+ ePackage = newEPackage;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DomainPackage.DOMAIN_EPACKAGE__EPACKAGE, oldEPackage, ePackage));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case DomainPackage.DOMAIN_EPACKAGE__EPACKAGE:
+ if (resolve)
+ return getEPackage();
+ return basicGetEPackage();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case DomainPackage.DOMAIN_EPACKAGE__EPACKAGE:
+ setEPackage((EPackage) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case DomainPackage.DOMAIN_EPACKAGE__EPACKAGE:
+ setEPackage((EPackage) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case DomainPackage.DOMAIN_EPACKAGE__EPACKAGE:
+ return ePackage != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //DomainEPackageImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/impl/DomainFactoryImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/impl/DomainFactoryImpl.java
new file mode 100644
index 0000000..a3b8678
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/impl/DomainFactoryImpl.java
@@ -0,0 +1,167 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.domain.impl;
+
+import org.eclipse.egf.model.domain.DomainEPackage;
+import org.eclipse.egf.model.domain.DomainFactory;
+import org.eclipse.egf.model.domain.DomainPackage;
+import org.eclipse.egf.model.domain.DomainURI;
+import org.eclipse.egf.model.domain.DomainViewpoint;
+import org.eclipse.egf.model.domain.TypeDomainEPackage;
+import org.eclipse.egf.model.domain.TypeDomainURI;
+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;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class DomainFactoryImpl extends EFactoryImpl implements DomainFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static DomainFactory init() {
+ try {
+ DomainFactory theDomainFactory = (DomainFactory) EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/egf/1.0.0/domain"); //$NON-NLS-1$
+ if (theDomainFactory != null) {
+ return theDomainFactory;
+ }
+ } catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new DomainFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public DomainFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case DomainPackage.DOMAIN_VIEWPOINT:
+ return createDomainViewpoint();
+ case DomainPackage.DOMAIN_EPACKAGE:
+ return createDomainEPackage();
+ case DomainPackage.TYPE_DOMAIN_EPACKAGE:
+ return createTypeDomainEPackage();
+ case DomainPackage.DOMAIN_URI:
+ return createDomainURI();
+ case DomainPackage.TYPE_DOMAIN_URI:
+ return createTypeDomainURI();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public DomainViewpoint createDomainViewpoint() {
+ DomainViewpointImpl domainViewpoint = new DomainViewpointImpl();
+ return domainViewpoint;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public DomainEPackage createDomainEPackage() {
+ DomainEPackageImpl domainEPackage = new DomainEPackageImpl();
+ return domainEPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypeDomainEPackage createTypeDomainEPackage() {
+ TypeDomainEPackageImpl typeDomainEPackage = new TypeDomainEPackageImpl();
+ return typeDomainEPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public DomainURI createDomainURI() {
+ DomainURIImpl domainURI = new DomainURIImpl();
+ return domainURI;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypeDomainURI createTypeDomainURI() {
+ TypeDomainURIImpl typeDomainURI = new TypeDomainURIImpl();
+ return typeDomainURI;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public DomainPackage getDomainPackage() {
+ return (DomainPackage) getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static DomainPackage getPackage() {
+ return DomainPackage.eINSTANCE;
+ }
+
+} // DomainFactoryImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/impl/DomainImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/impl/DomainImpl.java
new file mode 100644
index 0000000..8dfa440
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/impl/DomainImpl.java
@@ -0,0 +1,58 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.domain.impl;
+
+import org.eclipse.egf.model.domain.Domain;
+import org.eclipse.egf.model.domain.DomainPackage;
+import org.eclipse.egf.model.fcore.impl.ModelElementImpl;
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Domain</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class DomainImpl extends ModelElementImpl implements Domain {
+ /**
+ * A set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected int eFlags = 0;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected DomainImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return DomainPackage.Literals.DOMAIN;
+ }
+
+} // DomainImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/impl/DomainPackageImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/impl/DomainPackageImpl.java
new file mode 100644
index 0000000..adc5983
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/impl/DomainPackageImpl.java
@@ -0,0 +1,406 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.domain.impl;
+
+import org.eclipse.egf.model.domain.Domain;
+import org.eclipse.egf.model.domain.DomainEPackage;
+import org.eclipse.egf.model.domain.DomainFactory;
+import org.eclipse.egf.model.domain.DomainPackage;
+import org.eclipse.egf.model.domain.DomainURI;
+import org.eclipse.egf.model.domain.DomainViewpoint;
+import org.eclipse.egf.model.domain.TypeDomainEPackage;
+import org.eclipse.egf.model.domain.TypeDomainURI;
+import org.eclipse.egf.model.domain.util.DomainValidator;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.types.TypesPackage;
+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.EValidator;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class DomainPackageImpl extends EPackageImpl implements DomainPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass domainViewpointEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass domainEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass domainEPackageEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass typeDomainEPackageEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass domainURIEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass typeDomainURIEClass = 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.egf.model.domain.DomainPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private DomainPackageImpl() {
+ super(eNS_URI, DomainFactory.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 DomainPackage#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 DomainPackage init() {
+ if (isInited)
+ return (DomainPackage) EPackage.Registry.INSTANCE.getEPackage(DomainPackage.eNS_URI);
+
+ // Obtain or create and register package
+ DomainPackageImpl theDomainPackage = (DomainPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof DomainPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new DomainPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ FcorePackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theDomainPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theDomainPackage.initializePackageContents();
+
+ // Register package validator
+ EValidator.Registry.INSTANCE.put(theDomainPackage, new EValidator.Descriptor() {
+ public EValidator getEValidator() {
+ return DomainValidator.INSTANCE;
+ }
+ });
+
+ // Mark meta-data to indicate it can't be changed
+ theDomainPackage.freeze();
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(DomainPackage.eNS_URI, theDomainPackage);
+ return theDomainPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getDomainViewpoint() {
+ return domainViewpointEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getDomainViewpoint_Domains() {
+ return (EReference) domainViewpointEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getDomain() {
+ return domainEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getDomainEPackage() {
+ return domainEPackageEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getDomainEPackage_EPackage() {
+ return (EReference) domainEPackageEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTypeDomainEPackage() {
+ return typeDomainEPackageEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getTypeDomainEPackage_Domain() {
+ return (EReference) typeDomainEPackageEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getTypeDomainEPackage_Value() {
+ return (EReference) typeDomainEPackageEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getDomainURI() {
+ return domainURIEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getDomainURI_Uri() {
+ return (EAttribute) domainURIEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTypeDomainURI() {
+ return typeDomainURIEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getTypeDomainURI_Domain() {
+ return (EReference) typeDomainURIEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getTypeDomainURI_Value() {
+ return (EAttribute) typeDomainURIEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DomainFactory getDomainFactory() {
+ return (DomainFactory) 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
+ domainViewpointEClass = createEClass(DOMAIN_VIEWPOINT);
+ createEReference(domainViewpointEClass, DOMAIN_VIEWPOINT__DOMAINS);
+
+ domainEClass = createEClass(DOMAIN);
+
+ domainEPackageEClass = createEClass(DOMAIN_EPACKAGE);
+ createEReference(domainEPackageEClass, DOMAIN_EPACKAGE__EPACKAGE);
+
+ typeDomainEPackageEClass = createEClass(TYPE_DOMAIN_EPACKAGE);
+ createEReference(typeDomainEPackageEClass, TYPE_DOMAIN_EPACKAGE__DOMAIN);
+ createEReference(typeDomainEPackageEClass, TYPE_DOMAIN_EPACKAGE__VALUE);
+
+ domainURIEClass = createEClass(DOMAIN_URI);
+ createEAttribute(domainURIEClass, DOMAIN_URI__URI);
+
+ typeDomainURIEClass = createEClass(TYPE_DOMAIN_URI);
+ createEReference(typeDomainURIEClass, TYPE_DOMAIN_URI__DOMAIN);
+ createEAttribute(typeDomainURIEClass, TYPE_DOMAIN_URI__VALUE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized)
+ return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ FcorePackage theFcorePackage = (FcorePackage) EPackage.Registry.INSTANCE.getEPackage(FcorePackage.eNS_URI);
+ EcorePackage theEcorePackage = (EcorePackage) EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
+ TypesPackage theTypesPackage = (TypesPackage) EPackage.Registry.INSTANCE.getEPackage(TypesPackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ domainViewpointEClass.getESuperTypes().add(theFcorePackage.getViewpoint());
+ domainEClass.getESuperTypes().add(theFcorePackage.getModelElement());
+ domainEPackageEClass.getESuperTypes().add(this.getDomain());
+ typeDomainEPackageEClass.getESuperTypes().add(theTypesPackage.getTypeObject());
+ domainURIEClass.getESuperTypes().add(this.getDomain());
+ typeDomainURIEClass.getESuperTypes().add(theTypesPackage.getTypeObject());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(domainViewpointEClass, DomainViewpoint.class, "DomainViewpoint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getDomainViewpoint_Domains(), this.getDomain(), null, "domains", null, 0, -1, DomainViewpoint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(domainEClass, Domain.class, "Domain", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+
+ initEClass(domainEPackageEClass, DomainEPackage.class, "DomainEPackage", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getDomainEPackage_EPackage(), theEcorePackage.getEPackage(), null, "ePackage", null, 1, 1, DomainEPackage.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(typeDomainEPackageEClass, TypeDomainEPackage.class, "TypeDomainEPackage", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getTypeDomainEPackage_Domain(), this.getDomainEPackage(), null, "domain", null, 0, 1, TypeDomainEPackage.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getTypeDomainEPackage_Value(), theEcorePackage.getEPackage(), null, "value", null, 0, 1, TypeDomainEPackage.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(domainURIEClass, DomainURI.class, "DomainURI", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getDomainURI_Uri(), theTypesPackage.getURI(), "uri", null, 1, 1, DomainURI.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(typeDomainURIEClass, TypeDomainURI.class, "TypeDomainURI", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getTypeDomainURI_Domain(), this.getDomainURI(), null, "domain", null, 0, 1, TypeDomainURI.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getTypeDomainURI_Value(), theTypesPackage.getURI(), "value", null, 0, 1, TypeDomainURI.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ // Create resource
+ createResource(eNS_URI);
+
+ // Create annotations
+ // http://www.eclipse.org/emf/2002/Ecore
+ createEcoreAnnotations();
+ }
+
+ /**
+ * Initializes the annotations for <b>http://www.eclipse.org/emf/2002/Ecore</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void createEcoreAnnotations() {
+ String source = "http://www.eclipse.org/emf/2002/Ecore"; //$NON-NLS-1$
+ addAnnotation(domainEPackageEClass, source, new String[] { "constraints", "ValidPackage" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ addAnnotation(domainURIEClass, source, new String[] { "constraints", "ValidURI" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ addAnnotation(typeDomainURIEClass, source, new String[] { "constraints", "ValidDomainURI" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ }
+
+} // DomainPackageImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/impl/DomainURIImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/impl/DomainURIImpl.java
new file mode 100644
index 0000000..203cfdf
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/impl/DomainURIImpl.java
@@ -0,0 +1,171 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.domain.impl;
+
+import org.eclipse.egf.model.domain.DomainPackage;
+import org.eclipse.egf.model.domain.DomainURI;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>URI</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.domain.impl.DomainURIImpl#getUri <em>Uri</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class DomainURIImpl extends DomainImpl implements DomainURI {
+ /**
+ * The default value of the '{@link #getUri() <em>Uri</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getUri()
+ * @generated
+ * @ordered
+ */
+ protected static final URI URI_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getUri() <em>Uri</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getUri()
+ * @generated
+ * @ordered
+ */
+ protected URI uri = URI_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected DomainURIImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return DomainPackage.Literals.DOMAIN_URI;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public URI getUri() {
+ return uri;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setUri(URI newUri) {
+ URI oldUri = uri;
+ uri = newUri;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DomainPackage.DOMAIN_URI__URI, oldUri, uri));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case DomainPackage.DOMAIN_URI__URI:
+ return getUri();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case DomainPackage.DOMAIN_URI__URI:
+ setUri((URI) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case DomainPackage.DOMAIN_URI__URI:
+ setUri(URI_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case DomainPackage.DOMAIN_URI__URI:
+ return URI_EDEFAULT == null ? uri != null : !URI_EDEFAULT.equals(uri);
+ }
+ 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(" (uri: "); //$NON-NLS-1$
+ result.append(uri);
+ result.append(')');
+ return result.toString();
+ }
+
+} // DomainURIImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/impl/DomainViewpointImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/impl/DomainViewpointImpl.java
new file mode 100644
index 0000000..7ede177
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/impl/DomainViewpointImpl.java
@@ -0,0 +1,166 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.domain.impl;
+
+import java.util.Collection;
+
+import org.eclipse.egf.model.domain.Domain;
+import org.eclipse.egf.model.domain.DomainPackage;
+import org.eclipse.egf.model.domain.DomainViewpoint;
+import org.eclipse.egf.model.fcore.impl.ViewpointImpl;
+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;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Viewpoint</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.domain.impl.DomainViewpointImpl#getDomains <em>Domains</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class DomainViewpointImpl extends ViewpointImpl implements DomainViewpoint {
+ /**
+ * A set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected int eFlags = 0;
+
+ /**
+ * The cached value of the '{@link #getDomains() <em>Domains</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDomains()
+ * @generated
+ * @ordered
+ */
+ protected EList<Domain> domains;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected DomainViewpointImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return DomainPackage.Literals.DOMAIN_VIEWPOINT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Domain> getDomains() {
+ if (domains == null) {
+ domains = new EObjectContainmentEList<Domain>(Domain.class, this, DomainPackage.DOMAIN_VIEWPOINT__DOMAINS);
+ }
+ return domains;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case DomainPackage.DOMAIN_VIEWPOINT__DOMAINS:
+ return ((InternalEList<?>) getDomains()).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 DomainPackage.DOMAIN_VIEWPOINT__DOMAINS:
+ return getDomains();
+ }
+ 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 DomainPackage.DOMAIN_VIEWPOINT__DOMAINS:
+ getDomains().clear();
+ getDomains().addAll((Collection<? extends Domain>) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case DomainPackage.DOMAIN_VIEWPOINT__DOMAINS:
+ getDomains().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case DomainPackage.DOMAIN_VIEWPOINT__DOMAINS:
+ return domains != null && !domains.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // DomainViewpointImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/impl/TypeDomainEPackageImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/impl/TypeDomainEPackageImpl.java
new file mode 100644
index 0000000..0b0cf9e
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/impl/TypeDomainEPackageImpl.java
@@ -0,0 +1,190 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.domain.impl;
+
+import org.eclipse.egf.model.domain.DomainEPackage;
+import org.eclipse.egf.model.domain.DomainPackage;
+import org.eclipse.egf.model.domain.TypeDomainEPackage;
+import org.eclipse.egf.model.domain.adapter.TypeDomainEPackageAdapter;
+import org.eclipse.egf.model.types.impl.TypeObjectImpl;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Type Domain EPackage</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.domain.impl.TypeDomainEPackageImpl#getDomain <em>Domain</em>}</li>
+ * <li>{@link org.eclipse.egf.model.domain.impl.TypeDomainEPackageImpl#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class TypeDomainEPackageImpl extends TypeObjectImpl implements TypeDomainEPackage {
+ /**
+ * A set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected int eFlags = 0;
+
+ /**
+ * The cached value of the '{@link #getDomain() <em>Domain</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDomain()
+ * @generated
+ * @ordered
+ */
+ protected DomainEPackage domain;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected TypeDomainEPackageImpl() {
+ super();
+ new TypeDomainEPackageAdapter(this);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return DomainPackage.Literals.TYPE_DOMAIN_EPACKAGE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DomainEPackage getDomain() {
+ return domain;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setDomain(DomainEPackage newDomain) {
+ DomainEPackage oldDomain = domain;
+ domain = newDomain;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DomainPackage.TYPE_DOMAIN_EPACKAGE__DOMAIN, oldDomain, domain));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EPackage getValue() {
+ EPackage value = basicGetValue();
+ return value != null && value.eIsProxy() ? (EPackage) eResolveProxy((InternalEObject) value) : value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EPackage basicGetValue() {
+ if (getDomain() != null) {
+ return getDomain().getEPackage();
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case DomainPackage.TYPE_DOMAIN_EPACKAGE__DOMAIN:
+ return getDomain();
+ case DomainPackage.TYPE_DOMAIN_EPACKAGE__VALUE:
+ if (resolve)
+ return getValue();
+ return basicGetValue();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case DomainPackage.TYPE_DOMAIN_EPACKAGE__DOMAIN:
+ setDomain((DomainEPackage) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case DomainPackage.TYPE_DOMAIN_EPACKAGE__DOMAIN:
+ setDomain((DomainEPackage) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case DomainPackage.TYPE_DOMAIN_EPACKAGE__DOMAIN:
+ return domain != null;
+ case DomainPackage.TYPE_DOMAIN_EPACKAGE__VALUE:
+ return basicGetValue() != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // TypeDomainEPackageImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/impl/TypeDomainURIImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/impl/TypeDomainURIImpl.java
new file mode 100644
index 0000000..e04461f
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/impl/TypeDomainURIImpl.java
@@ -0,0 +1,187 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.domain.impl;
+
+import org.eclipse.egf.model.domain.DomainPackage;
+import org.eclipse.egf.model.domain.DomainURI;
+import org.eclipse.egf.model.domain.TypeDomainURI;
+import org.eclipse.egf.model.domain.adapter.TypeDomainURIAdapter;
+import org.eclipse.egf.model.types.impl.TypeObjectImpl;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Type Domain URI</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.domain.impl.TypeDomainURIImpl#getDomain <em>Domain</em>}</li>
+ * <li>{@link org.eclipse.egf.model.domain.impl.TypeDomainURIImpl#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class TypeDomainURIImpl extends TypeObjectImpl implements TypeDomainURI {
+ /**
+ * A set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected int eFlags = 0;
+
+ /**
+ * The cached value of the '{@link #getDomain() <em>Domain</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDomain()
+ * @generated
+ * @ordered
+ */
+ protected DomainURI domain;
+
+ /**
+ * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected static final URI VALUE_EDEFAULT = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected TypeDomainURIImpl() {
+ super();
+ new TypeDomainURIAdapter(this);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return DomainPackage.Literals.TYPE_DOMAIN_URI;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DomainURI getDomain() {
+ return domain;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setDomain(DomainURI newDomain) {
+ DomainURI oldDomain = domain;
+ domain = newDomain;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DomainPackage.TYPE_DOMAIN_URI__DOMAIN, oldDomain, domain));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public URI getValue() {
+ if (getDomain() != null) {
+ return getDomain().getUri();
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case DomainPackage.TYPE_DOMAIN_URI__DOMAIN:
+ return getDomain();
+ case DomainPackage.TYPE_DOMAIN_URI__VALUE:
+ return getValue();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case DomainPackage.TYPE_DOMAIN_URI__DOMAIN:
+ setDomain((DomainURI) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case DomainPackage.TYPE_DOMAIN_URI__DOMAIN:
+ setDomain((DomainURI) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case DomainPackage.TYPE_DOMAIN_URI__DOMAIN:
+ return domain != null;
+ case DomainPackage.TYPE_DOMAIN_URI__VALUE:
+ return VALUE_EDEFAULT == null ? getValue() != null : !VALUE_EDEFAULT.equals(getValue());
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // TypeDomainURIImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/util/DomainAdapterFactory.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/util/DomainAdapterFactory.java
new file mode 100644
index 0000000..48bf257
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/util/DomainAdapterFactory.java
@@ -0,0 +1,356 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.domain.util;
+
+import org.eclipse.egf.model.domain.Domain;
+import org.eclipse.egf.model.domain.DomainEPackage;
+import org.eclipse.egf.model.domain.DomainPackage;
+import org.eclipse.egf.model.domain.DomainURI;
+import org.eclipse.egf.model.domain.DomainViewpoint;
+import org.eclipse.egf.model.domain.TypeDomainEPackage;
+import org.eclipse.egf.model.domain.TypeDomainURI;
+import org.eclipse.egf.model.fcore.ModelElement;
+import org.eclipse.egf.model.fcore.Viewpoint;
+import org.eclipse.egf.model.types.Type;
+import org.eclipse.egf.model.types.TypeElement;
+import org.eclipse.egf.model.types.TypeObject;
+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;
+
+/**
+ * <!-- 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.egf.model.domain.DomainPackage
+ * @generated
+ */
+public class DomainAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static DomainPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public DomainAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = DomainPackage.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 DomainSwitch<Adapter> modelSwitch = new DomainSwitch<Adapter>() {
+ @Override
+ public Adapter caseDomainViewpoint(DomainViewpoint object) {
+ return createDomainViewpointAdapter();
+ }
+
+ @Override
+ public Adapter caseDomain(Domain object) {
+ return createDomainAdapter();
+ }
+
+ @Override
+ public Adapter caseDomainEPackage(DomainEPackage object) {
+ return createDomainEPackageAdapter();
+ }
+
+ @Override
+ public Adapter caseTypeDomainEPackage(TypeDomainEPackage object) {
+ return createTypeDomainEPackageAdapter();
+ }
+
+ @Override
+ public Adapter caseDomainURI(DomainURI object) {
+ return createDomainURIAdapter();
+ }
+
+ @Override
+ public Adapter caseTypeDomainURI(TypeDomainURI object) {
+ return createTypeDomainURIAdapter();
+ }
+
+ @Override
+ public Adapter caseModelElement(ModelElement object) {
+ return createModelElementAdapter();
+ }
+
+ @Override
+ public Adapter caseViewpoint(Viewpoint object) {
+ return createViewpointAdapter();
+ }
+
+ @Override
+ public Adapter caseTypeElement(TypeElement object) {
+ return createTypeElementAdapter();
+ }
+
+ @Override
+ public Adapter caseType(Type object) {
+ return createTypeAdapter();
+ }
+
+ @Override
+ public Adapter caseTypeObject(TypeObject object) {
+ return createTypeObjectAdapter();
+ }
+
+ @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.egf.model.domain.DomainViewpoint <em>Viewpoint</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.egf.model.domain.DomainViewpoint
+ * @generated
+ */
+ public Adapter createDomainViewpointAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.domain.Domain <em>Domain</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.egf.model.domain.Domain
+ * @generated
+ */
+ public Adapter createDomainAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.domain.DomainEPackage <em>EPackage</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.egf.model.domain.DomainEPackage
+ * @generated
+ */
+ public Adapter createDomainEPackageAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.domain.TypeDomainEPackage <em>Type Domain EPackage</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.egf.model.domain.TypeDomainEPackage
+ * @generated
+ */
+ public Adapter createTypeDomainEPackageAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.domain.DomainURI <em>URI</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.egf.model.domain.DomainURI
+ * @generated
+ */
+ public Adapter createDomainURIAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.domain.TypeDomainURI <em>Type Domain URI</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.egf.model.domain.TypeDomainURI
+ * @generated
+ */
+ public Adapter createTypeDomainURIAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fcore.ModelElement <em>Model Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore
+ * cases;
+ * it's useful to ignore a case when inheritance will catch all the cases
+ * anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.egf.model.fcore.ModelElement
+ * @generated
+ */
+ public Adapter createModelElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fcore.Viewpoint <em>Viewpoint</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.egf.model.fcore.Viewpoint
+ * @generated
+ */
+ public Adapter createViewpointAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.types.TypeElement <em>Type Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.egf.model.types.TypeElement
+ * @generated
+ */
+ public Adapter createTypeElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.types.Type <em>Type</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.egf.model.types.Type
+ * @generated
+ */
+ public Adapter createTypeAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.types.TypeObject <em>Type Object</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.egf.model.types.TypeObject
+ * @generated
+ */
+ public Adapter createTypeObjectAdapter() {
+ 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;
+ }
+
+} // DomainAdapterFactory
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/util/DomainResourceFactoryImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/util/DomainResourceFactoryImpl.java
new file mode 100644
index 0000000..e2415bd
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/util/DomainResourceFactoryImpl.java
@@ -0,0 +1,49 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.domain.util;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource Factory</b> associated with the package.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.domain.util.DomainResourceImpl
+ * @generated
+ */
+public class DomainResourceFactoryImpl extends ResourceFactoryImpl {
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DomainResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ Resource result = new DomainResourceImpl(uri);
+ return result;
+ }
+
+} // DomainResourceFactoryImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/util/DomainResourceImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/util/DomainResourceImpl.java
new file mode 100644
index 0000000..7edf6a7
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/util/DomainResourceImpl.java
@@ -0,0 +1,169 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.domain.util;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.egf.model.uri.ModelSchemeAware;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.xmi.XMIResource;
+import org.eclipse.emf.ecore.xmi.XMLParserPool;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+import org.eclipse.emf.ecore.xmi.XMLSave.XMLTypeInfo;
+import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl;
+import org.eclipse.emf.ecore.xmi.impl.XMLParserPoolImpl;
+import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource </b> associated with the package.
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.egf.model.domain.util.DomainResourceFactoryImpl
+ * @generated
+ */
+public class DomainResourceImpl extends XMIResourceImpl {
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private List<Object> lookupTable = new ArrayList<Object>();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private XMLParserPool parserPool = new XMLParserPoolImpl();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private Map<Object, Object> nameToFeatureMap = new HashMap<Object, Object>();
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param uri
+ * the URI of the new resource.
+ * @generated
+ */
+ public DomainResourceImpl(URI uri) {
+ super(uri);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean useIDAttributes() {
+ return false;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean useUUIDs() {
+ return true;
+ }
+
+ /**
+ * Called when the object is unloaded.
+ * This implementation {@link InternalEObject#eSetProxyURI sets} the object to be a proxy
+ * and clears the {@link #eAdapters adapters}.
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=292866
+ * Fix available in HEAD: 2.6.0.I200911020144
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void unloaded(InternalEObject internalEObject) {
+ // Ensure that an unresolved containment proxy's URI isn't reset.
+ //
+ if (!internalEObject.eIsProxy()) {
+ internalEObject.eSetProxyURI(uri.appendFragment(getURIFragment(internalEObject)));
+ }
+ internalEObject.eAdapters().clear();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void init() {
+ super.init();
+ setTrackingModification(true);
+ setEncoding("UTF-8"); //$NON-NLS-1$
+ setXMIVersion("2.1"); //$NON-NLS-1$
+ // Save Options
+ getDefaultSaveOptions().put(XMLResource.OPTION_DISABLE_NOTIFY, Boolean.TRUE);
+ getDefaultSaveOptions().put(XMLResource.OPTION_CONFIGURATION_CACHE, Boolean.TRUE);
+ getDefaultSaveOptions().put(XMLResource.OPTION_USE_CACHED_LOOKUP_TABLE, lookupTable);
+ getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ getDefaultSaveOptions().put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
+ getDefaultSaveOptions().put(XMLResource.OPTION_SAVE_TYPE_INFORMATION, new XMLTypeInfo() {
+ public boolean shouldSaveType(EClass objectType, EClassifier featureType, EStructuralFeature feature) {
+ return objectType != featureType && objectType != XMLTypePackage.Literals.ANY_TYPE;
+ }
+
+ public boolean shouldSaveType(EClass objectType, EClass featureType, EStructuralFeature feature) {
+ return objectType != featureType && objectType != XMLTypePackage.Literals.ANY_TYPE;
+ }
+ });
+ getDefaultSaveOptions().put(XMLResource.OPTION_LINE_WIDTH, new Integer(80));
+ // Avoid relative paths from workspace resources to plugin resources.
+ getDefaultSaveOptions().put(XMLResource.OPTION_URI_HANDLER, new ModelSchemeAware());
+ getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ getDefaultSaveOptions().put(XMIResource.OPTION_USE_XMI_TYPE, Boolean.TRUE);
+ // Load Options
+ getDefaultLoadOptions().put(XMLResource.OPTION_DISABLE_NOTIFY, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_DEFER_ATTACHMENT, Boolean.FALSE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_DEFER_IDREF_RESOLUTION, Boolean.FALSE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_DEPRECATED_METHODS, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_PARSER_POOL, parserPool);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_XML_NAME_TO_FEATURE_MAP, nameToFeatureMap);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ }
+
+} // DomainResourceImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/util/DomainSwitch.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/util/DomainSwitch.java
new file mode 100644
index 0000000..c01af03
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/util/DomainSwitch.java
@@ -0,0 +1,387 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.domain.util;
+
+import java.util.List;
+
+import org.eclipse.egf.model.domain.Domain;
+import org.eclipse.egf.model.domain.DomainEPackage;
+import org.eclipse.egf.model.domain.DomainPackage;
+import org.eclipse.egf.model.domain.DomainURI;
+import org.eclipse.egf.model.domain.DomainViewpoint;
+import org.eclipse.egf.model.domain.TypeDomainEPackage;
+import org.eclipse.egf.model.domain.TypeDomainURI;
+import org.eclipse.egf.model.fcore.ModelElement;
+import org.eclipse.egf.model.fcore.Viewpoint;
+import org.eclipse.egf.model.types.Type;
+import org.eclipse.egf.model.types.TypeElement;
+import org.eclipse.egf.model.types.TypeObject;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- 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.egf.model.domain.DomainPackage
+ * @generated
+ */
+public class DomainSwitch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static DomainPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public DomainSwitch() {
+ if (modelPackage == null) {
+ modelPackage = DomainPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * 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
+ */
+ public T doSwitch(EObject theEObject) {
+ return doSwitch(theEObject.eClass(), theEObject);
+ }
+
+ /**
+ * 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
+ */
+ @SuppressWarnings("all")
+ protected T doSwitch(EClass theEClass, EObject theEObject) {
+ if (theEClass.eContainer() == modelPackage) {
+ return doSwitch(theEClass.getClassifierID(), theEObject);
+ } else {
+ List<EClass> eSuperTypes = theEClass.getESuperTypes();
+ return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject);
+ }
+ }
+
+ /**
+ * 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
+ */
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case DomainPackage.DOMAIN_VIEWPOINT: {
+ DomainViewpoint domainViewpoint = (DomainViewpoint) theEObject;
+ T result = caseDomainViewpoint(domainViewpoint);
+ if (result == null)
+ result = caseViewpoint(domainViewpoint);
+ if (result == null)
+ result = caseModelElement(domainViewpoint);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case DomainPackage.DOMAIN: {
+ Domain domain = (Domain) theEObject;
+ T result = caseDomain(domain);
+ if (result == null)
+ result = caseModelElement(domain);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case DomainPackage.DOMAIN_EPACKAGE: {
+ DomainEPackage domainEPackage = (DomainEPackage) theEObject;
+ T result = caseDomainEPackage(domainEPackage);
+ if (result == null)
+ result = caseDomain(domainEPackage);
+ if (result == null)
+ result = caseModelElement(domainEPackage);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case DomainPackage.TYPE_DOMAIN_EPACKAGE: {
+ TypeDomainEPackage typeDomainEPackage = (TypeDomainEPackage) theEObject;
+ T result = caseTypeDomainEPackage(typeDomainEPackage);
+ if (result == null)
+ result = caseTypeObject(typeDomainEPackage);
+ if (result == null)
+ result = caseType(typeDomainEPackage);
+ if (result == null)
+ result = caseTypeElement(typeDomainEPackage);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case DomainPackage.DOMAIN_URI: {
+ DomainURI domainURI = (DomainURI) theEObject;
+ T result = caseDomainURI(domainURI);
+ if (result == null)
+ result = caseDomain(domainURI);
+ if (result == null)
+ result = caseModelElement(domainURI);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case DomainPackage.TYPE_DOMAIN_URI: {
+ TypeDomainURI typeDomainURI = (TypeDomainURI) theEObject;
+ T result = caseTypeDomainURI(typeDomainURI);
+ if (result == null)
+ result = caseTypeObject(typeDomainURI);
+ if (result == null)
+ result = caseType(typeDomainURI);
+ if (result == null)
+ result = caseTypeElement(typeDomainURI);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ default:
+ return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Viewpoint</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>Viewpoint</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseDomainViewpoint(DomainViewpoint object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Domain</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>Domain</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseDomain(Domain object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EPackage</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>EPackage</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseDomainEPackage(DomainEPackage object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Type Domain EPackage</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>Type Domain EPackage</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTypeDomainEPackage(TypeDomainEPackage object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>URI</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>URI</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseDomainURI(DomainURI object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Type Domain URI</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>Type Domain URI</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTypeDomainURI(TypeDomainURI object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Model Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Model Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseModelElement(ModelElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Viewpoint</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>Viewpoint</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseViewpoint(Viewpoint object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Type Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Type Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTypeElement(TypeElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Type</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>Type</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseType(Type object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Type Object</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>Type Object</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTypeObject(TypeObject 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
+ */
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} // DomainSwitch
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/util/DomainValidator.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/util/DomainValidator.java
new file mode 100644
index 0000000..8d3fc49
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/domain/util/DomainValidator.java
@@ -0,0 +1,489 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.domain.util;
+
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.egf.model.EGFModelPlugin;
+import org.eclipse.egf.model.domain.Domain;
+import org.eclipse.egf.model.domain.DomainEPackage;
+import org.eclipse.egf.model.domain.DomainPackage;
+import org.eclipse.egf.model.domain.DomainURI;
+import org.eclipse.egf.model.domain.DomainViewpoint;
+import org.eclipse.egf.model.domain.TypeDomainEPackage;
+import org.eclipse.egf.model.domain.TypeDomainURI;
+import org.eclipse.egf.model.types.util.TypesValidator;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.DiagnosticChain;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.util.EObjectValidator;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.validation.model.EvaluationMode;
+import org.eclipse.emf.validation.model.IConstraintStatus;
+import org.eclipse.emf.validation.service.IBatchValidator;
+import org.eclipse.emf.validation.service.ModelValidationService;
+import org.eclipse.emf.validation.service.ITraversalStrategy.Recursive;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Validator</b> for the model.
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.egf.model.domain.DomainPackage
+ * @generated
+ */
+public class DomainValidator extends EObjectValidator {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ public static final DomainValidator INSTANCE = new DomainValidator();
+
+ /**
+ * A constant for the {@link org.eclipse.emf.common.util.Diagnostic#getSource() source} of diagnostic {@link org.eclipse.emf.common.util.Diagnostic#getCode() codes} from this package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.common.util.Diagnostic#getSource()
+ * @see org.eclipse.emf.common.util.Diagnostic#getCode()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ public static final String DIAGNOSTIC_SOURCE = "org.eclipse.egf.model.domain"; //$NON-NLS-1$
+
+ /**
+ * A constant with a fixed name that can be used as the base value for additional hand written constants.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static final int GENERATED_DIAGNOSTIC_CODE_COUNT = 0;
+
+ /**
+ * A constant with a fixed name that can be used as the base value for additional hand written constants in a derived class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static final int DIAGNOSTIC_CODE_COUNT = GENERATED_DIAGNOSTIC_CODE_COUNT;
+
+ /**
+ * Model Validation Service interface for batch validation of EMF elements.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private final IBatchValidator batchValidator;
+
+ /**
+ * The cached base package validator.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected TypesValidator typesValidator;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public DomainValidator() {
+ super();
+ typesValidator = TypesValidator.INSTANCE;
+ batchValidator = (IBatchValidator) ModelValidationService.getInstance().newValidator(EvaluationMode.BATCH);
+ batchValidator.setTraversalStrategy(new Recursive());
+ batchValidator.setIncludeLiveConstraints(true);
+ batchValidator.setReportSuccesses(false);
+ }
+
+ /**
+ * Returns the package of this validator switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EPackage getEPackage() {
+ return DomainPackage.eINSTANCE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean validate(EClass eClass, EObject eObject, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ IStatus status = Status.OK_STATUS;
+ // do whatever the basic EcoreValidator does
+ super.validate(eClass, eObject, diagnostics, context);
+ // no point in validating if we can't report results
+ if (diagnostics != null) {
+ // if EMF Mode Validation Service already covered the sub-tree,
+ // which it does for efficient computation and error reporting,
+ // then don't repeat (the Diagnostician does the recursion
+ // externally). If there is no context map, then we can't
+ // help it
+ if (hasProcessed(eObject, context) == false) {
+ status = batchValidator.validate(eObject, new NullProgressMonitor());
+ processed(eObject, context, status);
+ appendDiagnostics(status, diagnostics);
+ }
+ }
+ return status.isOK();
+ }
+
+ /**
+ * Calls <code>validateXXX</code> for the corresponding classifier of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean validate(int classifierID, Object value, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ switch (classifierID) {
+ case DomainPackage.DOMAIN_VIEWPOINT:
+ return validateDomainViewpoint((DomainViewpoint) value, diagnostics, context);
+ case DomainPackage.DOMAIN:
+ return validateDomain((Domain) value, diagnostics, context);
+ case DomainPackage.DOMAIN_EPACKAGE:
+ return validateDomainEPackage((DomainEPackage) value, diagnostics, context);
+ case DomainPackage.TYPE_DOMAIN_EPACKAGE:
+ return validateTypeDomainEPackage((TypeDomainEPackage) value, diagnostics, context);
+ case DomainPackage.DOMAIN_URI:
+ return validateDomainURI((DomainURI) value, diagnostics, context);
+ case DomainPackage.TYPE_DOMAIN_URI:
+ return validateTypeDomainURI((TypeDomainURI) value, diagnostics, context);
+ default:
+ return true;
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateDomainViewpoint(DomainViewpoint domainViewpoint, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(domainViewpoint, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateDomain(Domain domain, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(domain, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateDomainEPackage(DomainEPackage domainEPackage, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(domainEPackage, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(domainEPackage, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(domainEPackage, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(domainEPackage, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(domainEPackage, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(domainEPackage, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(domainEPackage, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateDomainEPackage_ValidPackage(domainEPackage, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * Validates the ValidPackage constraint of '<em>EPackage</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validateDomainEPackage_ValidPackage(DomainEPackage domainEPackage, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (domainEPackage.getEPackage() == null) {
+ return true;
+ }
+ if (EPackage.Registry.INSTANCE.get(domainEPackage.getEPackage().getNsURI()) == null) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "ValidPackage", getObjectLabel(domainEPackage, context), "Unknown EPackage in EPackage.Registry" }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { domainEPackage }, context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateTypeDomainEPackage(TypeDomainEPackage typeDomainEPackage, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(typeDomainEPackage, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(typeDomainEPackage, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(typeDomainEPackage, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(typeDomainEPackage, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(typeDomainEPackage, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(typeDomainEPackage, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(typeDomainEPackage, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= typesValidator.validateTypeObject_ValidValue(typeDomainEPackage, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateDomainURI(DomainURI domainURI, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(domainURI, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(domainURI, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(domainURI, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(domainURI, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(domainURI, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(domainURI, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(domainURI, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateDomainURI_ValidURI(domainURI, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * Validates the ValidURI constraint of '<em>URI</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validateDomainURI_ValidURI(DomainURI domainURI, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ // if (domainURI.eResource() == null || domainURI.getUri() == null) {
+ // return true;
+ // }
+ // URI contentURI = domainURI.getUri();
+ // if (contentURI.isRelative()) {
+ // contentURI = contentURI.resolve(domainURI.eResource().getURI());
+ // }
+ // contentURI = CommonPlugin.asLocalURI(contentURI);
+ boolean valid = true;
+ // Try to load this URI
+ // String location = contentURI.toFileString();
+ // if (location != null) {
+ // File file = new File(location);
+ // if (file.canRead()) {
+ // valid = true;
+ // }
+ // }
+ if (valid == false) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_GenericConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "ValidURI", getObjectLabel(domainURI, context) }, //$NON-NLS-1$
+ new Object[] { domainURI }, context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateTypeDomainURI(TypeDomainURI typeDomainURI, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(typeDomainURI, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(typeDomainURI, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(typeDomainURI, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(typeDomainURI, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(typeDomainURI, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(typeDomainURI, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(typeDomainURI, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= typesValidator.validateTypeObject_ValidValue(typeDomainURI, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateTypeDomainURI_ValidDomainURI(typeDomainURI, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * Validates the ValidDomainURI constraint of '<em>Type Domain URI</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateTypeDomainURI_ValidDomainURI(TypeDomainURI typeDomainURI, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (typeDomainURI.eResource() == null || typeDomainURI.getDomain() == null) {
+ return true;
+ }
+ boolean found = false;
+ for (Iterator<EObject> iterator = EcoreUtil.getAllProperContents(typeDomainURI.eResource(), false); iterator.hasNext();) {
+ EObject eObject = iterator.next();
+ if (eObject instanceof DomainURI && eObject == typeDomainURI.getDomain()) {
+ found = true;
+ break;
+ }
+ }
+ if (found == false) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "ValidDomainURI", getObjectLabel(typeDomainURI, context), "Unknown Domain URI in this resource" }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { typeDomainURI }, context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Returns the resource locator that will be used to fetch messages for this validator's diagnostics.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EGFModelPlugin.INSTANCE;
+ }
+
+ /**
+ * If we have a context map, record this object's <code>status</code> in it
+ * so that we will know later that we have processed it and its sub-tree.
+ *
+ * @param eObject
+ * an element that we have validated
+ * @param context
+ * the context (may be <code>null</code>)
+ * @param status
+ * the element's validation status
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private void processed(EObject eObject, Map<Object, Object> context, IStatus status) {
+ if (context != null) {
+ context.put(eObject, status);
+ }
+ }
+
+ /**
+ * Determines whether we have processed this <code>eObject</code> before,
+ * by automatic recursion of the EMF Model Validation Service. This is
+ * only possible if we do, indeed, have a context.
+ *
+ * @param eObject
+ * an element to be validated (we hope not)
+ * @param context
+ * the context (may be <code>null</code>)
+ * @return <code>true</code> if the context is not <code>null</code> and
+ * the <code>eObject</code> or one of its containers has already been
+ * validated; <code>false</code>, otherwise
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean hasProcessed(EObject eObject, Map<Object, Object> context) {
+ boolean result = false;
+ if (context != null) {
+ // this is O(NlogN) but there's no helping it
+ while (eObject != null) {
+ if (context.containsKey(eObject)) {
+ result = true;
+ eObject = null;
+ } else {
+ eObject = eObject.eContainer();
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Converts a status result from the EMF validation service to diagnostics.
+ *
+ * @param status
+ * the EMF validation service's status result
+ * @param diagnostics
+ * a diagnostic chain to accumulate results on
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private void appendDiagnostics(IStatus status, DiagnosticChain diagnostics) {
+ if (status.isMultiStatus()) {
+ IStatus[] children = status.getChildren();
+ for (int i = 0; i < children.length; i++) {
+ appendDiagnostics(children[i], diagnostics);
+ }
+ } else if (status instanceof IConstraintStatus) {
+ diagnostics.add(new BasicDiagnostic(status.getSeverity(), status.getPlugin(), status.getCode(), status.getMessage(), ((IConstraintStatus) status).getResultLocus().toArray()));
+ }
+ }
+} // DomainValidator
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/Activity.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/Activity.java
new file mode 100644
index 0000000..2a0f3d9
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/Activity.java
@@ -0,0 +1,97 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore;
+
+import org.eclipse.egf.model.types.Type;
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Activity</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.fcore.Activity#getContractContainer <em>Contract Container</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getActivity()
+ * @model abstract="true"
+ * annotation="http://www.eclipse.org/emf/2002/Ecore constraints='MandatoryName ActivityCycle'"
+ * @generated
+ */
+public interface Activity extends NamedModelElement {
+
+ /**
+ * Returns the value of the '<em><b>Contract Container</b></em>' containment reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.fcore.ContractContainer#getActivity <em>Activity</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Contract Container</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Contract Container</em>' containment reference.
+ * @see #setContractContainer(ContractContainer)
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getActivity_ContractContainer()
+ * @see org.eclipse.egf.model.fcore.ContractContainer#getActivity
+ * @model opposite="activity" containment="true"
+ * @generated
+ */
+ ContractContainer getContractContainer();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.fcore.Activity#getContractContainer <em>Contract Container</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Contract Container</em>' containment reference.
+ * @see #getContractContainer()
+ * @generated
+ */
+ void setContractContainer(ContractContainer value);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation"
+ * @generated
+ */
+ EList<Contract> getContracts();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ EList<Contract> getContracts(Type type);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ EList<Contract> getContracts(ContractMode mode);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ EList<Contract> getContracts(Type type, ContractMode mode);
+
+} // Activity
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/Contract.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/Contract.java
new file mode 100644
index 0000000..9e5d1c4
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/Contract.java
@@ -0,0 +1,188 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore;
+
+import org.eclipse.egf.model.types.Type;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Contract</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.fcore.Contract#getContractContainer <em>Contract Container</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.Contract#isMandatory <em>Mandatory</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.Contract#getMode <em>Mode</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.Contract#getType <em>Type</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getContract()
+ * @model annotation="http://www.eclipse.org/emf/2002/Ecore constraints='UniqueName UselessMandatoryMode'"
+ * @generated
+ */
+public interface Contract extends NamedModelElement {
+ /**
+ * Returns the value of the '<em><b>Contract Container</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.fcore.ContractContainer#getContracts <em>Contracts</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Contract Container</em>' container reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Contract Container</em>' container reference.
+ * @see #setContractContainer(ContractContainer)
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getContract_ContractContainer()
+ * @see org.eclipse.egf.model.fcore.ContractContainer#getContracts
+ * @model opposite="contracts" required="true" transient="false"
+ * @generated
+ */
+ ContractContainer getContractContainer();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.fcore.Contract#getContractContainer <em>Contract Container</em>}' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Contract Container</em>' container reference.
+ * @see #getContractContainer()
+ * @generated
+ */
+ void setContractContainer(ContractContainer value);
+
+ /**
+ * Returns the value of the '<em><b>Mandatory</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Mandatory</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Mandatory</em>' attribute.
+ * @see #setMandatory(boolean)
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getContract_Mandatory()
+ * @model
+ * @generated
+ */
+ boolean isMandatory();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.fcore.Contract#isMandatory <em>Mandatory</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Mandatory</em>' attribute.
+ * @see #isMandatory()
+ * @generated
+ */
+ void setMandatory(boolean value);
+
+ /**
+ * Returns the value of the '<em><b>Mode</b></em>' attribute.
+ * The literals are from the enumeration {@link org.eclipse.egf.model.fcore.ContractMode}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Mode</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Mode</em>' attribute.
+ * @see org.eclipse.egf.model.fcore.ContractMode
+ * @see #setMode(ContractMode)
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getContract_Mode()
+ * @model
+ * @generated
+ */
+ ContractMode getMode();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.fcore.Contract#getMode <em>Mode</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Mode</em>' attribute.
+ * @see org.eclipse.egf.model.fcore.ContractMode
+ * @see #getMode()
+ * @generated
+ */
+ void setMode(ContractMode value);
+
+ /**
+ * Returns the value of the '<em><b>Type</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Type</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Type</em>' containment reference.
+ * @see #setType(Type)
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getContract_Type()
+ * @model containment="true" required="true"
+ * @generated
+ */
+ Type getType();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.fcore.Contract#getType <em>Type</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Type</em>' containment reference.
+ * @see #getType()
+ * @generated
+ */
+ void setType(Type value);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation" required="true"
+ * @generated
+ */
+ Activity getActivity();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation"
+ * @generated
+ */
+ EList<Contract> getContracts();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ EList<Contract> getContracts(Type type);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ EList<Contract> getContracts(ContractMode mode);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ EList<Contract> getContracts(Type type, ContractMode mode);
+
+} // Contract
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/ContractContainer.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/ContractContainer.java
new file mode 100644
index 0000000..f754deb
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/ContractContainer.java
@@ -0,0 +1,107 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore;
+
+import org.eclipse.egf.model.types.Type;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Contract Container</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.fcore.ContractContainer#getActivity <em>Activity</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.ContractContainer#getContracts <em>Contracts</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getContractContainer()
+ * @model annotation="http://www.eclipse.org/emf/2002/Ecore constraints='FactoryComponentContract'"
+ * @generated
+ */
+public interface ContractContainer extends ModelElement {
+ /**
+ * Returns the value of the '<em><b>Activity</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.fcore.Activity#getContractContainer <em>Contract Container</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Activity</em>' container reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Activity</em>' container reference.
+ * @see #setActivity(Activity)
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getContractContainer_Activity()
+ * @see org.eclipse.egf.model.fcore.Activity#getContractContainer
+ * @model opposite="contractContainer" resolveProxies="false" required="true" transient="false"
+ * @generated
+ */
+ Activity getActivity();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.fcore.ContractContainer#getActivity <em>Activity</em>}' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Activity</em>' container reference.
+ * @see #getActivity()
+ * @generated
+ */
+ void setActivity(Activity value);
+
+ /**
+ * Returns the value of the '<em><b>Contracts</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.egf.model.fcore.Contract}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.fcore.Contract#getContractContainer <em>Contract Container</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Contracts</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>Contracts</em>' containment reference list.
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getContractContainer_Contracts()
+ * @see org.eclipse.egf.model.fcore.Contract#getContractContainer
+ * @model opposite="contractContainer" containment="true" required="true"
+ * @generated
+ */
+ EList<Contract> getContracts();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ EList<Contract> getContracts(Type type);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ EList<Contract> getContracts(ContractMode mode);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ EList<Contract> getContracts(Type type, ContractMode mode);
+
+} // ContractContainer
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/ContractMode.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/ContractMode.java
new file mode 100644
index 0000000..b7e95bc
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/ContractMode.java
@@ -0,0 +1,244 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '
+ * <em><b>Contract Mode</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getContractMode()
+ * @model
+ * @generated
+ */
+public enum ContractMode implements Enumerator {
+ /**
+ * The '<em><b>In</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #IN_VALUE
+ * @generated
+ * @ordered
+ */
+ IN(0, "In", "In"), //$NON-NLS-1$ //$NON-NLS-2$
+
+ /**
+ * The '<em><b>Out</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #OUT_VALUE
+ * @generated
+ * @ordered
+ */
+ OUT(1, "Out", "Out"), //$NON-NLS-1$ //$NON-NLS-2$
+
+ /**
+ * The '<em><b>In Out</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #IN_OUT_VALUE
+ * @generated
+ * @ordered
+ */
+ IN_OUT(2, "In_Out", "In_Out"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ /**
+ * The '<em><b>In</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>IN</b></em>' literal object isn't clear, there
+ * really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #IN
+ * @model name="In"
+ * @generated
+ * @ordered
+ */
+ public static final int IN_VALUE = 0;
+
+ /**
+ * The '<em><b>Out</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>OUT</b></em>' literal object isn't clear, there
+ * really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #OUT
+ * @model name="Out"
+ * @generated
+ * @ordered
+ */
+ public static final int OUT_VALUE = 1;
+
+ /**
+ * The '<em><b>In Out</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>In Out</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #IN_OUT
+ * @model name="In_Out"
+ * @generated
+ * @ordered
+ */
+ public static final int IN_OUT_VALUE = 2;
+
+ /**
+ * An array of all the '<em><b>Contract Mode</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static final ContractMode[] VALUES_ARRAY = new ContractMode[] { IN, OUT, IN_OUT, };
+
+ /**
+ * A public read-only list of all the '<em><b>Contract Mode</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final List<ContractMode> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+ /**
+ * Returns the '<em><b>Contract Mode</b></em>' literal with the specified literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static ContractMode get(String literal) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ ContractMode result = VALUES_ARRAY[i];
+ if (result.toString().equals(literal)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Contract Mode</b></em>' literal with the specified name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static ContractMode getByName(String name) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ ContractMode result = VALUES_ARRAY[i];
+ if (result.getName().equals(name)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Contract Mode</b></em>' literal with the specified integer value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static ContractMode get(int value) {
+ switch (value) {
+ case IN_VALUE:
+ return IN;
+ case OUT_VALUE:
+ return OUT;
+ case IN_OUT_VALUE:
+ return IN_OUT;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final int value;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String name;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String literal;
+
+ /**
+ * Only this class can construct instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private ContractMode(int value, String name, String literal) {
+ this.value = value;
+ this.name = name;
+ this.literal = literal;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getLiteral() {
+ return literal;
+ }
+
+ /**
+ * Returns the literal value of the enumerator, which is its string representation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ return literal;
+ }
+
+} // ContractMode
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/FactoryComponent.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/FactoryComponent.java
new file mode 100644
index 0000000..257ae2d
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/FactoryComponent.java
@@ -0,0 +1,124 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore;
+
+import org.eclipse.egf.model.types.Type;
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Factory Component</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.fcore.FactoryComponent#getViewpointContainer <em>Viewpoint Container</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.FactoryComponent#getOrchestration <em>Orchestration</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getFactoryComponent()
+ * @model
+ * @generated
+ */
+public interface FactoryComponent extends Activity {
+ /**
+ * Returns the value of the '<em><b>Viewpoint Container</b></em>' containment reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.fcore.ViewpointContainer#getFactoryComponent <em>Factory Component</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Viewpoint Container</em>' containment reference
+ * isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Viewpoint Container</em>' containment reference.
+ * @see #setViewpointContainer(ViewpointContainer)
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getFactoryComponent_ViewpointContainer()
+ * @see org.eclipse.egf.model.fcore.ViewpointContainer#getFactoryComponent
+ * @model opposite="factoryComponent" containment="true"
+ * @generated
+ */
+ ViewpointContainer getViewpointContainer();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.fcore.FactoryComponent#getViewpointContainer <em>Viewpoint Container</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Viewpoint Container</em>' containment reference.
+ * @see #getViewpointContainer()
+ * @generated
+ */
+ void setViewpointContainer(ViewpointContainer value);
+
+ /**
+ * Returns the value of the '<em><b>Orchestration</b></em>' containment reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.fcore.Orchestration#getFactoryComponent <em>Factory Component</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Orchestration</em>' containment reference isn't
+ * clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Orchestration</em>' containment reference.
+ * @see #setOrchestration(Orchestration)
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getFactoryComponent_Orchestration()
+ * @see org.eclipse.egf.model.fcore.Orchestration#getFactoryComponent
+ * @model opposite="factoryComponent" containment="true"
+ * @generated
+ */
+ Orchestration getOrchestration();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.fcore.FactoryComponent#getOrchestration <em>Orchestration</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Orchestration</em>' containment reference.
+ * @see #getOrchestration()
+ * @generated
+ */
+ void setOrchestration(Orchestration value);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation"
+ * @generated
+ */
+ EList<InvocationContract> getInvocationContracts();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ EList<InvocationContract> getInvocationContracts(Type type);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ EList<InvocationContract> getInvocationContracts(ContractMode mode);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ EList<InvocationContract> getInvocationContracts(Type type, ContractMode mode);
+
+} // FactoryComponent
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/FactoryComponentContract.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/FactoryComponentContract.java
new file mode 100644
index 0000000..2def9cd
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/FactoryComponentContract.java
@@ -0,0 +1,52 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Factory Component Contract</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.fcore.FactoryComponentContract#getInvocationContracts <em>Invocation Contracts</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getFactoryComponentContract()
+ * @model annotation="http://www.eclipse.org/emf/2002/Ecore constraints='UselessFactoryComponentContract OutModeIsRestricted'"
+ * @generated
+ */
+public interface FactoryComponentContract extends Contract {
+ /**
+ * Returns the value of the '<em><b>Invocation Contracts</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.egf.model.fcore.InvocationContract}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.fcore.InvocationContract#getFactoryComponentContract <em>Factory Component Contract</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Invocation Contracts</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Invocation Contracts</em>' reference list.
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getFactoryComponentContract_InvocationContracts()
+ * @see org.eclipse.egf.model.fcore.InvocationContract#getFactoryComponentContract
+ * @model opposite="factoryComponentContract" resolveProxies="false"
+ * @generated
+ */
+ EList<InvocationContract> getInvocationContracts();
+
+} // FactoryComponentContract
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/FcoreFactory.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/FcoreFactory.java
new file mode 100644
index 0000000..bcb0739
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/FcoreFactory.java
@@ -0,0 +1,144 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore;
+
+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.egf.model.fcore.FcorePackage
+ * @generated
+ */
+public interface FcoreFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ FcoreFactory eINSTANCE = org.eclipse.egf.model.fcore.impl.FcoreFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Contract</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Contract</em>'.
+ * @generated
+ */
+ Contract createContract();
+
+ /**
+ * Returns a new object of class '<em>Factory Component</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Factory Component</em>'.
+ * @generated
+ */
+ FactoryComponent createFactoryComponent();
+
+ /**
+ * Returns a new object of class '<em>Contract Container</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Contract Container</em>'.
+ * @generated
+ */
+ ContractContainer createContractContainer();
+
+ /**
+ * Returns a new object of class '<em>Factory Component Contract</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Factory Component Contract</em>'.
+ * @generated
+ */
+ FactoryComponentContract createFactoryComponentContract();
+
+ /**
+ * Returns a new object of class '<em>Viewpoint Container</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Viewpoint Container</em>'.
+ * @generated
+ */
+ ViewpointContainer createViewpointContainer();
+
+ /**
+ * Returns a new object of class '<em>Orchestration Parameter Container</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Orchestration Parameter Container</em>'.
+ * @generated
+ */
+ OrchestrationParameterContainer createOrchestrationParameterContainer();
+
+ /**
+ * Returns a new object of class '<em>Orchestration Parameter</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Orchestration Parameter</em>'.
+ * @generated
+ */
+ OrchestrationParameter createOrchestrationParameter();
+
+ /**
+ * Returns a new object of class '<em>Invocation Contract Container</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Invocation Contract Container</em>'.
+ * @generated
+ */
+ InvocationContractContainer createInvocationContractContainer();
+
+ /**
+ * Returns a new object of class '<em>Invocation Contract</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Invocation Contract</em>'.
+ * @generated
+ */
+ InvocationContract createInvocationContract();
+
+ /**
+ * Returns an instance of data type '<em>Contract Mode</em>' corresponding the given literal.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param literal a literal of the data type.
+ * @return a new instance value of the data type.
+ * @generated
+ */
+ ContractMode createContractMode(String literal);
+
+ /**
+ * Returns a literal representation of an instance of data type '<em>Contract Mode</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param instanceValue an instance value of the data type.
+ * @return a literal representation of the instance value.
+ * @generated
+ */
+ String convertContractMode(ContractMode instanceValue);
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ FcorePackage getFcorePackage();
+
+} // FcoreFactory
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/FcorePackage.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/FcorePackage.java
new file mode 100644
index 0000000..a3c4cfa
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/FcorePackage.java
@@ -0,0 +1,2061 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.FcoreFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface FcorePackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "fcore"; //$NON-NLS-1$
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/egf/1.0.0/fcore"; //$NON-NLS-1$
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "fcore"; //$NON-NLS-1$
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ FcorePackage eINSTANCE = org.eclipse.egf.model.fcore.impl.FcorePackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.fcore.impl.ModelElementImpl <em>Model Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.impl.ModelElementImpl
+ * @see org.eclipse.egf.model.fcore.impl.FcorePackageImpl#getModelElement()
+ * @generated
+ */
+ int MODEL_ELEMENT = 0;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MODEL_ELEMENT__ID = 0;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MODEL_ELEMENT__DESCRIPTION = 1;
+
+ /**
+ * The number of structural features of the '<em>Model Element</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MODEL_ELEMENT_FEATURE_COUNT = 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.fcore.impl.NamedModelElementImpl <em>Named Model Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.impl.NamedModelElementImpl
+ * @see org.eclipse.egf.model.fcore.impl.FcorePackageImpl#getNamedModelElement()
+ * @generated
+ */
+ int NAMED_MODEL_ELEMENT = 1;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NAMED_MODEL_ELEMENT__ID = MODEL_ELEMENT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NAMED_MODEL_ELEMENT__DESCRIPTION = MODEL_ELEMENT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NAMED_MODEL_ELEMENT__NAME = MODEL_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Named Model Element</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NAMED_MODEL_ELEMENT_FEATURE_COUNT = MODEL_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.fcore.impl.ActivityImpl <em>Activity</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.impl.ActivityImpl
+ * @see org.eclipse.egf.model.fcore.impl.FcorePackageImpl#getActivity()
+ * @generated
+ */
+ int ACTIVITY = 2;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACTIVITY__ID = NAMED_MODEL_ELEMENT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACTIVITY__DESCRIPTION = NAMED_MODEL_ELEMENT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACTIVITY__NAME = NAMED_MODEL_ELEMENT__NAME;
+
+ /**
+ * The feature id for the '<em><b>Contract Container</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACTIVITY__CONTRACT_CONTAINER = NAMED_MODEL_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Activity</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACTIVITY_FEATURE_COUNT = NAMED_MODEL_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.fcore.impl.ContractImpl <em>Contract</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.impl.ContractImpl
+ * @see org.eclipse.egf.model.fcore.impl.FcorePackageImpl#getContract()
+ * @generated
+ */
+ int CONTRACT = 3;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CONTRACT__ID = NAMED_MODEL_ELEMENT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CONTRACT__DESCRIPTION = NAMED_MODEL_ELEMENT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CONTRACT__NAME = NAMED_MODEL_ELEMENT__NAME;
+
+ /**
+ * The feature id for the '<em><b>Contract Container</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CONTRACT__CONTRACT_CONTAINER = NAMED_MODEL_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Mandatory</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CONTRACT__MANDATORY = NAMED_MODEL_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Mode</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CONTRACT__MODE = NAMED_MODEL_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Type</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CONTRACT__TYPE = NAMED_MODEL_ELEMENT_FEATURE_COUNT + 3;
+
+ /**
+ * The number of structural features of the '<em>Contract</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CONTRACT_FEATURE_COUNT = NAMED_MODEL_ELEMENT_FEATURE_COUNT + 4;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.fcore.impl.FactoryComponentImpl <em>Factory Component</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.impl.FactoryComponentImpl
+ * @see org.eclipse.egf.model.fcore.impl.FcorePackageImpl#getFactoryComponent()
+ * @generated
+ */
+ int FACTORY_COMPONENT = 4;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FACTORY_COMPONENT__ID = ACTIVITY__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FACTORY_COMPONENT__DESCRIPTION = ACTIVITY__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FACTORY_COMPONENT__NAME = ACTIVITY__NAME;
+
+ /**
+ * The feature id for the '<em><b>Contract Container</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FACTORY_COMPONENT__CONTRACT_CONTAINER = ACTIVITY__CONTRACT_CONTAINER;
+
+ /**
+ * The feature id for the '<em><b>Viewpoint Container</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FACTORY_COMPONENT__VIEWPOINT_CONTAINER = ACTIVITY_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Orchestration</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FACTORY_COMPONENT__ORCHESTRATION = ACTIVITY_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Factory Component</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FACTORY_COMPONENT_FEATURE_COUNT = ACTIVITY_FEATURE_COUNT + 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.fcore.impl.ContractContainerImpl <em>Contract Container</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.impl.ContractContainerImpl
+ * @see org.eclipse.egf.model.fcore.impl.FcorePackageImpl#getContractContainer()
+ * @generated
+ */
+ int CONTRACT_CONTAINER = 5;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CONTRACT_CONTAINER__ID = MODEL_ELEMENT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CONTRACT_CONTAINER__DESCRIPTION = MODEL_ELEMENT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Activity</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CONTRACT_CONTAINER__ACTIVITY = MODEL_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Contracts</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CONTRACT_CONTAINER__CONTRACTS = MODEL_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Contract Container</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CONTRACT_CONTAINER_FEATURE_COUNT = MODEL_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.fcore.impl.FactoryComponentContractImpl <em>Factory Component Contract</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.impl.FactoryComponentContractImpl
+ * @see org.eclipse.egf.model.fcore.impl.FcorePackageImpl#getFactoryComponentContract()
+ * @generated
+ */
+ int FACTORY_COMPONENT_CONTRACT = 6;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FACTORY_COMPONENT_CONTRACT__ID = CONTRACT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FACTORY_COMPONENT_CONTRACT__DESCRIPTION = CONTRACT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FACTORY_COMPONENT_CONTRACT__NAME = CONTRACT__NAME;
+
+ /**
+ * The feature id for the '<em><b>Contract Container</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FACTORY_COMPONENT_CONTRACT__CONTRACT_CONTAINER = CONTRACT__CONTRACT_CONTAINER;
+
+ /**
+ * The feature id for the '<em><b>Mandatory</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FACTORY_COMPONENT_CONTRACT__MANDATORY = CONTRACT__MANDATORY;
+
+ /**
+ * The feature id for the '<em><b>Mode</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FACTORY_COMPONENT_CONTRACT__MODE = CONTRACT__MODE;
+
+ /**
+ * The feature id for the '<em><b>Type</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FACTORY_COMPONENT_CONTRACT__TYPE = CONTRACT__TYPE;
+
+ /**
+ * The feature id for the '<em><b>Invocation Contracts</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FACTORY_COMPONENT_CONTRACT__INVOCATION_CONTRACTS = CONTRACT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Factory Component Contract</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FACTORY_COMPONENT_CONTRACT_FEATURE_COUNT = CONTRACT_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.fcore.impl.ViewpointContainerImpl <em>Viewpoint Container</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.impl.ViewpointContainerImpl
+ * @see org.eclipse.egf.model.fcore.impl.FcorePackageImpl#getViewpointContainer()
+ * @generated
+ */
+ int VIEWPOINT_CONTAINER = 7;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.fcore.impl.ViewpointImpl <em>Viewpoint</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.impl.ViewpointImpl
+ * @see org.eclipse.egf.model.fcore.impl.FcorePackageImpl#getViewpoint()
+ * @generated
+ */
+ int VIEWPOINT = 8;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.fcore.impl.OrchestrationImpl <em>Orchestration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.impl.OrchestrationImpl
+ * @see org.eclipse.egf.model.fcore.impl.FcorePackageImpl#getOrchestration()
+ * @generated
+ */
+ int ORCHESTRATION = 9;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.fcore.impl.InvocationImpl <em>Invocation</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.impl.InvocationImpl
+ * @see org.eclipse.egf.model.fcore.impl.FcorePackageImpl#getInvocation()
+ * @generated
+ */
+ int INVOCATION = 12;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VIEWPOINT_CONTAINER__ID = MODEL_ELEMENT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VIEWPOINT_CONTAINER__DESCRIPTION = MODEL_ELEMENT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Factory Component</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VIEWPOINT_CONTAINER__FACTORY_COMPONENT = MODEL_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Viewpoints</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VIEWPOINT_CONTAINER__VIEWPOINTS = MODEL_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Viewpoint Container</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VIEWPOINT_CONTAINER_FEATURE_COUNT = MODEL_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VIEWPOINT__ID = MODEL_ELEMENT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VIEWPOINT__DESCRIPTION = MODEL_ELEMENT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Viewpoint Container</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VIEWPOINT__VIEWPOINT_CONTAINER = MODEL_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Viewpoint</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VIEWPOINT_FEATURE_COUNT = MODEL_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ORCHESTRATION__ID = MODEL_ELEMENT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ORCHESTRATION__DESCRIPTION = MODEL_ELEMENT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Factory Component</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ORCHESTRATION__FACTORY_COMPONENT = MODEL_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Orchestration Parameter Container</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ORCHESTRATION__ORCHESTRATION_PARAMETER_CONTAINER = MODEL_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Orchestration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ORCHESTRATION_FEATURE_COUNT = MODEL_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.fcore.impl.OrchestrationParameterContainerImpl <em>Orchestration Parameter Container</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.impl.OrchestrationParameterContainerImpl
+ * @see org.eclipse.egf.model.fcore.impl.FcorePackageImpl#getOrchestrationParameterContainer()
+ * @generated
+ */
+ int ORCHESTRATION_PARAMETER_CONTAINER = 10;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ORCHESTRATION_PARAMETER_CONTAINER__ID = MODEL_ELEMENT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ORCHESTRATION_PARAMETER_CONTAINER__DESCRIPTION = MODEL_ELEMENT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Orchestration</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ORCHESTRATION_PARAMETER_CONTAINER__ORCHESTRATION = MODEL_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Orchestration Parameters</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ORCHESTRATION_PARAMETER_CONTAINER__ORCHESTRATION_PARAMETERS = MODEL_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Orchestration Parameter Container</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ORCHESTRATION_PARAMETER_CONTAINER_FEATURE_COUNT = MODEL_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.fcore.impl.OrchestrationParameterImpl <em>Orchestration Parameter</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.impl.OrchestrationParameterImpl
+ * @see org.eclipse.egf.model.fcore.impl.FcorePackageImpl#getOrchestrationParameter()
+ * @generated
+ */
+ int ORCHESTRATION_PARAMETER = 11;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ORCHESTRATION_PARAMETER__ID = NAMED_MODEL_ELEMENT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ORCHESTRATION_PARAMETER__DESCRIPTION = NAMED_MODEL_ELEMENT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ORCHESTRATION_PARAMETER__NAME = NAMED_MODEL_ELEMENT__NAME;
+
+ /**
+ * The feature id for the '<em><b>Orchestration Parameter Container</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ORCHESTRATION_PARAMETER__ORCHESTRATION_PARAMETER_CONTAINER = NAMED_MODEL_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Invocation Contracts</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ORCHESTRATION_PARAMETER__INVOCATION_CONTRACTS = NAMED_MODEL_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Type</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ORCHESTRATION_PARAMETER__TYPE = NAMED_MODEL_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the '<em>Orchestration Parameter</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ORCHESTRATION_PARAMETER_FEATURE_COUNT = NAMED_MODEL_ELEMENT_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INVOCATION__ID = NAMED_MODEL_ELEMENT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INVOCATION__DESCRIPTION = NAMED_MODEL_ELEMENT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INVOCATION__NAME = NAMED_MODEL_ELEMENT__NAME;
+
+ /**
+ * The feature id for the '<em><b>Invocation Contract Container</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INVOCATION__INVOCATION_CONTRACT_CONTAINER = NAMED_MODEL_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Invoked Activity</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INVOCATION__INVOKED_ACTIVITY = NAMED_MODEL_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Invocation</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INVOCATION_FEATURE_COUNT = NAMED_MODEL_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.fcore.impl.InvocationContractContainerImpl <em>Invocation Contract Container</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.impl.InvocationContractContainerImpl
+ * @see org.eclipse.egf.model.fcore.impl.FcorePackageImpl#getInvocationContractContainer()
+ * @generated
+ */
+ int INVOCATION_CONTRACT_CONTAINER = 13;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INVOCATION_CONTRACT_CONTAINER__ID = MODEL_ELEMENT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INVOCATION_CONTRACT_CONTAINER__DESCRIPTION = MODEL_ELEMENT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Invocation</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INVOCATION_CONTRACT_CONTAINER__INVOCATION = MODEL_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Invocation Contracts</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INVOCATION_CONTRACT_CONTAINER__INVOCATION_CONTRACTS = MODEL_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Invocation Contract Container</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INVOCATION_CONTRACT_CONTAINER_FEATURE_COUNT = MODEL_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.fcore.impl.InvocationContractImpl <em>Invocation Contract</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.impl.InvocationContractImpl
+ * @see org.eclipse.egf.model.fcore.impl.FcorePackageImpl#getInvocationContract()
+ * @generated
+ */
+ int INVOCATION_CONTRACT = 14;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INVOCATION_CONTRACT__ID = MODEL_ELEMENT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INVOCATION_CONTRACT__DESCRIPTION = MODEL_ELEMENT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Invocation Contract Container</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INVOCATION_CONTRACT__INVOCATION_CONTRACT_CONTAINER = MODEL_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Factory Component Contract</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INVOCATION_CONTRACT__FACTORY_COMPONENT_CONTRACT = MODEL_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Orchestration Parameter</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INVOCATION_CONTRACT__ORCHESTRATION_PARAMETER = MODEL_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Source Invocation Contract</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INVOCATION_CONTRACT__SOURCE_INVOCATION_CONTRACT = MODEL_ELEMENT_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>Target Invocation Contract</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INVOCATION_CONTRACT__TARGET_INVOCATION_CONTRACT = MODEL_ELEMENT_FEATURE_COUNT + 4;
+
+ /**
+ * The feature id for the '<em><b>Invoked Contract</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INVOCATION_CONTRACT__INVOKED_CONTRACT = MODEL_ELEMENT_FEATURE_COUNT + 5;
+
+ /**
+ * The feature id for the '<em><b>Type</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INVOCATION_CONTRACT__TYPE = MODEL_ELEMENT_FEATURE_COUNT + 6;
+
+ /**
+ * The number of structural features of the '<em>Invocation Contract</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INVOCATION_CONTRACT_FEATURE_COUNT = MODEL_ELEMENT_FEATURE_COUNT + 7;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.fcore.ContractMode <em>Contract Mode</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.ContractMode
+ * @see org.eclipse.egf.model.fcore.impl.FcorePackageImpl#getContractMode()
+ * @generated
+ */
+ int CONTRACT_MODE = 15;
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.fcore.ModelElement <em>Model Element</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Model Element</em>'.
+ * @see org.eclipse.egf.model.fcore.ModelElement
+ * @generated
+ */
+ EClass getModelElement();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.egf.model.fcore.ModelElement#getID <em>ID</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>ID</em>'.
+ * @see org.eclipse.egf.model.fcore.ModelElement#getID()
+ * @see #getModelElement()
+ * @generated
+ */
+ EAttribute getModelElement_ID();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.egf.model.fcore.ModelElement#getDescription <em>Description</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Description</em>'.
+ * @see org.eclipse.egf.model.fcore.ModelElement#getDescription()
+ * @see #getModelElement()
+ * @generated
+ */
+ EAttribute getModelElement_Description();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.fcore.NamedModelElement <em>Named Model Element</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Named Model Element</em>'.
+ * @see org.eclipse.egf.model.fcore.NamedModelElement
+ * @generated
+ */
+ EClass getNamedModelElement();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.egf.model.fcore.NamedModelElement#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.egf.model.fcore.NamedModelElement#getName()
+ * @see #getNamedModelElement()
+ * @generated
+ */
+ EAttribute getNamedModelElement_Name();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.fcore.Activity <em>Activity</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Activity</em>'.
+ * @see org.eclipse.egf.model.fcore.Activity
+ * @generated
+ */
+ EClass getActivity();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.egf.model.fcore.Activity#getContractContainer <em>Contract Container</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Contract Container</em>'.
+ * @see org.eclipse.egf.model.fcore.Activity#getContractContainer()
+ * @see #getActivity()
+ * @generated
+ */
+ EReference getActivity_ContractContainer();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.fcore.Contract <em>Contract</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Contract</em>'.
+ * @see org.eclipse.egf.model.fcore.Contract
+ * @generated
+ */
+ EClass getContract();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.egf.model.fcore.Contract#getContractContainer <em>Contract Container</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Contract Container</em>'.
+ * @see org.eclipse.egf.model.fcore.Contract#getContractContainer()
+ * @see #getContract()
+ * @generated
+ */
+ EReference getContract_ContractContainer();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.egf.model.fcore.Contract#isMandatory <em>Mandatory</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Mandatory</em>'.
+ * @see org.eclipse.egf.model.fcore.Contract#isMandatory()
+ * @see #getContract()
+ * @generated
+ */
+ EAttribute getContract_Mandatory();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.egf.model.fcore.Contract#getMode <em>Mode</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Mode</em>'.
+ * @see org.eclipse.egf.model.fcore.Contract#getMode()
+ * @see #getContract()
+ * @generated
+ */
+ EAttribute getContract_Mode();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.egf.model.fcore.Contract#getType <em>Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Type</em>'.
+ * @see org.eclipse.egf.model.fcore.Contract#getType()
+ * @see #getContract()
+ * @generated
+ */
+ EReference getContract_Type();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.fcore.FactoryComponent <em>Factory Component</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Factory Component</em>'.
+ * @see org.eclipse.egf.model.fcore.FactoryComponent
+ * @generated
+ */
+ EClass getFactoryComponent();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.egf.model.fcore.FactoryComponent#getViewpointContainer <em>Viewpoint Container</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Viewpoint Container</em>'.
+ * @see org.eclipse.egf.model.fcore.FactoryComponent#getViewpointContainer()
+ * @see #getFactoryComponent()
+ * @generated
+ */
+ EReference getFactoryComponent_ViewpointContainer();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.egf.model.fcore.FactoryComponent#getOrchestration <em>Orchestration</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Orchestration</em>'.
+ * @see org.eclipse.egf.model.fcore.FactoryComponent#getOrchestration()
+ * @see #getFactoryComponent()
+ * @generated
+ */
+ EReference getFactoryComponent_Orchestration();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.fcore.ContractContainer <em>Contract Container</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Contract Container</em>'.
+ * @see org.eclipse.egf.model.fcore.ContractContainer
+ * @generated
+ */
+ EClass getContractContainer();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.egf.model.fcore.ContractContainer#getActivity <em>Activity</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Activity</em>'.
+ * @see org.eclipse.egf.model.fcore.ContractContainer#getActivity()
+ * @see #getContractContainer()
+ * @generated
+ */
+ EReference getContractContainer_Activity();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.egf.model.fcore.ContractContainer#getContracts <em>Contracts</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Contracts</em>'.
+ * @see org.eclipse.egf.model.fcore.ContractContainer#getContracts()
+ * @see #getContractContainer()
+ * @generated
+ */
+ EReference getContractContainer_Contracts();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.fcore.FactoryComponentContract <em>Factory Component Contract</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Factory Component Contract</em>'.
+ * @see org.eclipse.egf.model.fcore.FactoryComponentContract
+ * @generated
+ */
+ EClass getFactoryComponentContract();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.egf.model.fcore.FactoryComponentContract#getInvocationContracts <em>Invocation Contracts</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Invocation Contracts</em>'.
+ * @see org.eclipse.egf.model.fcore.FactoryComponentContract#getInvocationContracts()
+ * @see #getFactoryComponentContract()
+ * @generated
+ */
+ EReference getFactoryComponentContract_InvocationContracts();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.fcore.ViewpointContainer <em>Viewpoint Container</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Viewpoint Container</em>'.
+ * @see org.eclipse.egf.model.fcore.ViewpointContainer
+ * @generated
+ */
+ EClass getViewpointContainer();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.egf.model.fcore.ViewpointContainer#getFactoryComponent <em>Factory Component</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Factory Component</em>'.
+ * @see org.eclipse.egf.model.fcore.ViewpointContainer#getFactoryComponent()
+ * @see #getViewpointContainer()
+ * @generated
+ */
+ EReference getViewpointContainer_FactoryComponent();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.egf.model.fcore.ViewpointContainer#getViewpoints <em>Viewpoints</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Viewpoints</em>'.
+ * @see org.eclipse.egf.model.fcore.ViewpointContainer#getViewpoints()
+ * @see #getViewpointContainer()
+ * @generated
+ */
+ EReference getViewpointContainer_Viewpoints();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.fcore.Viewpoint <em>Viewpoint</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Viewpoint</em>'.
+ * @see org.eclipse.egf.model.fcore.Viewpoint
+ * @generated
+ */
+ EClass getViewpoint();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.egf.model.fcore.Viewpoint#getViewpointContainer <em>Viewpoint Container</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Viewpoint Container</em>'.
+ * @see org.eclipse.egf.model.fcore.Viewpoint#getViewpointContainer()
+ * @see #getViewpoint()
+ * @generated
+ */
+ EReference getViewpoint_ViewpointContainer();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.fcore.Orchestration <em>Orchestration</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Orchestration</em>'.
+ * @see org.eclipse.egf.model.fcore.Orchestration
+ * @generated
+ */
+ EClass getOrchestration();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.egf.model.fcore.Orchestration#getFactoryComponent <em>Factory Component</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Factory Component</em>'.
+ * @see org.eclipse.egf.model.fcore.Orchestration#getFactoryComponent()
+ * @see #getOrchestration()
+ * @generated
+ */
+ EReference getOrchestration_FactoryComponent();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.egf.model.fcore.Orchestration#getOrchestrationParameterContainer <em>Orchestration Parameter Container</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Orchestration Parameter Container</em>'.
+ * @see org.eclipse.egf.model.fcore.Orchestration#getOrchestrationParameterContainer()
+ * @see #getOrchestration()
+ * @generated
+ */
+ EReference getOrchestration_OrchestrationParameterContainer();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.fcore.OrchestrationParameterContainer <em>Orchestration Parameter Container</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Orchestration Parameter Container</em>'.
+ * @see org.eclipse.egf.model.fcore.OrchestrationParameterContainer
+ * @generated
+ */
+ EClass getOrchestrationParameterContainer();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.egf.model.fcore.OrchestrationParameterContainer#getOrchestration <em>Orchestration</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Orchestration</em>'.
+ * @see org.eclipse.egf.model.fcore.OrchestrationParameterContainer#getOrchestration()
+ * @see #getOrchestrationParameterContainer()
+ * @generated
+ */
+ EReference getOrchestrationParameterContainer_Orchestration();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.egf.model.fcore.OrchestrationParameterContainer#getOrchestrationParameters <em>Orchestration Parameters</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Orchestration Parameters</em>'.
+ * @see org.eclipse.egf.model.fcore.OrchestrationParameterContainer#getOrchestrationParameters()
+ * @see #getOrchestrationParameterContainer()
+ * @generated
+ */
+ EReference getOrchestrationParameterContainer_OrchestrationParameters();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.fcore.OrchestrationParameter <em>Orchestration Parameter</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Orchestration Parameter</em>'.
+ * @see org.eclipse.egf.model.fcore.OrchestrationParameter
+ * @generated
+ */
+ EClass getOrchestrationParameter();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.egf.model.fcore.OrchestrationParameter#getOrchestrationParameterContainer <em>Orchestration Parameter Container</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Orchestration Parameter Container</em>'.
+ * @see org.eclipse.egf.model.fcore.OrchestrationParameter#getOrchestrationParameterContainer()
+ * @see #getOrchestrationParameter()
+ * @generated
+ */
+ EReference getOrchestrationParameter_OrchestrationParameterContainer();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.egf.model.fcore.OrchestrationParameter#getInvocationContracts <em>Invocation Contracts</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Invocation Contracts</em>'.
+ * @see org.eclipse.egf.model.fcore.OrchestrationParameter#getInvocationContracts()
+ * @see #getOrchestrationParameter()
+ * @generated
+ */
+ EReference getOrchestrationParameter_InvocationContracts();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.egf.model.fcore.OrchestrationParameter#getType <em>Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Type</em>'.
+ * @see org.eclipse.egf.model.fcore.OrchestrationParameter#getType()
+ * @see #getOrchestrationParameter()
+ * @generated
+ */
+ EReference getOrchestrationParameter_Type();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.fcore.Invocation <em>Invocation</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Invocation</em>'.
+ * @see org.eclipse.egf.model.fcore.Invocation
+ * @generated
+ */
+ EClass getInvocation();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.egf.model.fcore.Invocation#getInvocationContractContainer <em>Invocation Contract Container</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Invocation Contract Container</em>'.
+ * @see org.eclipse.egf.model.fcore.Invocation#getInvocationContractContainer()
+ * @see #getInvocation()
+ * @generated
+ */
+ EReference getInvocation_InvocationContractContainer();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.egf.model.fcore.Invocation#getInvokedActivity <em>Invoked Activity</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Invoked Activity</em>'.
+ * @see org.eclipse.egf.model.fcore.Invocation#getInvokedActivity()
+ * @see #getInvocation()
+ * @generated
+ */
+ EReference getInvocation_InvokedActivity();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.fcore.InvocationContractContainer <em>Invocation Contract Container</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Invocation Contract Container</em>'.
+ * @see org.eclipse.egf.model.fcore.InvocationContractContainer
+ * @generated
+ */
+ EClass getInvocationContractContainer();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.egf.model.fcore.InvocationContractContainer#getInvocation <em>Invocation</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Invocation</em>'.
+ * @see org.eclipse.egf.model.fcore.InvocationContractContainer#getInvocation()
+ * @see #getInvocationContractContainer()
+ * @generated
+ */
+ EReference getInvocationContractContainer_Invocation();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.egf.model.fcore.InvocationContractContainer#getInvocationContracts <em>Invocation Contracts</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Invocation Contracts</em>'.
+ * @see org.eclipse.egf.model.fcore.InvocationContractContainer#getInvocationContracts()
+ * @see #getInvocationContractContainer()
+ * @generated
+ */
+ EReference getInvocationContractContainer_InvocationContracts();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.fcore.InvocationContract <em>Invocation Contract</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Invocation Contract</em>'.
+ * @see org.eclipse.egf.model.fcore.InvocationContract
+ * @generated
+ */
+ EClass getInvocationContract();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.egf.model.fcore.InvocationContract#getInvocationContractContainer <em>Invocation Contract Container</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Invocation Contract Container</em>'.
+ * @see org.eclipse.egf.model.fcore.InvocationContract#getInvocationContractContainer()
+ * @see #getInvocationContract()
+ * @generated
+ */
+ EReference getInvocationContract_InvocationContractContainer();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.egf.model.fcore.InvocationContract#getFactoryComponentContract <em>Factory Component Contract</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Factory Component Contract</em>'.
+ * @see org.eclipse.egf.model.fcore.InvocationContract#getFactoryComponentContract()
+ * @see #getInvocationContract()
+ * @generated
+ */
+ EReference getInvocationContract_FactoryComponentContract();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.egf.model.fcore.InvocationContract#getOrchestrationParameter <em>Orchestration Parameter</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Orchestration Parameter</em>'.
+ * @see org.eclipse.egf.model.fcore.InvocationContract#getOrchestrationParameter()
+ * @see #getInvocationContract()
+ * @generated
+ */
+ EReference getInvocationContract_OrchestrationParameter();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.egf.model.fcore.InvocationContract#getSourceInvocationContract <em>Source Invocation Contract</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Source Invocation Contract</em>'.
+ * @see org.eclipse.egf.model.fcore.InvocationContract#getSourceInvocationContract()
+ * @see #getInvocationContract()
+ * @generated
+ */
+ EReference getInvocationContract_SourceInvocationContract();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.egf.model.fcore.InvocationContract#getTargetInvocationContract <em>Target Invocation Contract</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Target Invocation Contract</em>'.
+ * @see org.eclipse.egf.model.fcore.InvocationContract#getTargetInvocationContract()
+ * @see #getInvocationContract()
+ * @generated
+ */
+ EReference getInvocationContract_TargetInvocationContract();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.egf.model.fcore.InvocationContract#getInvokedContract <em>Invoked Contract</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Invoked Contract</em>'.
+ * @see org.eclipse.egf.model.fcore.InvocationContract#getInvokedContract()
+ * @see #getInvocationContract()
+ * @generated
+ */
+ EReference getInvocationContract_InvokedContract();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.egf.model.fcore.InvocationContract#getType <em>Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Type</em>'.
+ * @see org.eclipse.egf.model.fcore.InvocationContract#getType()
+ * @see #getInvocationContract()
+ * @generated
+ */
+ EReference getInvocationContract_Type();
+
+ /**
+ * Returns the meta object for enum '{@link org.eclipse.egf.model.fcore.ContractMode <em>Contract Mode</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for enum '<em>Contract Mode</em>'.
+ * @see org.eclipse.egf.model.fcore.ContractMode
+ * @generated
+ */
+ EEnum getContractMode();
+
+ /**
+ * 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
+ */
+ FcoreFactory getFcoreFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.fcore.impl.ModelElementImpl <em>Model Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.impl.ModelElementImpl
+ * @see org.eclipse.egf.model.fcore.impl.FcorePackageImpl#getModelElement()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass MODEL_ELEMENT = eINSTANCE.getModelElement();
+
+ /**
+ * The meta object literal for the '<em><b>ID</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EAttribute MODEL_ELEMENT__ID = eINSTANCE.getModelElement_ID();
+
+ /**
+ * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EAttribute MODEL_ELEMENT__DESCRIPTION = eINSTANCE.getModelElement_Description();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.fcore.impl.NamedModelElementImpl <em>Named Model Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.impl.NamedModelElementImpl
+ * @see org.eclipse.egf.model.fcore.impl.FcorePackageImpl#getNamedModelElement()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass NAMED_MODEL_ELEMENT = eINSTANCE.getNamedModelElement();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EAttribute NAMED_MODEL_ELEMENT__NAME = eINSTANCE.getNamedModelElement_Name();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.fcore.impl.ActivityImpl <em>Activity</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.impl.ActivityImpl
+ * @see org.eclipse.egf.model.fcore.impl.FcorePackageImpl#getActivity()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass ACTIVITY = eINSTANCE.getActivity();
+
+ /**
+ * The meta object literal for the '<em><b>Contract Container</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference ACTIVITY__CONTRACT_CONTAINER = eINSTANCE.getActivity_ContractContainer();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.fcore.impl.ContractImpl <em>Contract</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.impl.ContractImpl
+ * @see org.eclipse.egf.model.fcore.impl.FcorePackageImpl#getContract()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass CONTRACT = eINSTANCE.getContract();
+
+ /**
+ * The meta object literal for the '<em><b>Contract Container</b></em>' container reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference CONTRACT__CONTRACT_CONTAINER = eINSTANCE.getContract_ContractContainer();
+
+ /**
+ * The meta object literal for the '<em><b>Mandatory</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EAttribute CONTRACT__MANDATORY = eINSTANCE.getContract_Mandatory();
+
+ /**
+ * The meta object literal for the '<em><b>Mode</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EAttribute CONTRACT__MODE = eINSTANCE.getContract_Mode();
+
+ /**
+ * The meta object literal for the '<em><b>Type</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference CONTRACT__TYPE = eINSTANCE.getContract_Type();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.fcore.impl.FactoryComponentImpl <em>Factory Component</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.impl.FactoryComponentImpl
+ * @see org.eclipse.egf.model.fcore.impl.FcorePackageImpl#getFactoryComponent()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass FACTORY_COMPONENT = eINSTANCE.getFactoryComponent();
+
+ /**
+ * The meta object literal for the '<em><b>Viewpoint Container</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference FACTORY_COMPONENT__VIEWPOINT_CONTAINER = eINSTANCE.getFactoryComponent_ViewpointContainer();
+
+ /**
+ * The meta object literal for the '<em><b>Orchestration</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference FACTORY_COMPONENT__ORCHESTRATION = eINSTANCE.getFactoryComponent_Orchestration();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.fcore.impl.ContractContainerImpl <em>Contract Container</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.impl.ContractContainerImpl
+ * @see org.eclipse.egf.model.fcore.impl.FcorePackageImpl#getContractContainer()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass CONTRACT_CONTAINER = eINSTANCE.getContractContainer();
+
+ /**
+ * The meta object literal for the '<em><b>Activity</b></em>' container reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference CONTRACT_CONTAINER__ACTIVITY = eINSTANCE.getContractContainer_Activity();
+
+ /**
+ * The meta object literal for the '<em><b>Contracts</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference CONTRACT_CONTAINER__CONTRACTS = eINSTANCE.getContractContainer_Contracts();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.fcore.impl.FactoryComponentContractImpl <em>Factory Component Contract</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.impl.FactoryComponentContractImpl
+ * @see org.eclipse.egf.model.fcore.impl.FcorePackageImpl#getFactoryComponentContract()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass FACTORY_COMPONENT_CONTRACT = eINSTANCE.getFactoryComponentContract();
+
+ /**
+ * The meta object literal for the '<em><b>Invocation Contracts</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference FACTORY_COMPONENT_CONTRACT__INVOCATION_CONTRACTS = eINSTANCE.getFactoryComponentContract_InvocationContracts();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.fcore.impl.ViewpointContainerImpl <em>Viewpoint Container</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.impl.ViewpointContainerImpl
+ * @see org.eclipse.egf.model.fcore.impl.FcorePackageImpl#getViewpointContainer()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass VIEWPOINT_CONTAINER = eINSTANCE.getViewpointContainer();
+
+ /**
+ * The meta object literal for the '<em><b>Factory Component</b></em>' container reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference VIEWPOINT_CONTAINER__FACTORY_COMPONENT = eINSTANCE.getViewpointContainer_FactoryComponent();
+
+ /**
+ * The meta object literal for the '<em><b>Viewpoints</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference VIEWPOINT_CONTAINER__VIEWPOINTS = eINSTANCE.getViewpointContainer_Viewpoints();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.fcore.impl.ViewpointImpl <em>Viewpoint</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.impl.ViewpointImpl
+ * @see org.eclipse.egf.model.fcore.impl.FcorePackageImpl#getViewpoint()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass VIEWPOINT = eINSTANCE.getViewpoint();
+
+ /**
+ * The meta object literal for the '<em><b>Viewpoint Container</b></em>' container reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference VIEWPOINT__VIEWPOINT_CONTAINER = eINSTANCE.getViewpoint_ViewpointContainer();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.fcore.impl.OrchestrationImpl <em>Orchestration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.impl.OrchestrationImpl
+ * @see org.eclipse.egf.model.fcore.impl.FcorePackageImpl#getOrchestration()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass ORCHESTRATION = eINSTANCE.getOrchestration();
+
+ /**
+ * The meta object literal for the '<em><b>Factory Component</b></em>' container reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference ORCHESTRATION__FACTORY_COMPONENT = eINSTANCE.getOrchestration_FactoryComponent();
+
+ /**
+ * The meta object literal for the '<em><b>Orchestration Parameter Container</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference ORCHESTRATION__ORCHESTRATION_PARAMETER_CONTAINER = eINSTANCE.getOrchestration_OrchestrationParameterContainer();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.fcore.impl.OrchestrationParameterContainerImpl <em>Orchestration Parameter Container</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.impl.OrchestrationParameterContainerImpl
+ * @see org.eclipse.egf.model.fcore.impl.FcorePackageImpl#getOrchestrationParameterContainer()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass ORCHESTRATION_PARAMETER_CONTAINER = eINSTANCE.getOrchestrationParameterContainer();
+
+ /**
+ * The meta object literal for the '<em><b>Orchestration</b></em>' container reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference ORCHESTRATION_PARAMETER_CONTAINER__ORCHESTRATION = eINSTANCE.getOrchestrationParameterContainer_Orchestration();
+
+ /**
+ * The meta object literal for the '<em><b>Orchestration Parameters</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference ORCHESTRATION_PARAMETER_CONTAINER__ORCHESTRATION_PARAMETERS = eINSTANCE.getOrchestrationParameterContainer_OrchestrationParameters();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.fcore.impl.OrchestrationParameterImpl <em>Orchestration Parameter</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.impl.OrchestrationParameterImpl
+ * @see org.eclipse.egf.model.fcore.impl.FcorePackageImpl#getOrchestrationParameter()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass ORCHESTRATION_PARAMETER = eINSTANCE.getOrchestrationParameter();
+
+ /**
+ * The meta object literal for the '<em><b>Orchestration Parameter Container</b></em>' container reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference ORCHESTRATION_PARAMETER__ORCHESTRATION_PARAMETER_CONTAINER = eINSTANCE.getOrchestrationParameter_OrchestrationParameterContainer();
+
+ /**
+ * The meta object literal for the '<em><b>Invocation Contracts</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference ORCHESTRATION_PARAMETER__INVOCATION_CONTRACTS = eINSTANCE.getOrchestrationParameter_InvocationContracts();
+
+ /**
+ * The meta object literal for the '<em><b>Type</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference ORCHESTRATION_PARAMETER__TYPE = eINSTANCE.getOrchestrationParameter_Type();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.fcore.impl.InvocationImpl <em>Invocation</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.impl.InvocationImpl
+ * @see org.eclipse.egf.model.fcore.impl.FcorePackageImpl#getInvocation()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass INVOCATION = eINSTANCE.getInvocation();
+
+ /**
+ * The meta object literal for the '<em><b>Invocation Contract Container</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference INVOCATION__INVOCATION_CONTRACT_CONTAINER = eINSTANCE.getInvocation_InvocationContractContainer();
+
+ /**
+ * The meta object literal for the '<em><b>Invoked Activity</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference INVOCATION__INVOKED_ACTIVITY = eINSTANCE.getInvocation_InvokedActivity();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.fcore.impl.InvocationContractContainerImpl <em>Invocation Contract Container</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.impl.InvocationContractContainerImpl
+ * @see org.eclipse.egf.model.fcore.impl.FcorePackageImpl#getInvocationContractContainer()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass INVOCATION_CONTRACT_CONTAINER = eINSTANCE.getInvocationContractContainer();
+
+ /**
+ * The meta object literal for the '<em><b>Invocation</b></em>' container reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference INVOCATION_CONTRACT_CONTAINER__INVOCATION = eINSTANCE.getInvocationContractContainer_Invocation();
+
+ /**
+ * The meta object literal for the '<em><b>Invocation Contracts</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference INVOCATION_CONTRACT_CONTAINER__INVOCATION_CONTRACTS = eINSTANCE.getInvocationContractContainer_InvocationContracts();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.fcore.impl.InvocationContractImpl <em>Invocation Contract</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.impl.InvocationContractImpl
+ * @see org.eclipse.egf.model.fcore.impl.FcorePackageImpl#getInvocationContract()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass INVOCATION_CONTRACT = eINSTANCE.getInvocationContract();
+
+ /**
+ * The meta object literal for the '<em><b>Invocation Contract Container</b></em>' container reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference INVOCATION_CONTRACT__INVOCATION_CONTRACT_CONTAINER = eINSTANCE.getInvocationContract_InvocationContractContainer();
+
+ /**
+ * The meta object literal for the '<em><b>Factory Component Contract</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference INVOCATION_CONTRACT__FACTORY_COMPONENT_CONTRACT = eINSTANCE.getInvocationContract_FactoryComponentContract();
+
+ /**
+ * The meta object literal for the '<em><b>Orchestration Parameter</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference INVOCATION_CONTRACT__ORCHESTRATION_PARAMETER = eINSTANCE.getInvocationContract_OrchestrationParameter();
+
+ /**
+ * The meta object literal for the '<em><b>Source Invocation Contract</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference INVOCATION_CONTRACT__SOURCE_INVOCATION_CONTRACT = eINSTANCE.getInvocationContract_SourceInvocationContract();
+
+ /**
+ * The meta object literal for the '<em><b>Target Invocation Contract</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference INVOCATION_CONTRACT__TARGET_INVOCATION_CONTRACT = eINSTANCE.getInvocationContract_TargetInvocationContract();
+
+ /**
+ * The meta object literal for the '<em><b>Invoked Contract</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference INVOCATION_CONTRACT__INVOKED_CONTRACT = eINSTANCE.getInvocationContract_InvokedContract();
+
+ /**
+ * The meta object literal for the '<em><b>Type</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference INVOCATION_CONTRACT__TYPE = eINSTANCE.getInvocationContract_Type();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.fcore.ContractMode <em>Contract Mode</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.ContractMode
+ * @see org.eclipse.egf.model.fcore.impl.FcorePackageImpl#getContractMode()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EEnum CONTRACT_MODE = eINSTANCE.getContractMode();
+
+ }
+
+} // FcorePackage
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/Invocation.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/Invocation.java
new file mode 100644
index 0000000..cffdea5
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/Invocation.java
@@ -0,0 +1,163 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore;
+
+import org.eclipse.egf.model.types.Type;
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Invocation</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.fcore.Invocation#getInvocationContractContainer <em>Invocation Contract Container</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.Invocation#getInvokedActivity <em>Invoked Activity</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getInvocation()
+ * @model abstract="true"
+ * annotation="http://www.eclipse.org/emf/2002/Ecore constraints='MandatoryInvokedContract'"
+ * @generated
+ */
+public interface Invocation extends NamedModelElement {
+ /**
+ * Returns the value of the '<em><b>Invocation Contract Container</b></em>' containment reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.fcore.InvocationContractContainer#getInvocation <em>Invocation</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Invocation Contract Container</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Invocation Contract Container</em>' containment reference.
+ * @see #setInvocationContractContainer(InvocationContractContainer)
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getInvocation_InvocationContractContainer()
+ * @see org.eclipse.egf.model.fcore.InvocationContractContainer#getInvocation
+ * @model opposite="invocation" containment="true"
+ * @generated
+ */
+ InvocationContractContainer getInvocationContractContainer();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.fcore.Invocation#getInvocationContractContainer <em>Invocation Contract Container</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Invocation Contract Container</em>' containment reference.
+ * @see #getInvocationContractContainer()
+ * @generated
+ */
+ void setInvocationContractContainer(InvocationContractContainer value);
+
+ /**
+ * Returns the value of the '<em><b>Invoked Activity</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Invoked Activity</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Invoked Activity</em>' reference.
+ * @see #setInvokedActivity(Activity)
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getInvocation_InvokedActivity()
+ * @model required="true"
+ * @generated
+ */
+ Activity getInvokedActivity();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.fcore.Invocation#getInvokedActivity <em>Invoked Activity</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Invoked Activity</em>' reference.
+ * @see #getInvokedActivity()
+ * @generated
+ */
+ void setInvokedActivity(Activity value);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation" required="true"
+ * @generated
+ */
+ FactoryComponent getFactoryComponent();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation"
+ * @generated
+ */
+ EList<InvocationContract> getInvocationContracts();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ EList<InvocationContract> getInvocationContracts(Type type);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ EList<InvocationContract> getInvocationContracts(ContractMode mode);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ EList<InvocationContract> getInvocationContracts(Type type, ContractMode mode);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation"
+ * @generated
+ */
+ EList<Contract> getInvokedContracts();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ EList<Contract> getInvokedContracts(Type type);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ EList<Contract> getInvokedContracts(ContractMode mode);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ EList<Contract> getInvokedContracts(Type type, ContractMode mode);
+
+} // Invocation
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/InvocationContract.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/InvocationContract.java
new file mode 100644
index 0000000..e492f68
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/InvocationContract.java
@@ -0,0 +1,251 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore;
+
+import org.eclipse.egf.model.types.Type;
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Invocation Contract</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.fcore.InvocationContract#getInvocationContractContainer <em>Invocation Contract Container</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.InvocationContract#getFactoryComponentContract <em>Factory Component Contract</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.InvocationContract#getOrchestrationParameter <em>Orchestration Parameter</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.InvocationContract#getSourceInvocationContract <em>Source Invocation Contract</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.InvocationContract#getTargetInvocationContract <em>Target Invocation Contract</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.InvocationContract#getInvokedContract <em>Invoked Contract</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.InvocationContract#getType <em>Type</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getInvocationContract()
+ * @model annotation="http://www.eclipse.org/emf/2002/Ecore constraints='ValidInvokedContract ValidInvokedContractType ValidFactoryComponentContract ValidFactoryComponentContractType ValidOrchestrationParameter ValidOrchestrationParameterType ValidSourceInvocationContract ValidSourceInvocationContractType UselessTypeValue'"
+ * @generated
+ */
+public interface InvocationContract extends ModelElement {
+ /**
+ * Returns the value of the '<em><b>Invocation Contract Container</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.fcore.InvocationContractContainer#getInvocationContracts <em>Invocation Contracts</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Invocation Contract Container</em>' container reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Invocation Contract Container</em>' container reference.
+ * @see #setInvocationContractContainer(InvocationContractContainer)
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getInvocationContract_InvocationContractContainer()
+ * @see org.eclipse.egf.model.fcore.InvocationContractContainer#getInvocationContracts
+ * @model opposite="invocationContracts" resolveProxies="false" required="true" transient="false"
+ * @generated
+ */
+ InvocationContractContainer getInvocationContractContainer();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.fcore.InvocationContract#getInvocationContractContainer <em>Invocation Contract Container</em>}' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Invocation Contract Container</em>' container reference.
+ * @see #getInvocationContractContainer()
+ * @generated
+ */
+ void setInvocationContractContainer(InvocationContractContainer value);
+
+ /**
+ * Returns the value of the '<em><b>Factory Component Contract</b></em>' reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.fcore.FactoryComponentContract#getInvocationContracts <em>Invocation Contracts</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Factory Component Contract</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Factory Component Contract</em>' reference.
+ * @see #setFactoryComponentContract(FactoryComponentContract)
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getInvocationContract_FactoryComponentContract()
+ * @see org.eclipse.egf.model.fcore.FactoryComponentContract#getInvocationContracts
+ * @model opposite="invocationContracts" resolveProxies="false"
+ * @generated
+ */
+ FactoryComponentContract getFactoryComponentContract();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.fcore.InvocationContract#getFactoryComponentContract <em>Factory Component Contract</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Factory Component Contract</em>' reference.
+ * @see #getFactoryComponentContract()
+ * @generated
+ */
+ void setFactoryComponentContract(FactoryComponentContract value);
+
+ /**
+ * Returns the value of the '<em><b>Orchestration Parameter</b></em>' reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.fcore.OrchestrationParameter#getInvocationContracts <em>Invocation Contracts</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Orchestration Parameter</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Orchestration Parameter</em>' reference.
+ * @see #setOrchestrationParameter(OrchestrationParameter)
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getInvocationContract_OrchestrationParameter()
+ * @see org.eclipse.egf.model.fcore.OrchestrationParameter#getInvocationContracts
+ * @model opposite="invocationContracts" resolveProxies="false"
+ * @generated
+ */
+ OrchestrationParameter getOrchestrationParameter();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.fcore.InvocationContract#getOrchestrationParameter <em>Orchestration Parameter</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Orchestration Parameter</em>' reference.
+ * @see #getOrchestrationParameter()
+ * @generated
+ */
+ void setOrchestrationParameter(OrchestrationParameter value);
+
+ /**
+ * Returns the value of the '<em><b>Source Invocation Contract</b></em>' reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.fcore.InvocationContract#getTargetInvocationContract <em>Target Invocation Contract</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Source Invocation Contract</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Source Invocation Contract</em>' reference.
+ * @see #setSourceInvocationContract(InvocationContract)
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getInvocationContract_SourceInvocationContract()
+ * @see org.eclipse.egf.model.fcore.InvocationContract#getTargetInvocationContract
+ * @model opposite="targetInvocationContract" resolveProxies="false"
+ * @generated
+ */
+ InvocationContract getSourceInvocationContract();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.fcore.InvocationContract#getSourceInvocationContract <em>Source Invocation Contract</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Source Invocation Contract</em>' reference.
+ * @see #getSourceInvocationContract()
+ * @generated
+ */
+ void setSourceInvocationContract(InvocationContract value);
+
+ /**
+ * Returns the value of the '<em><b>Target Invocation Contract</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.egf.model.fcore.InvocationContract}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.fcore.InvocationContract#getSourceInvocationContract <em>Source Invocation Contract</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Target Invocation Contract</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Target Invocation Contract</em>' reference list.
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getInvocationContract_TargetInvocationContract()
+ * @see org.eclipse.egf.model.fcore.InvocationContract#getSourceInvocationContract
+ * @model opposite="sourceInvocationContract" resolveProxies="false"
+ * @generated
+ */
+ EList<InvocationContract> getTargetInvocationContract();
+
+ /**
+ * Returns the value of the '<em><b>Invoked Contract</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Invoked Contract</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Invoked Contract</em>' reference.
+ * @see #setInvokedContract(Contract)
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getInvocationContract_InvokedContract()
+ * @model required="true"
+ * @generated
+ */
+ Contract getInvokedContract();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.fcore.InvocationContract#getInvokedContract <em>Invoked Contract</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Invoked Contract</em>' reference.
+ * @see #getInvokedContract()
+ * @generated
+ */
+ void setInvokedContract(Contract value);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Invoked Mode</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @model kind="operation"
+ * @generated
+ */
+ ContractMode getInvokedMode();
+
+ /**
+ * Returns the value of the '<em><b>Type</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Type</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Type</em>' containment reference.
+ * @see #setType(Type)
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getInvocationContract_Type()
+ * @model containment="true"
+ * @generated
+ */
+ Type getType();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.fcore.InvocationContract#getType <em>Type</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Type</em>' containment reference.
+ * @see #getType()
+ * @generated
+ */
+ void setType(Type value);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation" required="true"
+ * @generated
+ */
+ FactoryComponent getFactoryComponent();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation" required="true"
+ * @generated
+ */
+ Invocation getInvocation();
+
+} // InvocationContract
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/InvocationContractContainer.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/InvocationContractContainer.java
new file mode 100644
index 0000000..9801443
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/InvocationContractContainer.java
@@ -0,0 +1,89 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Invocation Contract Container</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.fcore.InvocationContractContainer#getInvocation <em>Invocation</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.InvocationContractContainer#getInvocationContracts <em>Invocation Contracts</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getInvocationContractContainer()
+ * @model
+ * @generated
+ */
+public interface InvocationContractContainer extends ModelElement {
+ /**
+ * Returns the value of the '<em><b>Invocation</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.fcore.Invocation#getInvocationContractContainer <em>Invocation Contract Container</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Invocation</em>' container reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Invocation</em>' container reference.
+ * @see #setInvocation(Invocation)
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getInvocationContractContainer_Invocation()
+ * @see org.eclipse.egf.model.fcore.Invocation#getInvocationContractContainer
+ * @model opposite="invocationContractContainer" resolveProxies="false" required="true" transient="false"
+ * @generated
+ */
+ Invocation getInvocation();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.fcore.InvocationContractContainer#getInvocation <em>Invocation</em>}' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Invocation</em>' container reference.
+ * @see #getInvocation()
+ * @generated
+ */
+ void setInvocation(Invocation value);
+
+ /**
+ * Returns the value of the '<em><b>Invocation Contracts</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.egf.model.fcore.InvocationContract}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.fcore.InvocationContract#getInvocationContractContainer <em>Invocation Contract Container</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Invocation Contracts</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>Invocation Contracts</em>' containment reference list.
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getInvocationContractContainer_InvocationContracts()
+ * @see org.eclipse.egf.model.fcore.InvocationContract#getInvocationContractContainer
+ * @model opposite="invocationContractContainer" containment="true"
+ * @generated
+ */
+ EList<InvocationContract> getInvocationContracts();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation" required="true"
+ * @generated
+ */
+ FactoryComponent getFactoryComponent();
+
+} // InvocationContractContainer
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/ModelElement.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/ModelElement.java
new file mode 100644
index 0000000..91a1c7b
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/ModelElement.java
@@ -0,0 +1,87 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Model Element</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.fcore.ModelElement#getID <em>ID</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.ModelElement#getDescription <em>Description</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getModelElement()
+ * @model abstract="true"
+ * @generated
+ */
+public interface ModelElement extends EObject {
+ /**
+ * Returns the value of the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>ID</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>ID</em>' attribute.
+ * @see #isSetID()
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getModelElement_ID()
+ * @model unsettable="true" transient="true" changeable="false" volatile="true" derived="true"
+ * @generated
+ */
+ String getID();
+
+ /**
+ * Returns whether the value of the '{@link org.eclipse.egf.model.fcore.ModelElement#getID <em>ID</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>ID</em>' attribute is set.
+ * @see #getID()
+ * @generated
+ */
+ boolean isSetID();
+
+ /**
+ * Returns the value of the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Description</em>' attribute isn't clear, there
+ * really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Description</em>' attribute.
+ * @see #setDescription(String)
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getModelElement_Description()
+ * @model
+ * @generated
+ */
+ String getDescription();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.fcore.ModelElement#getDescription <em>Description</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Description</em>' attribute.
+ * @see #getDescription()
+ * @generated
+ */
+ void setDescription(String value);
+
+} // ModelElement
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/NamedModelElement.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/NamedModelElement.java
new file mode 100644
index 0000000..e216aa1
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/NamedModelElement.java
@@ -0,0 +1,58 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Named Model Element</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.fcore.NamedModelElement#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getNamedModelElement()
+ * @model abstract="true"
+ * @generated
+ */
+public interface NamedModelElement extends ModelElement {
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getNamedModelElement_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.fcore.NamedModelElement#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);
+
+} // NamedModelElement
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/Orchestration.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/Orchestration.java
new file mode 100644
index 0000000..3b9abc0
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/Orchestration.java
@@ -0,0 +1,149 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore;
+
+import org.eclipse.egf.model.types.Type;
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Orchestration</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.fcore.Orchestration#getFactoryComponent <em>Factory Component</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.Orchestration#getOrchestrationParameterContainer <em>Orchestration Parameter Container</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getOrchestration()
+ * @model abstract="true"
+ * @generated
+ */
+public interface Orchestration extends ModelElement {
+ /**
+ * Returns the value of the '<em><b>Factory Component</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.fcore.FactoryComponent#getOrchestration <em>Orchestration</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Factory Component</em>' container reference
+ * isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Factory Component</em>' container reference.
+ * @see #setFactoryComponent(FactoryComponent)
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getOrchestration_FactoryComponent()
+ * @see org.eclipse.egf.model.fcore.FactoryComponent#getOrchestration
+ * @model opposite="orchestration" resolveProxies="false" required="true" transient="false"
+ * @generated
+ */
+ FactoryComponent getFactoryComponent();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.fcore.Orchestration#getFactoryComponent <em>Factory Component</em>}' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Factory Component</em>' container reference.
+ * @see #getFactoryComponent()
+ * @generated
+ */
+ void setFactoryComponent(FactoryComponent value);
+
+ /**
+ * Returns the value of the '<em><b>Orchestration Parameter Container</b></em>' containment reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.fcore.OrchestrationParameterContainer#getOrchestration <em>Orchestration</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Orchestration Parameter Container</em>' containment reference isn't
+ * clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Orchestration Parameter Container</em>' containment reference.
+ * @see #setOrchestrationParameterContainer(OrchestrationParameterContainer)
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getOrchestration_OrchestrationParameterContainer()
+ * @see org.eclipse.egf.model.fcore.OrchestrationParameterContainer#getOrchestration
+ * @model opposite="orchestration" containment="true"
+ * @generated
+ */
+ OrchestrationParameterContainer getOrchestrationParameterContainer();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.fcore.Orchestration#getOrchestrationParameterContainer <em>Orchestration Parameter Container</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Orchestration Parameter Container</em>' containment reference.
+ * @see #getOrchestrationParameterContainer()
+ * @generated
+ */
+ void setOrchestrationParameterContainer(OrchestrationParameterContainer value);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation"
+ * @generated
+ */
+ <T extends Invocation> EList<T> getInvocations();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation"
+ * @generated
+ */
+ EList<OrchestrationParameter> getOrchestrationParameters();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ EList<OrchestrationParameter> getOrchestrationParameters(Type type);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation"
+ * @generated
+ */
+ EList<InvocationContract> getInvocationContracts();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ EList<InvocationContract> getInvocationContracts(Type type);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ EList<InvocationContract> getInvocationContracts(ContractMode mode);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ EList<InvocationContract> getInvocationContracts(Type type, ContractMode mode);
+
+} // Orchestration
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/OrchestrationParameter.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/OrchestrationParameter.java
new file mode 100644
index 0000000..6d21ea4
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/OrchestrationParameter.java
@@ -0,0 +1,126 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore;
+
+import org.eclipse.egf.model.types.Type;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Orchestration Parameter</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.fcore.OrchestrationParameter#getOrchestrationParameterContainer <em>Orchestration Parameter Container</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.OrchestrationParameter#getInvocationContracts <em>Invocation Contracts</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.OrchestrationParameter#getType <em>Type</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getOrchestrationParameter()
+ * @model annotation="http://www.eclipse.org/emf/2002/Ecore constraints='UselessOrchestrationParameter'"
+ * @generated
+ */
+public interface OrchestrationParameter extends NamedModelElement {
+ /**
+ * Returns the value of the '<em><b>Orchestration Parameter Container</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.fcore.OrchestrationParameterContainer#getOrchestrationParameters <em>Orchestration Parameters</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Orchestration Parameter Container</em>' container reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Orchestration Parameter Container</em>' container reference.
+ * @see #setOrchestrationParameterContainer(OrchestrationParameterContainer)
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getOrchestrationParameter_OrchestrationParameterContainer()
+ * @see org.eclipse.egf.model.fcore.OrchestrationParameterContainer#getOrchestrationParameters
+ * @model opposite="orchestrationParameters" resolveProxies="false" required="true" transient="false"
+ * @generated
+ */
+ OrchestrationParameterContainer getOrchestrationParameterContainer();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.fcore.OrchestrationParameter#getOrchestrationParameterContainer <em>Orchestration Parameter Container</em>}' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Orchestration Parameter Container</em>' container reference.
+ * @see #getOrchestrationParameterContainer()
+ * @generated
+ */
+ void setOrchestrationParameterContainer(OrchestrationParameterContainer value);
+
+ /**
+ * Returns the value of the '<em><b>Invocation Contracts</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.egf.model.fcore.InvocationContract}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.fcore.InvocationContract#getOrchestrationParameter <em>Orchestration Parameter</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Invocation Contracts</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Invocation Contracts</em>' reference list.
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getOrchestrationParameter_InvocationContracts()
+ * @see org.eclipse.egf.model.fcore.InvocationContract#getOrchestrationParameter
+ * @model opposite="orchestrationParameter" resolveProxies="false"
+ * @generated
+ */
+ EList<InvocationContract> getInvocationContracts();
+
+ /**
+ * Returns the value of the '<em><b>Type</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Type</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Type</em>' containment reference.
+ * @see #setType(Type)
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getOrchestrationParameter_Type()
+ * @model containment="true" required="true"
+ * @generated
+ */
+ Type getType();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.fcore.OrchestrationParameter#getType <em>Type</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Type</em>' containment reference.
+ * @see #getType()
+ * @generated
+ */
+ void setType(Type value);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation" required="true"
+ * @generated
+ */
+ FactoryComponent getFactoryComponent();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation" required="true"
+ * @generated
+ */
+ Orchestration getOrchestration();
+
+} // OrchestrationParameter
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/OrchestrationParameterContainer.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/OrchestrationParameterContainer.java
new file mode 100644
index 0000000..da74f7c
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/OrchestrationParameterContainer.java
@@ -0,0 +1,98 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore;
+
+import org.eclipse.egf.model.types.Type;
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Orchestration Parameter Container</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.fcore.OrchestrationParameterContainer#getOrchestration <em>Orchestration</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.OrchestrationParameterContainer#getOrchestrationParameters <em>Orchestration Parameters</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getOrchestrationParameterContainer()
+ * @model annotation="http://www.eclipse.org/emf/2002/Ecore constraints='UselessOrchestrationParameterContainer'"
+ * @generated
+ */
+public interface OrchestrationParameterContainer extends ModelElement {
+ /**
+ * Returns the value of the '<em><b>Orchestration</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.fcore.Orchestration#getOrchestrationParameterContainer <em>Orchestration Parameter Container</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Orchestration</em>' container reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Orchestration</em>' container reference.
+ * @see #setOrchestration(Orchestration)
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getOrchestrationParameterContainer_Orchestration()
+ * @see org.eclipse.egf.model.fcore.Orchestration#getOrchestrationParameterContainer
+ * @model opposite="orchestrationParameterContainer" required="true" transient="false"
+ * @generated
+ */
+ Orchestration getOrchestration();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.fcore.OrchestrationParameterContainer#getOrchestration <em>Orchestration</em>}' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Orchestration</em>' container reference.
+ * @see #getOrchestration()
+ * @generated
+ */
+ void setOrchestration(Orchestration value);
+
+ /**
+ * Returns the value of the '<em><b>Orchestration Parameters</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.egf.model.fcore.OrchestrationParameter}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.fcore.OrchestrationParameter#getOrchestrationParameterContainer <em>Orchestration Parameter Container</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Orchestration Parameters</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>Orchestration Parameters</em>' containment reference list.
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getOrchestrationParameterContainer_OrchestrationParameters()
+ * @see org.eclipse.egf.model.fcore.OrchestrationParameter#getOrchestrationParameterContainer
+ * @model opposite="orchestrationParameterContainer" containment="true"
+ * @generated
+ */
+ EList<OrchestrationParameter> getOrchestrationParameters();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation" required="true"
+ * @generated
+ */
+ FactoryComponent getFactoryComponent();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ EList<OrchestrationParameter> getOrchestrationParameters(Type type);
+
+} // OrchestrationParameterContainer
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/Viewpoint.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/Viewpoint.java
new file mode 100644
index 0000000..ed831ba
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/Viewpoint.java
@@ -0,0 +1,60 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Viewpoint</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.fcore.Viewpoint#getViewpointContainer <em>Viewpoint Container</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getViewpoint()
+ * @model abstract="true"
+ * @generated
+ */
+public interface Viewpoint extends ModelElement {
+ /**
+ * Returns the value of the '<em><b>Viewpoint Container</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.fcore.ViewpointContainer#getViewpoints <em>Viewpoints</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Viewpoint Container</em>' container reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Viewpoint Container</em>' container reference.
+ * @see #setViewpointContainer(ViewpointContainer)
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getViewpoint_ViewpointContainer()
+ * @see org.eclipse.egf.model.fcore.ViewpointContainer#getViewpoints
+ * @model opposite="viewpoints" resolveProxies="false" required="true" transient="false"
+ * @generated
+ */
+ ViewpointContainer getViewpointContainer();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.fcore.Viewpoint#getViewpointContainer <em>Viewpoint Container</em>}' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Viewpoint Container</em>' container reference.
+ * @see #getViewpointContainer()
+ * @generated
+ */
+ void setViewpointContainer(ViewpointContainer value);
+
+} // Viewpoint
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/ViewpointContainer.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/ViewpointContainer.java
new file mode 100644
index 0000000..4b1eccd
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/ViewpointContainer.java
@@ -0,0 +1,89 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Viewpoint Container</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.fcore.ViewpointContainer#getFactoryComponent <em>Factory Component</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.ViewpointContainer#getViewpoints <em>Viewpoints</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getViewpointContainer()
+ * @model
+ * @generated
+ */
+public interface ViewpointContainer extends ModelElement {
+ /**
+ * Returns the value of the '<em><b>Factory Component</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.fcore.FactoryComponent#getViewpointContainer <em>Viewpoint Container</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Factory Component</em>' container reference
+ * isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Factory Component</em>' container reference.
+ * @see #setFactoryComponent(FactoryComponent)
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getViewpointContainer_FactoryComponent()
+ * @see org.eclipse.egf.model.fcore.FactoryComponent#getViewpointContainer
+ * @model opposite="viewpointContainer" resolveProxies="false" required="true" transient="false"
+ * @generated
+ */
+ FactoryComponent getFactoryComponent();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.fcore.ViewpointContainer#getFactoryComponent <em>Factory Component</em>}' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Factory Component</em>' container reference.
+ * @see #getFactoryComponent()
+ * @generated
+ */
+ void setFactoryComponent(FactoryComponent value);
+
+ /**
+ * Returns the value of the '<em><b>Viewpoints</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.egf.model.fcore.Viewpoint}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.fcore.Viewpoint#getViewpointContainer <em>Viewpoint Container</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Viewpoints</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>Viewpoints</em>' containment reference list.
+ * @see org.eclipse.egf.model.fcore.FcorePackage#getViewpointContainer_Viewpoints()
+ * @see org.eclipse.egf.model.fcore.Viewpoint#getViewpointContainer
+ * @model opposite="viewpointContainer" containment="true"
+ * @generated
+ */
+ EList<Viewpoint> getViewpoints();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ Viewpoint getViewpoint(Class<?> clazz);
+
+} // ViewpointContainer
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/ActivityImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/ActivityImpl.java
new file mode 100644
index 0000000..b107ad3
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/ActivityImpl.java
@@ -0,0 +1,273 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.impl;
+
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.Contract;
+import org.eclipse.egf.model.fcore.ContractContainer;
+import org.eclipse.egf.model.fcore.ContractMode;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.types.Type;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.UniqueEList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Activity</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>
+ * {@link org.eclipse.egf.model.fcore.impl.ActivityImpl#getContractContainer
+ * <em>Contract Container</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class ActivityImpl extends NamedModelElementImpl implements Activity {
+ /**
+ * The cached value of the '{@link #getContractContainer()
+ * <em>Contract Container</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getContractContainer()
+ * @generated
+ * @ordered
+ */
+ protected ContractContainer contractContainer;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ActivityImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FcorePackage.Literals.ACTIVITY;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ContractContainer getContractContainer() {
+ return contractContainer;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NotificationChain basicSetContractContainer(ContractContainer newContractContainer, NotificationChain msgs) {
+ ContractContainer oldContractContainer = contractContainer;
+ contractContainer = newContractContainer;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FcorePackage.ACTIVITY__CONTRACT_CONTAINER, oldContractContainer, newContractContainer);
+ if (msgs == null)
+ msgs = notification;
+ else
+ msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setContractContainer(ContractContainer newContractContainer) {
+ if (newContractContainer != contractContainer) {
+ NotificationChain msgs = null;
+ if (contractContainer != null)
+ msgs = ((InternalEObject) contractContainer).eInverseRemove(this, FcorePackage.CONTRACT_CONTAINER__ACTIVITY, ContractContainer.class, msgs);
+ if (newContractContainer != null)
+ msgs = ((InternalEObject) newContractContainer).eInverseAdd(this, FcorePackage.CONTRACT_CONTAINER__ACTIVITY, ContractContainer.class, msgs);
+ msgs = basicSetContractContainer(newContractContainer, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ } else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FcorePackage.ACTIVITY__CONTRACT_CONTAINER, newContractContainer, newContractContainer));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<Contract> getContracts() {
+ if (getContractContainer() != null) {
+ return getContractContainer().getContracts();
+ }
+ return new UniqueEList<Contract>();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<Contract> getContracts(Type innerType) {
+ if (getContractContainer() != null) {
+ return getContractContainer().getContracts(innerType);
+ }
+ return new UniqueEList<Contract>();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<Contract> getContracts(ContractMode mode) {
+ if (getContractContainer() != null) {
+ return getContractContainer().getContracts(mode);
+ }
+ return new UniqueEList<Contract>();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<Contract> getContracts(Type innerType, ContractMode mode) {
+ if (getContractContainer() != null) {
+ return getContractContainer().getContracts(innerType, mode);
+ }
+ return new UniqueEList<Contract>();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FcorePackage.ACTIVITY__CONTRACT_CONTAINER:
+ if (contractContainer != null)
+ msgs = ((InternalEObject) contractContainer).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FcorePackage.ACTIVITY__CONTRACT_CONTAINER, null, msgs);
+ return basicSetContractContainer((ContractContainer) otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FcorePackage.ACTIVITY__CONTRACT_CONTAINER:
+ return basicSetContractContainer(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FcorePackage.ACTIVITY__CONTRACT_CONTAINER:
+ return getContractContainer();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case FcorePackage.ACTIVITY__CONTRACT_CONTAINER:
+ setContractContainer((ContractContainer) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FcorePackage.ACTIVITY__CONTRACT_CONTAINER:
+ setContractContainer((ContractContainer) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FcorePackage.ACTIVITY__CONTRACT_CONTAINER:
+ return contractContainer != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // ActivityImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/ContractContainerImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/ContractContainerImpl.java
new file mode 100644
index 0000000..bcb4c67
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/ContractContainerImpl.java
@@ -0,0 +1,316 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.impl;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.eclipse.egf.common.helper.ClassHelper;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.Contract;
+import org.eclipse.egf.model.fcore.ContractContainer;
+import org.eclipse.egf.model.fcore.ContractMode;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.types.Type;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.UniqueEList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Contract Container</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.fcore.impl.ContractContainerImpl#getActivity <em>Activity</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.impl.ContractContainerImpl#getContracts <em>Contracts</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ContractContainerImpl extends ModelElementImpl implements ContractContainer {
+ /**
+ * The cached value of the '{@link #getContracts() <em>Contracts</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getContracts()
+ * @generated
+ * @ordered
+ */
+ protected EList<Contract> contracts;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ContractContainerImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FcorePackage.Literals.CONTRACT_CONTAINER;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Activity getActivity() {
+ if (eContainerFeatureID() != FcorePackage.CONTRACT_CONTAINER__ACTIVITY)
+ return null;
+ return (Activity) eContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetActivity(Activity newActivity, NotificationChain msgs) {
+ msgs = eBasicSetContainer((InternalEObject) newActivity, FcorePackage.CONTRACT_CONTAINER__ACTIVITY, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setActivity(Activity newActivity) {
+ if (newActivity != eInternalContainer() || (eContainerFeatureID() != FcorePackage.CONTRACT_CONTAINER__ACTIVITY && newActivity != null)) {
+ if (EcoreUtil.isAncestor(this, newActivity))
+ throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); //$NON-NLS-1$
+ NotificationChain msgs = null;
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ if (newActivity != null)
+ msgs = ((InternalEObject) newActivity).eInverseAdd(this, FcorePackage.ACTIVITY__CONTRACT_CONTAINER, Activity.class, msgs);
+ msgs = basicSetActivity(newActivity, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ } else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FcorePackage.CONTRACT_CONTAINER__ACTIVITY, newActivity, newActivity));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Contract> getContracts() {
+ if (contracts == null) {
+ contracts = new EObjectContainmentWithInverseEList<Contract>(Contract.class, this, FcorePackage.CONTRACT_CONTAINER__CONTRACTS, FcorePackage.CONTRACT__CONTRACT_CONTAINER);
+ }
+ return contracts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<Contract> getContracts(Type type) {
+ EList<Contract> innerContracts = new UniqueEList<Contract>();
+ if (type != null) {
+ for (Iterator<Contract> it = getContracts().iterator(); it.hasNext();) {
+ Contract contract = it.next();
+ if (contract.getType() != null && ClassHelper.asSubClass(type.getType(), contract.getType().getType())) {
+ innerContracts.add(contract);
+ }
+ }
+ }
+ return innerContracts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<Contract> getContracts(ContractMode mode) {
+ EList<Contract> innerContracts = new UniqueEList<Contract>();
+ if (mode != null) {
+ for (Iterator<Contract> it = getContracts().iterator(); it.hasNext();) {
+ Contract contract = it.next();
+ if (mode == ContractMode.IN && (contract.getMode() == ContractMode.IN || contract.getMode() == ContractMode.IN_OUT)) {
+ innerContracts.add(contract);
+ } else if (mode == ContractMode.OUT && (contract.getMode() == ContractMode.OUT || contract.getMode() == ContractMode.IN_OUT)) {
+ innerContracts.add(contract);
+ } else if (mode == ContractMode.IN_OUT) {
+ innerContracts.add(contract);
+ }
+ }
+ }
+ return innerContracts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<Contract> getContracts(Type type, ContractMode mode) {
+ EList<Contract> innerContracts = new UniqueEList<Contract>();
+ for (Iterator<Contract> it = getContracts(type).iterator(); it.hasNext();) {
+ Contract contract = it.next();
+ if (mode == ContractMode.IN && (contract.getMode() == ContractMode.IN || contract.getMode() == ContractMode.IN_OUT)) {
+ innerContracts.add(contract);
+ } else if (mode == ContractMode.OUT && (contract.getMode() == ContractMode.OUT || contract.getMode() == ContractMode.IN_OUT)) {
+ innerContracts.add(contract);
+ } else if (mode == ContractMode.IN_OUT) {
+ innerContracts.add(contract);
+ }
+ }
+ return innerContracts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FcorePackage.CONTRACT_CONTAINER__ACTIVITY:
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ return basicSetActivity((Activity) otherEnd, msgs);
+ case FcorePackage.CONTRACT_CONTAINER__CONTRACTS:
+ return ((InternalEList<InternalEObject>) (InternalEList<?>) getContracts()).basicAdd(otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FcorePackage.CONTRACT_CONTAINER__ACTIVITY:
+ return basicSetActivity(null, msgs);
+ case FcorePackage.CONTRACT_CONTAINER__CONTRACTS:
+ return ((InternalEList<?>) getContracts()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
+ switch (eContainerFeatureID()) {
+ case FcorePackage.CONTRACT_CONTAINER__ACTIVITY:
+ return eInternalContainer().eInverseRemove(this, FcorePackage.ACTIVITY__CONTRACT_CONTAINER, Activity.class, msgs);
+ }
+ return super.eBasicRemoveFromContainerFeature(msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FcorePackage.CONTRACT_CONTAINER__ACTIVITY:
+ return getActivity();
+ case FcorePackage.CONTRACT_CONTAINER__CONTRACTS:
+ return getContracts();
+ }
+ 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 FcorePackage.CONTRACT_CONTAINER__ACTIVITY:
+ setActivity((Activity) newValue);
+ return;
+ case FcorePackage.CONTRACT_CONTAINER__CONTRACTS:
+ getContracts().clear();
+ getContracts().addAll((Collection<? extends Contract>) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FcorePackage.CONTRACT_CONTAINER__ACTIVITY:
+ setActivity((Activity) null);
+ return;
+ case FcorePackage.CONTRACT_CONTAINER__CONTRACTS:
+ getContracts().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FcorePackage.CONTRACT_CONTAINER__ACTIVITY:
+ return getActivity() != null;
+ case FcorePackage.CONTRACT_CONTAINER__CONTRACTS:
+ return contracts != null && !contracts.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // ContractContainerImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/ContractImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/ContractImpl.java
new file mode 100644
index 0000000..29eadaf
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/ContractImpl.java
@@ -0,0 +1,500 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.impl;
+
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.Contract;
+import org.eclipse.egf.model.fcore.ContractContainer;
+import org.eclipse.egf.model.fcore.ContractMode;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.types.Type;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.UniqueEList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Contract</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.fcore.impl.ContractImpl#getContractContainer <em>Contract Container</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.impl.ContractImpl#isMandatory <em>Mandatory</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.impl.ContractImpl#getMode <em>Mode</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.impl.ContractImpl#getType <em>Type</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ContractImpl extends NamedModelElementImpl implements Contract {
+ /**
+ * The default value of the '{@link #isMandatory() <em>Mandatory</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isMandatory()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean MANDATORY_EDEFAULT = false;
+
+ /**
+ * The flag representing the value of the '{@link #isMandatory() <em>Mandatory</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isMandatory()
+ * @generated
+ * @ordered
+ */
+ protected static final int MANDATORY_EFLAG = 1 << 0;
+
+ /**
+ * The default value of the '{@link #getMode() <em>Mode</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMode()
+ * @generated
+ * @ordered
+ */
+ protected static final ContractMode MODE_EDEFAULT = ContractMode.IN;
+
+ /**
+ * The offset of the flags representing the value of the '{@link #getMode() <em>Mode</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected static final int MODE_EFLAG_OFFSET = 1;
+
+ /**
+ * The flags representing the default value of the '{@link #getMode() <em>Mode</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected static final int MODE_EFLAG_DEFAULT = MODE_EDEFAULT.ordinal() << MODE_EFLAG_OFFSET;
+
+ /**
+ * The array of enumeration values for '{@link ContractMode Contract Mode}'
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ private static final ContractMode[] MODE_EFLAG_VALUES = ContractMode.values();
+
+ /**
+ * The flags representing the value of the '{@link #getMode() <em>Mode</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMode()
+ * @generated
+ * @ordered
+ */
+ protected static final int MODE_EFLAG = 0x3 << MODE_EFLAG_OFFSET;
+
+ /**
+ * The cached value of the '{@link #getType() <em>Type</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getType()
+ * @generated
+ * @ordered
+ */
+ protected Type type;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ContractImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FcorePackage.Literals.CONTRACT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ContractContainer getContractContainer() {
+ if (eContainerFeatureID() != FcorePackage.CONTRACT__CONTRACT_CONTAINER)
+ return null;
+ return (ContractContainer) eContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetContractContainer(ContractContainer newContractContainer, NotificationChain msgs) {
+ msgs = eBasicSetContainer((InternalEObject) newContractContainer, FcorePackage.CONTRACT__CONTRACT_CONTAINER, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setContractContainer(ContractContainer newContractContainer) {
+ if (newContractContainer != eInternalContainer() || (eContainerFeatureID() != FcorePackage.CONTRACT__CONTRACT_CONTAINER && newContractContainer != null)) {
+ if (EcoreUtil.isAncestor(this, newContractContainer))
+ throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); //$NON-NLS-1$
+ NotificationChain msgs = null;
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ if (newContractContainer != null)
+ msgs = ((InternalEObject) newContractContainer).eInverseAdd(this, FcorePackage.CONTRACT_CONTAINER__CONTRACTS, ContractContainer.class, msgs);
+ msgs = basicSetContractContainer(newContractContainer, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ } else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FcorePackage.CONTRACT__CONTRACT_CONTAINER, newContractContainer, newContractContainer));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isMandatory() {
+ return (eFlags & MANDATORY_EFLAG) != 0;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setMandatory(boolean newMandatory) {
+ boolean oldMandatory = (eFlags & MANDATORY_EFLAG) != 0;
+ if (newMandatory)
+ eFlags |= MANDATORY_EFLAG;
+ else
+ eFlags &= ~MANDATORY_EFLAG;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FcorePackage.CONTRACT__MANDATORY, oldMandatory, newMandatory));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ContractMode getMode() {
+ return MODE_EFLAG_VALUES[(eFlags & MODE_EFLAG) >>> MODE_EFLAG_OFFSET];
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setMode(ContractMode newMode) {
+ ContractMode oldMode = MODE_EFLAG_VALUES[(eFlags & MODE_EFLAG) >>> MODE_EFLAG_OFFSET];
+ if (newMode == null)
+ newMode = MODE_EDEFAULT;
+ eFlags = eFlags & ~MODE_EFLAG | newMode.ordinal() << MODE_EFLAG_OFFSET;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FcorePackage.CONTRACT__MODE, oldMode, newMode));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Type getType() {
+ return type;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetType(Type newType, NotificationChain msgs) {
+ Type oldType = type;
+ type = newType;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FcorePackage.CONTRACT__TYPE, oldType, newType);
+ if (msgs == null)
+ msgs = notification;
+ else
+ msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setType(Type newType) {
+ if (newType != type) {
+ NotificationChain msgs = null;
+ if (type != null)
+ msgs = ((InternalEObject) type).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FcorePackage.CONTRACT__TYPE, null, msgs);
+ if (newType != null)
+ msgs = ((InternalEObject) newType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FcorePackage.CONTRACT__TYPE, null, msgs);
+ msgs = basicSetType(newType, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ } else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FcorePackage.CONTRACT__TYPE, newType, newType));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public Activity getActivity() {
+ if (getContractContainer() != null) {
+ return getContractContainer().getActivity();
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<Contract> getContracts() {
+ EList<Contract> contracts = new UniqueEList<Contract>();
+ if (getContractContainer() != null) {
+ return getContractContainer().getContracts();
+ }
+ return contracts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<Contract> getContracts(Type innerType) {
+ EList<Contract> contracts = new UniqueEList<Contract>();
+ if (getContractContainer() != null) {
+ return getContractContainer().getContracts(innerType);
+ }
+ return contracts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<Contract> getContracts(ContractMode mode) {
+ EList<Contract> contracts = new UniqueEList<Contract>();
+ if (getContractContainer() != null) {
+ return getContractContainer().getContracts(mode);
+ }
+ return contracts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<Contract> getContracts(Type innerType, ContractMode mode) {
+ EList<Contract> contracts = new UniqueEList<Contract>();
+ if (getContractContainer() != null) {
+ return getContractContainer().getContracts(innerType, mode);
+ }
+ return contracts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FcorePackage.CONTRACT__CONTRACT_CONTAINER:
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ return basicSetContractContainer((ContractContainer) otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FcorePackage.CONTRACT__CONTRACT_CONTAINER:
+ return basicSetContractContainer(null, msgs);
+ case FcorePackage.CONTRACT__TYPE:
+ return basicSetType(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
+ switch (eContainerFeatureID()) {
+ case FcorePackage.CONTRACT__CONTRACT_CONTAINER:
+ return eInternalContainer().eInverseRemove(this, FcorePackage.CONTRACT_CONTAINER__CONTRACTS, ContractContainer.class, msgs);
+ }
+ return super.eBasicRemoveFromContainerFeature(msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FcorePackage.CONTRACT__CONTRACT_CONTAINER:
+ return getContractContainer();
+ case FcorePackage.CONTRACT__MANDATORY:
+ return isMandatory();
+ case FcorePackage.CONTRACT__MODE:
+ return getMode();
+ case FcorePackage.CONTRACT__TYPE:
+ return getType();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case FcorePackage.CONTRACT__CONTRACT_CONTAINER:
+ setContractContainer((ContractContainer) newValue);
+ return;
+ case FcorePackage.CONTRACT__MANDATORY:
+ setMandatory((Boolean) newValue);
+ return;
+ case FcorePackage.CONTRACT__MODE:
+ setMode((ContractMode) newValue);
+ return;
+ case FcorePackage.CONTRACT__TYPE:
+ setType((Type) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FcorePackage.CONTRACT__CONTRACT_CONTAINER:
+ setContractContainer((ContractContainer) null);
+ return;
+ case FcorePackage.CONTRACT__MANDATORY:
+ setMandatory(MANDATORY_EDEFAULT);
+ return;
+ case FcorePackage.CONTRACT__MODE:
+ setMode(MODE_EDEFAULT);
+ return;
+ case FcorePackage.CONTRACT__TYPE:
+ setType((Type) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FcorePackage.CONTRACT__CONTRACT_CONTAINER:
+ return getContractContainer() != null;
+ case FcorePackage.CONTRACT__MANDATORY:
+ return ((eFlags & MANDATORY_EFLAG) != 0) != MANDATORY_EDEFAULT;
+ case FcorePackage.CONTRACT__MODE:
+ return (eFlags & MODE_EFLAG) != MODE_EFLAG_DEFAULT;
+ case FcorePackage.CONTRACT__TYPE:
+ return type != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy())
+ return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (mandatory: "); //$NON-NLS-1$
+ result.append((eFlags & MANDATORY_EFLAG) != 0);
+ result.append(", mode: "); //$NON-NLS-1$
+ result.append(MODE_EFLAG_VALUES[(eFlags & MODE_EFLAG) >>> MODE_EFLAG_OFFSET]);
+ result.append(')');
+ return result.toString();
+ }
+
+} // ContractImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/FactoryComponentContractImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/FactoryComponentContractImpl.java
new file mode 100644
index 0000000..8251b0d
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/FactoryComponentContractImpl.java
@@ -0,0 +1,171 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.impl;
+
+import java.util.Collection;
+
+import org.eclipse.egf.model.fcore.FactoryComponentContract;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.InvocationContract;
+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.EObjectWithInverseEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Factory Component Contract</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.fcore.impl.FactoryComponentContractImpl#getInvocationContracts <em>Invocation Contracts</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class FactoryComponentContractImpl extends ContractImpl implements FactoryComponentContract {
+ /**
+ * The cached value of the '{@link #getInvocationContracts() <em>Invocation Contracts</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getInvocationContracts()
+ * @generated
+ * @ordered
+ */
+ protected EList<InvocationContract> invocationContracts;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected FactoryComponentContractImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FcorePackage.Literals.FACTORY_COMPONENT_CONTRACT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<InvocationContract> getInvocationContracts() {
+ if (invocationContracts == null) {
+ invocationContracts = new EObjectWithInverseEList<InvocationContract>(InvocationContract.class, this, FcorePackage.FACTORY_COMPONENT_CONTRACT__INVOCATION_CONTRACTS, FcorePackage.INVOCATION_CONTRACT__FACTORY_COMPONENT_CONTRACT);
+ }
+ return invocationContracts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FcorePackage.FACTORY_COMPONENT_CONTRACT__INVOCATION_CONTRACTS:
+ return ((InternalEList<InternalEObject>) (InternalEList<?>) getInvocationContracts()).basicAdd(otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FcorePackage.FACTORY_COMPONENT_CONTRACT__INVOCATION_CONTRACTS:
+ return ((InternalEList<?>) getInvocationContracts()).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 FcorePackage.FACTORY_COMPONENT_CONTRACT__INVOCATION_CONTRACTS:
+ return getInvocationContracts();
+ }
+ 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 FcorePackage.FACTORY_COMPONENT_CONTRACT__INVOCATION_CONTRACTS:
+ getInvocationContracts().clear();
+ getInvocationContracts().addAll((Collection<? extends InvocationContract>) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FcorePackage.FACTORY_COMPONENT_CONTRACT__INVOCATION_CONTRACTS:
+ getInvocationContracts().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FcorePackage.FACTORY_COMPONENT_CONTRACT__INVOCATION_CONTRACTS:
+ return invocationContracts != null && !invocationContracts.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // FactoryComponentContractImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/FactoryComponentImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/FactoryComponentImpl.java
new file mode 100644
index 0000000..3ccf62b
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/FactoryComponentImpl.java
@@ -0,0 +1,350 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.impl;
+
+import org.eclipse.egf.model.fcore.ContractMode;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.model.fcore.Orchestration;
+import org.eclipse.egf.model.fcore.ViewpointContainer;
+import org.eclipse.egf.model.types.Type;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.UniqueEList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Factory Component</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.fcore.impl.FactoryComponentImpl#getViewpointContainer <em>Viewpoint Container</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.impl.FactoryComponentImpl#getOrchestration <em>Orchestration</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class FactoryComponentImpl extends ActivityImpl implements FactoryComponent {
+ /**
+ * The cached value of the '{@link #getViewpointContainer() <em>Viewpoint Container</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getViewpointContainer()
+ * @generated
+ * @ordered
+ */
+ protected ViewpointContainer viewpointContainer;
+
+ /**
+ * The cached value of the '{@link #getOrchestration() <em>Orchestration</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getOrchestration()
+ * @generated
+ * @ordered
+ */
+ protected Orchestration orchestration;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected FactoryComponentImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FcorePackage.Literals.FACTORY_COMPONENT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ViewpointContainer getViewpointContainer() {
+ return viewpointContainer;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetViewpointContainer(ViewpointContainer newViewpointContainer, NotificationChain msgs) {
+ ViewpointContainer oldViewpointContainer = viewpointContainer;
+ viewpointContainer = newViewpointContainer;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FcorePackage.FACTORY_COMPONENT__VIEWPOINT_CONTAINER, oldViewpointContainer, newViewpointContainer);
+ if (msgs == null)
+ msgs = notification;
+ else
+ msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setViewpointContainer(ViewpointContainer newViewpointContainer) {
+ if (newViewpointContainer != viewpointContainer) {
+ NotificationChain msgs = null;
+ if (viewpointContainer != null)
+ msgs = ((InternalEObject) viewpointContainer).eInverseRemove(this, FcorePackage.VIEWPOINT_CONTAINER__FACTORY_COMPONENT, ViewpointContainer.class, msgs);
+ if (newViewpointContainer != null)
+ msgs = ((InternalEObject) newViewpointContainer).eInverseAdd(this, FcorePackage.VIEWPOINT_CONTAINER__FACTORY_COMPONENT, ViewpointContainer.class, msgs);
+ msgs = basicSetViewpointContainer(newViewpointContainer, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ } else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FcorePackage.FACTORY_COMPONENT__VIEWPOINT_CONTAINER, newViewpointContainer, newViewpointContainer));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Orchestration getOrchestration() {
+ return orchestration;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetOrchestration(Orchestration newOrchestration, NotificationChain msgs) {
+ Orchestration oldOrchestration = orchestration;
+ orchestration = newOrchestration;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FcorePackage.FACTORY_COMPONENT__ORCHESTRATION, oldOrchestration, newOrchestration);
+ if (msgs == null)
+ msgs = notification;
+ else
+ msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setOrchestration(Orchestration newOrchestration) {
+ if (newOrchestration != orchestration) {
+ NotificationChain msgs = null;
+ if (orchestration != null)
+ msgs = ((InternalEObject) orchestration).eInverseRemove(this, FcorePackage.ORCHESTRATION__FACTORY_COMPONENT, Orchestration.class, msgs);
+ if (newOrchestration != null)
+ msgs = ((InternalEObject) newOrchestration).eInverseAdd(this, FcorePackage.ORCHESTRATION__FACTORY_COMPONENT, Orchestration.class, msgs);
+ msgs = basicSetOrchestration(newOrchestration, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ } else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FcorePackage.FACTORY_COMPONENT__ORCHESTRATION, newOrchestration, newOrchestration));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<InvocationContract> getInvocationContracts() {
+ EList<InvocationContract> invocationContracts = new UniqueEList<InvocationContract>();
+ if (getOrchestration() != null) {
+ return getOrchestration().getInvocationContracts();
+ }
+ return invocationContracts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<InvocationContract> getInvocationContracts(Type innerType) {
+ EList<InvocationContract> invocationContracts = new UniqueEList<InvocationContract>();
+ if (innerType != null && getOrchestration() != null) {
+ return getOrchestration().getInvocationContracts(innerType);
+ }
+ return invocationContracts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<InvocationContract> getInvocationContracts(ContractMode mode) {
+ EList<InvocationContract> invocationContracts = new UniqueEList<InvocationContract>();
+ if (mode != null) {
+ for (InvocationContract innerInvocationContract : getInvocationContracts()) {
+ if (mode == ContractMode.IN && (innerInvocationContract.getInvokedMode() == ContractMode.IN || innerInvocationContract.getInvokedMode() == ContractMode.IN_OUT)) {
+ invocationContracts.add(innerInvocationContract);
+ } else if (mode == ContractMode.OUT && (innerInvocationContract.getInvokedMode() == ContractMode.OUT || innerInvocationContract.getInvokedMode() == ContractMode.IN_OUT)) {
+ invocationContracts.add(innerInvocationContract);
+ } else if (mode == ContractMode.IN_OUT) {
+ invocationContracts.add(innerInvocationContract);
+ }
+ }
+ }
+ return invocationContracts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<InvocationContract> getInvocationContracts(Type type, ContractMode mode) {
+ EList<InvocationContract> invocationContexts = new UniqueEList<InvocationContract>();
+ for (InvocationContract innerInvocationContext : getInvocationContracts(type)) {
+ if (mode == ContractMode.IN && (innerInvocationContext.getInvokedMode() == ContractMode.IN || innerInvocationContext.getInvokedMode() == ContractMode.IN_OUT)) {
+ invocationContexts.add(innerInvocationContext);
+ } else if (mode == ContractMode.OUT && (innerInvocationContext.getInvokedMode() == ContractMode.OUT || innerInvocationContext.getInvokedMode() == ContractMode.IN_OUT)) {
+ invocationContexts.add(innerInvocationContext);
+ } else if (mode == ContractMode.IN_OUT) {
+ invocationContexts.add(innerInvocationContext);
+ }
+ }
+ return invocationContexts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FcorePackage.FACTORY_COMPONENT__VIEWPOINT_CONTAINER:
+ if (viewpointContainer != null)
+ msgs = ((InternalEObject) viewpointContainer).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FcorePackage.FACTORY_COMPONENT__VIEWPOINT_CONTAINER, null, msgs);
+ return basicSetViewpointContainer((ViewpointContainer) otherEnd, msgs);
+ case FcorePackage.FACTORY_COMPONENT__ORCHESTRATION:
+ if (orchestration != null)
+ msgs = ((InternalEObject) orchestration).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FcorePackage.FACTORY_COMPONENT__ORCHESTRATION, null, msgs);
+ return basicSetOrchestration((Orchestration) otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FcorePackage.FACTORY_COMPONENT__VIEWPOINT_CONTAINER:
+ return basicSetViewpointContainer(null, msgs);
+ case FcorePackage.FACTORY_COMPONENT__ORCHESTRATION:
+ return basicSetOrchestration(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FcorePackage.FACTORY_COMPONENT__VIEWPOINT_CONTAINER:
+ return getViewpointContainer();
+ case FcorePackage.FACTORY_COMPONENT__ORCHESTRATION:
+ return getOrchestration();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case FcorePackage.FACTORY_COMPONENT__VIEWPOINT_CONTAINER:
+ setViewpointContainer((ViewpointContainer) newValue);
+ return;
+ case FcorePackage.FACTORY_COMPONENT__ORCHESTRATION:
+ setOrchestration((Orchestration) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FcorePackage.FACTORY_COMPONENT__VIEWPOINT_CONTAINER:
+ setViewpointContainer((ViewpointContainer) null);
+ return;
+ case FcorePackage.FACTORY_COMPONENT__ORCHESTRATION:
+ setOrchestration((Orchestration) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FcorePackage.FACTORY_COMPONENT__VIEWPOINT_CONTAINER:
+ return viewpointContainer != null;
+ case FcorePackage.FACTORY_COMPONENT__ORCHESTRATION:
+ return orchestration != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // FactoryComponentImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/FcoreFactoryImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/FcoreFactoryImpl.java
new file mode 100644
index 0000000..0aecdf6
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/FcoreFactoryImpl.java
@@ -0,0 +1,310 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.impl;
+
+import org.eclipse.egf.model.fcore.Contract;
+import org.eclipse.egf.model.fcore.ContractContainer;
+import org.eclipse.egf.model.fcore.ContractMode;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.FactoryComponentContract;
+import org.eclipse.egf.model.fcore.FcoreFactory;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.model.fcore.InvocationContractContainer;
+import org.eclipse.egf.model.fcore.OrchestrationParameter;
+import org.eclipse.egf.model.fcore.OrchestrationParameterContainer;
+import org.eclipse.egf.model.fcore.ViewpointContainer;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class FcoreFactoryImpl extends EFactoryImpl implements FcoreFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static FcoreFactory init() {
+ try {
+ FcoreFactory theFcoreFactory = (FcoreFactory) EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/egf/1.0.0/fcore"); //$NON-NLS-1$
+ if (theFcoreFactory != null) {
+ return theFcoreFactory;
+ }
+ } catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new FcoreFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public FcoreFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case FcorePackage.CONTRACT:
+ return createContract();
+ case FcorePackage.FACTORY_COMPONENT:
+ return createFactoryComponent();
+ case FcorePackage.CONTRACT_CONTAINER:
+ return createContractContainer();
+ case FcorePackage.FACTORY_COMPONENT_CONTRACT:
+ return createFactoryComponentContract();
+ case FcorePackage.VIEWPOINT_CONTAINER:
+ return createViewpointContainer();
+ case FcorePackage.ORCHESTRATION_PARAMETER_CONTAINER:
+ return createOrchestrationParameterContainer();
+ case FcorePackage.ORCHESTRATION_PARAMETER:
+ return createOrchestrationParameter();
+ case FcorePackage.INVOCATION_CONTRACT_CONTAINER:
+ return createInvocationContractContainer();
+ case FcorePackage.INVOCATION_CONTRACT:
+ return createInvocationContract();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object createFromString(EDataType eDataType, String initialValue) {
+ switch (eDataType.getClassifierID()) {
+ case FcorePackage.CONTRACT_MODE:
+ return createContractModeFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String convertToString(EDataType eDataType, Object instanceValue) {
+ switch (eDataType.getClassifierID()) {
+ case FcorePackage.CONTRACT_MODE:
+ return convertContractModeToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Contract createContract() {
+ ContractImpl contract = new ContractImpl();
+ return contract;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public FactoryComponent createFactoryComponent() {
+ FactoryComponentImpl factoryComponent = new FactoryComponentImpl();
+ return factoryComponent;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ContractContainer createContractContainer() {
+ ContractContainerImpl contractContainer = new ContractContainerImpl();
+ return contractContainer;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public FactoryComponentContract createFactoryComponentContract() {
+ FactoryComponentContractImpl factoryComponentContract = new FactoryComponentContractImpl();
+ return factoryComponentContract;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ViewpointContainer createViewpointContainer() {
+ ViewpointContainerImpl viewpointContainer = new ViewpointContainerImpl();
+ return viewpointContainer;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public OrchestrationParameterContainer createOrchestrationParameterContainer() {
+ OrchestrationParameterContainerImpl orchestrationParameterContainer = new OrchestrationParameterContainerImpl();
+ return orchestrationParameterContainer;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public OrchestrationParameter createOrchestrationParameter() {
+ OrchestrationParameterImpl orchestrationParameter = new OrchestrationParameterImpl();
+ return orchestrationParameter;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public InvocationContractContainer createInvocationContractContainer() {
+ InvocationContractContainerImpl invocationContractContainer = new InvocationContractContainerImpl();
+ return invocationContractContainer;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public InvocationContract createInvocationContract() {
+ InvocationContractImpl invocationContract = new InvocationContractImpl();
+ return invocationContract;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ContractMode createContractMode(String literal) {
+ ContractMode result = ContractMode.get(literal);
+ if (result == null)
+ throw new IllegalArgumentException("The value '" + literal + "' is not a valid enumerator of '" + FcorePackage.Literals.CONTRACT_MODE.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ContractMode createContractModeFromString(EDataType eDataType, String initialValue) {
+ return createContractMode(initialValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String convertContractMode(ContractMode instanceValue) {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String convertContractModeToString(EDataType eDataType, Object instanceValue) {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public Class<?> createClazzFromString(EDataType eDataType, String initialValue) {
+ return (Class<?>) super.createFromString(eDataType, initialValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public FcorePackage getFcorePackage() {
+ return (FcorePackage) getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static FcorePackage getPackage() {
+ return FcorePackage.eINSTANCE;
+ }
+
+} // FcoreFactoryImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/FcorePackageImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/FcorePackageImpl.java
new file mode 100644
index 0000000..d50db6e
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/FcorePackageImpl.java
@@ -0,0 +1,1079 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.impl;
+
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.Contract;
+import org.eclipse.egf.model.fcore.ContractContainer;
+import org.eclipse.egf.model.fcore.ContractMode;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.FactoryComponentContract;
+import org.eclipse.egf.model.fcore.FcoreFactory;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.model.fcore.InvocationContractContainer;
+import org.eclipse.egf.model.fcore.ModelElement;
+import org.eclipse.egf.model.fcore.NamedModelElement;
+import org.eclipse.egf.model.fcore.Orchestration;
+import org.eclipse.egf.model.fcore.OrchestrationParameter;
+import org.eclipse.egf.model.fcore.OrchestrationParameterContainer;
+import org.eclipse.egf.model.fcore.Viewpoint;
+import org.eclipse.egf.model.fcore.ViewpointContainer;
+import org.eclipse.egf.model.fcore.util.FcoreValidator;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EGenericType;
+import org.eclipse.emf.ecore.EOperation;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.ETypeParameter;
+import org.eclipse.emf.ecore.EValidator;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class FcorePackageImpl extends EPackageImpl implements FcorePackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass modelElementEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass namedModelElementEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass activityEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass contractEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass factoryComponentEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass contractContainerEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass factoryComponentContractEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass viewpointContainerEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass viewpointEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass orchestrationEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass orchestrationParameterContainerEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass orchestrationParameterEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass invocationEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass invocationContractContainerEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass invocationContractEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EEnum contractModeEEnum = 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.egf.model.fcore.FcorePackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private FcorePackageImpl() {
+ super(eNS_URI, FcoreFactory.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 FcorePackage#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 FcorePackage init() {
+ if (isInited)
+ return (FcorePackage) EPackage.Registry.INSTANCE.getEPackage(FcorePackage.eNS_URI);
+
+ // Obtain or create and register package
+ FcorePackageImpl theFcorePackage = (FcorePackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof FcorePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new FcorePackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ TypesPackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theFcorePackage.createPackageContents();
+
+ // Initialize created meta-data
+ theFcorePackage.initializePackageContents();
+
+ // Register package validator
+ EValidator.Registry.INSTANCE.put(theFcorePackage, new EValidator.Descriptor() {
+ public EValidator getEValidator() {
+ return FcoreValidator.INSTANCE;
+ }
+ });
+
+ // Mark meta-data to indicate it can't be changed
+ theFcorePackage.freeze();
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(FcorePackage.eNS_URI, theFcorePackage);
+ return theFcorePackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getModelElement() {
+ return modelElementEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getModelElement_ID() {
+ return (EAttribute) modelElementEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getModelElement_Description() {
+ return (EAttribute) modelElementEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getNamedModelElement() {
+ return namedModelElementEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getNamedModelElement_Name() {
+ return (EAttribute) namedModelElementEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getActivity() {
+ return activityEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getActivity_ContractContainer() {
+ return (EReference) activityEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getContract() {
+ return contractEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getContract_ContractContainer() {
+ return (EReference) contractEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getContract_Mandatory() {
+ return (EAttribute) contractEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getContract_Mode() {
+ return (EAttribute) contractEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getContract_Type() {
+ return (EReference) contractEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getFactoryComponent() {
+ return factoryComponentEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getFactoryComponent_ViewpointContainer() {
+ return (EReference) factoryComponentEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getFactoryComponent_Orchestration() {
+ return (EReference) factoryComponentEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getContractContainer() {
+ return contractContainerEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getContractContainer_Activity() {
+ return (EReference) contractContainerEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getContractContainer_Contracts() {
+ return (EReference) contractContainerEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getFactoryComponentContract() {
+ return factoryComponentContractEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getFactoryComponentContract_InvocationContracts() {
+ return (EReference) factoryComponentContractEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getViewpointContainer() {
+ return viewpointContainerEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getViewpointContainer_FactoryComponent() {
+ return (EReference) viewpointContainerEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getViewpointContainer_Viewpoints() {
+ return (EReference) viewpointContainerEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getViewpoint() {
+ return viewpointEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getViewpoint_ViewpointContainer() {
+ return (EReference) viewpointEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getOrchestration() {
+ return orchestrationEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getOrchestration_FactoryComponent() {
+ return (EReference) orchestrationEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getOrchestration_OrchestrationParameterContainer() {
+ return (EReference) orchestrationEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getOrchestrationParameterContainer() {
+ return orchestrationParameterContainerEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getOrchestrationParameterContainer_Orchestration() {
+ return (EReference) orchestrationParameterContainerEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getOrchestrationParameterContainer_OrchestrationParameters() {
+ return (EReference) orchestrationParameterContainerEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getOrchestrationParameter() {
+ return orchestrationParameterEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getOrchestrationParameter_OrchestrationParameterContainer() {
+ return (EReference) orchestrationParameterEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getOrchestrationParameter_InvocationContracts() {
+ return (EReference) orchestrationParameterEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getOrchestrationParameter_Type() {
+ return (EReference) orchestrationParameterEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getInvocation() {
+ return invocationEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getInvocation_InvocationContractContainer() {
+ return (EReference) invocationEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getInvocation_InvokedActivity() {
+ return (EReference) invocationEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getInvocationContractContainer() {
+ return invocationContractContainerEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getInvocationContractContainer_Invocation() {
+ return (EReference) invocationContractContainerEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getInvocationContractContainer_InvocationContracts() {
+ return (EReference) invocationContractContainerEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getInvocationContract() {
+ return invocationContractEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getInvocationContract_InvocationContractContainer() {
+ return (EReference) invocationContractEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getInvocationContract_FactoryComponentContract() {
+ return (EReference) invocationContractEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getInvocationContract_OrchestrationParameter() {
+ return (EReference) invocationContractEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getInvocationContract_SourceInvocationContract() {
+ return (EReference) invocationContractEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getInvocationContract_TargetInvocationContract() {
+ return (EReference) invocationContractEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getInvocationContract_InvokedContract() {
+ return (EReference) invocationContractEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getInvocationContract_Type() {
+ return (EReference) invocationContractEClass.getEStructuralFeatures().get(6);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EEnum getContractMode() {
+ return contractModeEEnum;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FcoreFactory getFcoreFactory() {
+ return (FcoreFactory) 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
+ modelElementEClass = createEClass(MODEL_ELEMENT);
+ createEAttribute(modelElementEClass, MODEL_ELEMENT__ID);
+ createEAttribute(modelElementEClass, MODEL_ELEMENT__DESCRIPTION);
+
+ namedModelElementEClass = createEClass(NAMED_MODEL_ELEMENT);
+ createEAttribute(namedModelElementEClass, NAMED_MODEL_ELEMENT__NAME);
+
+ activityEClass = createEClass(ACTIVITY);
+ createEReference(activityEClass, ACTIVITY__CONTRACT_CONTAINER);
+
+ contractEClass = createEClass(CONTRACT);
+ createEReference(contractEClass, CONTRACT__CONTRACT_CONTAINER);
+ createEAttribute(contractEClass, CONTRACT__MANDATORY);
+ createEAttribute(contractEClass, CONTRACT__MODE);
+ createEReference(contractEClass, CONTRACT__TYPE);
+
+ factoryComponentEClass = createEClass(FACTORY_COMPONENT);
+ createEReference(factoryComponentEClass, FACTORY_COMPONENT__VIEWPOINT_CONTAINER);
+ createEReference(factoryComponentEClass, FACTORY_COMPONENT__ORCHESTRATION);
+
+ contractContainerEClass = createEClass(CONTRACT_CONTAINER);
+ createEReference(contractContainerEClass, CONTRACT_CONTAINER__ACTIVITY);
+ createEReference(contractContainerEClass, CONTRACT_CONTAINER__CONTRACTS);
+
+ factoryComponentContractEClass = createEClass(FACTORY_COMPONENT_CONTRACT);
+ createEReference(factoryComponentContractEClass, FACTORY_COMPONENT_CONTRACT__INVOCATION_CONTRACTS);
+
+ viewpointContainerEClass = createEClass(VIEWPOINT_CONTAINER);
+ createEReference(viewpointContainerEClass, VIEWPOINT_CONTAINER__FACTORY_COMPONENT);
+ createEReference(viewpointContainerEClass, VIEWPOINT_CONTAINER__VIEWPOINTS);
+
+ viewpointEClass = createEClass(VIEWPOINT);
+ createEReference(viewpointEClass, VIEWPOINT__VIEWPOINT_CONTAINER);
+
+ orchestrationEClass = createEClass(ORCHESTRATION);
+ createEReference(orchestrationEClass, ORCHESTRATION__FACTORY_COMPONENT);
+ createEReference(orchestrationEClass, ORCHESTRATION__ORCHESTRATION_PARAMETER_CONTAINER);
+
+ orchestrationParameterContainerEClass = createEClass(ORCHESTRATION_PARAMETER_CONTAINER);
+ createEReference(orchestrationParameterContainerEClass, ORCHESTRATION_PARAMETER_CONTAINER__ORCHESTRATION);
+ createEReference(orchestrationParameterContainerEClass, ORCHESTRATION_PARAMETER_CONTAINER__ORCHESTRATION_PARAMETERS);
+
+ orchestrationParameterEClass = createEClass(ORCHESTRATION_PARAMETER);
+ createEReference(orchestrationParameterEClass, ORCHESTRATION_PARAMETER__ORCHESTRATION_PARAMETER_CONTAINER);
+ createEReference(orchestrationParameterEClass, ORCHESTRATION_PARAMETER__INVOCATION_CONTRACTS);
+ createEReference(orchestrationParameterEClass, ORCHESTRATION_PARAMETER__TYPE);
+
+ invocationEClass = createEClass(INVOCATION);
+ createEReference(invocationEClass, INVOCATION__INVOCATION_CONTRACT_CONTAINER);
+ createEReference(invocationEClass, INVOCATION__INVOKED_ACTIVITY);
+
+ invocationContractContainerEClass = createEClass(INVOCATION_CONTRACT_CONTAINER);
+ createEReference(invocationContractContainerEClass, INVOCATION_CONTRACT_CONTAINER__INVOCATION);
+ createEReference(invocationContractContainerEClass, INVOCATION_CONTRACT_CONTAINER__INVOCATION_CONTRACTS);
+
+ invocationContractEClass = createEClass(INVOCATION_CONTRACT);
+ createEReference(invocationContractEClass, INVOCATION_CONTRACT__INVOCATION_CONTRACT_CONTAINER);
+ createEReference(invocationContractEClass, INVOCATION_CONTRACT__FACTORY_COMPONENT_CONTRACT);
+ createEReference(invocationContractEClass, INVOCATION_CONTRACT__ORCHESTRATION_PARAMETER);
+ createEReference(invocationContractEClass, INVOCATION_CONTRACT__SOURCE_INVOCATION_CONTRACT);
+ createEReference(invocationContractEClass, INVOCATION_CONTRACT__TARGET_INVOCATION_CONTRACT);
+ createEReference(invocationContractEClass, INVOCATION_CONTRACT__INVOKED_CONTRACT);
+ createEReference(invocationContractEClass, INVOCATION_CONTRACT__TYPE);
+
+ // Create enums
+ contractModeEEnum = createEEnum(CONTRACT_MODE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized)
+ return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ EcorePackage theEcorePackage = (EcorePackage) EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
+ TypesPackage theTypesPackage = (TypesPackage) EPackage.Registry.INSTANCE.getEPackage(TypesPackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ namedModelElementEClass.getESuperTypes().add(this.getModelElement());
+ activityEClass.getESuperTypes().add(this.getNamedModelElement());
+ contractEClass.getESuperTypes().add(this.getNamedModelElement());
+ factoryComponentEClass.getESuperTypes().add(this.getActivity());
+ contractContainerEClass.getESuperTypes().add(this.getModelElement());
+ factoryComponentContractEClass.getESuperTypes().add(this.getContract());
+ viewpointContainerEClass.getESuperTypes().add(this.getModelElement());
+ viewpointEClass.getESuperTypes().add(this.getModelElement());
+ orchestrationEClass.getESuperTypes().add(this.getModelElement());
+ orchestrationParameterContainerEClass.getESuperTypes().add(this.getModelElement());
+ orchestrationParameterEClass.getESuperTypes().add(this.getNamedModelElement());
+ invocationEClass.getESuperTypes().add(this.getNamedModelElement());
+ invocationContractContainerEClass.getESuperTypes().add(this.getModelElement());
+ invocationContractEClass.getESuperTypes().add(this.getModelElement());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(modelElementEClass, ModelElement.class, "ModelElement", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getModelElement_ID(), theEcorePackage.getEString(), "iD", null, 0, 1, ModelElement.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getModelElement_Description(), theEcorePackage.getEString(), "description", null, 0, 1, ModelElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(namedModelElementEClass, NamedModelElement.class, "NamedModelElement", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getNamedModelElement_Name(), theEcorePackage.getEString(), "name", null, 0, 1, NamedModelElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(activityEClass, Activity.class, "Activity", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getActivity_ContractContainer(), this.getContractContainer(), this.getContractContainer_Activity(), "contractContainer", null, 0, 1, Activity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ addEOperation(activityEClass, this.getContract(), "getContracts", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ EOperation op = addEOperation(activityEClass, this.getContract(), "getContracts", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, theTypesPackage.getType(), "type", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ op = addEOperation(activityEClass, this.getContract(), "getContracts", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, this.getContractMode(), "mode", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ op = addEOperation(activityEClass, this.getContract(), "getContracts", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, theTypesPackage.getType(), "type", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, this.getContractMode(), "mode", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(contractEClass, Contract.class, "Contract", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getContract_ContractContainer(), this.getContractContainer(), this.getContractContainer_Contracts(), "contractContainer", null, 1, 1, Contract.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getContract_Mandatory(), theEcorePackage.getEBoolean(), "mandatory", null, 0, 1, Contract.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getContract_Mode(), this.getContractMode(), "mode", null, 0, 1, Contract.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getContract_Type(), theTypesPackage.getType(), null, "type", null, 1, 1, Contract.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ addEOperation(contractEClass, this.getActivity(), "getActivity", 1, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ addEOperation(contractEClass, this.getContract(), "getContracts", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ op = addEOperation(contractEClass, this.getContract(), "getContracts", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, theTypesPackage.getType(), "type", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ op = addEOperation(contractEClass, this.getContract(), "getContracts", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, this.getContractMode(), "mode", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ op = addEOperation(contractEClass, this.getContract(), "getContracts", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, theTypesPackage.getType(), "type", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, this.getContractMode(), "mode", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(factoryComponentEClass, FactoryComponent.class, "FactoryComponent", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getFactoryComponent_ViewpointContainer(), this.getViewpointContainer(), this.getViewpointContainer_FactoryComponent(),
+ "viewpointContainer", null, 0, 1, FactoryComponent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getFactoryComponent_Orchestration(), this.getOrchestration(), this.getOrchestration_FactoryComponent(),
+ "orchestration", null, 0, 1, FactoryComponent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ addEOperation(factoryComponentEClass, this.getInvocationContract(), "getInvocationContracts", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ op = addEOperation(factoryComponentEClass, this.getInvocationContract(), "getInvocationContracts", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, theTypesPackage.getType(), "type", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ op = addEOperation(factoryComponentEClass, this.getInvocationContract(), "getInvocationContracts", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, this.getContractMode(), "mode", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ op = addEOperation(factoryComponentEClass, this.getInvocationContract(), "getInvocationContracts", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, theTypesPackage.getType(), "type", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, this.getContractMode(), "mode", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(contractContainerEClass, ContractContainer.class, "ContractContainer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getContractContainer_Activity(), this.getActivity(), this.getActivity_ContractContainer(), "activity", null, 1, 1, ContractContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getContractContainer_Contracts(), this.getContract(), this.getContract_ContractContainer(), "contracts", null, 1, -1, ContractContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ op = addEOperation(contractContainerEClass, this.getContract(), "getContracts", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, theTypesPackage.getType(), "type", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ op = addEOperation(contractContainerEClass, this.getContract(), "getContracts", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, this.getContractMode(), "mode", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ op = addEOperation(contractContainerEClass, this.getContract(), "getContracts", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, theTypesPackage.getType(), "type", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, this.getContractMode(), "mode", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(factoryComponentContractEClass, FactoryComponentContract.class, "FactoryComponentContract", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getFactoryComponentContract_InvocationContracts(), this.getInvocationContract(), this.getInvocationContract_FactoryComponentContract(),
+ "invocationContracts", null, 0, -1, FactoryComponentContract.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(viewpointContainerEClass, ViewpointContainer.class, "ViewpointContainer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getViewpointContainer_FactoryComponent(), this.getFactoryComponent(), this.getFactoryComponent_ViewpointContainer(),
+ "factoryComponent", null, 1, 1, ViewpointContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getViewpointContainer_Viewpoints(), this.getViewpoint(), this.getViewpoint_ViewpointContainer(), "viewpoints", null, 0, -1, ViewpointContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ op = addEOperation(viewpointContainerEClass, this.getViewpoint(), "getViewpoint", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ EGenericType g1 = createEGenericType(theEcorePackage.getEJavaClass());
+ EGenericType g2 = createEGenericType();
+ g1.getETypeArguments().add(g2);
+ addEParameter(op, g1, "clazz", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(viewpointEClass, Viewpoint.class, "Viewpoint", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getViewpoint_ViewpointContainer(), this.getViewpointContainer(), this.getViewpointContainer_Viewpoints(),
+ "viewpointContainer", null, 1, 1, Viewpoint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(orchestrationEClass, Orchestration.class, "Orchestration", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getOrchestration_FactoryComponent(), this.getFactoryComponent(), this.getFactoryComponent_Orchestration(),
+ "factoryComponent", null, 1, 1, Orchestration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getOrchestration_OrchestrationParameterContainer(), this.getOrchestrationParameterContainer(), this.getOrchestrationParameterContainer_Orchestration(),
+ "orchestrationParameterContainer", null, 0, 1, Orchestration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ op = addEOperation(orchestrationEClass, null, "getInvocations", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ ETypeParameter t1 = addETypeParameter(op, "T"); //$NON-NLS-1$
+ g1 = createEGenericType(this.getInvocation());
+ t1.getEBounds().add(g1);
+ g1 = createEGenericType(t1);
+ initEOperation(op, g1);
+
+ addEOperation(orchestrationEClass, this.getOrchestrationParameter(), "getOrchestrationParameters", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ op = addEOperation(orchestrationEClass, this.getOrchestrationParameter(), "getOrchestrationParameters", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, theTypesPackage.getType(), "type", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ addEOperation(orchestrationEClass, this.getInvocationContract(), "getInvocationContracts", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ op = addEOperation(orchestrationEClass, this.getInvocationContract(), "getInvocationContracts", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, theTypesPackage.getType(), "type", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ op = addEOperation(orchestrationEClass, this.getInvocationContract(), "getInvocationContracts", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, this.getContractMode(), "mode", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ op = addEOperation(orchestrationEClass, this.getInvocationContract(), "getInvocationContracts", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, theTypesPackage.getType(), "type", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, this.getContractMode(), "mode", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(orchestrationParameterContainerEClass, OrchestrationParameterContainer.class, "OrchestrationParameterContainer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getOrchestrationParameterContainer_Orchestration(), this.getOrchestration(), this.getOrchestration_OrchestrationParameterContainer(),
+ "orchestration", null, 1, 1, OrchestrationParameterContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getOrchestrationParameterContainer_OrchestrationParameters(), this.getOrchestrationParameter(), this.getOrchestrationParameter_OrchestrationParameterContainer(),
+ "orchestrationParameters", null, 0, -1, OrchestrationParameterContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ addEOperation(orchestrationParameterContainerEClass, this.getFactoryComponent(), "getFactoryComponent", 1, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ op = addEOperation(orchestrationParameterContainerEClass, this.getOrchestrationParameter(), "getOrchestrationParameters", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, theTypesPackage.getType(), "type", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(orchestrationParameterEClass, OrchestrationParameter.class, "OrchestrationParameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getOrchestrationParameter_OrchestrationParameterContainer(), this.getOrchestrationParameterContainer(), this.getOrchestrationParameterContainer_OrchestrationParameters(),
+ "orchestrationParameterContainer", null, 1, 1, OrchestrationParameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getOrchestrationParameter_InvocationContracts(), this.getInvocationContract(), this.getInvocationContract_OrchestrationParameter(),
+ "invocationContracts", null, 0, -1, OrchestrationParameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getOrchestrationParameter_Type(), theTypesPackage.getType(), null, "type", null, 1, 1, OrchestrationParameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ addEOperation(orchestrationParameterEClass, this.getFactoryComponent(), "getFactoryComponent", 1, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ addEOperation(orchestrationParameterEClass, this.getOrchestration(), "getOrchestration", 1, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(invocationEClass, Invocation.class, "Invocation", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getInvocation_InvocationContractContainer(), this.getInvocationContractContainer(), this.getInvocationContractContainer_Invocation(),
+ "invocationContractContainer", null, 0, 1, Invocation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getInvocation_InvokedActivity(), this.getActivity(), null, "invokedActivity", null, 1, 1, Invocation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ addEOperation(invocationEClass, this.getFactoryComponent(), "getFactoryComponent", 1, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ addEOperation(invocationEClass, this.getInvocationContract(), "getInvocationContracts", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ op = addEOperation(invocationEClass, this.getInvocationContract(), "getInvocationContracts", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, theTypesPackage.getType(), "type", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ op = addEOperation(invocationEClass, this.getInvocationContract(), "getInvocationContracts", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, this.getContractMode(), "mode", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ op = addEOperation(invocationEClass, this.getInvocationContract(), "getInvocationContracts", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, theTypesPackage.getType(), "type", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, this.getContractMode(), "mode", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ addEOperation(invocationEClass, this.getContract(), "getInvokedContracts", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ op = addEOperation(invocationEClass, this.getContract(), "getInvokedContracts", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, theTypesPackage.getType(), "type", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ op = addEOperation(invocationEClass, this.getContract(), "getInvokedContracts", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, this.getContractMode(), "mode", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ op = addEOperation(invocationEClass, this.getContract(), "getInvokedContracts", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, theTypesPackage.getType(), "type", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, this.getContractMode(), "mode", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(invocationContractContainerEClass, InvocationContractContainer.class, "InvocationContractContainer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getInvocationContractContainer_Invocation(), this.getInvocation(), this.getInvocation_InvocationContractContainer(),
+ "invocation", null, 1, 1, InvocationContractContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getInvocationContractContainer_InvocationContracts(), this.getInvocationContract(), this.getInvocationContract_InvocationContractContainer(),
+ "invocationContracts", null, 0, -1, InvocationContractContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ addEOperation(invocationContractContainerEClass, this.getFactoryComponent(), "getFactoryComponent", 1, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(invocationContractEClass, InvocationContract.class, "InvocationContract", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getInvocationContract_InvocationContractContainer(), this.getInvocationContractContainer(), this.getInvocationContractContainer_InvocationContracts(),
+ "invocationContractContainer", null, 1, 1, InvocationContract.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getInvocationContract_FactoryComponentContract(), this.getFactoryComponentContract(), this.getFactoryComponentContract_InvocationContracts(),
+ "factoryComponentContract", null, 0, 1, InvocationContract.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getInvocationContract_OrchestrationParameter(), this.getOrchestrationParameter(), this.getOrchestrationParameter_InvocationContracts(),
+ "orchestrationParameter", null, 0, 1, InvocationContract.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getInvocationContract_SourceInvocationContract(), this.getInvocationContract(), this.getInvocationContract_TargetInvocationContract(),
+ "sourceInvocationContract", null, 0, 1, InvocationContract.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getInvocationContract_TargetInvocationContract(), this.getInvocationContract(), this.getInvocationContract_SourceInvocationContract(),
+ "targetInvocationContract", null, 0, -1, InvocationContract.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getInvocationContract_InvokedContract(), this.getContract(), null, "invokedContract", null, 1, 1, InvocationContract.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getInvocationContract_Type(), theTypesPackage.getType(), null, "type", null, 0, 1, InvocationContract.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ addEOperation(invocationContractEClass, this.getFactoryComponent(), "getFactoryComponent", 1, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ addEOperation(invocationContractEClass, this.getInvocation(), "getInvocation", 1, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ addEOperation(invocationContractEClass, this.getContractMode(), "getInvokedMode", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ // Initialize enums and add enum literals
+ initEEnum(contractModeEEnum, ContractMode.class, "ContractMode"); //$NON-NLS-1$
+ addEEnumLiteral(contractModeEEnum, ContractMode.IN);
+ addEEnumLiteral(contractModeEEnum, ContractMode.OUT);
+ addEEnumLiteral(contractModeEEnum, ContractMode.IN_OUT);
+
+ // Create resource
+ createResource(eNS_URI);
+
+ // Create annotations
+ // http://www.eclipse.org/emf/2002/Ecore
+ createEcoreAnnotations();
+ }
+
+ /**
+ * Initializes the annotations for <b>http://www.eclipse.org/emf/2002/Ecore</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void createEcoreAnnotations() {
+ String source = "http://www.eclipse.org/emf/2002/Ecore"; //$NON-NLS-1$
+ addAnnotation(activityEClass, source, new String[] { "constraints", "MandatoryName ActivityCycle" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ addAnnotation(contractEClass, source, new String[] { "constraints", "UniqueName UselessMandatoryMode" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ addAnnotation(contractContainerEClass, source, new String[] { "constraints", "FactoryComponentContract" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ addAnnotation(factoryComponentContractEClass, source, new String[] { "constraints", "UselessFactoryComponentContract OutModeIsRestricted" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ addAnnotation(orchestrationParameterContainerEClass, source, new String[] { "constraints", "UselessOrchestrationParameterContainer" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ addAnnotation(orchestrationParameterEClass, source, new String[] { "constraints", "UselessOrchestrationParameter" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ addAnnotation(invocationEClass, source, new String[] { "constraints", "MandatoryInvokedContract" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ addAnnotation(invocationContractEClass, source, new String[] {
+ "constraints", "ValidInvokedContract ValidInvokedContractType ValidFactoryComponentContract ValidFactoryComponentContractType ValidOrchestrationParameter ValidOrchestrationParameterType ValidSourceInvocationContract ValidSourceInvocationContractType UselessTypeValue" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ }
+
+} // FcorePackageImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/InvocationContractContainerImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/InvocationContractContainerImpl.java
new file mode 100644
index 0000000..af6f478
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/InvocationContractContainerImpl.java
@@ -0,0 +1,262 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.impl;
+
+import java.util.Collection;
+
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.model.fcore.InvocationContractContainer;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Invocation Contract Container</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.fcore.impl.InvocationContractContainerImpl#getInvocation <em>Invocation</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.impl.InvocationContractContainerImpl#getInvocationContracts <em>Invocation Contracts</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class InvocationContractContainerImpl extends ModelElementImpl implements InvocationContractContainer {
+ /**
+ * The cached value of the '{@link #getInvocationContracts() <em>Invocation Contracts</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getInvocationContracts()
+ * @generated
+ * @ordered
+ */
+ protected EList<InvocationContract> invocationContracts;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected InvocationContractContainerImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FcorePackage.Literals.INVOCATION_CONTRACT_CONTAINER;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Invocation getInvocation() {
+ if (eContainerFeatureID() != FcorePackage.INVOCATION_CONTRACT_CONTAINER__INVOCATION)
+ return null;
+ return (Invocation) eContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetInvocation(Invocation newInvocation, NotificationChain msgs) {
+ msgs = eBasicSetContainer((InternalEObject) newInvocation, FcorePackage.INVOCATION_CONTRACT_CONTAINER__INVOCATION, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setInvocation(Invocation newInvocation) {
+ if (newInvocation != eInternalContainer() || (eContainerFeatureID() != FcorePackage.INVOCATION_CONTRACT_CONTAINER__INVOCATION && newInvocation != null)) {
+ if (EcoreUtil.isAncestor(this, newInvocation))
+ throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); //$NON-NLS-1$
+ NotificationChain msgs = null;
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ if (newInvocation != null)
+ msgs = ((InternalEObject) newInvocation).eInverseAdd(this, FcorePackage.INVOCATION__INVOCATION_CONTRACT_CONTAINER, Invocation.class, msgs);
+ msgs = basicSetInvocation(newInvocation, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ } else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FcorePackage.INVOCATION_CONTRACT_CONTAINER__INVOCATION, newInvocation, newInvocation));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<InvocationContract> getInvocationContracts() {
+ if (invocationContracts == null) {
+ invocationContracts = new EObjectContainmentWithInverseEList<InvocationContract>(InvocationContract.class, this, FcorePackage.INVOCATION_CONTRACT_CONTAINER__INVOCATION_CONTRACTS, FcorePackage.INVOCATION_CONTRACT__INVOCATION_CONTRACT_CONTAINER);
+ }
+ return invocationContracts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public FactoryComponent getFactoryComponent() {
+ if (getInvocation() != null) {
+ return getInvocation().getFactoryComponent();
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FcorePackage.INVOCATION_CONTRACT_CONTAINER__INVOCATION:
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ return basicSetInvocation((Invocation) otherEnd, msgs);
+ case FcorePackage.INVOCATION_CONTRACT_CONTAINER__INVOCATION_CONTRACTS:
+ return ((InternalEList<InternalEObject>) (InternalEList<?>) getInvocationContracts()).basicAdd(otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FcorePackage.INVOCATION_CONTRACT_CONTAINER__INVOCATION:
+ return basicSetInvocation(null, msgs);
+ case FcorePackage.INVOCATION_CONTRACT_CONTAINER__INVOCATION_CONTRACTS:
+ return ((InternalEList<?>) getInvocationContracts()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
+ switch (eContainerFeatureID()) {
+ case FcorePackage.INVOCATION_CONTRACT_CONTAINER__INVOCATION:
+ return eInternalContainer().eInverseRemove(this, FcorePackage.INVOCATION__INVOCATION_CONTRACT_CONTAINER, Invocation.class, msgs);
+ }
+ return super.eBasicRemoveFromContainerFeature(msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FcorePackage.INVOCATION_CONTRACT_CONTAINER__INVOCATION:
+ return getInvocation();
+ case FcorePackage.INVOCATION_CONTRACT_CONTAINER__INVOCATION_CONTRACTS:
+ return getInvocationContracts();
+ }
+ 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 FcorePackage.INVOCATION_CONTRACT_CONTAINER__INVOCATION:
+ setInvocation((Invocation) newValue);
+ return;
+ case FcorePackage.INVOCATION_CONTRACT_CONTAINER__INVOCATION_CONTRACTS:
+ getInvocationContracts().clear();
+ getInvocationContracts().addAll((Collection<? extends InvocationContract>) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FcorePackage.INVOCATION_CONTRACT_CONTAINER__INVOCATION:
+ setInvocation((Invocation) null);
+ return;
+ case FcorePackage.INVOCATION_CONTRACT_CONTAINER__INVOCATION_CONTRACTS:
+ getInvocationContracts().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FcorePackage.INVOCATION_CONTRACT_CONTAINER__INVOCATION:
+ return getInvocation() != null;
+ case FcorePackage.INVOCATION_CONTRACT_CONTAINER__INVOCATION_CONTRACTS:
+ return invocationContracts != null && !invocationContracts.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // InvocationContractContainerImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/InvocationContractImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/InvocationContractImpl.java
new file mode 100644
index 0000000..d8e9385
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/InvocationContractImpl.java
@@ -0,0 +1,644 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.impl;
+
+import java.util.Collection;
+import org.eclipse.egf.model.fcore.Contract;
+import org.eclipse.egf.model.fcore.ContractMode;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.FactoryComponentContract;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.model.fcore.InvocationContractContainer;
+import org.eclipse.egf.model.fcore.OrchestrationParameter;
+import org.eclipse.egf.model.fcore.adapter.InvocationContractAdapter;
+import org.eclipse.egf.model.types.Type;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectWithInverseEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Invocation Contract</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.fcore.impl.InvocationContractImpl#getInvocationContractContainer <em>Invocation Contract Container</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.impl.InvocationContractImpl#getFactoryComponentContract <em>Factory Component Contract</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.impl.InvocationContractImpl#getOrchestrationParameter <em>Orchestration Parameter</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.impl.InvocationContractImpl#getSourceInvocationContract <em>Source Invocation Contract</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.impl.InvocationContractImpl#getTargetInvocationContract <em>Target Invocation Contract</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.impl.InvocationContractImpl#getInvokedContract <em>Invoked Contract</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.impl.InvocationContractImpl#getType <em>Type</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class InvocationContractImpl extends ModelElementImpl implements InvocationContract {
+ /**
+ * The cached value of the '{@link #getFactoryComponentContract() <em>Factory Component Contract</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getFactoryComponentContract()
+ * @generated
+ * @ordered
+ */
+ protected FactoryComponentContract factoryComponentContract;
+
+ /**
+ * The cached value of the '{@link #getOrchestrationParameter() <em>Orchestration Parameter</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getOrchestrationParameter()
+ * @generated
+ * @ordered
+ */
+ protected OrchestrationParameter orchestrationParameter;
+
+ /**
+ * The cached value of the '{@link #getSourceInvocationContract() <em>Source Invocation Contract</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSourceInvocationContract()
+ * @generated
+ * @ordered
+ */
+ protected InvocationContract sourceInvocationContract;
+
+ /**
+ * The cached value of the '{@link #getTargetInvocationContract() <em>Target Invocation Contract</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTargetInvocationContract()
+ * @generated
+ * @ordered
+ */
+ protected EList<InvocationContract> targetInvocationContract;
+
+ /**
+ * The cached value of the '{@link #getInvokedContract() <em>Invoked Contract</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getInvokedContract()
+ * @generated
+ * @ordered
+ */
+ protected Contract invokedContract;
+
+ /**
+ * The cached value of the '{@link #getType() <em>Type</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getType()
+ * @generated
+ * @ordered
+ */
+ protected Type type;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ protected InvocationContractImpl() {
+ super();
+ new InvocationContractAdapter(this);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FcorePackage.Literals.INVOCATION_CONTRACT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public InvocationContractContainer getInvocationContractContainer() {
+ if (eContainerFeatureID() != FcorePackage.INVOCATION_CONTRACT__INVOCATION_CONTRACT_CONTAINER)
+ return null;
+ return (InvocationContractContainer) eContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetInvocationContractContainer(InvocationContractContainer newInvocationContractContainer, NotificationChain msgs) {
+ msgs = eBasicSetContainer((InternalEObject) newInvocationContractContainer, FcorePackage.INVOCATION_CONTRACT__INVOCATION_CONTRACT_CONTAINER, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setInvocationContractContainer(InvocationContractContainer newInvocationContractContainer) {
+ if (newInvocationContractContainer != eInternalContainer() || (eContainerFeatureID() != FcorePackage.INVOCATION_CONTRACT__INVOCATION_CONTRACT_CONTAINER && newInvocationContractContainer != null)) {
+ if (EcoreUtil.isAncestor(this, newInvocationContractContainer))
+ throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); //$NON-NLS-1$
+ NotificationChain msgs = null;
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ if (newInvocationContractContainer != null)
+ msgs = ((InternalEObject) newInvocationContractContainer).eInverseAdd(this, FcorePackage.INVOCATION_CONTRACT_CONTAINER__INVOCATION_CONTRACTS, InvocationContractContainer.class, msgs);
+ msgs = basicSetInvocationContractContainer(newInvocationContractContainer, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ } else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FcorePackage.INVOCATION_CONTRACT__INVOCATION_CONTRACT_CONTAINER, newInvocationContractContainer, newInvocationContractContainer));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FactoryComponentContract getFactoryComponentContract() {
+ return factoryComponentContract;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetFactoryComponentContract(FactoryComponentContract newFactoryComponentContract, NotificationChain msgs) {
+ FactoryComponentContract oldFactoryComponentContract = factoryComponentContract;
+ factoryComponentContract = newFactoryComponentContract;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FcorePackage.INVOCATION_CONTRACT__FACTORY_COMPONENT_CONTRACT, oldFactoryComponentContract, newFactoryComponentContract);
+ if (msgs == null)
+ msgs = notification;
+ else
+ msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setFactoryComponentContract(FactoryComponentContract newFactoryComponentContract) {
+ if (newFactoryComponentContract != factoryComponentContract) {
+ NotificationChain msgs = null;
+ if (factoryComponentContract != null)
+ msgs = ((InternalEObject) factoryComponentContract).eInverseRemove(this, FcorePackage.FACTORY_COMPONENT_CONTRACT__INVOCATION_CONTRACTS, FactoryComponentContract.class, msgs);
+ if (newFactoryComponentContract != null)
+ msgs = ((InternalEObject) newFactoryComponentContract).eInverseAdd(this, FcorePackage.FACTORY_COMPONENT_CONTRACT__INVOCATION_CONTRACTS, FactoryComponentContract.class, msgs);
+ msgs = basicSetFactoryComponentContract(newFactoryComponentContract, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ } else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FcorePackage.INVOCATION_CONTRACT__FACTORY_COMPONENT_CONTRACT, newFactoryComponentContract, newFactoryComponentContract));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public OrchestrationParameter getOrchestrationParameter() {
+ return orchestrationParameter;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetOrchestrationParameter(OrchestrationParameter newOrchestrationParameter, NotificationChain msgs) {
+ OrchestrationParameter oldOrchestrationParameter = orchestrationParameter;
+ orchestrationParameter = newOrchestrationParameter;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FcorePackage.INVOCATION_CONTRACT__ORCHESTRATION_PARAMETER, oldOrchestrationParameter, newOrchestrationParameter);
+ if (msgs == null)
+ msgs = notification;
+ else
+ msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setOrchestrationParameter(OrchestrationParameter newOrchestrationParameter) {
+ if (newOrchestrationParameter != orchestrationParameter) {
+ NotificationChain msgs = null;
+ if (orchestrationParameter != null)
+ msgs = ((InternalEObject) orchestrationParameter).eInverseRemove(this, FcorePackage.ORCHESTRATION_PARAMETER__INVOCATION_CONTRACTS, OrchestrationParameter.class, msgs);
+ if (newOrchestrationParameter != null)
+ msgs = ((InternalEObject) newOrchestrationParameter).eInverseAdd(this, FcorePackage.ORCHESTRATION_PARAMETER__INVOCATION_CONTRACTS, OrchestrationParameter.class, msgs);
+ msgs = basicSetOrchestrationParameter(newOrchestrationParameter, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ } else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FcorePackage.INVOCATION_CONTRACT__ORCHESTRATION_PARAMETER, newOrchestrationParameter, newOrchestrationParameter));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public InvocationContract getSourceInvocationContract() {
+ return sourceInvocationContract;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetSourceInvocationContract(InvocationContract newSourceInvocationContract, NotificationChain msgs) {
+ InvocationContract oldSourceInvocationContract = sourceInvocationContract;
+ sourceInvocationContract = newSourceInvocationContract;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FcorePackage.INVOCATION_CONTRACT__SOURCE_INVOCATION_CONTRACT, oldSourceInvocationContract, newSourceInvocationContract);
+ if (msgs == null)
+ msgs = notification;
+ else
+ msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSourceInvocationContract(InvocationContract newSourceInvocationContract) {
+ if (newSourceInvocationContract != sourceInvocationContract) {
+ NotificationChain msgs = null;
+ if (sourceInvocationContract != null)
+ msgs = ((InternalEObject) sourceInvocationContract).eInverseRemove(this, FcorePackage.INVOCATION_CONTRACT__TARGET_INVOCATION_CONTRACT, InvocationContract.class, msgs);
+ if (newSourceInvocationContract != null)
+ msgs = ((InternalEObject) newSourceInvocationContract).eInverseAdd(this, FcorePackage.INVOCATION_CONTRACT__TARGET_INVOCATION_CONTRACT, InvocationContract.class, msgs);
+ msgs = basicSetSourceInvocationContract(newSourceInvocationContract, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ } else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FcorePackage.INVOCATION_CONTRACT__SOURCE_INVOCATION_CONTRACT, newSourceInvocationContract, newSourceInvocationContract));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<InvocationContract> getTargetInvocationContract() {
+ if (targetInvocationContract == null) {
+ targetInvocationContract = new EObjectWithInverseEList<InvocationContract>(InvocationContract.class, this, FcorePackage.INVOCATION_CONTRACT__TARGET_INVOCATION_CONTRACT, FcorePackage.INVOCATION_CONTRACT__SOURCE_INVOCATION_CONTRACT);
+ }
+ return targetInvocationContract;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Contract getInvokedContract() {
+ if (invokedContract != null && invokedContract.eIsProxy()) {
+ InternalEObject oldInvokedContract = (InternalEObject) invokedContract;
+ invokedContract = (Contract) eResolveProxy(oldInvokedContract);
+ if (invokedContract != oldInvokedContract) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, FcorePackage.INVOCATION_CONTRACT__INVOKED_CONTRACT, oldInvokedContract, invokedContract));
+ }
+ }
+ return invokedContract;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Contract basicGetInvokedContract() {
+ return invokedContract;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setInvokedContract(Contract newInvokedContract) {
+ Contract oldInvokedContract = invokedContract;
+ invokedContract = newInvokedContract;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FcorePackage.INVOCATION_CONTRACT__INVOKED_CONTRACT, oldInvokedContract, invokedContract));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public ContractMode getInvokedMode() {
+ if (getInvokedContract() != null) {
+ return getInvokedContract().getMode();
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Type getType() {
+ return type;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetType(Type newType, NotificationChain msgs) {
+ Type oldType = type;
+ type = newType;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FcorePackage.INVOCATION_CONTRACT__TYPE, oldType, newType);
+ if (msgs == null)
+ msgs = notification;
+ else
+ msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setType(Type newType) {
+ if (newType != type) {
+ NotificationChain msgs = null;
+ if (type != null)
+ msgs = ((InternalEObject) type).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FcorePackage.INVOCATION_CONTRACT__TYPE, null, msgs);
+ if (newType != null)
+ msgs = ((InternalEObject) newType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FcorePackage.INVOCATION_CONTRACT__TYPE, null, msgs);
+ msgs = basicSetType(newType, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ } else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FcorePackage.INVOCATION_CONTRACT__TYPE, newType, newType));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public FactoryComponent getFactoryComponent() {
+ if (getInvocationContractContainer() != null) {
+ return getInvocationContractContainer().getFactoryComponent();
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public Invocation getInvocation() {
+ if (getInvocationContractContainer() != null) {
+ return getInvocationContractContainer().getInvocation();
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FcorePackage.INVOCATION_CONTRACT__INVOCATION_CONTRACT_CONTAINER:
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ return basicSetInvocationContractContainer((InvocationContractContainer) otherEnd, msgs);
+ case FcorePackage.INVOCATION_CONTRACT__FACTORY_COMPONENT_CONTRACT:
+ if (factoryComponentContract != null)
+ msgs = ((InternalEObject) factoryComponentContract).eInverseRemove(this, FcorePackage.FACTORY_COMPONENT_CONTRACT__INVOCATION_CONTRACTS, FactoryComponentContract.class, msgs);
+ return basicSetFactoryComponentContract((FactoryComponentContract) otherEnd, msgs);
+ case FcorePackage.INVOCATION_CONTRACT__ORCHESTRATION_PARAMETER:
+ if (orchestrationParameter != null)
+ msgs = ((InternalEObject) orchestrationParameter).eInverseRemove(this, FcorePackage.ORCHESTRATION_PARAMETER__INVOCATION_CONTRACTS, OrchestrationParameter.class, msgs);
+ return basicSetOrchestrationParameter((OrchestrationParameter) otherEnd, msgs);
+ case FcorePackage.INVOCATION_CONTRACT__SOURCE_INVOCATION_CONTRACT:
+ if (sourceInvocationContract != null)
+ msgs = ((InternalEObject) sourceInvocationContract).eInverseRemove(this, FcorePackage.INVOCATION_CONTRACT__TARGET_INVOCATION_CONTRACT, InvocationContract.class, msgs);
+ return basicSetSourceInvocationContract((InvocationContract) otherEnd, msgs);
+ case FcorePackage.INVOCATION_CONTRACT__TARGET_INVOCATION_CONTRACT:
+ return ((InternalEList<InternalEObject>) (InternalEList<?>) getTargetInvocationContract()).basicAdd(otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FcorePackage.INVOCATION_CONTRACT__INVOCATION_CONTRACT_CONTAINER:
+ return basicSetInvocationContractContainer(null, msgs);
+ case FcorePackage.INVOCATION_CONTRACT__FACTORY_COMPONENT_CONTRACT:
+ return basicSetFactoryComponentContract(null, msgs);
+ case FcorePackage.INVOCATION_CONTRACT__ORCHESTRATION_PARAMETER:
+ return basicSetOrchestrationParameter(null, msgs);
+ case FcorePackage.INVOCATION_CONTRACT__SOURCE_INVOCATION_CONTRACT:
+ return basicSetSourceInvocationContract(null, msgs);
+ case FcorePackage.INVOCATION_CONTRACT__TARGET_INVOCATION_CONTRACT:
+ return ((InternalEList<?>) getTargetInvocationContract()).basicRemove(otherEnd, msgs);
+ case FcorePackage.INVOCATION_CONTRACT__TYPE:
+ return basicSetType(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
+ switch (eContainerFeatureID()) {
+ case FcorePackage.INVOCATION_CONTRACT__INVOCATION_CONTRACT_CONTAINER:
+ return eInternalContainer().eInverseRemove(this, FcorePackage.INVOCATION_CONTRACT_CONTAINER__INVOCATION_CONTRACTS, InvocationContractContainer.class, msgs);
+ }
+ return super.eBasicRemoveFromContainerFeature(msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FcorePackage.INVOCATION_CONTRACT__INVOCATION_CONTRACT_CONTAINER:
+ return getInvocationContractContainer();
+ case FcorePackage.INVOCATION_CONTRACT__FACTORY_COMPONENT_CONTRACT:
+ return getFactoryComponentContract();
+ case FcorePackage.INVOCATION_CONTRACT__ORCHESTRATION_PARAMETER:
+ return getOrchestrationParameter();
+ case FcorePackage.INVOCATION_CONTRACT__SOURCE_INVOCATION_CONTRACT:
+ return getSourceInvocationContract();
+ case FcorePackage.INVOCATION_CONTRACT__TARGET_INVOCATION_CONTRACT:
+ return getTargetInvocationContract();
+ case FcorePackage.INVOCATION_CONTRACT__INVOKED_CONTRACT:
+ if (resolve)
+ return getInvokedContract();
+ return basicGetInvokedContract();
+ case FcorePackage.INVOCATION_CONTRACT__TYPE:
+ return getType();
+ }
+ 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 FcorePackage.INVOCATION_CONTRACT__INVOCATION_CONTRACT_CONTAINER:
+ setInvocationContractContainer((InvocationContractContainer) newValue);
+ return;
+ case FcorePackage.INVOCATION_CONTRACT__FACTORY_COMPONENT_CONTRACT:
+ setFactoryComponentContract((FactoryComponentContract) newValue);
+ return;
+ case FcorePackage.INVOCATION_CONTRACT__ORCHESTRATION_PARAMETER:
+ setOrchestrationParameter((OrchestrationParameter) newValue);
+ return;
+ case FcorePackage.INVOCATION_CONTRACT__SOURCE_INVOCATION_CONTRACT:
+ setSourceInvocationContract((InvocationContract) newValue);
+ return;
+ case FcorePackage.INVOCATION_CONTRACT__TARGET_INVOCATION_CONTRACT:
+ getTargetInvocationContract().clear();
+ getTargetInvocationContract().addAll((Collection<? extends InvocationContract>) newValue);
+ return;
+ case FcorePackage.INVOCATION_CONTRACT__INVOKED_CONTRACT:
+ setInvokedContract((Contract) newValue);
+ return;
+ case FcorePackage.INVOCATION_CONTRACT__TYPE:
+ setType((Type) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FcorePackage.INVOCATION_CONTRACT__INVOCATION_CONTRACT_CONTAINER:
+ setInvocationContractContainer((InvocationContractContainer) null);
+ return;
+ case FcorePackage.INVOCATION_CONTRACT__FACTORY_COMPONENT_CONTRACT:
+ setFactoryComponentContract((FactoryComponentContract) null);
+ return;
+ case FcorePackage.INVOCATION_CONTRACT__ORCHESTRATION_PARAMETER:
+ setOrchestrationParameter((OrchestrationParameter) null);
+ return;
+ case FcorePackage.INVOCATION_CONTRACT__SOURCE_INVOCATION_CONTRACT:
+ setSourceInvocationContract((InvocationContract) null);
+ return;
+ case FcorePackage.INVOCATION_CONTRACT__TARGET_INVOCATION_CONTRACT:
+ getTargetInvocationContract().clear();
+ return;
+ case FcorePackage.INVOCATION_CONTRACT__INVOKED_CONTRACT:
+ setInvokedContract((Contract) null);
+ return;
+ case FcorePackage.INVOCATION_CONTRACT__TYPE:
+ setType((Type) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FcorePackage.INVOCATION_CONTRACT__INVOCATION_CONTRACT_CONTAINER:
+ return getInvocationContractContainer() != null;
+ case FcorePackage.INVOCATION_CONTRACT__FACTORY_COMPONENT_CONTRACT:
+ return factoryComponentContract != null;
+ case FcorePackage.INVOCATION_CONTRACT__ORCHESTRATION_PARAMETER:
+ return orchestrationParameter != null;
+ case FcorePackage.INVOCATION_CONTRACT__SOURCE_INVOCATION_CONTRACT:
+ return sourceInvocationContract != null;
+ case FcorePackage.INVOCATION_CONTRACT__TARGET_INVOCATION_CONTRACT:
+ return targetInvocationContract != null && !targetInvocationContract.isEmpty();
+ case FcorePackage.INVOCATION_CONTRACT__INVOKED_CONTRACT:
+ return invokedContract != null;
+ case FcorePackage.INVOCATION_CONTRACT__TYPE:
+ return type != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // InvocationContractImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/InvocationImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/InvocationImpl.java
new file mode 100644
index 0000000..1dbd54c
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/InvocationImpl.java
@@ -0,0 +1,444 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.impl;
+
+import org.eclipse.egf.common.helper.ClassHelper;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.Contract;
+import org.eclipse.egf.model.fcore.ContractMode;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.model.fcore.InvocationContractContainer;
+import org.eclipse.egf.model.types.Type;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.UniqueEList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Invocation</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.fcore.impl.InvocationImpl#getInvocationContractContainer <em>Invocation Contract Container</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.impl.InvocationImpl#getInvokedActivity <em>Invoked Activity</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class InvocationImpl extends NamedModelElementImpl implements Invocation {
+ /**
+ * The cached value of the '{@link #getInvocationContractContainer() <em>Invocation Contract Container</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getInvocationContractContainer()
+ * @generated
+ * @ordered
+ */
+ protected InvocationContractContainer invocationContractContainer;
+
+ /**
+ * The cached value of the '{@link #getInvokedActivity() <em>Invoked Activity</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getInvokedActivity()
+ * @generated
+ * @ordered
+ */
+ protected Activity invokedActivity;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected InvocationImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FcorePackage.Literals.INVOCATION;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public InvocationContractContainer getInvocationContractContainer() {
+ return invocationContractContainer;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetInvocationContractContainer(InvocationContractContainer newInvocationContractContainer, NotificationChain msgs) {
+ InvocationContractContainer oldInvocationContractContainer = invocationContractContainer;
+ invocationContractContainer = newInvocationContractContainer;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FcorePackage.INVOCATION__INVOCATION_CONTRACT_CONTAINER, oldInvocationContractContainer, newInvocationContractContainer);
+ if (msgs == null)
+ msgs = notification;
+ else
+ msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setInvocationContractContainer(InvocationContractContainer newInvocationContractContainer) {
+ if (newInvocationContractContainer != invocationContractContainer) {
+ NotificationChain msgs = null;
+ if (invocationContractContainer != null)
+ msgs = ((InternalEObject) invocationContractContainer).eInverseRemove(this, FcorePackage.INVOCATION_CONTRACT_CONTAINER__INVOCATION, InvocationContractContainer.class, msgs);
+ if (newInvocationContractContainer != null)
+ msgs = ((InternalEObject) newInvocationContractContainer).eInverseAdd(this, FcorePackage.INVOCATION_CONTRACT_CONTAINER__INVOCATION, InvocationContractContainer.class, msgs);
+ msgs = basicSetInvocationContractContainer(newInvocationContractContainer, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ } else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FcorePackage.INVOCATION__INVOCATION_CONTRACT_CONTAINER, newInvocationContractContainer, newInvocationContractContainer));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Activity getInvokedActivity() {
+ if (invokedActivity != null && invokedActivity.eIsProxy()) {
+ InternalEObject oldInvokedActivity = (InternalEObject) invokedActivity;
+ invokedActivity = (Activity) eResolveProxy(oldInvokedActivity);
+ if (invokedActivity != oldInvokedActivity) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, FcorePackage.INVOCATION__INVOKED_ACTIVITY, oldInvokedActivity, invokedActivity));
+ }
+ }
+ return invokedActivity;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Activity basicGetInvokedActivity() {
+ return invokedActivity;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setInvokedActivity(Activity newInvokedActivity) {
+ Activity oldInvokedActivity = invokedActivity;
+ invokedActivity = newInvokedActivity;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FcorePackage.INVOCATION__INVOKED_ACTIVITY, oldInvokedActivity, invokedActivity));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FactoryComponent getFactoryComponent() {
+ // TODO: implement this method
+ // Ensure that you remove @generated or mark it @generated NOT
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<Contract> getInvokedContracts() {
+ EList<Contract> contracts = new UniqueEList<Contract>();
+ if (getInvocationContractContainer() != null && getInvocationContractContainer().getInvocationContracts() != null) {
+ for (InvocationContract invocationContract : getInvocationContractContainer().getInvocationContracts()) {
+ if (invocationContract.getInvokedContract() != null) {
+ contracts.add(invocationContract.getInvokedContract());
+ }
+ }
+ }
+ return contracts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<Contract> getInvokedContracts(Type type) {
+ EList<Contract> contracts = new UniqueEList<Contract>();
+ if (type != null) {
+ for (Contract contract : getInvokedContracts()) {
+ if (contract.getType() != null && ClassHelper.asSubClass(type.getType(), contract.getType().getType())) {
+ contracts.add(contract);
+ }
+ }
+ }
+ return contracts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<Contract> getInvokedContracts(ContractMode mode) {
+ EList<Contract> contracts = new UniqueEList<Contract>();
+ if (mode != null) {
+ for (Contract contract : getInvokedContracts()) {
+ if (mode == ContractMode.IN && (contract.getMode() == ContractMode.IN || contract.getMode() == ContractMode.IN_OUT)) {
+ contracts.add(contract);
+ } else if (mode == ContractMode.OUT && (contract.getMode() == ContractMode.OUT || contract.getMode() == ContractMode.IN_OUT)) {
+ contracts.add(contract);
+ } else if (mode == ContractMode.IN_OUT) {
+ contracts.add(contract);
+ }
+ }
+ }
+ return contracts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<Contract> getInvokedContracts(Type type, ContractMode mode) {
+ EList<Contract> contracts = new UniqueEList<Contract>();
+ for (Contract contract : getInvokedContracts(type)) {
+ if (mode == ContractMode.IN && (contract.getMode() == ContractMode.IN || contract.getMode() == ContractMode.IN_OUT)) {
+ contracts.add(contract);
+ } else if (mode == ContractMode.OUT && (contract.getMode() == ContractMode.OUT || contract.getMode() == ContractMode.IN_OUT)) {
+ contracts.add(contract);
+ } else if (mode == ContractMode.IN_OUT) {
+ contracts.add(contract);
+ }
+ }
+ return contracts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<InvocationContract> getInvocationContracts() {
+ EList<InvocationContract> invocationContracts = new UniqueEList<InvocationContract>();
+ if (getInvocationContractContainer() != null && getInvocationContractContainer().getInvocationContracts() != null) {
+ invocationContracts.addAll(getInvocationContractContainer().getInvocationContracts());
+ }
+ return invocationContracts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<InvocationContract> getInvocationContracts(Type innerType) {
+ EList<InvocationContract> invocationContracts = new UniqueEList<InvocationContract>();
+ if (innerType != null) {
+ for (InvocationContract innerInvocationContract : getInvocationContracts()) {
+ // Nothing to analyse
+ if (innerInvocationContract.getInvokedContract() == null || innerInvocationContract.getInvokedContract().getType() == null) {
+ continue;
+ }
+ // Local type definition if available
+ Type type = innerInvocationContract.getType();
+ if (type == null) {
+ // Otherwise invoked contract type
+ type = innerInvocationContract.getInvokedContract().getType();
+ }
+ if (ClassHelper.asSubClass(innerType.getType(), type.getType())) {
+ invocationContracts.add(innerInvocationContract);
+ }
+ }
+ }
+ return invocationContracts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<InvocationContract> getInvocationContracts(ContractMode mode) {
+ EList<InvocationContract> invocationContracts = new UniqueEList<InvocationContract>();
+ if (mode != null) {
+ for (InvocationContract innerInvocationContract : getInvocationContracts()) {
+ if (mode == ContractMode.IN && (innerInvocationContract.getInvokedMode() == ContractMode.IN || innerInvocationContract.getInvokedMode() == ContractMode.IN_OUT)) {
+ invocationContracts.add(innerInvocationContract);
+ } else if (mode == ContractMode.OUT && (innerInvocationContract.getInvokedMode() == ContractMode.OUT || innerInvocationContract.getInvokedMode() == ContractMode.IN_OUT)) {
+ invocationContracts.add(innerInvocationContract);
+ } else if (mode == ContractMode.IN_OUT) {
+ invocationContracts.add(innerInvocationContract);
+ }
+ }
+ }
+ return invocationContracts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<InvocationContract> getInvocationContracts(Type type, ContractMode mode) {
+ EList<InvocationContract> invocationContracts = new UniqueEList<InvocationContract>();
+ for (InvocationContract innerInvocationContract : getInvocationContracts(type)) {
+ if (mode == ContractMode.IN && (innerInvocationContract.getInvokedMode() == ContractMode.IN || innerInvocationContract.getInvokedMode() == ContractMode.IN_OUT)) {
+ invocationContracts.add(innerInvocationContract);
+ } else if (mode == ContractMode.OUT && (innerInvocationContract.getInvokedMode() == ContractMode.OUT || innerInvocationContract.getInvokedMode() == ContractMode.IN_OUT)) {
+ invocationContracts.add(innerInvocationContract);
+ } else if (mode == ContractMode.IN_OUT) {
+ invocationContracts.add(innerInvocationContract);
+ }
+ }
+ return invocationContracts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FcorePackage.INVOCATION__INVOCATION_CONTRACT_CONTAINER:
+ if (invocationContractContainer != null)
+ msgs = ((InternalEObject) invocationContractContainer).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FcorePackage.INVOCATION__INVOCATION_CONTRACT_CONTAINER, null, msgs);
+ return basicSetInvocationContractContainer((InvocationContractContainer) otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FcorePackage.INVOCATION__INVOCATION_CONTRACT_CONTAINER:
+ return basicSetInvocationContractContainer(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FcorePackage.INVOCATION__INVOCATION_CONTRACT_CONTAINER:
+ return getInvocationContractContainer();
+ case FcorePackage.INVOCATION__INVOKED_ACTIVITY:
+ if (resolve)
+ return getInvokedActivity();
+ return basicGetInvokedActivity();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case FcorePackage.INVOCATION__INVOCATION_CONTRACT_CONTAINER:
+ setInvocationContractContainer((InvocationContractContainer) newValue);
+ return;
+ case FcorePackage.INVOCATION__INVOKED_ACTIVITY:
+ setInvokedActivity((Activity) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FcorePackage.INVOCATION__INVOCATION_CONTRACT_CONTAINER:
+ setInvocationContractContainer((InvocationContractContainer) null);
+ return;
+ case FcorePackage.INVOCATION__INVOKED_ACTIVITY:
+ setInvokedActivity((Activity) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FcorePackage.INVOCATION__INVOCATION_CONTRACT_CONTAINER:
+ return invocationContractContainer != null;
+ case FcorePackage.INVOCATION__INVOKED_ACTIVITY:
+ return invokedActivity != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // InvocationImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/ModelElementImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/ModelElementImpl.java
new file mode 100644
index 0000000..eecbfdd
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/ModelElementImpl.java
@@ -0,0 +1,216 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.impl;
+
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.ModelElement;
+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.Container;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Model Element</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.fcore.impl.ModelElementImpl#getID <em>ID</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.impl.ModelElementImpl#getDescription <em>Description</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class ModelElementImpl extends Container implements ModelElement {
+ /**
+ * A set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected int eFlags = 0;
+
+ /**
+ * The default value of the '{@link #getID() <em>ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getID()
+ * @generated
+ * @ordered
+ */
+ protected static final String ID_EDEFAULT = null;
+
+ /**
+ * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDescription()
+ * @generated
+ * @ordered
+ */
+ protected static final String DESCRIPTION_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDescription()
+ * @generated
+ * @ordered
+ */
+ protected String description = DESCRIPTION_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ModelElementImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FcorePackage.Literals.MODEL_ELEMENT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public String getID() {
+ return this.eResource() != null && this.eResource() instanceof XMLResource ? ((XMLResource) this.eResource()).getID(this) : null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean isSetID() {
+ return getID() != null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setDescription(String newDescription) {
+ String oldDescription = description;
+ description = newDescription;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FcorePackage.MODEL_ELEMENT__DESCRIPTION, oldDescription, description));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FcorePackage.MODEL_ELEMENT__ID:
+ return getID();
+ case FcorePackage.MODEL_ELEMENT__DESCRIPTION:
+ return getDescription();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case FcorePackage.MODEL_ELEMENT__DESCRIPTION:
+ setDescription((String) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FcorePackage.MODEL_ELEMENT__DESCRIPTION:
+ setDescription(DESCRIPTION_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FcorePackage.MODEL_ELEMENT__ID:
+ return isSetID();
+ case FcorePackage.MODEL_ELEMENT__DESCRIPTION:
+ return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
+ }
+ 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(" (description: "); //$NON-NLS-1$
+ result.append(description);
+ result.append(')');
+ return result.toString();
+ }
+
+} // ModelElementImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/NamedModelElementImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/NamedModelElementImpl.java
new file mode 100644
index 0000000..1547c9d
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/NamedModelElementImpl.java
@@ -0,0 +1,173 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.impl;
+
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.NamedModelElement;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Named Model Element</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.fcore.impl.NamedModelElementImpl#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class NamedModelElementImpl extends ModelElementImpl implements NamedModelElement {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected NamedModelElementImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FcorePackage.Literals.NAMED_MODEL_ELEMENT;
+ }
+
+ /**
+ * <!-- 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, FcorePackage.NAMED_MODEL_ELEMENT__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FcorePackage.NAMED_MODEL_ELEMENT__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 FcorePackage.NAMED_MODEL_ELEMENT__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 FcorePackage.NAMED_MODEL_ELEMENT__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FcorePackage.NAMED_MODEL_ELEMENT__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: "); //$NON-NLS-1$
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+} //NamedModelElementImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/OrchestrationImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/OrchestrationImpl.java
new file mode 100644
index 0000000..d64c4a9
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/OrchestrationImpl.java
@@ -0,0 +1,384 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.impl;
+
+import org.eclipse.egf.model.fcore.ContractMode;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.model.fcore.Orchestration;
+import org.eclipse.egf.model.fcore.OrchestrationParameter;
+import org.eclipse.egf.model.fcore.OrchestrationParameterContainer;
+import org.eclipse.egf.model.types.Type;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.UniqueEList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Orchestration</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.fcore.impl.OrchestrationImpl#getFactoryComponent <em>Factory Component</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.impl.OrchestrationImpl#getOrchestrationParameterContainer <em>Orchestration Parameter Container</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class OrchestrationImpl extends ModelElementImpl implements Orchestration {
+ /**
+ * The cached value of the '{@link #getOrchestrationParameterContainer() <em>Orchestration Parameter Container</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getOrchestrationParameterContainer()
+ * @generated
+ * @ordered
+ */
+ protected OrchestrationParameterContainer orchestrationParameterContainer;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected OrchestrationImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FcorePackage.Literals.ORCHESTRATION;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FactoryComponent getFactoryComponent() {
+ if (eContainerFeatureID() != FcorePackage.ORCHESTRATION__FACTORY_COMPONENT)
+ return null;
+ return (FactoryComponent) eContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetFactoryComponent(FactoryComponent newFactoryComponent, NotificationChain msgs) {
+ msgs = eBasicSetContainer((InternalEObject) newFactoryComponent, FcorePackage.ORCHESTRATION__FACTORY_COMPONENT, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setFactoryComponent(FactoryComponent newFactoryComponent) {
+ if (newFactoryComponent != eInternalContainer() || (eContainerFeatureID() != FcorePackage.ORCHESTRATION__FACTORY_COMPONENT && newFactoryComponent != null)) {
+ if (EcoreUtil.isAncestor(this, newFactoryComponent))
+ throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); //$NON-NLS-1$
+ NotificationChain msgs = null;
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ if (newFactoryComponent != null)
+ msgs = ((InternalEObject) newFactoryComponent).eInverseAdd(this, FcorePackage.FACTORY_COMPONENT__ORCHESTRATION, FactoryComponent.class, msgs);
+ msgs = basicSetFactoryComponent(newFactoryComponent, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ } else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FcorePackage.ORCHESTRATION__FACTORY_COMPONENT, newFactoryComponent, newFactoryComponent));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public OrchestrationParameterContainer getOrchestrationParameterContainer() {
+ return orchestrationParameterContainer;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetOrchestrationParameterContainer(OrchestrationParameterContainer newOrchestrationParameterContainer, NotificationChain msgs) {
+ OrchestrationParameterContainer oldOrchestrationParameterContainer = orchestrationParameterContainer;
+ orchestrationParameterContainer = newOrchestrationParameterContainer;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FcorePackage.ORCHESTRATION__ORCHESTRATION_PARAMETER_CONTAINER, oldOrchestrationParameterContainer, newOrchestrationParameterContainer);
+ if (msgs == null)
+ msgs = notification;
+ else
+ msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setOrchestrationParameterContainer(OrchestrationParameterContainer newOrchestrationParameterContainer) {
+ if (newOrchestrationParameterContainer != orchestrationParameterContainer) {
+ NotificationChain msgs = null;
+ if (orchestrationParameterContainer != null)
+ msgs = ((InternalEObject) orchestrationParameterContainer).eInverseRemove(this, FcorePackage.ORCHESTRATION_PARAMETER_CONTAINER__ORCHESTRATION, OrchestrationParameterContainer.class, msgs);
+ if (newOrchestrationParameterContainer != null)
+ msgs = ((InternalEObject) newOrchestrationParameterContainer).eInverseAdd(this, FcorePackage.ORCHESTRATION_PARAMETER_CONTAINER__ORCHESTRATION, OrchestrationParameterContainer.class, msgs);
+ msgs = basicSetOrchestrationParameterContainer(newOrchestrationParameterContainer, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ } else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FcorePackage.ORCHESTRATION__ORCHESTRATION_PARAMETER_CONTAINER, newOrchestrationParameterContainer, newOrchestrationParameterContainer));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public <T extends Invocation> EList<T> getInvocations() {
+ // TODO: implement this method
+ // Ensure that you remove @generated or mark it @generated NOT
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<InvocationContract> getInvocationContracts() {
+ EList<InvocationContract> invocationContracts = new UniqueEList<InvocationContract>();
+ if (getInvocations() != null) {
+ for (Invocation invocation : getInvocations()) {
+ invocationContracts.addAll(invocation.getInvocationContracts());
+ }
+ }
+ return invocationContracts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<InvocationContract> getInvocationContracts(Type type) {
+ EList<InvocationContract> invocationContracts = new UniqueEList<InvocationContract>();
+ if (type != null) {
+ for (Invocation invocation : getInvocations()) {
+ invocationContracts.addAll(invocation.getInvocationContracts(type));
+ }
+ }
+ return invocationContracts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<InvocationContract> getInvocationContracts(ContractMode mode) {
+ EList<InvocationContract> invocationContracts = new UniqueEList<InvocationContract>();
+ if (mode != null) {
+ for (Invocation invocation : getInvocations()) {
+ invocationContracts.addAll(invocation.getInvocationContracts(mode));
+ }
+ }
+ return invocationContracts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<InvocationContract> getInvocationContracts(Type type, ContractMode mode) {
+ EList<InvocationContract> invocationContracts = new UniqueEList<InvocationContract>();
+ for (Invocation invocation : getInvocations()) {
+ invocationContracts.addAll(invocation.getInvocationContracts(type, mode));
+ }
+ return invocationContracts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<OrchestrationParameter> getOrchestrationParameters() {
+ EList<OrchestrationParameter> orchestrationParameters = new UniqueEList<OrchestrationParameter>();
+ if (getOrchestrationParameterContainer() != null) {
+ return getOrchestrationParameterContainer().getOrchestrationParameters();
+ }
+ return orchestrationParameters;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<OrchestrationParameter> getOrchestrationParameters(Type type) {
+ EList<OrchestrationParameter> orchestrationParameters = new UniqueEList<OrchestrationParameter>();
+ if (getOrchestrationParameterContainer() != null) {
+ return getOrchestrationParameterContainer().getOrchestrationParameters(type);
+ }
+ return orchestrationParameters;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FcorePackage.ORCHESTRATION__FACTORY_COMPONENT:
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ return basicSetFactoryComponent((FactoryComponent) otherEnd, msgs);
+ case FcorePackage.ORCHESTRATION__ORCHESTRATION_PARAMETER_CONTAINER:
+ if (orchestrationParameterContainer != null)
+ msgs = ((InternalEObject) orchestrationParameterContainer).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FcorePackage.ORCHESTRATION__ORCHESTRATION_PARAMETER_CONTAINER, null, msgs);
+ return basicSetOrchestrationParameterContainer((OrchestrationParameterContainer) otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FcorePackage.ORCHESTRATION__FACTORY_COMPONENT:
+ return basicSetFactoryComponent(null, msgs);
+ case FcorePackage.ORCHESTRATION__ORCHESTRATION_PARAMETER_CONTAINER:
+ return basicSetOrchestrationParameterContainer(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
+ switch (eContainerFeatureID()) {
+ case FcorePackage.ORCHESTRATION__FACTORY_COMPONENT:
+ return eInternalContainer().eInverseRemove(this, FcorePackage.FACTORY_COMPONENT__ORCHESTRATION, FactoryComponent.class, msgs);
+ }
+ return super.eBasicRemoveFromContainerFeature(msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FcorePackage.ORCHESTRATION__FACTORY_COMPONENT:
+ return getFactoryComponent();
+ case FcorePackage.ORCHESTRATION__ORCHESTRATION_PARAMETER_CONTAINER:
+ return getOrchestrationParameterContainer();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case FcorePackage.ORCHESTRATION__FACTORY_COMPONENT:
+ setFactoryComponent((FactoryComponent) newValue);
+ return;
+ case FcorePackage.ORCHESTRATION__ORCHESTRATION_PARAMETER_CONTAINER:
+ setOrchestrationParameterContainer((OrchestrationParameterContainer) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FcorePackage.ORCHESTRATION__FACTORY_COMPONENT:
+ setFactoryComponent((FactoryComponent) null);
+ return;
+ case FcorePackage.ORCHESTRATION__ORCHESTRATION_PARAMETER_CONTAINER:
+ setOrchestrationParameterContainer((OrchestrationParameterContainer) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FcorePackage.ORCHESTRATION__FACTORY_COMPONENT:
+ return getFactoryComponent() != null;
+ case FcorePackage.ORCHESTRATION__ORCHESTRATION_PARAMETER_CONTAINER:
+ return orchestrationParameterContainer != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // OrchestrationImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/OrchestrationParameterContainerImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/OrchestrationParameterContainerImpl.java
new file mode 100644
index 0000000..42189d4
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/OrchestrationParameterContainerImpl.java
@@ -0,0 +1,279 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.impl;
+
+import java.util.Collection;
+
+import org.eclipse.egf.common.helper.ClassHelper;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.Orchestration;
+import org.eclipse.egf.model.fcore.OrchestrationParameter;
+import org.eclipse.egf.model.fcore.OrchestrationParameterContainer;
+import org.eclipse.egf.model.types.Type;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.UniqueEList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Orchestration Parameter Container</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.fcore.impl.OrchestrationParameterContainerImpl#getOrchestration <em>Orchestration</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.impl.OrchestrationParameterContainerImpl#getOrchestrationParameters <em>Orchestration Parameters</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class OrchestrationParameterContainerImpl extends ModelElementImpl implements OrchestrationParameterContainer {
+ /**
+ * The cached value of the '{@link #getOrchestrationParameters() <em>Orchestration Parameters</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getOrchestrationParameters()
+ * @generated
+ * @ordered
+ */
+ protected EList<OrchestrationParameter> orchestrationParameters;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected OrchestrationParameterContainerImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FcorePackage.Literals.ORCHESTRATION_PARAMETER_CONTAINER;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Orchestration getOrchestration() {
+ if (eContainerFeatureID() != FcorePackage.ORCHESTRATION_PARAMETER_CONTAINER__ORCHESTRATION)
+ return null;
+ return (Orchestration) eContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetOrchestration(Orchestration newOrchestration, NotificationChain msgs) {
+ msgs = eBasicSetContainer((InternalEObject) newOrchestration, FcorePackage.ORCHESTRATION_PARAMETER_CONTAINER__ORCHESTRATION, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setOrchestration(Orchestration newOrchestration) {
+ if (newOrchestration != eInternalContainer() || (eContainerFeatureID() != FcorePackage.ORCHESTRATION_PARAMETER_CONTAINER__ORCHESTRATION && newOrchestration != null)) {
+ if (EcoreUtil.isAncestor(this, newOrchestration))
+ throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); //$NON-NLS-1$
+ NotificationChain msgs = null;
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ if (newOrchestration != null)
+ msgs = ((InternalEObject) newOrchestration).eInverseAdd(this, FcorePackage.ORCHESTRATION__ORCHESTRATION_PARAMETER_CONTAINER, Orchestration.class, msgs);
+ msgs = basicSetOrchestration(newOrchestration, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ } else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FcorePackage.ORCHESTRATION_PARAMETER_CONTAINER__ORCHESTRATION, newOrchestration, newOrchestration));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<OrchestrationParameter> getOrchestrationParameters() {
+ if (orchestrationParameters == null) {
+ orchestrationParameters = new EObjectContainmentWithInverseEList<OrchestrationParameter>(OrchestrationParameter.class, this, FcorePackage.ORCHESTRATION_PARAMETER_CONTAINER__ORCHESTRATION_PARAMETERS, FcorePackage.ORCHESTRATION_PARAMETER__ORCHESTRATION_PARAMETER_CONTAINER);
+ }
+ return orchestrationParameters;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FactoryComponent getFactoryComponent() {
+ // TODO: implement this method
+ // Ensure that you remove @generated or mark it @generated NOT
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<OrchestrationParameter> getOrchestrationParameters(Type type) {
+ EList<OrchestrationParameter> innerOrchestrationParameters = new UniqueEList<OrchestrationParameter>();
+ for (OrchestrationParameter innerOrchestrationParameter : getOrchestrationParameters()) {
+ if (innerOrchestrationParameter.getType() != null && ClassHelper.asSubClass(type.getType(), innerOrchestrationParameter.getType().getType())) {
+ innerOrchestrationParameters.add(innerOrchestrationParameter);
+ }
+ }
+ return innerOrchestrationParameters;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FcorePackage.ORCHESTRATION_PARAMETER_CONTAINER__ORCHESTRATION:
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ return basicSetOrchestration((Orchestration) otherEnd, msgs);
+ case FcorePackage.ORCHESTRATION_PARAMETER_CONTAINER__ORCHESTRATION_PARAMETERS:
+ return ((InternalEList<InternalEObject>) (InternalEList<?>) getOrchestrationParameters()).basicAdd(otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FcorePackage.ORCHESTRATION_PARAMETER_CONTAINER__ORCHESTRATION:
+ return basicSetOrchestration(null, msgs);
+ case FcorePackage.ORCHESTRATION_PARAMETER_CONTAINER__ORCHESTRATION_PARAMETERS:
+ return ((InternalEList<?>) getOrchestrationParameters()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
+ switch (eContainerFeatureID()) {
+ case FcorePackage.ORCHESTRATION_PARAMETER_CONTAINER__ORCHESTRATION:
+ return eInternalContainer().eInverseRemove(this, FcorePackage.ORCHESTRATION__ORCHESTRATION_PARAMETER_CONTAINER, Orchestration.class, msgs);
+ }
+ return super.eBasicRemoveFromContainerFeature(msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FcorePackage.ORCHESTRATION_PARAMETER_CONTAINER__ORCHESTRATION:
+ return getOrchestration();
+ case FcorePackage.ORCHESTRATION_PARAMETER_CONTAINER__ORCHESTRATION_PARAMETERS:
+ return getOrchestrationParameters();
+ }
+ 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 FcorePackage.ORCHESTRATION_PARAMETER_CONTAINER__ORCHESTRATION:
+ setOrchestration((Orchestration) newValue);
+ return;
+ case FcorePackage.ORCHESTRATION_PARAMETER_CONTAINER__ORCHESTRATION_PARAMETERS:
+ getOrchestrationParameters().clear();
+ getOrchestrationParameters().addAll((Collection<? extends OrchestrationParameter>) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FcorePackage.ORCHESTRATION_PARAMETER_CONTAINER__ORCHESTRATION:
+ setOrchestration((Orchestration) null);
+ return;
+ case FcorePackage.ORCHESTRATION_PARAMETER_CONTAINER__ORCHESTRATION_PARAMETERS:
+ getOrchestrationParameters().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FcorePackage.ORCHESTRATION_PARAMETER_CONTAINER__ORCHESTRATION:
+ return getOrchestration() != null;
+ case FcorePackage.ORCHESTRATION_PARAMETER_CONTAINER__ORCHESTRATION_PARAMETERS:
+ return orchestrationParameters != null && !orchestrationParameters.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // OrchestrationParameterContainerImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/OrchestrationParameterImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/OrchestrationParameterImpl.java
new file mode 100644
index 0000000..cb8ab75
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/OrchestrationParameterImpl.java
@@ -0,0 +1,346 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.impl;
+
+import java.util.Collection;
+
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.model.fcore.Orchestration;
+import org.eclipse.egf.model.fcore.OrchestrationParameter;
+import org.eclipse.egf.model.fcore.OrchestrationParameterContainer;
+import org.eclipse.egf.model.types.Type;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectWithInverseEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Orchestration Parameter</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.fcore.impl.OrchestrationParameterImpl#getOrchestrationParameterContainer <em>Orchestration Parameter Container</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.impl.OrchestrationParameterImpl#getInvocationContracts <em>Invocation Contracts</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.impl.OrchestrationParameterImpl#getType <em>Type</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class OrchestrationParameterImpl extends NamedModelElementImpl implements OrchestrationParameter {
+ /**
+ * The cached value of the '{@link #getInvocationContracts() <em>Invocation Contracts</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getInvocationContracts()
+ * @generated
+ * @ordered
+ */
+ protected EList<InvocationContract> invocationContracts;
+
+ /**
+ * The cached value of the '{@link #getType() <em>Type</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getType()
+ * @generated
+ * @ordered
+ */
+ protected Type type;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected OrchestrationParameterImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FcorePackage.Literals.ORCHESTRATION_PARAMETER;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public OrchestrationParameterContainer getOrchestrationParameterContainer() {
+ if (eContainerFeatureID() != FcorePackage.ORCHESTRATION_PARAMETER__ORCHESTRATION_PARAMETER_CONTAINER)
+ return null;
+ return (OrchestrationParameterContainer) eContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetOrchestrationParameterContainer(OrchestrationParameterContainer newOrchestrationParameterContainer, NotificationChain msgs) {
+ msgs = eBasicSetContainer((InternalEObject) newOrchestrationParameterContainer, FcorePackage.ORCHESTRATION_PARAMETER__ORCHESTRATION_PARAMETER_CONTAINER, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setOrchestrationParameterContainer(OrchestrationParameterContainer newOrchestrationParameterContainer) {
+ if (newOrchestrationParameterContainer != eInternalContainer() || (eContainerFeatureID() != FcorePackage.ORCHESTRATION_PARAMETER__ORCHESTRATION_PARAMETER_CONTAINER && newOrchestrationParameterContainer != null)) {
+ if (EcoreUtil.isAncestor(this, newOrchestrationParameterContainer))
+ throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); //$NON-NLS-1$
+ NotificationChain msgs = null;
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ if (newOrchestrationParameterContainer != null)
+ msgs = ((InternalEObject) newOrchestrationParameterContainer).eInverseAdd(this, FcorePackage.ORCHESTRATION_PARAMETER_CONTAINER__ORCHESTRATION_PARAMETERS, OrchestrationParameterContainer.class, msgs);
+ msgs = basicSetOrchestrationParameterContainer(newOrchestrationParameterContainer, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ } else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FcorePackage.ORCHESTRATION_PARAMETER__ORCHESTRATION_PARAMETER_CONTAINER, newOrchestrationParameterContainer, newOrchestrationParameterContainer));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<InvocationContract> getInvocationContracts() {
+ if (invocationContracts == null) {
+ invocationContracts = new EObjectWithInverseEList<InvocationContract>(InvocationContract.class, this, FcorePackage.ORCHESTRATION_PARAMETER__INVOCATION_CONTRACTS, FcorePackage.INVOCATION_CONTRACT__ORCHESTRATION_PARAMETER);
+ }
+ return invocationContracts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Type getType() {
+ return type;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetType(Type newType, NotificationChain msgs) {
+ Type oldType = type;
+ type = newType;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FcorePackage.ORCHESTRATION_PARAMETER__TYPE, oldType, newType);
+ if (msgs == null)
+ msgs = notification;
+ else
+ msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setType(Type newType) {
+ if (newType != type) {
+ NotificationChain msgs = null;
+ if (type != null)
+ msgs = ((InternalEObject) type).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FcorePackage.ORCHESTRATION_PARAMETER__TYPE, null, msgs);
+ if (newType != null)
+ msgs = ((InternalEObject) newType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FcorePackage.ORCHESTRATION_PARAMETER__TYPE, null, msgs);
+ msgs = basicSetType(newType, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ } else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FcorePackage.ORCHESTRATION_PARAMETER__TYPE, newType, newType));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public FactoryComponent getFactoryComponent() {
+ if (getOrchestration() != null) {
+ return getOrchestration().getFactoryComponent();
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public Orchestration getOrchestration() {
+ if (getOrchestrationParameterContainer() != null) {
+ return getOrchestrationParameterContainer().getOrchestration();
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FcorePackage.ORCHESTRATION_PARAMETER__ORCHESTRATION_PARAMETER_CONTAINER:
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ return basicSetOrchestrationParameterContainer((OrchestrationParameterContainer) otherEnd, msgs);
+ case FcorePackage.ORCHESTRATION_PARAMETER__INVOCATION_CONTRACTS:
+ return ((InternalEList<InternalEObject>) (InternalEList<?>) getInvocationContracts()).basicAdd(otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FcorePackage.ORCHESTRATION_PARAMETER__ORCHESTRATION_PARAMETER_CONTAINER:
+ return basicSetOrchestrationParameterContainer(null, msgs);
+ case FcorePackage.ORCHESTRATION_PARAMETER__INVOCATION_CONTRACTS:
+ return ((InternalEList<?>) getInvocationContracts()).basicRemove(otherEnd, msgs);
+ case FcorePackage.ORCHESTRATION_PARAMETER__TYPE:
+ return basicSetType(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
+ switch (eContainerFeatureID()) {
+ case FcorePackage.ORCHESTRATION_PARAMETER__ORCHESTRATION_PARAMETER_CONTAINER:
+ return eInternalContainer().eInverseRemove(this, FcorePackage.ORCHESTRATION_PARAMETER_CONTAINER__ORCHESTRATION_PARAMETERS, OrchestrationParameterContainer.class, msgs);
+ }
+ return super.eBasicRemoveFromContainerFeature(msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FcorePackage.ORCHESTRATION_PARAMETER__ORCHESTRATION_PARAMETER_CONTAINER:
+ return getOrchestrationParameterContainer();
+ case FcorePackage.ORCHESTRATION_PARAMETER__INVOCATION_CONTRACTS:
+ return getInvocationContracts();
+ case FcorePackage.ORCHESTRATION_PARAMETER__TYPE:
+ return getType();
+ }
+ 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 FcorePackage.ORCHESTRATION_PARAMETER__ORCHESTRATION_PARAMETER_CONTAINER:
+ setOrchestrationParameterContainer((OrchestrationParameterContainer) newValue);
+ return;
+ case FcorePackage.ORCHESTRATION_PARAMETER__INVOCATION_CONTRACTS:
+ getInvocationContracts().clear();
+ getInvocationContracts().addAll((Collection<? extends InvocationContract>) newValue);
+ return;
+ case FcorePackage.ORCHESTRATION_PARAMETER__TYPE:
+ setType((Type) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FcorePackage.ORCHESTRATION_PARAMETER__ORCHESTRATION_PARAMETER_CONTAINER:
+ setOrchestrationParameterContainer((OrchestrationParameterContainer) null);
+ return;
+ case FcorePackage.ORCHESTRATION_PARAMETER__INVOCATION_CONTRACTS:
+ getInvocationContracts().clear();
+ return;
+ case FcorePackage.ORCHESTRATION_PARAMETER__TYPE:
+ setType((Type) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FcorePackage.ORCHESTRATION_PARAMETER__ORCHESTRATION_PARAMETER_CONTAINER:
+ return getOrchestrationParameterContainer() != null;
+ case FcorePackage.ORCHESTRATION_PARAMETER__INVOCATION_CONTRACTS:
+ return invocationContracts != null && !invocationContracts.isEmpty();
+ case FcorePackage.ORCHESTRATION_PARAMETER__TYPE:
+ return type != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // OrchestrationParameterImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/ViewpointContainerImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/ViewpointContainerImpl.java
new file mode 100644
index 0000000..83b0923
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/ViewpointContainerImpl.java
@@ -0,0 +1,263 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.impl;
+
+import java.util.Collection;
+
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.Viewpoint;
+import org.eclipse.egf.model.fcore.ViewpointContainer;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Viewpoint Container</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.fcore.impl.ViewpointContainerImpl#getFactoryComponent <em>Factory Component</em>}</li>
+ * <li>{@link org.eclipse.egf.model.fcore.impl.ViewpointContainerImpl#getViewpoints <em>Viewpoints</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ViewpointContainerImpl extends ModelElementImpl implements ViewpointContainer {
+ /**
+ * The cached value of the '{@link #getViewpoints() <em>Viewpoints</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getViewpoints()
+ * @generated
+ * @ordered
+ */
+ protected EList<Viewpoint> viewpoints;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ViewpointContainerImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FcorePackage.Literals.VIEWPOINT_CONTAINER;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FactoryComponent getFactoryComponent() {
+ if (eContainerFeatureID() != FcorePackage.VIEWPOINT_CONTAINER__FACTORY_COMPONENT)
+ return null;
+ return (FactoryComponent) eContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetFactoryComponent(FactoryComponent newFactoryComponent, NotificationChain msgs) {
+ msgs = eBasicSetContainer((InternalEObject) newFactoryComponent, FcorePackage.VIEWPOINT_CONTAINER__FACTORY_COMPONENT, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setFactoryComponent(FactoryComponent newFactoryComponent) {
+ if (newFactoryComponent != eInternalContainer() || (eContainerFeatureID() != FcorePackage.VIEWPOINT_CONTAINER__FACTORY_COMPONENT && newFactoryComponent != null)) {
+ if (EcoreUtil.isAncestor(this, newFactoryComponent))
+ throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); //$NON-NLS-1$
+ NotificationChain msgs = null;
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ if (newFactoryComponent != null)
+ msgs = ((InternalEObject) newFactoryComponent).eInverseAdd(this, FcorePackage.FACTORY_COMPONENT__VIEWPOINT_CONTAINER, FactoryComponent.class, msgs);
+ msgs = basicSetFactoryComponent(newFactoryComponent, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ } else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FcorePackage.VIEWPOINT_CONTAINER__FACTORY_COMPONENT, newFactoryComponent, newFactoryComponent));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Viewpoint> getViewpoints() {
+ if (viewpoints == null) {
+ viewpoints = new EObjectContainmentWithInverseEList<Viewpoint>(Viewpoint.class, this, FcorePackage.VIEWPOINT_CONTAINER__VIEWPOINTS, FcorePackage.VIEWPOINT__VIEWPOINT_CONTAINER);
+ }
+ return viewpoints;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public Viewpoint getViewpoint(Class<?> clazz) {
+ for (Viewpoint viewpoint : getViewpoints()) {
+ if (clazz.isInstance(viewpoint)) {
+ return viewpoint;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FcorePackage.VIEWPOINT_CONTAINER__FACTORY_COMPONENT:
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ return basicSetFactoryComponent((FactoryComponent) otherEnd, msgs);
+ case FcorePackage.VIEWPOINT_CONTAINER__VIEWPOINTS:
+ return ((InternalEList<InternalEObject>) (InternalEList<?>) getViewpoints()).basicAdd(otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FcorePackage.VIEWPOINT_CONTAINER__FACTORY_COMPONENT:
+ return basicSetFactoryComponent(null, msgs);
+ case FcorePackage.VIEWPOINT_CONTAINER__VIEWPOINTS:
+ return ((InternalEList<?>) getViewpoints()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
+ switch (eContainerFeatureID()) {
+ case FcorePackage.VIEWPOINT_CONTAINER__FACTORY_COMPONENT:
+ return eInternalContainer().eInverseRemove(this, FcorePackage.FACTORY_COMPONENT__VIEWPOINT_CONTAINER, FactoryComponent.class, msgs);
+ }
+ return super.eBasicRemoveFromContainerFeature(msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FcorePackage.VIEWPOINT_CONTAINER__FACTORY_COMPONENT:
+ return getFactoryComponent();
+ case FcorePackage.VIEWPOINT_CONTAINER__VIEWPOINTS:
+ return getViewpoints();
+ }
+ 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 FcorePackage.VIEWPOINT_CONTAINER__FACTORY_COMPONENT:
+ setFactoryComponent((FactoryComponent) newValue);
+ return;
+ case FcorePackage.VIEWPOINT_CONTAINER__VIEWPOINTS:
+ getViewpoints().clear();
+ getViewpoints().addAll((Collection<? extends Viewpoint>) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FcorePackage.VIEWPOINT_CONTAINER__FACTORY_COMPONENT:
+ setFactoryComponent((FactoryComponent) null);
+ return;
+ case FcorePackage.VIEWPOINT_CONTAINER__VIEWPOINTS:
+ getViewpoints().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FcorePackage.VIEWPOINT_CONTAINER__FACTORY_COMPONENT:
+ return getFactoryComponent() != null;
+ case FcorePackage.VIEWPOINT_CONTAINER__VIEWPOINTS:
+ return viewpoints != null && !viewpoints.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // ViewpointContainerImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/ViewpointImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/ViewpointImpl.java
new file mode 100644
index 0000000..f92abc9
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/impl/ViewpointImpl.java
@@ -0,0 +1,202 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.impl;
+
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.Viewpoint;
+import org.eclipse.egf.model.fcore.ViewpointContainer;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Viewpoint</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.fcore.impl.ViewpointImpl#getViewpointContainer <em>Viewpoint Container</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class ViewpointImpl extends ModelElementImpl implements Viewpoint {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ViewpointImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FcorePackage.Literals.VIEWPOINT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ViewpointContainer getViewpointContainer() {
+ if (eContainerFeatureID() != FcorePackage.VIEWPOINT__VIEWPOINT_CONTAINER)
+ return null;
+ return (ViewpointContainer) eContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetViewpointContainer(ViewpointContainer newViewpointContainer, NotificationChain msgs) {
+ msgs = eBasicSetContainer((InternalEObject) newViewpointContainer, FcorePackage.VIEWPOINT__VIEWPOINT_CONTAINER, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setViewpointContainer(ViewpointContainer newViewpointContainer) {
+ if (newViewpointContainer != eInternalContainer() || (eContainerFeatureID() != FcorePackage.VIEWPOINT__VIEWPOINT_CONTAINER && newViewpointContainer != null)) {
+ if (EcoreUtil.isAncestor(this, newViewpointContainer))
+ throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); //$NON-NLS-1$
+ NotificationChain msgs = null;
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ if (newViewpointContainer != null)
+ msgs = ((InternalEObject) newViewpointContainer).eInverseAdd(this, FcorePackage.VIEWPOINT_CONTAINER__VIEWPOINTS, ViewpointContainer.class, msgs);
+ msgs = basicSetViewpointContainer(newViewpointContainer, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ } else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FcorePackage.VIEWPOINT__VIEWPOINT_CONTAINER, newViewpointContainer, newViewpointContainer));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FcorePackage.VIEWPOINT__VIEWPOINT_CONTAINER:
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ return basicSetViewpointContainer((ViewpointContainer) otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FcorePackage.VIEWPOINT__VIEWPOINT_CONTAINER:
+ return basicSetViewpointContainer(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
+ switch (eContainerFeatureID()) {
+ case FcorePackage.VIEWPOINT__VIEWPOINT_CONTAINER:
+ return eInternalContainer().eInverseRemove(this, FcorePackage.VIEWPOINT_CONTAINER__VIEWPOINTS, ViewpointContainer.class, msgs);
+ }
+ return super.eBasicRemoveFromContainerFeature(msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FcorePackage.VIEWPOINT__VIEWPOINT_CONTAINER:
+ return getViewpointContainer();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case FcorePackage.VIEWPOINT__VIEWPOINT_CONTAINER:
+ setViewpointContainer((ViewpointContainer) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FcorePackage.VIEWPOINT__VIEWPOINT_CONTAINER:
+ setViewpointContainer((ViewpointContainer) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FcorePackage.VIEWPOINT__VIEWPOINT_CONTAINER:
+ return getViewpointContainer() != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // ViewpointImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/util/FcoreAdapterFactory.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/util/FcoreAdapterFactory.java
new file mode 100644
index 0000000..c8acc3f
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/util/FcoreAdapterFactory.java
@@ -0,0 +1,446 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.util;
+
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.Contract;
+import org.eclipse.egf.model.fcore.ContractContainer;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.FactoryComponentContract;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.model.fcore.InvocationContractContainer;
+import org.eclipse.egf.model.fcore.ModelElement;
+import org.eclipse.egf.model.fcore.NamedModelElement;
+import org.eclipse.egf.model.fcore.Orchestration;
+import org.eclipse.egf.model.fcore.OrchestrationParameter;
+import org.eclipse.egf.model.fcore.OrchestrationParameterContainer;
+import org.eclipse.egf.model.fcore.Viewpoint;
+import org.eclipse.egf.model.fcore.ViewpointContainer;
+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;
+
+/**
+ * <!-- 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.egf.model.fcore.FcorePackage
+ * @generated
+ */
+public class FcoreAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static FcorePackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public FcoreAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = FcorePackage.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 FcoreSwitch<Adapter> modelSwitch = new FcoreSwitch<Adapter>() {
+ @Override
+ public Adapter caseModelElement(ModelElement object) {
+ return createModelElementAdapter();
+ }
+
+ @Override
+ public Adapter caseNamedModelElement(NamedModelElement object) {
+ return createNamedModelElementAdapter();
+ }
+
+ @Override
+ public Adapter caseActivity(Activity object) {
+ return createActivityAdapter();
+ }
+
+ @Override
+ public Adapter caseContract(Contract object) {
+ return createContractAdapter();
+ }
+
+ @Override
+ public Adapter caseFactoryComponent(FactoryComponent object) {
+ return createFactoryComponentAdapter();
+ }
+
+ @Override
+ public Adapter caseContractContainer(ContractContainer object) {
+ return createContractContainerAdapter();
+ }
+
+ @Override
+ public Adapter caseFactoryComponentContract(FactoryComponentContract object) {
+ return createFactoryComponentContractAdapter();
+ }
+
+ @Override
+ public Adapter caseViewpointContainer(ViewpointContainer object) {
+ return createViewpointContainerAdapter();
+ }
+
+ @Override
+ public Adapter caseViewpoint(Viewpoint object) {
+ return createViewpointAdapter();
+ }
+
+ @Override
+ public Adapter caseOrchestration(Orchestration object) {
+ return createOrchestrationAdapter();
+ }
+
+ @Override
+ public Adapter caseOrchestrationParameterContainer(OrchestrationParameterContainer object) {
+ return createOrchestrationParameterContainerAdapter();
+ }
+
+ @Override
+ public Adapter caseOrchestrationParameter(OrchestrationParameter object) {
+ return createOrchestrationParameterAdapter();
+ }
+
+ @Override
+ public Adapter caseInvocation(Invocation object) {
+ return createInvocationAdapter();
+ }
+
+ @Override
+ public Adapter caseInvocationContractContainer(InvocationContractContainer object) {
+ return createInvocationContractContainerAdapter();
+ }
+
+ @Override
+ public Adapter caseInvocationContract(InvocationContract object) {
+ return createInvocationContractAdapter();
+ }
+
+ @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.egf.model.fcore.ModelElement <em>Model Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore
+ * cases;
+ * it's useful to ignore a case when inheritance will catch all the cases
+ * anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.egf.model.fcore.ModelElement
+ * @generated
+ */
+ public Adapter createModelElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fcore.NamedModelElement <em>Named Model Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.egf.model.fcore.NamedModelElement
+ * @generated
+ */
+ public Adapter createNamedModelElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fcore.Activity <em>Activity</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.egf.model.fcore.Activity
+ * @generated
+ */
+ public Adapter createActivityAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fcore.Contract <em>Contract</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.egf.model.fcore.Contract
+ * @generated
+ */
+ public Adapter createContractAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fcore.FactoryComponent <em>Factory Component</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.egf.model.fcore.FactoryComponent
+ * @generated
+ */
+ public Adapter createFactoryComponentAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fcore.ContractContainer <em>Contract Container</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.egf.model.fcore.ContractContainer
+ * @generated
+ */
+ public Adapter createContractContainerAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fcore.FactoryComponentContract <em>Factory Component Contract</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.egf.model.fcore.FactoryComponentContract
+ * @generated
+ */
+ public Adapter createFactoryComponentContractAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fcore.ViewpointContainer <em>Viewpoint Container</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.egf.model.fcore.ViewpointContainer
+ * @generated
+ */
+ public Adapter createViewpointContainerAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fcore.Viewpoint <em>Viewpoint</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.egf.model.fcore.Viewpoint
+ * @generated
+ */
+ public Adapter createViewpointAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fcore.Orchestration <em>Orchestration</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.egf.model.fcore.Orchestration
+ * @generated
+ */
+ public Adapter createOrchestrationAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fcore.OrchestrationParameterContainer <em>Orchestration Parameter Container</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.egf.model.fcore.OrchestrationParameterContainer
+ * @generated
+ */
+ public Adapter createOrchestrationParameterContainerAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fcore.OrchestrationParameter <em>Orchestration Parameter</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.egf.model.fcore.OrchestrationParameter
+ * @generated
+ */
+ public Adapter createOrchestrationParameterAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fcore.Invocation <em>Invocation</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.egf.model.fcore.Invocation
+ * @generated
+ */
+ public Adapter createInvocationAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fcore.InvocationContractContainer <em>Invocation Contract Container</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.egf.model.fcore.InvocationContractContainer
+ * @generated
+ */
+ public Adapter createInvocationContractContainerAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fcore.InvocationContract <em>Invocation Contract</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.egf.model.fcore.InvocationContract
+ * @generated
+ */
+ public Adapter createInvocationContractAdapter() {
+ 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;
+ }
+
+} // FcoreAdapterFactory
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/util/FcoreResourceFactoryImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/util/FcoreResourceFactoryImpl.java
new file mode 100644
index 0000000..1abb1d7
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/util/FcoreResourceFactoryImpl.java
@@ -0,0 +1,49 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.util;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource Factory</b> associated with the package.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.util.FcoreResourceImpl
+ * @generated
+ */
+public class FcoreResourceFactoryImpl extends ResourceFactoryImpl {
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FcoreResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ Resource result = new FcoreResourceImpl(uri);
+ return result;
+ }
+
+} // FcoreResourceFactoryImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/util/FcoreResourceImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/util/FcoreResourceImpl.java
new file mode 100644
index 0000000..86ba515
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/util/FcoreResourceImpl.java
@@ -0,0 +1,166 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.util;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.egf.model.uri.ModelSchemeAware;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.xmi.XMIResource;
+import org.eclipse.emf.ecore.xmi.XMLParserPool;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+import org.eclipse.emf.ecore.xmi.XMLSave.XMLTypeInfo;
+import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl;
+import org.eclipse.emf.ecore.xmi.impl.XMLParserPoolImpl;
+import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource </b> associated with the package.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.fcore.util.FcoreResourceFactoryImpl
+ * @generated
+ */
+public class FcoreResourceImpl extends XMIResourceImpl {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private List<Object> lookupTable = new ArrayList<Object>();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private XMLParserPool parserPool = new XMLParserPoolImpl();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private Map<Object, Object> nameToFeatureMap = new HashMap<Object, Object>();
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param uri the URI of the new resource.
+ * @generated
+ */
+ public FcoreResourceImpl(URI uri) {
+ super(uri);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean useIDAttributes() {
+ return false;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean useUUIDs() {
+ return true;
+ }
+
+ /**
+ * Called when the object is unloaded.
+ * This implementation
+ * {@link InternalEObject#eSetProxyURI sets} the object to be a proxy
+ * and clears the {@link #eAdapters adapters}.
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=292866
+ * Fix available in HEAD: 2.6.0.I200911020144
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void unloaded(InternalEObject internalEObject) {
+ // Ensure that an unresolved containment proxy's URI isn't reset.
+ //
+ if (!internalEObject.eIsProxy()) {
+ internalEObject.eSetProxyURI(uri.appendFragment(getURIFragment(internalEObject)));
+ }
+ internalEObject.eAdapters().clear();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void init() {
+ super.init();
+ setTrackingModification(true);
+ setEncoding("UTF-8"); //$NON-NLS-1$
+ setXMIVersion("2.1"); //$NON-NLS-1$
+ // Save Options
+ getDefaultSaveOptions().put(XMLResource.OPTION_DISABLE_NOTIFY, Boolean.TRUE);
+ getDefaultSaveOptions().put(XMLResource.OPTION_CONFIGURATION_CACHE, Boolean.TRUE);
+ getDefaultSaveOptions().put(XMLResource.OPTION_USE_CACHED_LOOKUP_TABLE, lookupTable);
+ getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ getDefaultSaveOptions().put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
+ getDefaultSaveOptions().put(XMLResource.OPTION_SAVE_TYPE_INFORMATION, new XMLTypeInfo() {
+ public boolean shouldSaveType(EClass objectType, EClassifier featureType, EStructuralFeature feature) {
+ return objectType != featureType && objectType != XMLTypePackage.Literals.ANY_TYPE;
+ }
+
+ public boolean shouldSaveType(EClass objectType, EClass featureType, EStructuralFeature feature) {
+ return objectType != featureType && objectType != XMLTypePackage.Literals.ANY_TYPE;
+ }
+ });
+ getDefaultSaveOptions().put(XMLResource.OPTION_LINE_WIDTH, new Integer(80));
+ // Avoid relative paths from workspace resources to plugin resources.
+ getDefaultSaveOptions().put(XMLResource.OPTION_URI_HANDLER, new ModelSchemeAware());
+ getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ getDefaultSaveOptions().put(XMIResource.OPTION_USE_XMI_TYPE, Boolean.TRUE);
+ // Load Options
+ getDefaultLoadOptions().put(XMLResource.OPTION_DISABLE_NOTIFY, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_DEFER_ATTACHMENT, Boolean.FALSE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_DEFER_IDREF_RESOLUTION, Boolean.FALSE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_DEPRECATED_METHODS, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_PARSER_POOL, parserPool);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_XML_NAME_TO_FEATURE_MAP, nameToFeatureMap);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ }
+
+} // FcoreResourceImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/util/FcoreSwitch.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/util/FcoreSwitch.java
new file mode 100644
index 0000000..35d592a
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/util/FcoreSwitch.java
@@ -0,0 +1,540 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.util;
+
+import java.util.List;
+
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.Contract;
+import org.eclipse.egf.model.fcore.ContractContainer;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.FactoryComponentContract;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.model.fcore.InvocationContractContainer;
+import org.eclipse.egf.model.fcore.ModelElement;
+import org.eclipse.egf.model.fcore.NamedModelElement;
+import org.eclipse.egf.model.fcore.Orchestration;
+import org.eclipse.egf.model.fcore.OrchestrationParameter;
+import org.eclipse.egf.model.fcore.OrchestrationParameterContainer;
+import org.eclipse.egf.model.fcore.Viewpoint;
+import org.eclipse.egf.model.fcore.ViewpointContainer;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- 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.egf.model.fcore.FcorePackage
+ * @generated
+ */
+public class FcoreSwitch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static FcorePackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public FcoreSwitch() {
+ if (modelPackage == null) {
+ modelPackage = FcorePackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * 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
+ */
+ public T doSwitch(EObject theEObject) {
+ return doSwitch(theEObject.eClass(), theEObject);
+ }
+
+ /**
+ * 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
+ */
+ @SuppressWarnings("all")
+ protected T doSwitch(EClass theEClass, EObject theEObject) {
+ if (theEClass.eContainer() == modelPackage) {
+ return doSwitch(theEClass.getClassifierID(), theEObject);
+ } else {
+ List<EClass> eSuperTypes = theEClass.getESuperTypes();
+ return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject);
+ }
+ }
+
+ /**
+ * 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
+ */
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case FcorePackage.MODEL_ELEMENT: {
+ ModelElement modelElement = (ModelElement) theEObject;
+ T result = caseModelElement(modelElement);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case FcorePackage.NAMED_MODEL_ELEMENT: {
+ NamedModelElement namedModelElement = (NamedModelElement) theEObject;
+ T result = caseNamedModelElement(namedModelElement);
+ if (result == null)
+ result = caseModelElement(namedModelElement);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case FcorePackage.ACTIVITY: {
+ Activity activity = (Activity) theEObject;
+ T result = caseActivity(activity);
+ if (result == null)
+ result = caseNamedModelElement(activity);
+ if (result == null)
+ result = caseModelElement(activity);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case FcorePackage.CONTRACT: {
+ Contract contract = (Contract) theEObject;
+ T result = caseContract(contract);
+ if (result == null)
+ result = caseNamedModelElement(contract);
+ if (result == null)
+ result = caseModelElement(contract);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case FcorePackage.FACTORY_COMPONENT: {
+ FactoryComponent factoryComponent = (FactoryComponent) theEObject;
+ T result = caseFactoryComponent(factoryComponent);
+ if (result == null)
+ result = caseActivity(factoryComponent);
+ if (result == null)
+ result = caseNamedModelElement(factoryComponent);
+ if (result == null)
+ result = caseModelElement(factoryComponent);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case FcorePackage.CONTRACT_CONTAINER: {
+ ContractContainer contractContainer = (ContractContainer) theEObject;
+ T result = caseContractContainer(contractContainer);
+ if (result == null)
+ result = caseModelElement(contractContainer);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case FcorePackage.FACTORY_COMPONENT_CONTRACT: {
+ FactoryComponentContract factoryComponentContract = (FactoryComponentContract) theEObject;
+ T result = caseFactoryComponentContract(factoryComponentContract);
+ if (result == null)
+ result = caseContract(factoryComponentContract);
+ if (result == null)
+ result = caseNamedModelElement(factoryComponentContract);
+ if (result == null)
+ result = caseModelElement(factoryComponentContract);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case FcorePackage.VIEWPOINT_CONTAINER: {
+ ViewpointContainer viewpointContainer = (ViewpointContainer) theEObject;
+ T result = caseViewpointContainer(viewpointContainer);
+ if (result == null)
+ result = caseModelElement(viewpointContainer);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case FcorePackage.VIEWPOINT: {
+ Viewpoint viewpoint = (Viewpoint) theEObject;
+ T result = caseViewpoint(viewpoint);
+ if (result == null)
+ result = caseModelElement(viewpoint);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case FcorePackage.ORCHESTRATION: {
+ Orchestration orchestration = (Orchestration) theEObject;
+ T result = caseOrchestration(orchestration);
+ if (result == null)
+ result = caseModelElement(orchestration);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case FcorePackage.ORCHESTRATION_PARAMETER_CONTAINER: {
+ OrchestrationParameterContainer orchestrationParameterContainer = (OrchestrationParameterContainer) theEObject;
+ T result = caseOrchestrationParameterContainer(orchestrationParameterContainer);
+ if (result == null)
+ result = caseModelElement(orchestrationParameterContainer);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case FcorePackage.ORCHESTRATION_PARAMETER: {
+ OrchestrationParameter orchestrationParameter = (OrchestrationParameter) theEObject;
+ T result = caseOrchestrationParameter(orchestrationParameter);
+ if (result == null)
+ result = caseNamedModelElement(orchestrationParameter);
+ if (result == null)
+ result = caseModelElement(orchestrationParameter);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case FcorePackage.INVOCATION: {
+ Invocation invocation = (Invocation) theEObject;
+ T result = caseInvocation(invocation);
+ if (result == null)
+ result = caseNamedModelElement(invocation);
+ if (result == null)
+ result = caseModelElement(invocation);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case FcorePackage.INVOCATION_CONTRACT_CONTAINER: {
+ InvocationContractContainer invocationContractContainer = (InvocationContractContainer) theEObject;
+ T result = caseInvocationContractContainer(invocationContractContainer);
+ if (result == null)
+ result = caseModelElement(invocationContractContainer);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case FcorePackage.INVOCATION_CONTRACT: {
+ InvocationContract invocationContract = (InvocationContract) theEObject;
+ T result = caseInvocationContract(invocationContract);
+ if (result == null)
+ result = caseModelElement(invocationContract);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ default:
+ return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Model Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Model Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseModelElement(ModelElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Named Model Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Named Model Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseNamedModelElement(NamedModelElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Activity</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>Activity</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseActivity(Activity object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Contract</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>Contract</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseContract(Contract object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Factory Component</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>Factory Component</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseFactoryComponent(FactoryComponent object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Contract Container</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>Contract Container</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseContractContainer(ContractContainer object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Factory Component Contract</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>Factory Component Contract</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseFactoryComponentContract(FactoryComponentContract object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Viewpoint Container</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>Viewpoint Container</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseViewpointContainer(ViewpointContainer object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Viewpoint</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>Viewpoint</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseViewpoint(Viewpoint object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Orchestration</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>Orchestration</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseOrchestration(Orchestration object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Orchestration Parameter Container</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>Orchestration Parameter Container</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseOrchestrationParameterContainer(OrchestrationParameterContainer object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Orchestration Parameter</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>Orchestration Parameter</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseOrchestrationParameter(OrchestrationParameter object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Invocation</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>Invocation</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseInvocation(Invocation object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Invocation Contract Container</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>Invocation Contract Container</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseInvocationContractContainer(InvocationContractContainer object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Invocation Contract</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>Invocation Contract</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseInvocationContract(InvocationContract 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
+ */
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} // FcoreSwitch
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/util/FcoreValidator.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/util/FcoreValidator.java
new file mode 100644
index 0000000..cd9780e
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/fcore/util/FcoreValidator.java
@@ -0,0 +1,1143 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.fcore.util;
+
+import java.util.Map;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.egf.common.helper.ClassHelper;
+import org.eclipse.egf.model.EGFModelPlugin;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.Contract;
+import org.eclipse.egf.model.fcore.ContractContainer;
+import org.eclipse.egf.model.fcore.ContractMode;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.FactoryComponentContract;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.model.fcore.InvocationContractContainer;
+import org.eclipse.egf.model.fcore.ModelElement;
+import org.eclipse.egf.model.fcore.NamedModelElement;
+import org.eclipse.egf.model.fcore.Orchestration;
+import org.eclipse.egf.model.fcore.OrchestrationParameter;
+import org.eclipse.egf.model.fcore.OrchestrationParameterContainer;
+import org.eclipse.egf.model.fcore.Viewpoint;
+import org.eclipse.egf.model.fcore.ViewpointContainer;
+import org.eclipse.egf.model.helper.ActivityCycleFinder;
+import org.eclipse.egf.model.types.Type;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.DiagnosticChain;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.util.EObjectValidator;
+import org.eclipse.emf.validation.model.EvaluationMode;
+import org.eclipse.emf.validation.model.IConstraintStatus;
+import org.eclipse.emf.validation.service.IBatchValidator;
+import org.eclipse.emf.validation.service.ModelValidationService;
+import org.eclipse.emf.validation.service.ITraversalStrategy.Recursive;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Validator</b> for the model.
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.egf.model.fcore.FcorePackage
+ * @generated
+ */
+public class FcoreValidator extends EObjectValidator {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ public static final FcoreValidator INSTANCE = new FcoreValidator();
+
+ /**
+ * A constant for the {@link org.eclipse.emf.common.util.Diagnostic#getSource() source} of diagnostic {@link org.eclipse.emf.common.util.Diagnostic#getCode() codes} from this package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.common.util.Diagnostic#getSource()
+ * @see org.eclipse.emf.common.util.Diagnostic#getCode()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ public static final String DIAGNOSTIC_SOURCE = "org.eclipse.egf.model.fcore"; //$NON-NLS-1$
+
+ /**
+ * A constant with a fixed name that can be used as the base value for additional hand written constants.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static final int GENERATED_DIAGNOSTIC_CODE_COUNT = 0;
+
+ /**
+ * A constant with a fixed name that can be used as the base value for additional hand written constants in a derived class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static final int DIAGNOSTIC_CODE_COUNT = GENERATED_DIAGNOSTIC_CODE_COUNT;
+
+ /**
+ * Model Validation Service interface for batch validation of EMF elements.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private final IBatchValidator batchValidator;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public FcoreValidator() {
+ super();
+ batchValidator = (IBatchValidator) ModelValidationService.getInstance().newValidator(EvaluationMode.BATCH);
+ batchValidator.setTraversalStrategy(new Recursive());
+ batchValidator.setIncludeLiveConstraints(true);
+ batchValidator.setReportSuccesses(false);
+ }
+
+ /**
+ * Returns the package of this validator switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EPackage getEPackage() {
+ return FcorePackage.eINSTANCE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean validate(EClass eClass, EObject eObject, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ IStatus status = Status.OK_STATUS;
+ // do whatever the basic EcoreValidator does
+ super.validate(eClass, eObject, diagnostics, context);
+ // no point in validating if we can't report results
+ if (diagnostics != null) {
+ // if EMF Mode Validation Service already covered the sub-tree,
+ // which it does for efficient computation and error reporting,
+ // then don't repeat (the Diagnostician does the recursion
+ // externally). If there is no context map, then we can't
+ // help it
+ if (hasProcessed(eObject, context) == false) {
+ status = batchValidator.validate(eObject, new NullProgressMonitor());
+ processed(eObject, context, status);
+ appendDiagnostics(status, diagnostics);
+ }
+ }
+ return status.isOK();
+ }
+
+ /**
+ * Calls <code>validateXXX</code> for the corresponding classifier of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean validate(int classifierID, Object value, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ switch (classifierID) {
+ case FcorePackage.MODEL_ELEMENT:
+ return validateModelElement((ModelElement) value, diagnostics, context);
+ case FcorePackage.NAMED_MODEL_ELEMENT:
+ return validateNamedModelElement((NamedModelElement) value, diagnostics, context);
+ case FcorePackage.ACTIVITY:
+ return validateActivity((Activity) value, diagnostics, context);
+ case FcorePackage.CONTRACT:
+ return validateContract((Contract) value, diagnostics, context);
+ case FcorePackage.FACTORY_COMPONENT:
+ return validateFactoryComponent((FactoryComponent) value, diagnostics, context);
+ case FcorePackage.CONTRACT_CONTAINER:
+ return validateContractContainer((ContractContainer) value, diagnostics, context);
+ case FcorePackage.FACTORY_COMPONENT_CONTRACT:
+ return validateFactoryComponentContract((FactoryComponentContract) value, diagnostics, context);
+ case FcorePackage.VIEWPOINT_CONTAINER:
+ return validateViewpointContainer((ViewpointContainer) value, diagnostics, context);
+ case FcorePackage.VIEWPOINT:
+ return validateViewpoint((Viewpoint) value, diagnostics, context);
+ case FcorePackage.ORCHESTRATION:
+ return validateOrchestration((Orchestration) value, diagnostics, context);
+ case FcorePackage.ORCHESTRATION_PARAMETER_CONTAINER:
+ return validateOrchestrationParameterContainer((OrchestrationParameterContainer) value, diagnostics, context);
+ case FcorePackage.ORCHESTRATION_PARAMETER:
+ return validateOrchestrationParameter((OrchestrationParameter) value, diagnostics, context);
+ case FcorePackage.INVOCATION:
+ return validateInvocation((Invocation) value, diagnostics, context);
+ case FcorePackage.INVOCATION_CONTRACT_CONTAINER:
+ return validateInvocationContractContainer((InvocationContractContainer) value, diagnostics, context);
+ case FcorePackage.INVOCATION_CONTRACT:
+ return validateInvocationContract((InvocationContract) value, diagnostics, context);
+ case FcorePackage.CONTRACT_MODE:
+ return validateContractMode((ContractMode) value, diagnostics, context);
+ default:
+ return true;
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateModelElement(ModelElement modelElement, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(modelElement, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateNamedModelElement(NamedModelElement namedModelElement, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(namedModelElement, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateActivity(Activity activity, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(activity, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(activity, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(activity, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(activity, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(activity, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(activity, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(activity, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateActivity_MandatoryName(activity, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateActivity_ActivityCycle(activity, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * Validates the MandatoryName constraint of '<em>Activity</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validateActivity_MandatoryName(Activity activity, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (activity.getName() == null || activity.getName().trim().length() == 0) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "MandatoryName", getObjectLabel(activity, context), "The attribute name is mandatory" }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { activity }, context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Validates the ActivityCycle constraint of '<em>Activity</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validateActivity_ActivityCycle(Activity activity, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ ActivityCycleFinder finder = new ActivityCycleFinder(activity);
+ ModelElement element = finder.getFirstRepetition();
+ if (element != null) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_GenericConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "ActivityCycle", getObjectLabel(element, context) }, //$NON-NLS-1$
+ new Object[] { element }, context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateContract(Contract contract, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(contract, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(contract, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(contract, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(contract, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(contract, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(contract, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(contract, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateContract_UniqueName(contract, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateContract_UselessMandatoryMode(contract, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateFactoryComponent(FactoryComponent factoryComponent, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(factoryComponent, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(factoryComponent, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(factoryComponent, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(factoryComponent, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(factoryComponent, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(factoryComponent, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(factoryComponent, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateActivity_MandatoryName(factoryComponent, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateActivity_ActivityCycle(factoryComponent, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateContractContainer(ContractContainer contractContainer, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(contractContainer, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(contractContainer, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(contractContainer, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(contractContainer, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(contractContainer, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(contractContainer, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(contractContainer, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateContractContainer_FactoryComponentContract(contractContainer, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * Validates the FactoryComponentContract constraint of '<em>Contract Container</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validateContractContainer_FactoryComponentContract(ContractContainer contractContainer, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (contractContainer.getActivity() == null || contractContainer.getActivity() instanceof FactoryComponent == false) {
+ return true;
+ }
+ boolean mismatch = false;
+ for (Contract contract : contractContainer.getContracts()) {
+ if (contract instanceof FactoryComponentContract == false) {
+ mismatch = true;
+ break;
+ }
+ }
+ if (mismatch) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "FactoryComponentContract", getObjectLabel(contractContainer, context), "This ContractContainer should only hold FactoryComponentContract" }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { contractContainer }, context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateFactoryComponentContract(FactoryComponentContract factoryComponentContract, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(factoryComponentContract, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(factoryComponentContract, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(factoryComponentContract, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(factoryComponentContract, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(factoryComponentContract, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(factoryComponentContract, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(factoryComponentContract, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateContract_UniqueName(factoryComponentContract, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateContract_UselessMandatoryMode(factoryComponentContract, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateFactoryComponentContract_UselessFactoryComponentContract(factoryComponentContract, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateFactoryComponentContract_OutModeIsRestricted(factoryComponentContract, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * Validates the UselessFactoryComponentContract constraint of '<em>Factory Component Contract</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validateFactoryComponentContract_UselessFactoryComponentContract(FactoryComponentContract factoryComponentContract, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (factoryComponentContract.getInvocationContracts() == null || factoryComponentContract.getInvocationContracts().size() == 0) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.WARNING, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "UselessFactoryComponentContract", getObjectLabel(factoryComponentContract, context), "This FactoryComponentContract is not used" }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { factoryComponentContract }, context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateViewpointContainer(ViewpointContainer viewpointContainer, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(viewpointContainer, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateViewpoint(Viewpoint viewpoint, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(viewpoint, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateOrchestration(Orchestration orchestration, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(orchestration, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateOrchestrationParameterContainer(OrchestrationParameterContainer orchestrationParameterContainer, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(orchestrationParameterContainer, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(orchestrationParameterContainer, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(orchestrationParameterContainer, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(orchestrationParameterContainer, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(orchestrationParameterContainer, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(orchestrationParameterContainer, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(orchestrationParameterContainer, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateOrchestrationParameterContainer_UselessOrchestrationParameterContainer(orchestrationParameterContainer, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateOrchestrationParameter(OrchestrationParameter orchestrationParameter, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(orchestrationParameter, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(orchestrationParameter, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(orchestrationParameter, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(orchestrationParameter, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(orchestrationParameter, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(orchestrationParameter, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(orchestrationParameter, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateOrchestrationParameter_UselessOrchestrationParameter(orchestrationParameter, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * Validates the UselessOrchestrationParameter constraint of '<em>Orchestration Parameter</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validateOrchestrationParameter_UselessOrchestrationParameter(OrchestrationParameter orchestrationParameter, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (orchestrationParameter.getInvocationContracts() == null || orchestrationParameter.getInvocationContracts().size() < 2) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.WARNING, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "UselessOrchestrationParameter", getObjectLabel(orchestrationParameter, context), "This OrchestrationParameter should be defined in an InvocationContract" }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { orchestrationParameter }, context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Validates the UselessOrchestrationParameterContainer constraint of '<em>Orchestration Parameter
+ * Container</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validateOrchestrationParameterContainer_UselessOrchestrationParameterContainer(OrchestrationParameterContainer orchestrationParameterContainer, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (orchestrationParameterContainer.getOrchestrationParameters() == null || orchestrationParameterContainer.getOrchestrationParameters().size() == 0) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.WARNING, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "UselessOrchestrationParameterContainer", getObjectLabel(orchestrationParameterContainer, context), "It should contain at least one InvocationParameter to be useful" }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { orchestrationParameterContainer }, context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateInvocation(Invocation invocation, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(invocation, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(invocation, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(invocation, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(invocation, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(invocation, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(invocation, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(invocation, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateInvocation_MandatoryInvokedContract(invocation, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * Validates the MandatoryInvokedContract constraint of '<em>Invocation</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validateInvocation_MandatoryInvokedContract(Invocation invocation, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (invocation.getInvokedActivity() == null || invocation.getInvokedActivity().getContracts() == null || invocation.getInvokedActivity().getContracts().size() == 0) {
+ return true;
+ }
+ for (Contract contract : invocation.getInvokedActivity().getContracts()) {
+ // Mandatory contract with a default value raise a warning
+ // see validateContract_UselessMandatoryMode
+ // as such this doesn't prevent any execution
+ // only mandatory contract with no default value should be declared at invocation level
+ if (contract.isMandatory() == false || contract.getType() == null || contract.getType().getValue() != null) {
+ continue;
+ }
+ boolean found = false;
+ if (invocation.getInvocationContracts() != null) {
+ for (InvocationContract invocationContract : invocation.getInvocationContracts()) {
+ if (contract.equals(invocationContract.getInvokedContract())) {
+ found = true;
+ break;
+ }
+ }
+ }
+ if (found == false) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "MandatoryInvokedContract", getObjectLabel(invocation, context), NLS.bind("Mandatory Contract ''{0}'' should be invoked", getObjectLabel(contract, context)) }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { invocation }, context));
+ }
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateInvocationContractContainer(InvocationContractContainer invocationContractContainer, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(invocationContractContainer, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateInvocationContract(InvocationContract invocationContract, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(invocationContract, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(invocationContract, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(invocationContract, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(invocationContract, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(invocationContract, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(invocationContract, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(invocationContract, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateInvocationContract_ValidInvokedContract(invocationContract, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateInvocationContract_ValidInvokedContractType(invocationContract, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateInvocationContract_ValidFactoryComponentContract(invocationContract, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateInvocationContract_ValidFactoryComponentContractType(invocationContract, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateInvocationContract_ValidOrchestrationParameter(invocationContract, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateInvocationContract_ValidOrchestrationParameterType(invocationContract, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateInvocationContract_ValidSourceInvocationContract(invocationContract, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateInvocationContract_ValidSourceInvocationContractType(invocationContract, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateInvocationContract_UselessTypeValue(invocationContract, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * Validates the ValidInvokedContract constraint of '<em>Invocation Contract</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validateInvocationContract_ValidInvokedContract(InvocationContract invocationContract, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (invocationContract.getInvokedContract() == null || invocationContract.getInvocation() == null || invocationContract.getInvocation().getInvokedActivity() == null) {
+ return true;
+ }
+ // Activity contract analysis
+ boolean found = false;
+ for (Contract contract : invocationContract.getInvocation().getInvokedActivity().getContracts()) {
+ if (contract == invocationContract.getInvokedContract()) {
+ found = true;
+ break;
+ }
+ }
+ if (found == false) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_GenericConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "ValidInvokedContract", getObjectLabel(invocationContract, context) }, //$NON-NLS-1$
+ new Object[] { invocationContract }, context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Validates the ValidInvokedContractType constraint of '<em>Invocation Contract</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validateInvocationContract_ValidInvokedContractType(InvocationContract invocationContract, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (invocationContract.getInvokedContract() == null || invocationContract.getInvokedContract().getType() == null || invocationContract.getType() == null) {
+ return true;
+ }
+ if (ClassHelper.asSubClass(invocationContract.getInvokedContract().getType().getType(), invocationContract.getType().getType()) == false) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "ValidInvokedContractType", getObjectLabel(invocationContract, context), "InvocationContract Type and Contract Type mismatch" }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { invocationContract }, context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Validates the ValidFactoryComponentContract constraint of '<em>Invocation Contract</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validateInvocationContract_ValidFactoryComponentContract(InvocationContract invocationContract, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (invocationContract.getFactoryComponentContract() == null || invocationContract.getInvokedMode() == null) {
+ return true;
+ }
+ if (invocationContract.getInvokedMode() == ContractMode.OUT) {
+ if (invocationContract.getFactoryComponentContract().getMode() == ContractMode.IN) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "ValidFactoryComponentContract", getObjectLabel(invocationContract, context), "InvocationContract in Out Mode couldn't be assigned to a FactoryComponentContract in In Mode" }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { invocationContract }, context));
+ }
+ return false;
+ }
+ } else if (invocationContract.getInvokedMode() == ContractMode.IN) {
+ if (invocationContract.getFactoryComponentContract().getMode() == ContractMode.OUT) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "ValidFactoryComponentContract", getObjectLabel(invocationContract, context), "InvocationContract in In Mode couldn't be assigned to a FactoryComponentContract in Out Mode" }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { invocationContract }, context));
+ }
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Validates the ValidFactoryComponentContractType constraint of '<em>Invocation Contract</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validateInvocationContract_ValidFactoryComponentContractType(InvocationContract invocationContract, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (invocationContract.getFactoryComponentContract() == null || invocationContract.getFactoryComponentContract().getType() == null) {
+ return true;
+ }
+ if (invocationContract.getInvokedContract() == null || invocationContract.getInvokedContract().getType() == null) {
+ return true;
+ }
+ Type type = invocationContract.getType();
+ if (type == null) {
+ type = invocationContract.getInvokedContract().getType();
+ }
+ if (ClassHelper.asSubClass(invocationContract.getFactoryComponentContract().getType().getType(), type.getType()) == false) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "ValidFactoryComponentContractType", getObjectLabel(invocationContract, context), "FactoryComponentContract Type is not a subtype of Invoked Contract Type" }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { invocationContract }, context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Validates the ValidOrchestrationParameter constraint of '<em>Invocation Contract</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validateInvocationContract_ValidOrchestrationParameter(InvocationContract invocationContract, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (invocationContract.getOrchestrationParameter() == null || invocationContract.getInvokedContract() == null) {
+ return true;
+ }
+ if (invocationContract.getInvokedContract().getMode() == ContractMode.OUT) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "ValidOrchestrationParameter", getObjectLabel(invocationContract, context), "InvocationContract in Out Mode couldn't be assigned to an OrchestrationParameter" }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { invocationContract }, context));
+ }
+ return false;
+ }
+ if (invocationContract.getSourceInvocationContract() != null) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "ValidOrchestrationParameter", getObjectLabel(invocationContract, context), "InvocationContract assigned to a SourceInvocationContract couldn't be assigned to an OrchestrationParameter" }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { invocationContract }, context));
+ }
+ return false;
+ }
+ if (invocationContract.getFactoryComponentContract() != null && invocationContract.getFactoryComponentContract().getMode() != ContractMode.OUT) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "ValidOrchestrationParameter", getObjectLabel(invocationContract, context), "FactoryComponentContract should be in Out Mode when an InvocationContract is either assigned to an OrchestrationParameter and a FactoryComponentContract" }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { invocationContract }, context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Validates the ValidOrchestrationParameterType constraint of '<em>Invocation Contract</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validateInvocationContract_ValidOrchestrationParameterType(InvocationContract invocationContract, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (invocationContract.getOrchestrationParameter() == null || invocationContract.getOrchestrationParameter().getType() == null || invocationContract.getInvokedContract() == null || invocationContract.getInvokedContract().getType() == null) {
+ return true;
+ }
+ Type type = invocationContract.getType();
+ if (type == null) {
+ type = invocationContract.getInvokedContract().getType();
+ }
+ if (ClassHelper.asSubClass(invocationContract.getOrchestrationParameter().getType().getType(), type.getType()) == false) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "ValidOrchestrationParameterType", getObjectLabel(invocationContract, context), "OrchestrationParameter Type is not a subtype of Invoked Contract Type" }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { invocationContract }, context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Validates the ValidSourceInvocationContract constraint of '<em>Invocation Contract</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validateInvocationContract_ValidSourceInvocationContract(InvocationContract invocationContract, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (invocationContract.getSourceInvocationContract() == null || invocationContract.getInvokedContract() == null) {
+ return true;
+ }
+ if (invocationContract.getInvokedContract().getMode() == ContractMode.OUT) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "ValidSourceInvocationContract", getObjectLabel(invocationContract, context), "InvocationContract in Out Mode couldn't be assigned to a SourceInvocationContract" }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { invocationContract }, context));
+ }
+ return false;
+ }
+ if (invocationContract.getFactoryComponentContract() != null && invocationContract.getFactoryComponentContract().getMode() != ContractMode.OUT) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "ValidSourceInvocationContract", getObjectLabel(invocationContract, context), "InvocationContract with a SourceInvocationContract couldn't be assigned to a FactoryComponentContract in In or In_Out Mode" }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { invocationContract }, context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Validates the ValidSourceInvocationContractType constraint of '<em>Invocation Contract</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validateInvocationContract_ValidSourceInvocationContractType(InvocationContract invocationContract, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (invocationContract.getSourceInvocationContract() == null || invocationContract.getSourceInvocationContract().getInvokedContract() == null || invocationContract.getSourceInvocationContract().getInvokedContract().getType() == null) {
+ return true;
+ }
+ Type sourceType = invocationContract.getSourceInvocationContract().getType();
+ if (sourceType == null) {
+ sourceType = invocationContract.getSourceInvocationContract().getInvokedContract().getType();
+ }
+ if (invocationContract.getInvokedContract() == null || invocationContract.getInvokedContract().getType() == null) {
+ return true;
+ }
+ Type type = invocationContract.getType();
+ if (type == null) {
+ type = invocationContract.getInvokedContract().getType();
+ }
+ if (ClassHelper.asSubClass(sourceType.getType(), type.getType()) == false) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "ValidSourceInvocationContractType", getObjectLabel(invocationContract, context), "InvocationContract Type and SourceInvocationContract Type mismatch" }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { invocationContract }, context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Validates the UselessTypeValue constraint of '<em>Invocation Contract</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validateInvocationContract_UselessTypeValue(InvocationContract invocationContract, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (invocationContract.getOrchestrationParameter() == null && invocationContract.getFactoryComponentContract() == null) {
+ return true;
+ }
+ boolean valid = true;
+ if (invocationContract.getInvokedMode() == ContractMode.IN_OUT) {
+ // Default value for IN_OUT apply either assigned OrchestrationParameter (for IN Mode)
+ // and FactoryComponentContract (for OUT Mode) but not both
+ if (invocationContract.getOrchestrationParameter() != null && invocationContract.getFactoryComponentContract() != null && invocationContract.getType() != null && invocationContract.getType().getValue() != null) {
+ valid = false;
+ }
+ } else if (invocationContract.getType() != null && invocationContract.getType().getValue() != null) {
+ valid = false;
+ }
+ if (valid == false) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.WARNING, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "UselessTypeValue", getObjectLabel(invocationContract, context), "InvocationContract is used in an OrchestrationParameter or a FactoryComponentContract, Value will be ignored" }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { invocationContract }, context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Validates the UniqueName constraint of '<em>Contract</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validateContract_UniqueName(Contract contract, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (contract.getName() == null) {
+ return true;
+ }
+ // Verify if name is unique in its contract container
+ boolean collapse = false;
+ for (Contract innerContract : contract.getContracts()) {
+ // Ignore ourself
+ if (innerContract == contract) {
+ continue;
+ }
+ // Ignore mutually exclusive conditions
+ if ((contract.getMode() == ContractMode.IN && innerContract.getMode() == ContractMode.OUT) || (contract.getMode() == ContractMode.OUT && innerContract.getMode() == ContractMode.IN)) {
+ continue;
+ }
+ // Collapse
+ if (contract.getName().equals(innerContract.getName())) {
+ collapse = true;
+ break;
+ }
+ }
+ if (collapse) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "UniqueName", getObjectLabel(contract, context), "Contract Name should be unique in its ContractContainer" }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { contract }, context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Validates the UselessMandatoryMode constraint of '<em>Contract</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validateContract_UselessMandatoryMode(Contract contract, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (contract.isMandatory() == false || contract.getType() == null || contract.getType().getValue() == null) {
+ return true;
+ }
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.WARNING, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "UselessMandatoryMode", getObjectLabel(contract, context), "A Mandatory Contract with a default value is always true" }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { contract }, context));
+ }
+ return false;
+ }
+
+ /**
+ * Validates the OutModeIsRestricted constraint of '<em>FactoryComponentContract</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validateFactoryComponentContract_OutModeIsRestricted(FactoryComponentContract factoryComponentContract, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (factoryComponentContract.getMode() == ContractMode.IN || factoryComponentContract.getInvocationContracts() == null) {
+ return true;
+ }
+ if (factoryComponentContract.getInvocationContracts().size() > 1) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "OutModeIsRestricted", getObjectLabel(factoryComponentContract, context), "Out or In_Out Contract Mode should have only one assigned InvocationContract" }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { factoryComponentContract }, context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateContractMode(ContractMode contractMode, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return true;
+ }
+
+ /**
+ * Returns the resource locator that will be used to fetch messages for this validator's diagnostics.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EGFModelPlugin.INSTANCE;
+ }
+
+ /**
+ * If we have a context map, record this object's <code>status</code> in it
+ * so that we will know later that we have processed it and its sub-tree.
+ *
+ * @param eObject
+ * an element that we have validated
+ * @param context
+ * the context (may be <code>null</code>)
+ * @param status
+ * the element's validation status
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private void processed(EObject eObject, Map<Object, Object> context, IStatus status) {
+ if (context != null) {
+ context.put(eObject, status);
+ }
+ }
+
+ /**
+ * Determines whether we have processed this <code>eObject</code> before,
+ * by automatic recursion of the EMF Model Validation Service. This is
+ * only possible if we do, indeed, have a context.
+ *
+ * @param eObject
+ * an element to be validated (we hope not)
+ * @param context
+ * the context (may be <code>null</code>)
+ * @return <code>true</code> if the context is not <code>null</code> and
+ * the <code>eObject</code> or one of its containers has already been
+ * validated; <code>false</code>, otherwise
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean hasProcessed(EObject eObject, Map<Object, Object> context) {
+ boolean result = false;
+ if (context != null) {
+ // this is O(NlogN) but there's no helping it
+ while (eObject != null) {
+ if (context.containsKey(eObject)) {
+ result = true;
+ eObject = null;
+ } else {
+ eObject = eObject.eContainer();
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Converts a status result from the EMF validation service to diagnostics.
+ *
+ * @param status
+ * the EMF validation service's status result
+ * @param diagnostics
+ * a diagnostic chain to accumulate results on
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private void appendDiagnostics(IStatus status, DiagnosticChain diagnostics) {
+ if (status.isMultiStatus()) {
+ IStatus[] children = status.getChildren();
+ for (int i = 0; i < children.length; i++) {
+ appendDiagnostics(children[i], diagnostics);
+ }
+ } else if (status instanceof IConstraintStatus) {
+ diagnostics.add(new BasicDiagnostic(status.getSeverity(), status.getPlugin(), status.getCode(), status.getMessage(), ((IConstraintStatus) status).getResultLocus().toArray()));
+ }
+ }
+} // FcoreValidator
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/Mapping.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/Mapping.java
new file mode 100644
index 0000000..b0b959e
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/Mapping.java
@@ -0,0 +1,28 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.mapping;
+
+import org.eclipse.egf.model.fcore.NamedModelElement;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Mapping</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.egf.model.mapping.MappingPackage#getMapping()
+ * @model abstract="true"
+ * @generated
+ */
+public interface Mapping extends NamedModelElement {
+} // Mapping
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/MappingDomain.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/MappingDomain.java
new file mode 100644
index 0000000..0331651
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/MappingDomain.java
@@ -0,0 +1,87 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.mapping;
+
+import org.eclipse.egf.model.domain.Domain;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Domain</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.mapping.MappingDomain#getSource <em>Source</em>}</li>
+ * <li>{@link org.eclipse.egf.model.mapping.MappingDomain#getTarget <em>Target</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.mapping.MappingPackage#getMappingDomain()
+ * @model
+ * @generated
+ */
+public interface MappingDomain extends Mapping {
+ /**
+ * Returns the value of the '<em><b>Source</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Source</em>' reference isn't clear, there really
+ * should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Source</em>' reference.
+ * @see #setSource(Domain)
+ * @see org.eclipse.egf.model.mapping.MappingPackage#getMappingDomain_Source()
+ * @model resolveProxies="false" required="true"
+ * @generated
+ */
+ Domain getSource();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.mapping.MappingDomain#getSource <em>Source</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Source</em>' reference.
+ * @see #getSource()
+ * @generated
+ */
+ void setSource(Domain value);
+
+ /**
+ * Returns the value of the '<em><b>Target</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Target</em>' reference isn't clear, there really
+ * should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Target</em>' reference.
+ * @see #setTarget(Domain)
+ * @see org.eclipse.egf.model.mapping.MappingPackage#getMappingDomain_Target()
+ * @model resolveProxies="false" required="true"
+ * @generated
+ */
+ Domain getTarget();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.mapping.MappingDomain#getTarget <em>Target</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Target</em>' reference.
+ * @see #getTarget()
+ * @generated
+ */
+ void setTarget(Domain value);
+
+} // MappingDomain
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/MappingFactory.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/MappingFactory.java
new file mode 100644
index 0000000..6d17198
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/MappingFactory.java
@@ -0,0 +1,61 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.mapping;
+
+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.egf.model.mapping.MappingPackage
+ * @generated
+ */
+public interface MappingFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ MappingFactory eINSTANCE = org.eclipse.egf.model.mapping.impl.MappingFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Viewpoint</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Viewpoint</em>'.
+ * @generated
+ */
+ MappingViewpoint createMappingViewpoint();
+
+ /**
+ * Returns a new object of class '<em>Domain</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Domain</em>'.
+ * @generated
+ */
+ MappingDomain createMappingDomain();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ MappingPackage getMappingPackage();
+
+} // MappingFactory
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/MappingPackage.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/MappingPackage.java
new file mode 100644
index 0000000..a2f1125
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/MappingPackage.java
@@ -0,0 +1,380 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.mapping;
+
+import org.eclipse.egf.model.fcore.FcorePackage;
+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 enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.mapping.MappingFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface MappingPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "mapping"; //$NON-NLS-1$
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/egf/1.0.0/mapping"; //$NON-NLS-1$
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "mapping"; //$NON-NLS-1$
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ MappingPackage eINSTANCE = org.eclipse.egf.model.mapping.impl.MappingPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.mapping.impl.MappingViewpointImpl <em>Viewpoint</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.mapping.impl.MappingViewpointImpl
+ * @see org.eclipse.egf.model.mapping.impl.MappingPackageImpl#getMappingViewpoint()
+ * @generated
+ */
+ int MAPPING_VIEWPOINT = 0;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MAPPING_VIEWPOINT__ID = FcorePackage.VIEWPOINT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MAPPING_VIEWPOINT__DESCRIPTION = FcorePackage.VIEWPOINT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Viewpoint Container</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MAPPING_VIEWPOINT__VIEWPOINT_CONTAINER = FcorePackage.VIEWPOINT__VIEWPOINT_CONTAINER;
+
+ /**
+ * The feature id for the '<em><b>Mappings</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MAPPING_VIEWPOINT__MAPPINGS = FcorePackage.VIEWPOINT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Viewpoint</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MAPPING_VIEWPOINT_FEATURE_COUNT = FcorePackage.VIEWPOINT_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.mapping.impl.MappingImpl <em>Mapping</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.mapping.impl.MappingImpl
+ * @see org.eclipse.egf.model.mapping.impl.MappingPackageImpl#getMapping()
+ * @generated
+ */
+ int MAPPING = 1;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MAPPING__ID = FcorePackage.NAMED_MODEL_ELEMENT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MAPPING__DESCRIPTION = FcorePackage.NAMED_MODEL_ELEMENT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MAPPING__NAME = FcorePackage.NAMED_MODEL_ELEMENT__NAME;
+
+ /**
+ * The number of structural features of the '<em>Mapping</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MAPPING_FEATURE_COUNT = FcorePackage.NAMED_MODEL_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.mapping.impl.MappingDomainImpl <em>Domain</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.mapping.impl.MappingDomainImpl
+ * @see org.eclipse.egf.model.mapping.impl.MappingPackageImpl#getMappingDomain()
+ * @generated
+ */
+ int MAPPING_DOMAIN = 2;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MAPPING_DOMAIN__ID = MAPPING__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MAPPING_DOMAIN__DESCRIPTION = MAPPING__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MAPPING_DOMAIN__NAME = MAPPING__NAME;
+
+ /**
+ * The feature id for the '<em><b>Source</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MAPPING_DOMAIN__SOURCE = MAPPING_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Target</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MAPPING_DOMAIN__TARGET = MAPPING_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Domain</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MAPPING_DOMAIN_FEATURE_COUNT = MAPPING_FEATURE_COUNT + 2;
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.mapping.MappingViewpoint <em>Viewpoint</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Viewpoint</em>'.
+ * @see org.eclipse.egf.model.mapping.MappingViewpoint
+ * @generated
+ */
+ EClass getMappingViewpoint();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.egf.model.mapping.MappingViewpoint#getMappings <em>Mappings</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Mappings</em>'.
+ * @see org.eclipse.egf.model.mapping.MappingViewpoint#getMappings()
+ * @see #getMappingViewpoint()
+ * @generated
+ */
+ EReference getMappingViewpoint_Mappings();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.mapping.Mapping <em>Mapping</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Mapping</em>'.
+ * @see org.eclipse.egf.model.mapping.Mapping
+ * @generated
+ */
+ EClass getMapping();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.mapping.MappingDomain <em>Domain</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Domain</em>'.
+ * @see org.eclipse.egf.model.mapping.MappingDomain
+ * @generated
+ */
+ EClass getMappingDomain();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.egf.model.mapping.MappingDomain#getSource <em>Source</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Source</em>'.
+ * @see org.eclipse.egf.model.mapping.MappingDomain#getSource()
+ * @see #getMappingDomain()
+ * @generated
+ */
+ EReference getMappingDomain_Source();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.egf.model.mapping.MappingDomain#getTarget <em>Target</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Target</em>'.
+ * @see org.eclipse.egf.model.mapping.MappingDomain#getTarget()
+ * @see #getMappingDomain()
+ * @generated
+ */
+ EReference getMappingDomain_Target();
+
+ /**
+ * 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
+ */
+ MappingFactory getMappingFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.mapping.impl.MappingViewpointImpl <em>Viewpoint</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.mapping.impl.MappingViewpointImpl
+ * @see org.eclipse.egf.model.mapping.impl.MappingPackageImpl#getMappingViewpoint()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass MAPPING_VIEWPOINT = eINSTANCE.getMappingViewpoint();
+
+ /**
+ * The meta object literal for the '<em><b>Mappings</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference MAPPING_VIEWPOINT__MAPPINGS = eINSTANCE.getMappingViewpoint_Mappings();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.mapping.impl.MappingImpl <em>Mapping</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.mapping.impl.MappingImpl
+ * @see org.eclipse.egf.model.mapping.impl.MappingPackageImpl#getMapping()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass MAPPING = eINSTANCE.getMapping();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.mapping.impl.MappingDomainImpl <em>Domain</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.mapping.impl.MappingDomainImpl
+ * @see org.eclipse.egf.model.mapping.impl.MappingPackageImpl#getMappingDomain()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass MAPPING_DOMAIN = eINSTANCE.getMappingDomain();
+
+ /**
+ * The meta object literal for the '<em><b>Source</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference MAPPING_DOMAIN__SOURCE = eINSTANCE.getMappingDomain_Source();
+
+ /**
+ * The meta object literal for the '<em><b>Target</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference MAPPING_DOMAIN__TARGET = eINSTANCE.getMappingDomain_Target();
+
+ }
+
+} // MappingPackage
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/MappingViewpoint.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/MappingViewpoint.java
new file mode 100644
index 0000000..b3af0b4
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/MappingViewpoint.java
@@ -0,0 +1,51 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.mapping;
+
+import org.eclipse.egf.model.fcore.Viewpoint;
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Viewpoint</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.mapping.MappingViewpoint#getMappings <em>Mappings</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.mapping.MappingPackage#getMappingViewpoint()
+ * @model
+ * @generated
+ */
+public interface MappingViewpoint extends Viewpoint {
+ /**
+ * Returns the value of the '<em><b>Mappings</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.egf.model.mapping.MappingDomain}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Mappings</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>Mappings</em>' containment reference list.
+ * @see org.eclipse.egf.model.mapping.MappingPackage#getMappingViewpoint_Mappings()
+ * @model containment="true"
+ * @generated
+ */
+ EList<MappingDomain> getMappings();
+
+} // MappingViewpoint
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/impl/MappingDomainImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/impl/MappingDomainImpl.java
new file mode 100644
index 0000000..c7e77c6
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/impl/MappingDomainImpl.java
@@ -0,0 +1,186 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.mapping.impl;
+
+import org.eclipse.egf.model.domain.Domain;
+import org.eclipse.egf.model.mapping.MappingDomain;
+import org.eclipse.egf.model.mapping.MappingPackage;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Domain</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.mapping.impl.MappingDomainImpl#getSource <em>Source</em>}</li>
+ * <li>{@link org.eclipse.egf.model.mapping.impl.MappingDomainImpl#getTarget <em>Target</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class MappingDomainImpl extends MappingImpl implements MappingDomain {
+ /**
+ * The cached value of the '{@link #getSource() <em>Source</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSource()
+ * @generated
+ * @ordered
+ */
+ protected Domain source;
+
+ /**
+ * The cached value of the '{@link #getTarget() <em>Target</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTarget()
+ * @generated
+ * @ordered
+ */
+ protected Domain target;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected MappingDomainImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return MappingPackage.Literals.MAPPING_DOMAIN;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Domain getSource() {
+ return source;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSource(Domain newSource) {
+ Domain oldSource = source;
+ source = newSource;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, MappingPackage.MAPPING_DOMAIN__SOURCE, oldSource, source));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Domain getTarget() {
+ return target;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setTarget(Domain newTarget) {
+ Domain oldTarget = target;
+ target = newTarget;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, MappingPackage.MAPPING_DOMAIN__TARGET, oldTarget, target));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case MappingPackage.MAPPING_DOMAIN__SOURCE:
+ return getSource();
+ case MappingPackage.MAPPING_DOMAIN__TARGET:
+ return getTarget();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case MappingPackage.MAPPING_DOMAIN__SOURCE:
+ setSource((Domain) newValue);
+ return;
+ case MappingPackage.MAPPING_DOMAIN__TARGET:
+ setTarget((Domain) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case MappingPackage.MAPPING_DOMAIN__SOURCE:
+ setSource((Domain) null);
+ return;
+ case MappingPackage.MAPPING_DOMAIN__TARGET:
+ setTarget((Domain) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case MappingPackage.MAPPING_DOMAIN__SOURCE:
+ return source != null;
+ case MappingPackage.MAPPING_DOMAIN__TARGET:
+ return target != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // MappingDomainImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/impl/MappingFactoryImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/impl/MappingFactoryImpl.java
new file mode 100644
index 0000000..c871291
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/impl/MappingFactoryImpl.java
@@ -0,0 +1,125 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.mapping.impl;
+
+import org.eclipse.egf.model.mapping.MappingDomain;
+import org.eclipse.egf.model.mapping.MappingFactory;
+import org.eclipse.egf.model.mapping.MappingPackage;
+import org.eclipse.egf.model.mapping.MappingViewpoint;
+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;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class MappingFactoryImpl extends EFactoryImpl implements MappingFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static MappingFactory init() {
+ try {
+ MappingFactory theMappingFactory = (MappingFactory) EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/egf/1.0.0/mapping"); //$NON-NLS-1$
+ if (theMappingFactory != null) {
+ return theMappingFactory;
+ }
+ } catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new MappingFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public MappingFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case MappingPackage.MAPPING_VIEWPOINT:
+ return createMappingViewpoint();
+ case MappingPackage.MAPPING_DOMAIN:
+ return createMappingDomain();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public MappingViewpoint createMappingViewpoint() {
+ MappingViewpointImpl mappingViewpoint = new MappingViewpointImpl();
+ return mappingViewpoint;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public MappingDomain createMappingDomain() {
+ MappingDomainImpl mappingDomain = new MappingDomainImpl();
+ return mappingDomain;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public MappingPackage getMappingPackage() {
+ return (MappingPackage) getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static MappingPackage getPackage() {
+ return MappingPackage.eINSTANCE;
+ }
+
+} // MappingFactoryImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/impl/MappingImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/impl/MappingImpl.java
new file mode 100644
index 0000000..18b122a
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/impl/MappingImpl.java
@@ -0,0 +1,58 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.mapping.impl;
+
+import org.eclipse.egf.model.fcore.impl.NamedModelElementImpl;
+import org.eclipse.egf.model.mapping.Mapping;
+import org.eclipse.egf.model.mapping.MappingPackage;
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Mapping</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class MappingImpl extends NamedModelElementImpl implements Mapping {
+ /**
+ * A set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected int eFlags = 0;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected MappingImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return MappingPackage.Literals.MAPPING;
+ }
+
+} // MappingImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/impl/MappingPackageImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/impl/MappingPackageImpl.java
new file mode 100644
index 0000000..d141c5f
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/impl/MappingPackageImpl.java
@@ -0,0 +1,267 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.mapping.impl;
+
+import org.eclipse.egf.model.domain.DomainPackage;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.mapping.Mapping;
+import org.eclipse.egf.model.mapping.MappingDomain;
+import org.eclipse.egf.model.mapping.MappingFactory;
+import org.eclipse.egf.model.mapping.MappingPackage;
+import org.eclipse.egf.model.mapping.MappingViewpoint;
+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;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class MappingPackageImpl extends EPackageImpl implements MappingPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass mappingViewpointEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass mappingEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass mappingDomainEClass = 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.egf.model.mapping.MappingPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private MappingPackageImpl() {
+ super(eNS_URI, MappingFactory.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 MappingPackage#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 MappingPackage init() {
+ if (isInited)
+ return (MappingPackage) EPackage.Registry.INSTANCE.getEPackage(MappingPackage.eNS_URI);
+
+ // Obtain or create and register package
+ MappingPackageImpl theMappingPackage = (MappingPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof MappingPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new MappingPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ DomainPackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theMappingPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theMappingPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theMappingPackage.freeze();
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(MappingPackage.eNS_URI, theMappingPackage);
+ return theMappingPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getMappingViewpoint() {
+ return mappingViewpointEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getMappingViewpoint_Mappings() {
+ return (EReference) mappingViewpointEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getMapping() {
+ return mappingEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getMappingDomain() {
+ return mappingDomainEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getMappingDomain_Source() {
+ return (EReference) mappingDomainEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getMappingDomain_Target() {
+ return (EReference) mappingDomainEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MappingFactory getMappingFactory() {
+ return (MappingFactory) 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
+ mappingViewpointEClass = createEClass(MAPPING_VIEWPOINT);
+ createEReference(mappingViewpointEClass, MAPPING_VIEWPOINT__MAPPINGS);
+
+ mappingEClass = createEClass(MAPPING);
+
+ mappingDomainEClass = createEClass(MAPPING_DOMAIN);
+ createEReference(mappingDomainEClass, MAPPING_DOMAIN__SOURCE);
+ createEReference(mappingDomainEClass, MAPPING_DOMAIN__TARGET);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized)
+ return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ FcorePackage theFcorePackage = (FcorePackage) EPackage.Registry.INSTANCE.getEPackage(FcorePackage.eNS_URI);
+ DomainPackage theDomainPackage = (DomainPackage) EPackage.Registry.INSTANCE.getEPackage(DomainPackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ mappingViewpointEClass.getESuperTypes().add(theFcorePackage.getViewpoint());
+ mappingEClass.getESuperTypes().add(theFcorePackage.getNamedModelElement());
+ mappingDomainEClass.getESuperTypes().add(this.getMapping());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(mappingViewpointEClass, MappingViewpoint.class, "MappingViewpoint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getMappingViewpoint_Mappings(), this.getMappingDomain(), null, "mappings", null, 0, -1, MappingViewpoint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(mappingEClass, Mapping.class, "Mapping", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+
+ initEClass(mappingDomainEClass, MappingDomain.class, "MappingDomain", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getMappingDomain_Source(), theDomainPackage.getDomain(), null, "source", null, 1, 1, MappingDomain.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getMappingDomain_Target(), theDomainPackage.getDomain(), null, "target", null, 1, 1, MappingDomain.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} // MappingPackageImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/impl/MappingViewpointImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/impl/MappingViewpointImpl.java
new file mode 100644
index 0000000..a87f3af
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/impl/MappingViewpointImpl.java
@@ -0,0 +1,166 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.mapping.impl;
+
+import java.util.Collection;
+
+import org.eclipse.egf.model.fcore.impl.ViewpointImpl;
+import org.eclipse.egf.model.mapping.MappingDomain;
+import org.eclipse.egf.model.mapping.MappingPackage;
+import org.eclipse.egf.model.mapping.MappingViewpoint;
+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;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Viewpoint</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.mapping.impl.MappingViewpointImpl#getMappings <em>Mappings</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class MappingViewpointImpl extends ViewpointImpl implements MappingViewpoint {
+ /**
+ * A set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected int eFlags = 0;
+
+ /**
+ * The cached value of the '{@link #getMappings() <em>Mappings</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMappings()
+ * @generated
+ * @ordered
+ */
+ protected EList<MappingDomain> mappings;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected MappingViewpointImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return MappingPackage.Literals.MAPPING_VIEWPOINT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<MappingDomain> getMappings() {
+ if (mappings == null) {
+ mappings = new EObjectContainmentEList<MappingDomain>(MappingDomain.class, this, MappingPackage.MAPPING_VIEWPOINT__MAPPINGS);
+ }
+ return mappings;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case MappingPackage.MAPPING_VIEWPOINT__MAPPINGS:
+ return ((InternalEList<?>) getMappings()).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 MappingPackage.MAPPING_VIEWPOINT__MAPPINGS:
+ return getMappings();
+ }
+ 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 MappingPackage.MAPPING_VIEWPOINT__MAPPINGS:
+ getMappings().clear();
+ getMappings().addAll((Collection<? extends MappingDomain>) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case MappingPackage.MAPPING_VIEWPOINT__MAPPINGS:
+ getMappings().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case MappingPackage.MAPPING_VIEWPOINT__MAPPINGS:
+ return mappings != null && !mappings.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // MappingViewpointImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/util/MappingAdapterFactory.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/util/MappingAdapterFactory.java
new file mode 100644
index 0000000..c1eac4c
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/util/MappingAdapterFactory.java
@@ -0,0 +1,253 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.mapping.util;
+
+import org.eclipse.egf.model.fcore.ModelElement;
+import org.eclipse.egf.model.fcore.NamedModelElement;
+import org.eclipse.egf.model.fcore.Viewpoint;
+import org.eclipse.egf.model.mapping.Mapping;
+import org.eclipse.egf.model.mapping.MappingDomain;
+import org.eclipse.egf.model.mapping.MappingPackage;
+import org.eclipse.egf.model.mapping.MappingViewpoint;
+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;
+
+/**
+ * <!-- 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.egf.model.mapping.MappingPackage
+ * @generated
+ */
+public class MappingAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static MappingPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public MappingAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = MappingPackage.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 MappingSwitch<Adapter> modelSwitch = new MappingSwitch<Adapter>() {
+ @Override
+ public Adapter caseMappingViewpoint(MappingViewpoint object) {
+ return createMappingViewpointAdapter();
+ }
+
+ @Override
+ public Adapter caseMapping(Mapping object) {
+ return createMappingAdapter();
+ }
+
+ @Override
+ public Adapter caseMappingDomain(MappingDomain object) {
+ return createMappingDomainAdapter();
+ }
+
+ @Override
+ public Adapter caseModelElement(ModelElement object) {
+ return createModelElementAdapter();
+ }
+
+ @Override
+ public Adapter caseViewpoint(Viewpoint object) {
+ return createViewpointAdapter();
+ }
+
+ @Override
+ public Adapter caseNamedModelElement(NamedModelElement object) {
+ return createNamedModelElementAdapter();
+ }
+
+ @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.egf.model.mapping.MappingViewpoint <em>Viewpoint</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.egf.model.mapping.MappingViewpoint
+ * @generated
+ */
+ public Adapter createMappingViewpointAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.mapping.Mapping <em>Mapping</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.egf.model.mapping.Mapping
+ * @generated
+ */
+ public Adapter createMappingAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.mapping.MappingDomain <em>Domain</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.egf.model.mapping.MappingDomain
+ * @generated
+ */
+ public Adapter createMappingDomainAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fcore.ModelElement <em>Model Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore
+ * cases;
+ * it's useful to ignore a case when inheritance will catch all the cases
+ * anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.egf.model.fcore.ModelElement
+ * @generated
+ */
+ public Adapter createModelElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fcore.Viewpoint <em>Viewpoint</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.egf.model.fcore.Viewpoint
+ * @generated
+ */
+ public Adapter createViewpointAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fcore.NamedModelElement <em>Named Model Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.egf.model.fcore.NamedModelElement
+ * @generated
+ */
+ public Adapter createNamedModelElementAdapter() {
+ 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;
+ }
+
+} // MappingAdapterFactory
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/util/MappingResourceFactoryImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/util/MappingResourceFactoryImpl.java
new file mode 100644
index 0000000..e29b41e
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/util/MappingResourceFactoryImpl.java
@@ -0,0 +1,49 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.mapping.util;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource Factory</b> associated with the package.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.mapping.util.MappingResourceImpl
+ * @generated
+ */
+public class MappingResourceFactoryImpl extends ResourceFactoryImpl {
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MappingResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ Resource result = new MappingResourceImpl(uri);
+ return result;
+ }
+
+} // MappingResourceFactoryImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/util/MappingResourceImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/util/MappingResourceImpl.java
new file mode 100644
index 0000000..10de553
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/util/MappingResourceImpl.java
@@ -0,0 +1,169 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.mapping.util;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.egf.model.uri.ModelSchemeAware;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.xmi.XMIResource;
+import org.eclipse.emf.ecore.xmi.XMLParserPool;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+import org.eclipse.emf.ecore.xmi.XMLSave.XMLTypeInfo;
+import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl;
+import org.eclipse.emf.ecore.xmi.impl.XMLParserPoolImpl;
+import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource </b> associated with the package.
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.egf.model.mapping.util.MappingResourceFactoryImpl
+ * @generated
+ */
+public class MappingResourceImpl extends XMIResourceImpl {
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private List<Object> lookupTable = new ArrayList<Object>();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private XMLParserPool parserPool = new XMLParserPoolImpl();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private Map<Object, Object> nameToFeatureMap = new HashMap<Object, Object>();
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param uri
+ * the URI of the new resource.
+ * @generated
+ */
+ public MappingResourceImpl(URI uri) {
+ super(uri);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean useIDAttributes() {
+ return false;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean useUUIDs() {
+ return true;
+ }
+
+ /**
+ * Called when the object is unloaded.
+ * This implementation {@link InternalEObject#eSetProxyURI sets} the object to be a proxy
+ * and clears the {@link #eAdapters adapters}.
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=292866
+ * Fix available in HEAD: 2.6.0.I200911020144
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void unloaded(InternalEObject internalEObject) {
+ // Ensure that an unresolved containment proxy's URI isn't reset.
+ //
+ if (!internalEObject.eIsProxy()) {
+ internalEObject.eSetProxyURI(uri.appendFragment(getURIFragment(internalEObject)));
+ }
+ internalEObject.eAdapters().clear();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void init() {
+ super.init();
+ setTrackingModification(true);
+ setEncoding("UTF-8"); //$NON-NLS-1$
+ setXMIVersion("2.1"); //$NON-NLS-1$
+ // Save Options
+ getDefaultSaveOptions().put(XMLResource.OPTION_DISABLE_NOTIFY, Boolean.TRUE);
+ getDefaultSaveOptions().put(XMLResource.OPTION_CONFIGURATION_CACHE, Boolean.TRUE);
+ getDefaultSaveOptions().put(XMLResource.OPTION_USE_CACHED_LOOKUP_TABLE, lookupTable);
+ getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ getDefaultSaveOptions().put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
+ getDefaultSaveOptions().put(XMLResource.OPTION_SAVE_TYPE_INFORMATION, new XMLTypeInfo() {
+ public boolean shouldSaveType(EClass objectType, EClassifier featureType, EStructuralFeature feature) {
+ return objectType != featureType && objectType != XMLTypePackage.Literals.ANY_TYPE;
+ }
+
+ public boolean shouldSaveType(EClass objectType, EClass featureType, EStructuralFeature feature) {
+ return objectType != featureType && objectType != XMLTypePackage.Literals.ANY_TYPE;
+ }
+ });
+ getDefaultSaveOptions().put(XMLResource.OPTION_LINE_WIDTH, new Integer(80));
+ // Avoid relative paths from workspace resources to plugin resources.
+ getDefaultSaveOptions().put(XMLResource.OPTION_URI_HANDLER, new ModelSchemeAware());
+ getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ getDefaultSaveOptions().put(XMIResource.OPTION_USE_XMI_TYPE, Boolean.TRUE);
+ // Load Options
+ getDefaultLoadOptions().put(XMLResource.OPTION_DEFER_ATTACHMENT, Boolean.FALSE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_DEFER_IDREF_RESOLUTION, Boolean.FALSE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_DISABLE_NOTIFY, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_DEPRECATED_METHODS, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_PARSER_POOL, parserPool);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_XML_NAME_TO_FEATURE_MAP, nameToFeatureMap);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ }
+
+} // MappingResourceImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/util/MappingSwitch.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/util/MappingSwitch.java
new file mode 100644
index 0000000..95bf91f
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/mapping/util/MappingSwitch.java
@@ -0,0 +1,264 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.mapping.util;
+
+import java.util.List;
+
+import org.eclipse.egf.model.fcore.ModelElement;
+import org.eclipse.egf.model.fcore.NamedModelElement;
+import org.eclipse.egf.model.fcore.Viewpoint;
+import org.eclipse.egf.model.mapping.Mapping;
+import org.eclipse.egf.model.mapping.MappingDomain;
+import org.eclipse.egf.model.mapping.MappingPackage;
+import org.eclipse.egf.model.mapping.MappingViewpoint;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- 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.egf.model.mapping.MappingPackage
+ * @generated
+ */
+public class MappingSwitch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static MappingPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public MappingSwitch() {
+ if (modelPackage == null) {
+ modelPackage = MappingPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * 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
+ */
+ public T doSwitch(EObject theEObject) {
+ return doSwitch(theEObject.eClass(), theEObject);
+ }
+
+ /**
+ * 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
+ */
+ @SuppressWarnings("all")
+ protected T doSwitch(EClass theEClass, EObject theEObject) {
+ if (theEClass.eContainer() == modelPackage) {
+ return doSwitch(theEClass.getClassifierID(), theEObject);
+ } else {
+ List<EClass> eSuperTypes = theEClass.getESuperTypes();
+ return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject);
+ }
+ }
+
+ /**
+ * 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
+ */
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case MappingPackage.MAPPING_VIEWPOINT: {
+ MappingViewpoint mappingViewpoint = (MappingViewpoint) theEObject;
+ T result = caseMappingViewpoint(mappingViewpoint);
+ if (result == null)
+ result = caseViewpoint(mappingViewpoint);
+ if (result == null)
+ result = caseModelElement(mappingViewpoint);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case MappingPackage.MAPPING: {
+ Mapping mapping = (Mapping) theEObject;
+ T result = caseMapping(mapping);
+ if (result == null)
+ result = caseNamedModelElement(mapping);
+ if (result == null)
+ result = caseModelElement(mapping);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case MappingPackage.MAPPING_DOMAIN: {
+ MappingDomain mappingDomain = (MappingDomain) theEObject;
+ T result = caseMappingDomain(mappingDomain);
+ if (result == null)
+ result = caseMapping(mappingDomain);
+ if (result == null)
+ result = caseNamedModelElement(mappingDomain);
+ if (result == null)
+ result = caseModelElement(mappingDomain);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ default:
+ return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Viewpoint</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>Viewpoint</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseMappingViewpoint(MappingViewpoint object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Mapping</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>Mapping</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseMapping(Mapping object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Domain</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>Domain</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseMappingDomain(MappingDomain object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Model Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Model Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseModelElement(ModelElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Viewpoint</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>Viewpoint</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseViewpoint(Viewpoint object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Named Model Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Named Model Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseNamedModelElement(NamedModelElement 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
+ */
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} // MappingSwitch
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/AbstractPatternCall.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/AbstractPatternCall.java
new file mode 100644
index 0000000..aaff8fb
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/AbstractPatternCall.java
@@ -0,0 +1,58 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Abstract Pattern Call</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.pattern.AbstractPatternCall#getCalled <em>Called</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getAbstractPatternCall()
+ * @model abstract="true"
+ * @generated
+ */
+public interface AbstractPatternCall extends Call {
+ /**
+ * Returns the value of the '<em><b>Called</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Called</em>' reference isn't clear, there really
+ * should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Called</em>' reference.
+ * @see #setCalled(Pattern)
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getAbstractPatternCall_Called()
+ * @model required="true"
+ * @generated
+ */
+ Pattern getCalled();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.pattern.AbstractPatternCall#getCalled <em>Called</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Called</em>' reference.
+ * @see #getCalled()
+ * @generated
+ */
+ void setCalled(Pattern value);
+
+} // AbstractPatternCall
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/BackCall.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/BackCall.java
new file mode 100644
index 0000000..dba1033
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/BackCall.java
@@ -0,0 +1,27 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Back Call</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getBackCall()
+ * @model
+ * @generated
+ */
+public interface BackCall extends Call {
+
+} // BackCall
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/BasicQuery.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/BasicQuery.java
new file mode 100644
index 0000000..f8626c7
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/BasicQuery.java
@@ -0,0 +1,28 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object '
+ * <em><b>Basic Query</b></em>'. <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getBasicQuery()
+ * @model
+ * @generated
+ */
+public interface BasicQuery extends Query {
+
+ String TYPE = "type"; //$NON-NLS-1$
+
+} // BasicQuery
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/Call.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/Call.java
new file mode 100644
index 0000000..70df426
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/Call.java
@@ -0,0 +1,62 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern;
+
+import org.eclipse.egf.model.fcore.ModelElement;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Call</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.pattern.Call#getPattern <em>Pattern</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getCall()
+ * @model abstract="true"
+ * @generated
+ */
+public interface Call extends ModelElement {
+ /**
+ * Returns the value of the '<em><b>Pattern</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.pattern.Pattern#getOrchestration <em>Orchestration</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Pattern</em>' container reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Pattern</em>' container reference.
+ * @see #setPattern(Pattern)
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getCall_Pattern()
+ * @see org.eclipse.egf.model.pattern.Pattern#getOrchestration
+ * @model opposite="orchestration" required="true" transient="false"
+ * @generated
+ */
+ Pattern getPattern();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.pattern.Call#getPattern <em>Pattern</em>}' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Pattern</em>' container reference.
+ * @see #getPattern()
+ * @generated
+ */
+ void setPattern(Pattern value);
+
+} // Call
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/CustomQuery.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/CustomQuery.java
new file mode 100644
index 0000000..9dd6602
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/CustomQuery.java
@@ -0,0 +1,26 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Custom Query</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getCustomQuery()
+ * @model
+ * @generated
+ */
+public interface CustomQuery extends Query {
+} // CustomQuery
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/MethodCall.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/MethodCall.java
new file mode 100644
index 0000000..526fb77
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/MethodCall.java
@@ -0,0 +1,58 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Method Call</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.pattern.MethodCall#getCalled <em>Called</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getMethodCall()
+ * @model
+ * @generated
+ */
+public interface MethodCall extends Call {
+ /**
+ * Returns the value of the '<em><b>Called</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Called</em>' reference isn't clear, there really
+ * should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Called</em>' reference.
+ * @see #setCalled(PatternMethod)
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getMethodCall_Called()
+ * @model required="true"
+ * @generated
+ */
+ PatternMethod getCalled();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.pattern.MethodCall#getCalled <em>Called</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Called</em>' reference.
+ * @see #getCalled()
+ * @generated
+ */
+ void setCalled(PatternMethod value);
+
+} // MethodCall
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/Pattern.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/Pattern.java
new file mode 100644
index 0000000..2d18a63
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/Pattern.java
@@ -0,0 +1,280 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Pattern</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.pattern.Pattern#getHeaderMethod <em>Header Method</em>}</li>
+ * <li>{@link org.eclipse.egf.model.pattern.Pattern#getMethods <em>Methods</em>}</li>
+ * <li>{@link org.eclipse.egf.model.pattern.Pattern#getFooterMethod <em>Footer Method</em>}</li>
+ * <li>{@link org.eclipse.egf.model.pattern.Pattern#getSuperPattern <em>Super Pattern</em>}</li>
+ * <li>{@link org.eclipse.egf.model.pattern.Pattern#getOrchestration <em>Orchestration</em>}</li>
+ * <li>{@link org.eclipse.egf.model.pattern.Pattern#getParameters <em>Parameters</em>}</li>
+ * <li>{@link org.eclipse.egf.model.pattern.Pattern#getNature <em>Nature</em>}</li>
+ * <li>{@link org.eclipse.egf.model.pattern.Pattern#getVariables <em>Variables</em>}</li>
+ * <li>{@link org.eclipse.egf.model.pattern.Pattern#getInitMethod <em>Init Method</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getPattern()
+ * @model annotation="http://www.eclipse.org/emf/2002/Ecore constraints='HeaderMethod FooterMethod'"
+ * @generated
+ */
+public interface Pattern extends PatternElement {
+ /**
+ * Returns the value of the '<em><b>Header Method</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Header Method</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Header Method</em>' reference.
+ * @see #setHeaderMethod(PatternMethod)
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getPattern_HeaderMethod()
+ * @model resolveProxies="false" required="true"
+ * @generated
+ */
+ PatternMethod getHeaderMethod();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.pattern.Pattern#getHeaderMethod <em>Header Method</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Header Method</em>' reference.
+ * @see #getHeaderMethod()
+ * @generated
+ */
+ void setHeaderMethod(PatternMethod value);
+
+ /**
+ * Returns the value of the '<em><b>Methods</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.egf.model.pattern.PatternMethod}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.pattern.PatternMethod#getPattern <em>Pattern</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Methods</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>Methods</em>' containment reference list.
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getPattern_Methods()
+ * @see org.eclipse.egf.model.pattern.PatternMethod#getPattern
+ * @model opposite="pattern" containment="true"
+ * @generated
+ */
+ EList<PatternMethod> getMethods();
+
+ /**
+ * Returns the value of the '<em><b>Super Pattern</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Super Pattern</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Super Pattern</em>' reference.
+ * @see #setSuperPattern(Pattern)
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getPattern_SuperPattern()
+ * @model
+ * @generated
+ */
+ Pattern getSuperPattern();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.pattern.Pattern#getSuperPattern <em>Super Pattern</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Super Pattern</em>' reference.
+ * @see #getSuperPattern()
+ * @generated
+ */
+ void setSuperPattern(Pattern value);
+
+ /**
+ * Returns the value of the '<em><b>Footer Method</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Footer Method</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Footer Method</em>' reference.
+ * @see #setFooterMethod(PatternMethod)
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getPattern_FooterMethod()
+ * @model resolveProxies="false" required="true"
+ * @generated
+ */
+ PatternMethod getFooterMethod();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.pattern.Pattern#getFooterMethod <em>Footer Method</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Footer Method</em>' reference.
+ * @see #getFooterMethod()
+ * @generated
+ */
+ void setFooterMethod(PatternMethod value);
+
+ /**
+ * Returns the value of the '<em><b>Orchestration</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.egf.model.pattern.Call}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.pattern.Call#getPattern <em>Pattern</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Orchestration</em>' reference list isn't
+ * clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Orchestration</em>' containment reference list.
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getPattern_Orchestration()
+ * @see org.eclipse.egf.model.pattern.Call#getPattern
+ * @model opposite="pattern" containment="true"
+ * @generated
+ */
+ EList<Call> getOrchestration();
+
+ /**
+ * Returns the value of the '<em><b>Parameters</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.egf.model.pattern.PatternParameter}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Parameters</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>Parameters</em>' containment reference list.
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getPattern_Parameters()
+ * @model containment="true"
+ * @generated
+ */
+ EList<PatternParameter> getParameters();
+
+ /**
+ * Returns the value of the '<em><b>Nature</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Nature</em>' containment reference isn't
+ * clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Nature</em>' containment reference.
+ * @see #setNature(PatternNature)
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getPattern_Nature()
+ * @model containment="true" required="true"
+ * @generated
+ */
+ PatternNature getNature();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.pattern.Pattern#getNature <em>Nature</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Nature</em>' containment reference.
+ * @see #getNature()
+ * @generated
+ */
+ void setNature(PatternNature value);
+
+ /**
+ * Returns the value of the '<em><b>Variables</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.egf.model.pattern.PatternVariable}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Variables</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>Variables</em>' containment reference list.
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getPattern_Variables()
+ * @model containment="true"
+ * @generated
+ */
+ EList<PatternVariable> getVariables();
+
+ /**
+ * Returns the value of the '<em><b>Init Method</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Init Method</em>' reference isn't clear, there
+ * really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Init Method</em>' reference.
+ * @see #setInitMethod(PatternMethod)
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getPattern_InitMethod()
+ * @model resolveProxies="false" required="true"
+ * @generated
+ */
+ PatternMethod getInitMethod();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.pattern.Pattern#getInitMethod <em>Init Method</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Init Method</em>' reference.
+ * @see #getInitMethod()
+ * @generated
+ */
+ void setInitMethod(PatternMethod value);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ PatternMethod getMethod(String name);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation"
+ * @generated
+ */
+ EList<PatternParameter> getAllParameters();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation"
+ * @generated
+ */
+ EList<PatternVariable> getAllVariables();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation"
+ * @generated
+ */
+ EList<PatternMethod> getAllMethods();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model nameRequired="true"
+ * @generated
+ */
+ PatternParameter getParameter(String name);
+
+} // Pattern
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/PatternCall.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/PatternCall.java
new file mode 100644
index 0000000..710b0d4
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/PatternCall.java
@@ -0,0 +1,51 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern;
+
+import org.eclipse.emf.common.util.EMap;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Call</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.pattern.PatternCall#getParameterMatching <em>Parameter Matching</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getPatternCall()
+ * @model
+ * @generated
+ */
+public interface PatternCall extends AbstractPatternCall {
+ /**
+ * Returns the value of the '<em><b>Parameter Matching</b></em>' map.
+ * The key is of type {@link org.eclipse.egf.model.pattern.PatternParameter},
+ * and the value is of type {@link org.eclipse.egf.model.pattern.PatternParameter},
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Parameter Matching</em>' reference list isn't
+ * clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Parameter Matching</em>' map.
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getPatternCall_ParameterMatching()
+ * @model mapType="org.eclipse.egf.model.pattern.Paramerter2ParameterMap<org.eclipse.egf.model.pattern.PatternParameter, org.eclipse.egf.model.pattern.PatternParameter>"
+ * @generated
+ */
+ EMap<PatternParameter, PatternParameter> getParameterMatching();
+
+} // PatternCall
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/PatternElement.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/PatternElement.java
new file mode 100644
index 0000000..c8dba41
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/PatternElement.java
@@ -0,0 +1,63 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern;
+
+import org.eclipse.egf.model.fcore.NamedModelElement;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Element</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.pattern.PatternElement#getContainer <em>Container</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getPatternElement()
+ * @model abstract="true"
+ * annotation="http://www.eclipse.org/emf/2002/Ecore constraints='MandatoryName'"
+ * @generated
+ */
+public interface PatternElement extends NamedModelElement {
+ /**
+ * Returns the value of the '<em><b>Container</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.pattern.PatternLibrary#getElements <em>Elements</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Container</em>' container reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Container</em>' container reference.
+ * @see #setContainer(PatternLibrary)
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getPatternElement_Container()
+ * @see org.eclipse.egf.model.pattern.PatternLibrary#getElements
+ * @model opposite="elements" resolveProxies="false" transient="false"
+ * @generated
+ */
+ PatternLibrary getContainer();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.pattern.PatternElement#getContainer <em>Container</em>}' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Container</em>' container reference.
+ * @see #getContainer()
+ * @generated
+ */
+ void setContainer(PatternLibrary value);
+
+} // PatternElement
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/PatternFactory.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/PatternFactory.java
new file mode 100644
index 0000000..11d8391
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/PatternFactory.java
@@ -0,0 +1,245 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern;
+
+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.egf.model.pattern.PatternPackage
+ * @generated
+ */
+public interface PatternFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ PatternFactory eINSTANCE = org.eclipse.egf.model.pattern.impl.PatternFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Pattern</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Pattern</em>'.
+ * @generated
+ */
+ Pattern createPattern();
+
+ /**
+ * Returns a new object of class '<em>Method</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Method</em>'.
+ * @generated
+ */
+ PatternMethod createPatternMethod();
+
+ /**
+ * Returns a new object of class '<em>Parameter</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Parameter</em>'.
+ * @generated
+ */
+ PatternParameter createPatternParameter();
+
+ /**
+ * Returns a new object of class '<em>Library</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Library</em>'.
+ * @generated
+ */
+ PatternLibrary createPatternLibrary();
+
+ /**
+ * Returns a new object of class '<em>Viewpoint</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Viewpoint</em>'.
+ * @generated
+ */
+ PatternViewpoint createPatternViewpoint();
+
+ /**
+ * Returns a new object of class '<em>Call</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Call</em>'.
+ * @generated
+ */
+ PatternCall createPatternCall();
+
+ /**
+ * Returns a new object of class '<em>Super Call</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Super Call</em>'.
+ * @generated
+ */
+ SuperCall createSuperCall();
+
+ /**
+ * Returns a new object of class '<em>Method Call</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Method Call</em>'.
+ * @generated
+ */
+ MethodCall createMethodCall();
+
+ /**
+ * Returns a new object of class '<em>Variable</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Variable</em>'.
+ * @generated
+ */
+ PatternVariable createPatternVariable();
+
+ /**
+ * Returns a new object of class '<em>Injected Call</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Injected Call</em>'.
+ * @generated
+ */
+ PatternInjectedCall createPatternInjectedCall();
+
+ /**
+ * Returns a new object of class '<em>Basic Query</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Basic Query</em>'.
+ * @generated
+ */
+ BasicQuery createBasicQuery();
+
+ /**
+ * Returns a new object of class '<em>String Query</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>String Query</em>'.
+ * @generated
+ */
+ StringQuery createStringQuery();
+
+ /**
+ * Returns a new object of class '<em>Custom Query</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Custom Query</em>'.
+ * @generated
+ */
+ CustomQuery createCustomQuery();
+
+ /**
+ * Returns a new object of class '<em>Type Pattern Execution Reporter</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Type Pattern Execution Reporter</em>'.
+ * @generated
+ */
+ TypePatternExecutionReporter createTypePatternExecutionReporter();
+
+ /**
+ * Returns a new object of class '<em>Back Call</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Back Call</em>'.
+ * @generated
+ */
+ BackCall createBackCall();
+
+ /**
+ * Returns a new object of class '<em>Type Pattern Call Back Handler</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Type Pattern Call Back Handler</em>'.
+ * @generated
+ */
+ TypePatternCallBackHandler createTypePatternCallBackHandler();
+
+ /**
+ * Returns a new object of class '<em>Type Pattern Domain Visitor</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Type Pattern Domain Visitor</em>'.
+ * @generated
+ */
+ TypePatternDomainVisitor createTypePatternDomainVisitor();
+
+ /**
+ * Returns a new object of class '<em>Type Pattern List</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Type Pattern List</em>'.
+ * @generated
+ */
+ TypePatternList createTypePatternList();
+
+ /**
+ * Returns an instance of data type '<em>Context</em>' corresponding the given literal.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param literal a literal of the data type.
+ * @return a new instance value of the data type.
+ * @generated
+ */
+ PatternContext createPatternContext(String literal);
+
+ /**
+ * Returns a literal representation of an instance of data type '<em>Context</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param instanceValue an instance value of the data type.
+ * @return a literal representation of the instance value.
+ * @generated
+ */
+ String convertPatternContext(PatternContext instanceValue);
+
+ /**
+ * Returns an instance of data type '<em>Exception</em>' corresponding the given literal.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param literal a literal of the data type.
+ * @return a new instance value of the data type.
+ * @generated
+ */
+ PatternException createPatternException(String literal);
+
+ /**
+ * Returns a literal representation of an instance of data type '<em>Exception</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param instanceValue an instance value of the data type.
+ * @return a literal representation of the instance value.
+ * @generated
+ */
+ String convertPatternException(PatternException instanceValue);
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ PatternPackage getPatternPackage();
+
+} // PatternFactory
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/PatternInjectedCall.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/PatternInjectedCall.java
new file mode 100644
index 0000000..fae6323
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/PatternInjectedCall.java
@@ -0,0 +1,58 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Injected Call</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.pattern.PatternInjectedCall#getContext <em>Context</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getPatternInjectedCall()
+ * @model
+ * @generated
+ */
+public interface PatternInjectedCall extends AbstractPatternCall {
+ /**
+ * Returns the value of the '<em><b>Context</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Context</em>' reference isn't clear, there
+ * really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Context</em>' reference.
+ * @see #setContext(PatternVariable)
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getPatternInjectedCall_Context()
+ * @model resolveProxies="false" required="true"
+ * @generated
+ */
+ PatternVariable getContext();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.pattern.PatternInjectedCall#getContext <em>Context</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Context</em>' reference.
+ * @see #getContext()
+ * @generated
+ */
+ void setContext(PatternVariable value);
+
+} // PatternInjectedCall
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/PatternLibrary.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/PatternLibrary.java
new file mode 100644
index 0000000..e645d61
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/PatternLibrary.java
@@ -0,0 +1,71 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.EMap;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Library</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.pattern.PatternLibrary#getElements <em>Elements</em>}</li>
+ * <li>{@link org.eclipse.egf.model.pattern.PatternLibrary#getFilters <em>Filters</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getPatternLibrary()
+ * @model
+ * @generated
+ */
+public interface PatternLibrary extends PatternElement {
+ /**
+ * Returns the value of the '<em><b>Elements</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.egf.model.pattern.PatternElement}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.pattern.PatternElement#getContainer <em>Container</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Elements</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>Elements</em>' containment reference list.
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getPatternLibrary_Elements()
+ * @see org.eclipse.egf.model.pattern.PatternElement#getContainer
+ * @model opposite="container" containment="true"
+ * @generated
+ */
+ EList<PatternElement> getElements();
+
+ /**
+ * Returns the value of the '<em><b>Filters</b></em>' map.
+ * The key is of type {@link java.lang.String},
+ * and the value is of type list of {@link org.eclipse.egf.model.pattern.PatternElement},
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Filters</em>' map isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Filters</em>' map.
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getPatternLibrary_Filters()
+ * @model mapType="org.eclipse.egf.model.pattern.String2PatternList<org.eclipse.emf.ecore.EString, org.eclipse.egf.model.pattern.PatternElement>"
+ * @generated
+ */
+ EMap<String, EList<PatternElement>> getFilters();
+
+} // PatternLibrary
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/PatternMethod.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/PatternMethod.java
new file mode 100644
index 0000000..e7d6f32
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/PatternMethod.java
@@ -0,0 +1,90 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern;
+
+import org.eclipse.egf.model.fcore.NamedModelElement;
+import org.eclipse.emf.common.util.URI;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Method</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.pattern.PatternMethod#getPattern <em>Pattern</em>}</li>
+ * <li>{@link org.eclipse.egf.model.pattern.PatternMethod#getPatternFilePath <em>Pattern File Path</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getPatternMethod()
+ * @model annotation="http://www.eclipse.org/emf/2002/Ecore constraints='MandatoryName'"
+ * @generated
+ */
+public interface PatternMethod extends NamedModelElement {
+ /**
+ * Returns the value of the '<em><b>Pattern</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.pattern.Pattern#getMethods <em>Methods</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Pattern</em>' container reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Pattern</em>' container reference.
+ * @see #setPattern(Pattern)
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getPatternMethod_Pattern()
+ * @see org.eclipse.egf.model.pattern.Pattern#getMethods
+ * @model opposite="methods" resolveProxies="false" required="true" transient="false"
+ * @generated
+ */
+ Pattern getPattern();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.pattern.PatternMethod#getPattern <em>Pattern</em>}' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Pattern</em>' container reference.
+ * @see #getPattern()
+ * @generated
+ */
+ void setPattern(Pattern value);
+
+ /**
+ * Returns the value of the '<em><b>Pattern File Path</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Pattern File Path</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Pattern File Path</em>' attribute.
+ * @see #setPatternFilePath(URI)
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getPatternMethod_PatternFilePath()
+ * @model dataType="org.eclipse.egf.model.types.URI" required="true"
+ * @generated
+ */
+ URI getPatternFilePath();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.pattern.PatternMethod#getPatternFilePath <em>Pattern File Path</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Pattern File Path</em>' attribute.
+ * @see #getPatternFilePath()
+ * @generated
+ */
+ void setPatternFilePath(URI value);
+
+} // PatternMethod
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/PatternNature.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/PatternNature.java
new file mode 100644
index 0000000..c6d5df4
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/PatternNature.java
@@ -0,0 +1,29 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern;
+
+import org.eclipse.egf.model.fcore.NamedModelElement;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Nature</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getPatternNature()
+ * @model abstract="true"
+ * annotation="http://www.eclipse.org/emf/2002/Ecore constraints='MandatoryName'"
+ * @generated
+ */
+public interface PatternNature extends NamedModelElement {
+} // PatternNature
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/PatternPackage.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/PatternPackage.java
new file mode 100644
index 0000000..36fcdf6
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/PatternPackage.java
@@ -0,0 +1,2845 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern;
+
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.PatternFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface PatternPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "pattern"; //$NON-NLS-1$
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/egf/1.0.0/pattern"; //$NON-NLS-1$
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "pattern"; //$NON-NLS-1$
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ PatternPackage eINSTANCE = org.eclipse.egf.model.pattern.impl.PatternPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.pattern.impl.PatternElementImpl <em>Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.PatternElementImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getPatternElement()
+ * @generated
+ */
+ int PATTERN_ELEMENT = 4;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_ELEMENT__ID = FcorePackage.NAMED_MODEL_ELEMENT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_ELEMENT__DESCRIPTION = FcorePackage.NAMED_MODEL_ELEMENT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_ELEMENT__NAME = FcorePackage.NAMED_MODEL_ELEMENT__NAME;
+
+ /**
+ * The feature id for the '<em><b>Container</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_ELEMENT__CONTAINER = FcorePackage.NAMED_MODEL_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Element</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_ELEMENT_FEATURE_COUNT = FcorePackage.NAMED_MODEL_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.pattern.impl.PatternImpl <em>Pattern</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.PatternImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getPattern()
+ * @generated
+ */
+ int PATTERN = 0;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN__ID = PATTERN_ELEMENT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN__DESCRIPTION = PATTERN_ELEMENT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN__NAME = PATTERN_ELEMENT__NAME;
+
+ /**
+ * The feature id for the '<em><b>Container</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN__CONTAINER = PATTERN_ELEMENT__CONTAINER;
+
+ /**
+ * The feature id for the '<em><b>Header Method</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN__HEADER_METHOD = PATTERN_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Methods</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN__METHODS = PATTERN_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Footer Method</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN__FOOTER_METHOD = PATTERN_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Super Pattern</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN__SUPER_PATTERN = PATTERN_ELEMENT_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>Orchestration</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN__ORCHESTRATION = PATTERN_ELEMENT_FEATURE_COUNT + 4;
+
+ /**
+ * The feature id for the '<em><b>Parameters</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN__PARAMETERS = PATTERN_ELEMENT_FEATURE_COUNT + 5;
+
+ /**
+ * The feature id for the '<em><b>Nature</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN__NATURE = PATTERN_ELEMENT_FEATURE_COUNT + 6;
+
+ /**
+ * The feature id for the '<em><b>Variables</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN__VARIABLES = PATTERN_ELEMENT_FEATURE_COUNT + 7;
+
+ /**
+ * The feature id for the '<em><b>Init Method</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN__INIT_METHOD = PATTERN_ELEMENT_FEATURE_COUNT + 8;
+
+ /**
+ * The number of structural features of the '<em>Pattern</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_FEATURE_COUNT = PATTERN_ELEMENT_FEATURE_COUNT + 9;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.pattern.impl.PatternMethodImpl <em>Method</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.PatternMethodImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getPatternMethod()
+ * @generated
+ */
+ int PATTERN_METHOD = 1;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_METHOD__ID = FcorePackage.NAMED_MODEL_ELEMENT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_METHOD__DESCRIPTION = FcorePackage.NAMED_MODEL_ELEMENT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_METHOD__NAME = FcorePackage.NAMED_MODEL_ELEMENT__NAME;
+
+ /**
+ * The feature id for the '<em><b>Pattern</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_METHOD__PATTERN = FcorePackage.NAMED_MODEL_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Pattern File Path</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_METHOD__PATTERN_FILE_PATH = FcorePackage.NAMED_MODEL_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Method</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_METHOD_FEATURE_COUNT = FcorePackage.NAMED_MODEL_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.pattern.impl.PatternParameterImpl <em>Parameter</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.PatternParameterImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getPatternParameter()
+ * @generated
+ */
+ int PATTERN_PARAMETER = 2;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_PARAMETER__ID = FcorePackage.NAMED_MODEL_ELEMENT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_PARAMETER__DESCRIPTION = FcorePackage.NAMED_MODEL_ELEMENT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_PARAMETER__NAME = FcorePackage.NAMED_MODEL_ELEMENT__NAME;
+
+ /**
+ * The feature id for the '<em><b>Type</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_PARAMETER__TYPE = FcorePackage.NAMED_MODEL_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Query</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_PARAMETER__QUERY = FcorePackage.NAMED_MODEL_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Parameter</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_PARAMETER_FEATURE_COUNT = FcorePackage.NAMED_MODEL_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.pattern.impl.PatternLibraryImpl <em>Library</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.PatternLibraryImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getPatternLibrary()
+ * @generated
+ */
+ int PATTERN_LIBRARY = 3;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_LIBRARY__ID = PATTERN_ELEMENT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_LIBRARY__DESCRIPTION = PATTERN_ELEMENT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_LIBRARY__NAME = PATTERN_ELEMENT__NAME;
+
+ /**
+ * The feature id for the '<em><b>Container</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_LIBRARY__CONTAINER = PATTERN_ELEMENT__CONTAINER;
+
+ /**
+ * The feature id for the '<em><b>Elements</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_LIBRARY__ELEMENTS = PATTERN_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Filters</b></em>' map.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_LIBRARY__FILTERS = PATTERN_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Library</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_LIBRARY_FEATURE_COUNT = PATTERN_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.pattern.impl.PatternViewpointImpl <em>Viewpoint</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.PatternViewpointImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getPatternViewpoint()
+ * @generated
+ */
+ int PATTERN_VIEWPOINT = 5;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_VIEWPOINT__ID = FcorePackage.VIEWPOINT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_VIEWPOINT__DESCRIPTION = FcorePackage.VIEWPOINT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Viewpoint Container</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_VIEWPOINT__VIEWPOINT_CONTAINER = FcorePackage.VIEWPOINT__VIEWPOINT_CONTAINER;
+
+ /**
+ * The feature id for the '<em><b>Libraries</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_VIEWPOINT__LIBRARIES = FcorePackage.VIEWPOINT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Viewpoint</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_VIEWPOINT_FEATURE_COUNT = FcorePackage.VIEWPOINT_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.pattern.impl.PatternNatureImpl <em>Nature</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.PatternNatureImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getPatternNature()
+ * @generated
+ */
+ int PATTERN_NATURE = 6;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_NATURE__ID = FcorePackage.NAMED_MODEL_ELEMENT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_NATURE__DESCRIPTION = FcorePackage.NAMED_MODEL_ELEMENT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_NATURE__NAME = FcorePackage.NAMED_MODEL_ELEMENT__NAME;
+
+ /**
+ * The number of structural features of the '<em>Nature</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_NATURE_FEATURE_COUNT = FcorePackage.NAMED_MODEL_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.pattern.impl.CallImpl <em>Call</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.CallImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getCall()
+ * @generated
+ */
+ int CALL = 10;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CALL__ID = FcorePackage.MODEL_ELEMENT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CALL__DESCRIPTION = FcorePackage.MODEL_ELEMENT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Pattern</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CALL__PATTERN = FcorePackage.MODEL_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Call</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CALL_FEATURE_COUNT = FcorePackage.MODEL_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.pattern.impl.AbstractPatternCallImpl <em>Abstract Pattern Call</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.AbstractPatternCallImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getAbstractPatternCall()
+ * @generated
+ */
+ int ABSTRACT_PATTERN_CALL = 13;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ABSTRACT_PATTERN_CALL__ID = CALL__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ABSTRACT_PATTERN_CALL__DESCRIPTION = CALL__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Pattern</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ABSTRACT_PATTERN_CALL__PATTERN = CALL__PATTERN;
+
+ /**
+ * The feature id for the '<em><b>Called</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ABSTRACT_PATTERN_CALL__CALLED = CALL_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Abstract Pattern Call</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ABSTRACT_PATTERN_CALL_FEATURE_COUNT = CALL_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.pattern.impl.PatternCallImpl <em>Call</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.PatternCallImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getPatternCall()
+ * @generated
+ */
+ int PATTERN_CALL = 7;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_CALL__ID = ABSTRACT_PATTERN_CALL__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_CALL__DESCRIPTION = ABSTRACT_PATTERN_CALL__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Pattern</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_CALL__PATTERN = ABSTRACT_PATTERN_CALL__PATTERN;
+
+ /**
+ * The feature id for the '<em><b>Called</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_CALL__CALLED = ABSTRACT_PATTERN_CALL__CALLED;
+
+ /**
+ * The feature id for the '<em><b>Parameter Matching</b></em>' map.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_CALL__PARAMETER_MATCHING = ABSTRACT_PATTERN_CALL_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Call</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_CALL_FEATURE_COUNT = ABSTRACT_PATTERN_CALL_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.pattern.impl.SuperCallImpl <em>Super Call</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.SuperCallImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getSuperCall()
+ * @generated
+ */
+ int SUPER_CALL = 8;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SUPER_CALL__ID = CALL__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SUPER_CALL__DESCRIPTION = CALL__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Pattern</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SUPER_CALL__PATTERN = CALL__PATTERN;
+
+ /**
+ * The number of structural features of the '<em>Super Call</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SUPER_CALL_FEATURE_COUNT = CALL_FEATURE_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.pattern.impl.Paramerter2ParameterMapImpl <em>Paramerter2 Parameter Map</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.Paramerter2ParameterMapImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getParamerter2ParameterMap()
+ * @generated
+ */
+ int PARAMERTER2_PARAMETER_MAP = 9;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PARAMERTER2_PARAMETER_MAP__VALUE = 0;
+
+ /**
+ * The feature id for the '<em><b>Key</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PARAMERTER2_PARAMETER_MAP__KEY = 1;
+
+ /**
+ * The number of structural features of the '<em>Paramerter2 Parameter Map</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PARAMERTER2_PARAMETER_MAP_FEATURE_COUNT = 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.pattern.impl.MethodCallImpl <em>Method Call</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.MethodCallImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getMethodCall()
+ * @generated
+ */
+ int METHOD_CALL = 11;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int METHOD_CALL__ID = CALL__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int METHOD_CALL__DESCRIPTION = CALL__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Pattern</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int METHOD_CALL__PATTERN = CALL__PATTERN;
+
+ /**
+ * The feature id for the '<em><b>Called</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int METHOD_CALL__CALLED = CALL_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Method Call</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int METHOD_CALL_FEATURE_COUNT = CALL_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.pattern.impl.PatternVariableImpl <em>Variable</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.PatternVariableImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getPatternVariable()
+ * @generated
+ */
+ int PATTERN_VARIABLE = 12;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_VARIABLE__ID = FcorePackage.NAMED_MODEL_ELEMENT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_VARIABLE__DESCRIPTION = FcorePackage.NAMED_MODEL_ELEMENT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_VARIABLE__NAME = FcorePackage.NAMED_MODEL_ELEMENT__NAME;
+
+ /**
+ * The feature id for the '<em><b>Type</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_VARIABLE__TYPE = FcorePackage.NAMED_MODEL_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Variable</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_VARIABLE_FEATURE_COUNT = FcorePackage.NAMED_MODEL_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.pattern.impl.PatternInjectedCallImpl <em>Injected Call</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.PatternInjectedCallImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getPatternInjectedCall()
+ * @generated
+ */
+ int PATTERN_INJECTED_CALL = 14;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_INJECTED_CALL__ID = ABSTRACT_PATTERN_CALL__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_INJECTED_CALL__DESCRIPTION = ABSTRACT_PATTERN_CALL__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Pattern</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_INJECTED_CALL__PATTERN = ABSTRACT_PATTERN_CALL__PATTERN;
+
+ /**
+ * The feature id for the '<em><b>Called</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_INJECTED_CALL__CALLED = ABSTRACT_PATTERN_CALL__CALLED;
+
+ /**
+ * The feature id for the '<em><b>Context</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_INJECTED_CALL__CONTEXT = ABSTRACT_PATTERN_CALL_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Injected Call</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PATTERN_INJECTED_CALL_FEATURE_COUNT = ABSTRACT_PATTERN_CALL_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.pattern.impl.QueryImpl <em>Query</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.QueryImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getQuery()
+ * @generated
+ */
+ int QUERY = 15;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int QUERY__ID = FcorePackage.MODEL_ELEMENT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int QUERY__DESCRIPTION = FcorePackage.MODEL_ELEMENT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Parameter</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int QUERY__PARAMETER = FcorePackage.MODEL_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Extension Id</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int QUERY__EXTENSION_ID = FcorePackage.MODEL_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Query Context</b></em>' map.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int QUERY__QUERY_CONTEXT = FcorePackage.MODEL_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the '<em>Query</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int QUERY_FEATURE_COUNT = FcorePackage.MODEL_ELEMENT_FEATURE_COUNT + 3;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.pattern.impl.BasicQueryImpl <em>Basic Query</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.BasicQueryImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getBasicQuery()
+ * @generated
+ */
+ int BASIC_QUERY = 16;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BASIC_QUERY__ID = QUERY__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BASIC_QUERY__DESCRIPTION = QUERY__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Parameter</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BASIC_QUERY__PARAMETER = QUERY__PARAMETER;
+
+ /**
+ * The feature id for the '<em><b>Extension Id</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BASIC_QUERY__EXTENSION_ID = QUERY__EXTENSION_ID;
+
+ /**
+ * The feature id for the '<em><b>Query Context</b></em>' map.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BASIC_QUERY__QUERY_CONTEXT = QUERY__QUERY_CONTEXT;
+
+ /**
+ * The number of structural features of the '<em>Basic Query</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BASIC_QUERY_FEATURE_COUNT = QUERY_FEATURE_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.pattern.impl.StringQueryImpl <em>String Query</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.StringQueryImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getStringQuery()
+ * @generated
+ */
+ int STRING_QUERY = 17;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STRING_QUERY__ID = QUERY__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STRING_QUERY__DESCRIPTION = QUERY__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Parameter</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STRING_QUERY__PARAMETER = QUERY__PARAMETER;
+
+ /**
+ * The feature id for the '<em><b>Extension Id</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STRING_QUERY__EXTENSION_ID = QUERY__EXTENSION_ID;
+
+ /**
+ * The feature id for the '<em><b>Query Context</b></em>' map.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STRING_QUERY__QUERY_CONTEXT = QUERY__QUERY_CONTEXT;
+
+ /**
+ * The number of structural features of the '<em>String Query</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STRING_QUERY_FEATURE_COUNT = QUERY_FEATURE_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.pattern.impl.CustomQueryImpl <em>Custom Query</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.CustomQueryImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getCustomQuery()
+ * @generated
+ */
+ int CUSTOM_QUERY = 18;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CUSTOM_QUERY__ID = QUERY__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CUSTOM_QUERY__DESCRIPTION = QUERY__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Parameter</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CUSTOM_QUERY__PARAMETER = QUERY__PARAMETER;
+
+ /**
+ * The feature id for the '<em><b>Extension Id</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CUSTOM_QUERY__EXTENSION_ID = QUERY__EXTENSION_ID;
+
+ /**
+ * The feature id for the '<em><b>Query Context</b></em>' map.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CUSTOM_QUERY__QUERY_CONTEXT = QUERY__QUERY_CONTEXT;
+
+ /**
+ * The number of structural features of the '<em>Custom Query</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CUSTOM_QUERY_FEATURE_COUNT = QUERY_FEATURE_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.pattern.impl.String2PatternListImpl <em>String2 Pattern List</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.String2PatternListImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getString2PatternList()
+ * @generated
+ */
+ int STRING2_PATTERN_LIST = 19;
+
+ /**
+ * The feature id for the '<em><b>Key</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STRING2_PATTERN_LIST__KEY = 0;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STRING2_PATTERN_LIST__VALUE = 1;
+
+ /**
+ * The number of structural features of the '<em>String2 Pattern List</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STRING2_PATTERN_LIST_FEATURE_COUNT = 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.pattern.impl.String2StringImpl <em>String2 String</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.String2StringImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getString2String()
+ * @generated
+ */
+ int STRING2_STRING = 20;
+
+ /**
+ * The feature id for the '<em><b>Key</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STRING2_STRING__KEY = 0;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STRING2_STRING__VALUE = 1;
+
+ /**
+ * The number of structural features of the '<em>String2 String</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STRING2_STRING_FEATURE_COUNT = 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.pattern.impl.TypePatternExecutionReporterImpl <em>Type Pattern Execution Reporter</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.TypePatternExecutionReporterImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getTypePatternExecutionReporter()
+ * @generated
+ */
+ int TYPE_PATTERN_EXECUTION_REPORTER = 21;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_PATTERN_EXECUTION_REPORTER__ID = TypesPackage.TYPE_ABSTRACT_CLASS__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_PATTERN_EXECUTION_REPORTER__DESCRIPTION = TypesPackage.TYPE_ABSTRACT_CLASS__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_PATTERN_EXECUTION_REPORTER__VALUE = TypesPackage.TYPE_ABSTRACT_CLASS__VALUE;
+
+ /**
+ * The number of structural features of the '<em>Type Pattern Execution Reporter</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_PATTERN_EXECUTION_REPORTER_FEATURE_COUNT = TypesPackage.TYPE_ABSTRACT_CLASS_FEATURE_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.pattern.impl.BackCallImpl <em>Back Call</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.BackCallImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getBackCall()
+ * @generated
+ */
+ int BACK_CALL = 22;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BACK_CALL__ID = CALL__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BACK_CALL__DESCRIPTION = CALL__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Pattern</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BACK_CALL__PATTERN = CALL__PATTERN;
+
+ /**
+ * The number of structural features of the '<em>Back Call</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BACK_CALL_FEATURE_COUNT = CALL_FEATURE_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.pattern.impl.TypePatternCallBackHandlerImpl <em>Type Pattern Call Back Handler</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.TypePatternCallBackHandlerImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getTypePatternCallBackHandler()
+ * @generated
+ */
+ int TYPE_PATTERN_CALL_BACK_HANDLER = 23;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_PATTERN_CALL_BACK_HANDLER__ID = TypesPackage.TYPE_ABSTRACT_CLASS__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_PATTERN_CALL_BACK_HANDLER__DESCRIPTION = TypesPackage.TYPE_ABSTRACT_CLASS__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_PATTERN_CALL_BACK_HANDLER__VALUE = TypesPackage.TYPE_ABSTRACT_CLASS__VALUE;
+
+ /**
+ * The number of structural features of the '<em>Type Pattern Call Back Handler</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_PATTERN_CALL_BACK_HANDLER_FEATURE_COUNT = TypesPackage.TYPE_ABSTRACT_CLASS_FEATURE_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.pattern.impl.TypePatternDomainVisitorImpl <em>Type Pattern Domain Visitor</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.TypePatternDomainVisitorImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getTypePatternDomainVisitor()
+ * @generated
+ */
+ int TYPE_PATTERN_DOMAIN_VISITOR = 24;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_PATTERN_DOMAIN_VISITOR__ID = TypesPackage.TYPE_ABSTRACT_CLASS__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_PATTERN_DOMAIN_VISITOR__DESCRIPTION = TypesPackage.TYPE_ABSTRACT_CLASS__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_PATTERN_DOMAIN_VISITOR__VALUE = TypesPackage.TYPE_ABSTRACT_CLASS__VALUE;
+
+ /**
+ * The number of structural features of the '<em>Type Pattern Domain Visitor</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_PATTERN_DOMAIN_VISITOR_FEATURE_COUNT = TypesPackage.TYPE_ABSTRACT_CLASS_FEATURE_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.pattern.impl.TypePatternListImpl <em>Type Pattern List</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.TypePatternListImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getTypePatternList()
+ * @generated
+ */
+ int TYPE_PATTERN_LIST = 25;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_PATTERN_LIST__ID = TypesPackage.TYPE__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_PATTERN_LIST__DESCRIPTION = TypesPackage.TYPE__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Elements</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_PATTERN_LIST__ELEMENTS = TypesPackage.TYPE_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Type Pattern List</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_PATTERN_LIST_FEATURE_COUNT = TypesPackage.TYPE_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '<em>Context</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.PatternContext
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getPatternContext()
+ * @generated
+ */
+ int PATTERN_CONTEXT = 26;
+
+ /**
+ * The meta object id for the '<em>Exception</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.PatternException
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getPatternException()
+ * @generated
+ */
+ int PATTERN_EXCEPTION = 27;
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.pattern.Pattern <em>Pattern</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Pattern</em>'.
+ * @see org.eclipse.egf.model.pattern.Pattern
+ * @generated
+ */
+ EClass getPattern();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.egf.model.pattern.Pattern#getHeaderMethod <em>Header Method</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Header Method</em>'.
+ * @see org.eclipse.egf.model.pattern.Pattern#getHeaderMethod()
+ * @see #getPattern()
+ * @generated
+ */
+ EReference getPattern_HeaderMethod();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.egf.model.pattern.Pattern#getMethods <em>Methods</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Methods</em>'.
+ * @see org.eclipse.egf.model.pattern.Pattern#getMethods()
+ * @see #getPattern()
+ * @generated
+ */
+ EReference getPattern_Methods();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.egf.model.pattern.Pattern#getSuperPattern <em>Super Pattern</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Super Pattern</em>'.
+ * @see org.eclipse.egf.model.pattern.Pattern#getSuperPattern()
+ * @see #getPattern()
+ * @generated
+ */
+ EReference getPattern_SuperPattern();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.egf.model.pattern.Pattern#getFooterMethod <em>Footer Method</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Footer Method</em>'.
+ * @see org.eclipse.egf.model.pattern.Pattern#getFooterMethod()
+ * @see #getPattern()
+ * @generated
+ */
+ EReference getPattern_FooterMethod();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.egf.model.pattern.Pattern#getOrchestration <em>Orchestration</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Orchestration</em>'.
+ * @see org.eclipse.egf.model.pattern.Pattern#getOrchestration()
+ * @see #getPattern()
+ * @generated
+ */
+ EReference getPattern_Orchestration();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.egf.model.pattern.Pattern#getParameters <em>Parameters</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Parameters</em>'.
+ * @see org.eclipse.egf.model.pattern.Pattern#getParameters()
+ * @see #getPattern()
+ * @generated
+ */
+ EReference getPattern_Parameters();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.egf.model.pattern.Pattern#getNature <em>Nature</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Nature</em>'.
+ * @see org.eclipse.egf.model.pattern.Pattern#getNature()
+ * @see #getPattern()
+ * @generated
+ */
+ EReference getPattern_Nature();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.egf.model.pattern.Pattern#getVariables <em>Variables</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Variables</em>'.
+ * @see org.eclipse.egf.model.pattern.Pattern#getVariables()
+ * @see #getPattern()
+ * @generated
+ */
+ EReference getPattern_Variables();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.egf.model.pattern.Pattern#getInitMethod <em>Init Method</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Init Method</em>'.
+ * @see org.eclipse.egf.model.pattern.Pattern#getInitMethod()
+ * @see #getPattern()
+ * @generated
+ */
+ EReference getPattern_InitMethod();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.pattern.PatternMethod <em>Method</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Method</em>'.
+ * @see org.eclipse.egf.model.pattern.PatternMethod
+ * @generated
+ */
+ EClass getPatternMethod();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.egf.model.pattern.PatternMethod#getPattern <em>Pattern</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Pattern</em>'.
+ * @see org.eclipse.egf.model.pattern.PatternMethod#getPattern()
+ * @see #getPatternMethod()
+ * @generated
+ */
+ EReference getPatternMethod_Pattern();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.egf.model.pattern.PatternMethod#getPatternFilePath <em>Pattern File Path</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Pattern File Path</em>'.
+ * @see org.eclipse.egf.model.pattern.PatternMethod#getPatternFilePath()
+ * @see #getPatternMethod()
+ * @generated
+ */
+ EAttribute getPatternMethod_PatternFilePath();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.pattern.PatternParameter <em>Parameter</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Parameter</em>'.
+ * @see org.eclipse.egf.model.pattern.PatternParameter
+ * @generated
+ */
+ EClass getPatternParameter();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.egf.model.pattern.PatternParameter#getType <em>Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Type</em>'.
+ * @see org.eclipse.egf.model.pattern.PatternParameter#getType()
+ * @see #getPatternParameter()
+ * @generated
+ */
+ EAttribute getPatternParameter_Type();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.egf.model.pattern.PatternParameter#getQuery <em>Query</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Query</em>'.
+ * @see org.eclipse.egf.model.pattern.PatternParameter#getQuery()
+ * @see #getPatternParameter()
+ * @generated
+ */
+ EReference getPatternParameter_Query();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.pattern.PatternLibrary <em>Library</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Library</em>'.
+ * @see org.eclipse.egf.model.pattern.PatternLibrary
+ * @generated
+ */
+ EClass getPatternLibrary();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.egf.model.pattern.PatternLibrary#getElements <em>Elements</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Elements</em>'.
+ * @see org.eclipse.egf.model.pattern.PatternLibrary#getElements()
+ * @see #getPatternLibrary()
+ * @generated
+ */
+ EReference getPatternLibrary_Elements();
+
+ /**
+ * Returns the meta object for the map '{@link org.eclipse.egf.model.pattern.PatternLibrary#getFilters <em>Filters</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the map '<em>Filters</em>'.
+ * @see org.eclipse.egf.model.pattern.PatternLibrary#getFilters()
+ * @see #getPatternLibrary()
+ * @generated
+ */
+ EReference getPatternLibrary_Filters();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.pattern.PatternElement <em>Element</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Element</em>'.
+ * @see org.eclipse.egf.model.pattern.PatternElement
+ * @generated
+ */
+ EClass getPatternElement();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.egf.model.pattern.PatternElement#getContainer <em>Container</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Container</em>'.
+ * @see org.eclipse.egf.model.pattern.PatternElement#getContainer()
+ * @see #getPatternElement()
+ * @generated
+ */
+ EReference getPatternElement_Container();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.pattern.PatternViewpoint <em>Viewpoint</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Viewpoint</em>'.
+ * @see org.eclipse.egf.model.pattern.PatternViewpoint
+ * @generated
+ */
+ EClass getPatternViewpoint();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.egf.model.pattern.PatternViewpoint#getLibraries <em>Libraries</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Libraries</em>'.
+ * @see org.eclipse.egf.model.pattern.PatternViewpoint#getLibraries()
+ * @see #getPatternViewpoint()
+ * @generated
+ */
+ EReference getPatternViewpoint_Libraries();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.pattern.PatternNature <em>Nature</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Nature</em>'.
+ * @see org.eclipse.egf.model.pattern.PatternNature
+ * @generated
+ */
+ EClass getPatternNature();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.pattern.PatternCall <em>Call</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Call</em>'.
+ * @see org.eclipse.egf.model.pattern.PatternCall
+ * @generated
+ */
+ EClass getPatternCall();
+
+ /**
+ * Returns the meta object for the map '{@link org.eclipse.egf.model.pattern.PatternCall#getParameterMatching <em>Parameter Matching</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the map '<em>Parameter Matching</em>'.
+ * @see org.eclipse.egf.model.pattern.PatternCall#getParameterMatching()
+ * @see #getPatternCall()
+ * @generated
+ */
+ EReference getPatternCall_ParameterMatching();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.pattern.SuperCall <em>Super Call</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Super Call</em>'.
+ * @see org.eclipse.egf.model.pattern.SuperCall
+ * @generated
+ */
+ EClass getSuperCall();
+
+ /**
+ * Returns the meta object for class '{@link java.util.Map.Entry <em>Paramerter2 Parameter Map</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Paramerter2 Parameter Map</em>'.
+ * @see java.util.Map.Entry
+ * @model features="value key"
+ * valueType="org.eclipse.egf.model.pattern.PatternParameter"
+ * keyType="org.eclipse.egf.model.pattern.PatternParameter" keyResolveProxies="false"
+ * @generated
+ */
+ EClass getParamerter2ParameterMap();
+
+ /**
+ * Returns the meta object for the reference '{@link java.util.Map.Entry <em>Key</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Key</em>'.
+ * @see java.util.Map.Entry
+ * @see #getParamerter2ParameterMap()
+ * @generated
+ */
+ EReference getParamerter2ParameterMap_Key();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.pattern.Call <em>Call</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Call</em>'.
+ * @see org.eclipse.egf.model.pattern.Call
+ * @generated
+ */
+ EClass getCall();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.egf.model.pattern.Call#getPattern <em>Pattern</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Pattern</em>'.
+ * @see org.eclipse.egf.model.pattern.Call#getPattern()
+ * @see #getCall()
+ * @generated
+ */
+ EReference getCall_Pattern();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.pattern.MethodCall <em>Method Call</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Method Call</em>'.
+ * @see org.eclipse.egf.model.pattern.MethodCall
+ * @generated
+ */
+ EClass getMethodCall();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.egf.model.pattern.MethodCall#getCalled <em>Called</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Called</em>'.
+ * @see org.eclipse.egf.model.pattern.MethodCall#getCalled()
+ * @see #getMethodCall()
+ * @generated
+ */
+ EReference getMethodCall_Called();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.pattern.PatternVariable <em>Variable</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Variable</em>'.
+ * @see org.eclipse.egf.model.pattern.PatternVariable
+ * @generated
+ */
+ EClass getPatternVariable();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.egf.model.pattern.PatternVariable#getType <em>Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Type</em>'.
+ * @see org.eclipse.egf.model.pattern.PatternVariable#getType()
+ * @see #getPatternVariable()
+ * @generated
+ */
+ EAttribute getPatternVariable_Type();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.pattern.AbstractPatternCall <em>Abstract Pattern Call</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Abstract Pattern Call</em>'.
+ * @see org.eclipse.egf.model.pattern.AbstractPatternCall
+ * @generated
+ */
+ EClass getAbstractPatternCall();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.egf.model.pattern.AbstractPatternCall#getCalled <em>Called</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Called</em>'.
+ * @see org.eclipse.egf.model.pattern.AbstractPatternCall#getCalled()
+ * @see #getAbstractPatternCall()
+ * @generated
+ */
+ EReference getAbstractPatternCall_Called();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.pattern.PatternInjectedCall <em>Injected Call</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Injected Call</em>'.
+ * @see org.eclipse.egf.model.pattern.PatternInjectedCall
+ * @generated
+ */
+ EClass getPatternInjectedCall();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.egf.model.pattern.PatternInjectedCall#getContext <em>Context</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Context</em>'.
+ * @see org.eclipse.egf.model.pattern.PatternInjectedCall#getContext()
+ * @see #getPatternInjectedCall()
+ * @generated
+ */
+ EReference getPatternInjectedCall_Context();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.pattern.Query <em>Query</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Query</em>'.
+ * @see org.eclipse.egf.model.pattern.Query
+ * @generated
+ */
+ EClass getQuery();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.egf.model.pattern.Query#getParameter <em>Parameter</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Parameter</em>'.
+ * @see org.eclipse.egf.model.pattern.Query#getParameter()
+ * @see #getQuery()
+ * @generated
+ */
+ EReference getQuery_Parameter();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.egf.model.pattern.Query#getExtensionId <em>Extension Id</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Extension Id</em>'.
+ * @see org.eclipse.egf.model.pattern.Query#getExtensionId()
+ * @see #getQuery()
+ * @generated
+ */
+ EAttribute getQuery_ExtensionId();
+
+ /**
+ * Returns the meta object for the map '{@link org.eclipse.egf.model.pattern.Query#getQueryContext <em>Query Context</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the map '<em>Query Context</em>'.
+ * @see org.eclipse.egf.model.pattern.Query#getQueryContext()
+ * @see #getQuery()
+ * @generated
+ */
+ EReference getQuery_QueryContext();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.pattern.BasicQuery <em>Basic Query</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Basic Query</em>'.
+ * @see org.eclipse.egf.model.pattern.BasicQuery
+ * @generated
+ */
+ EClass getBasicQuery();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.pattern.StringQuery <em>String Query</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>String Query</em>'.
+ * @see org.eclipse.egf.model.pattern.StringQuery
+ * @generated
+ */
+ EClass getStringQuery();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.pattern.CustomQuery <em>Custom Query</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Custom Query</em>'.
+ * @see org.eclipse.egf.model.pattern.CustomQuery
+ * @generated
+ */
+ EClass getCustomQuery();
+
+ /**
+ * Returns the meta object for class '{@link java.util.Map.Entry <em>String2 Pattern List</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>String2 Pattern List</em>'.
+ * @see java.util.Map.Entry
+ * @model keyDataType="org.eclipse.emf.ecore.EString" keyRequired="true"
+ * valueType="org.eclipse.egf.model.pattern.PatternElement" valueMany="true"
+ * @generated
+ */
+ EClass getString2PatternList();
+
+ /**
+ * Returns the meta object for the attribute '{@link java.util.Map.Entry <em>Key</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Key</em>'.
+ * @see java.util.Map.Entry
+ * @see #getString2PatternList()
+ * @generated
+ */
+ EAttribute getString2PatternList_Key();
+
+ /**
+ * Returns the meta object for the reference list '{@link java.util.Map.Entry <em>Value</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Value</em>'.
+ * @see java.util.Map.Entry
+ * @see #getString2PatternList()
+ * @generated
+ */
+ EReference getString2PatternList_Value();
+
+ /**
+ * Returns the meta object for class '{@link java.util.Map.Entry <em>String2 String</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>String2 String</em>'.
+ * @see java.util.Map.Entry
+ * @model keyDataType="org.eclipse.emf.ecore.EString" keyRequired="true"
+ * valueDataType="org.eclipse.emf.ecore.EString" valueRequired="true"
+ * @generated
+ */
+ EClass getString2String();
+
+ /**
+ * Returns the meta object for the attribute '{@link java.util.Map.Entry <em>Key</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Key</em>'.
+ * @see java.util.Map.Entry
+ * @see #getString2String()
+ * @generated
+ */
+ EAttribute getString2String_Key();
+
+ /**
+ * Returns the meta object for the attribute '{@link java.util.Map.Entry <em>Value</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Value</em>'.
+ * @see java.util.Map.Entry
+ * @see #getString2String()
+ * @generated
+ */
+ EAttribute getString2String_Value();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.pattern.TypePatternExecutionReporter <em>Type Pattern Execution Reporter</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Type Pattern Execution Reporter</em>'.
+ * @see org.eclipse.egf.model.pattern.TypePatternExecutionReporter
+ * @generated
+ */
+ EClass getTypePatternExecutionReporter();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.pattern.BackCall <em>Back Call</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Back Call</em>'.
+ * @see org.eclipse.egf.model.pattern.BackCall
+ * @generated
+ */
+ EClass getBackCall();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.pattern.TypePatternCallBackHandler <em>Type Pattern Call Back Handler</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Type Pattern Call Back Handler</em>'.
+ * @see org.eclipse.egf.model.pattern.TypePatternCallBackHandler
+ * @generated
+ */
+ EClass getTypePatternCallBackHandler();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.pattern.TypePatternDomainVisitor <em>Type Pattern Domain Visitor</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Type Pattern Domain Visitor</em>'.
+ * @see org.eclipse.egf.model.pattern.TypePatternDomainVisitor
+ * @generated
+ */
+ EClass getTypePatternDomainVisitor();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.pattern.TypePatternList <em>Type Pattern List</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Type Pattern List</em>'.
+ * @see org.eclipse.egf.model.pattern.TypePatternList
+ * @generated
+ */
+ EClass getTypePatternList();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.egf.model.pattern.TypePatternList#getElements <em>Elements</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Elements</em>'.
+ * @see org.eclipse.egf.model.pattern.TypePatternList#getElements()
+ * @see #getTypePatternList()
+ * @generated
+ */
+ EReference getTypePatternList_Elements();
+
+ /**
+ * Returns the meta object for the reference '{@link java.util.Map.Entry <em>Value</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Value</em>'.
+ * @see java.util.Map.Entry
+ * @see #getParamerter2ParameterMap()
+ * @generated
+ */
+ EReference getParamerter2ParameterMap_Value();
+
+ /**
+ * Returns the meta object for data type '{@link org.eclipse.egf.model.pattern.PatternContext <em>Context</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for data type '<em>Context</em>'.
+ * @see org.eclipse.egf.model.pattern.PatternContext
+ * @model instanceClass="org.eclipse.egf.model.pattern.PatternContext"
+ * @generated
+ */
+ EDataType getPatternContext();
+
+ /**
+ * Returns the meta object for data type '{@link org.eclipse.egf.model.pattern.PatternException <em>Exception</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for data type '<em>Exception</em>'.
+ * @see org.eclipse.egf.model.pattern.PatternException
+ * @model instanceClass="org.eclipse.egf.model.pattern.PatternException"
+ * @generated
+ */
+ EDataType getPatternException();
+
+ /**
+ * 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
+ */
+ PatternFactory getPatternFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.pattern.impl.PatternImpl <em>Pattern</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.PatternImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getPattern()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass PATTERN = eINSTANCE.getPattern();
+
+ /**
+ * The meta object literal for the '<em><b>Header Method</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference PATTERN__HEADER_METHOD = eINSTANCE.getPattern_HeaderMethod();
+
+ /**
+ * The meta object literal for the '<em><b>Methods</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference PATTERN__METHODS = eINSTANCE.getPattern_Methods();
+
+ /**
+ * The meta object literal for the '<em><b>Super Pattern</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference PATTERN__SUPER_PATTERN = eINSTANCE.getPattern_SuperPattern();
+
+ /**
+ * The meta object literal for the '<em><b>Footer Method</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference PATTERN__FOOTER_METHOD = eINSTANCE.getPattern_FooterMethod();
+
+ /**
+ * The meta object literal for the '<em><b>Orchestration</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference PATTERN__ORCHESTRATION = eINSTANCE.getPattern_Orchestration();
+
+ /**
+ * The meta object literal for the '<em><b>Parameters</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference PATTERN__PARAMETERS = eINSTANCE.getPattern_Parameters();
+
+ /**
+ * The meta object literal for the '<em><b>Nature</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference PATTERN__NATURE = eINSTANCE.getPattern_Nature();
+
+ /**
+ * The meta object literal for the '<em><b>Variables</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference PATTERN__VARIABLES = eINSTANCE.getPattern_Variables();
+
+ /**
+ * The meta object literal for the '<em><b>Init Method</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference PATTERN__INIT_METHOD = eINSTANCE.getPattern_InitMethod();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.pattern.impl.PatternMethodImpl <em>Method</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.PatternMethodImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getPatternMethod()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass PATTERN_METHOD = eINSTANCE.getPatternMethod();
+
+ /**
+ * The meta object literal for the '<em><b>Pattern</b></em>' container reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference PATTERN_METHOD__PATTERN = eINSTANCE.getPatternMethod_Pattern();
+
+ /**
+ * The meta object literal for the '<em><b>Pattern File Path</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EAttribute PATTERN_METHOD__PATTERN_FILE_PATH = eINSTANCE.getPatternMethod_PatternFilePath();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.pattern.impl.PatternParameterImpl <em>Parameter</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.PatternParameterImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getPatternParameter()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass PATTERN_PARAMETER = eINSTANCE.getPatternParameter();
+
+ /**
+ * The meta object literal for the '<em><b>Type</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EAttribute PATTERN_PARAMETER__TYPE = eINSTANCE.getPatternParameter_Type();
+
+ /**
+ * The meta object literal for the '<em><b>Query</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference PATTERN_PARAMETER__QUERY = eINSTANCE.getPatternParameter_Query();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.pattern.impl.PatternLibraryImpl <em>Library</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.PatternLibraryImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getPatternLibrary()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass PATTERN_LIBRARY = eINSTANCE.getPatternLibrary();
+
+ /**
+ * The meta object literal for the '<em><b>Elements</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference PATTERN_LIBRARY__ELEMENTS = eINSTANCE.getPatternLibrary_Elements();
+
+ /**
+ * The meta object literal for the '<em><b>Filters</b></em>' map feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference PATTERN_LIBRARY__FILTERS = eINSTANCE.getPatternLibrary_Filters();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.pattern.impl.PatternElementImpl <em>Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.PatternElementImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getPatternElement()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass PATTERN_ELEMENT = eINSTANCE.getPatternElement();
+
+ /**
+ * The meta object literal for the '<em><b>Container</b></em>' container reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference PATTERN_ELEMENT__CONTAINER = eINSTANCE.getPatternElement_Container();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.pattern.impl.PatternViewpointImpl <em>Viewpoint</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.PatternViewpointImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getPatternViewpoint()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass PATTERN_VIEWPOINT = eINSTANCE.getPatternViewpoint();
+
+ /**
+ * The meta object literal for the '<em><b>Libraries</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference PATTERN_VIEWPOINT__LIBRARIES = eINSTANCE.getPatternViewpoint_Libraries();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.pattern.impl.PatternNatureImpl <em>Nature</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.PatternNatureImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getPatternNature()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass PATTERN_NATURE = eINSTANCE.getPatternNature();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.pattern.impl.PatternCallImpl <em>Call</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.PatternCallImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getPatternCall()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass PATTERN_CALL = eINSTANCE.getPatternCall();
+
+ /**
+ * The meta object literal for the '<em><b>Parameter Matching</b></em>' map feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference PATTERN_CALL__PARAMETER_MATCHING = eINSTANCE.getPatternCall_ParameterMatching();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.pattern.impl.SuperCallImpl <em>Super Call</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.SuperCallImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getSuperCall()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass SUPER_CALL = eINSTANCE.getSuperCall();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.pattern.impl.Paramerter2ParameterMapImpl <em>Paramerter2 Parameter Map</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.Paramerter2ParameterMapImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getParamerter2ParameterMap()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass PARAMERTER2_PARAMETER_MAP = eINSTANCE.getParamerter2ParameterMap();
+
+ /**
+ * The meta object literal for the '<em><b>Key</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference PARAMERTER2_PARAMETER_MAP__KEY = eINSTANCE.getParamerter2ParameterMap_Key();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.pattern.impl.CallImpl <em>Call</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.CallImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getCall()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass CALL = eINSTANCE.getCall();
+
+ /**
+ * The meta object literal for the '<em><b>Pattern</b></em>' container reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference CALL__PATTERN = eINSTANCE.getCall_Pattern();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.pattern.impl.MethodCallImpl <em>Method Call</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.MethodCallImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getMethodCall()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass METHOD_CALL = eINSTANCE.getMethodCall();
+
+ /**
+ * The meta object literal for the '<em><b>Called</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference METHOD_CALL__CALLED = eINSTANCE.getMethodCall_Called();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.pattern.impl.PatternVariableImpl <em>Variable</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.PatternVariableImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getPatternVariable()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass PATTERN_VARIABLE = eINSTANCE.getPatternVariable();
+
+ /**
+ * The meta object literal for the '<em><b>Type</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EAttribute PATTERN_VARIABLE__TYPE = eINSTANCE.getPatternVariable_Type();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.pattern.impl.AbstractPatternCallImpl <em>Abstract Pattern Call</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.AbstractPatternCallImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getAbstractPatternCall()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass ABSTRACT_PATTERN_CALL = eINSTANCE.getAbstractPatternCall();
+
+ /**
+ * The meta object literal for the '<em><b>Called</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference ABSTRACT_PATTERN_CALL__CALLED = eINSTANCE.getAbstractPatternCall_Called();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.pattern.impl.PatternInjectedCallImpl <em>Injected Call</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.PatternInjectedCallImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getPatternInjectedCall()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass PATTERN_INJECTED_CALL = eINSTANCE.getPatternInjectedCall();
+
+ /**
+ * The meta object literal for the '<em><b>Context</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference PATTERN_INJECTED_CALL__CONTEXT = eINSTANCE.getPatternInjectedCall_Context();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.pattern.impl.QueryImpl <em>Query</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.QueryImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getQuery()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass QUERY = eINSTANCE.getQuery();
+
+ /**
+ * The meta object literal for the '<em><b>Parameter</b></em>' container reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference QUERY__PARAMETER = eINSTANCE.getQuery_Parameter();
+
+ /**
+ * The meta object literal for the '<em><b>Extension Id</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EAttribute QUERY__EXTENSION_ID = eINSTANCE.getQuery_ExtensionId();
+
+ /**
+ * The meta object literal for the '<em><b>Query Context</b></em>' map feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference QUERY__QUERY_CONTEXT = eINSTANCE.getQuery_QueryContext();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.pattern.impl.BasicQueryImpl <em>Basic Query</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.BasicQueryImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getBasicQuery()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass BASIC_QUERY = eINSTANCE.getBasicQuery();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.pattern.impl.StringQueryImpl <em>String Query</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.StringQueryImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getStringQuery()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass STRING_QUERY = eINSTANCE.getStringQuery();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.pattern.impl.CustomQueryImpl <em>Custom Query</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.CustomQueryImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getCustomQuery()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass CUSTOM_QUERY = eINSTANCE.getCustomQuery();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.pattern.impl.String2PatternListImpl <em>String2 Pattern List</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.String2PatternListImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getString2PatternList()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass STRING2_PATTERN_LIST = eINSTANCE.getString2PatternList();
+
+ /**
+ * The meta object literal for the '<em><b>Key</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EAttribute STRING2_PATTERN_LIST__KEY = eINSTANCE.getString2PatternList_Key();
+
+ /**
+ * The meta object literal for the '<em><b>Value</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference STRING2_PATTERN_LIST__VALUE = eINSTANCE.getString2PatternList_Value();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.pattern.impl.String2StringImpl <em>String2 String</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.String2StringImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getString2String()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass STRING2_STRING = eINSTANCE.getString2String();
+
+ /**
+ * The meta object literal for the '<em><b>Key</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EAttribute STRING2_STRING__KEY = eINSTANCE.getString2String_Key();
+
+ /**
+ * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EAttribute STRING2_STRING__VALUE = eINSTANCE.getString2String_Value();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.pattern.impl.TypePatternExecutionReporterImpl <em>Type Pattern Execution Reporter</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.TypePatternExecutionReporterImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getTypePatternExecutionReporter()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass TYPE_PATTERN_EXECUTION_REPORTER = eINSTANCE.getTypePatternExecutionReporter();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.pattern.impl.BackCallImpl <em>Back Call</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.BackCallImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getBackCall()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass BACK_CALL = eINSTANCE.getBackCall();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.pattern.impl.TypePatternCallBackHandlerImpl <em>Type Pattern Call Back Handler</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.TypePatternCallBackHandlerImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getTypePatternCallBackHandler()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass TYPE_PATTERN_CALL_BACK_HANDLER = eINSTANCE.getTypePatternCallBackHandler();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.pattern.impl.TypePatternDomainVisitorImpl <em>Type Pattern Domain Visitor</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.TypePatternDomainVisitorImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getTypePatternDomainVisitor()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass TYPE_PATTERN_DOMAIN_VISITOR = eINSTANCE.getTypePatternDomainVisitor();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.pattern.impl.TypePatternListImpl <em>Type Pattern List</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.impl.TypePatternListImpl
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getTypePatternList()
+ * @generated
+ */
+ EClass TYPE_PATTERN_LIST = eINSTANCE.getTypePatternList();
+
+ /**
+ * The meta object literal for the '<em><b>Elements</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference TYPE_PATTERN_LIST__ELEMENTS = eINSTANCE.getTypePatternList_Elements();
+
+ /**
+ * The meta object literal for the '<em><b>Value</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EReference PARAMERTER2_PARAMETER_MAP__VALUE = eINSTANCE.getParamerter2ParameterMap_Value();
+
+ /**
+ * The meta object literal for the '<em>Context</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.PatternContext
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getPatternContext()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EDataType PATTERN_CONTEXT = eINSTANCE.getPatternContext();
+
+ /**
+ * The meta object literal for the '<em>Exception</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.PatternException
+ * @see org.eclipse.egf.model.pattern.impl.PatternPackageImpl#getPatternException()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EDataType PATTERN_EXCEPTION = eINSTANCE.getPatternException();
+
+ }
+
+} // PatternPackage
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/PatternParameter.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/PatternParameter.java
new file mode 100644
index 0000000..c8374ab
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/PatternParameter.java
@@ -0,0 +1,89 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern;
+
+import org.eclipse.egf.model.fcore.NamedModelElement;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Parameter</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.pattern.PatternParameter#getType <em>Type</em>}</li>
+ * <li>{@link org.eclipse.egf.model.pattern.PatternParameter#getQuery <em>Query</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getPatternParameter()
+ * @model annotation="http://www.eclipse.org/emf/2002/Ecore constraints='MandatoryName'"
+ * @generated
+ */
+public interface PatternParameter extends NamedModelElement {
+ /**
+ * Returns the value of the '<em><b>Type</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Type</em>' reference isn't clear, there really
+ * should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Type</em>' attribute.
+ * @see #setType(String)
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getPatternParameter_Type()
+ * @model required="true"
+ * @generated
+ */
+ String getType();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.pattern.PatternParameter#getType <em>Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Type</em>' attribute.
+ * @see #getType()
+ * @generated
+ */
+ void setType(String value);
+
+ /**
+ * Returns the value of the '<em><b>Query</b></em>' containment reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.pattern.Query#getParameter <em>Parameter</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Query</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Query</em>' containment reference.
+ * @see #setQuery(Query)
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getPatternParameter_Query()
+ * @see org.eclipse.egf.model.pattern.Query#getParameter
+ * @model opposite="parameter" containment="true"
+ * @generated
+ */
+ Query getQuery();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.pattern.PatternParameter#getQuery <em>Query</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Query</em>' containment reference.
+ * @see #getQuery()
+ * @generated
+ */
+ void setQuery(Query value);
+
+} // PatternParameter
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/PatternVariable.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/PatternVariable.java
new file mode 100644
index 0000000..842a290
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/PatternVariable.java
@@ -0,0 +1,60 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern;
+
+import org.eclipse.egf.model.fcore.NamedModelElement;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Variable</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.pattern.PatternVariable#getType <em>Type</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getPatternVariable()
+ * @model annotation="http://www.eclipse.org/emf/2002/Ecore constraints='MandatoryName'"
+ * @generated
+ */
+public interface PatternVariable extends NamedModelElement {
+
+ /**
+ * Returns the value of the '<em><b>Type</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Type</em>' attribute isn't clear, there really
+ * should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Type</em>' attribute.
+ * @see #setType(String)
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getPatternVariable_Type()
+ * @model required="true"
+ * @generated
+ */
+ String getType();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.pattern.PatternVariable#getType <em>Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Type</em>' attribute.
+ * @see #getType()
+ * @generated
+ */
+ void setType(String value);
+} // PatternVariable
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/PatternViewpoint.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/PatternViewpoint.java
new file mode 100644
index 0000000..d2388d1
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/PatternViewpoint.java
@@ -0,0 +1,51 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern;
+
+import org.eclipse.egf.model.fcore.Viewpoint;
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Viewpoint</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.pattern.PatternViewpoint#getLibraries <em>Libraries</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getPatternViewpoint()
+ * @model
+ * @generated
+ */
+public interface PatternViewpoint extends Viewpoint {
+ /**
+ * Returns the value of the '<em><b>Libraries</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.egf.model.pattern.PatternLibrary}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Libraries</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>Libraries</em>' containment reference list.
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getPatternViewpoint_Libraries()
+ * @model containment="true"
+ * @generated
+ */
+ EList<PatternLibrary> getLibraries();
+
+} // PatternViewpoint
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/Query.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/Query.java
new file mode 100644
index 0000000..673f8bc
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/Query.java
@@ -0,0 +1,102 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern;
+
+import org.eclipse.egf.model.fcore.ModelElement;
+import org.eclipse.emf.common.util.EMap;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object '
+ * <em><b>Query</b></em>'. <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.pattern.Query#getParameter <em>Parameter</em>}</li>
+ * <li>{@link org.eclipse.egf.model.pattern.Query#getExtensionId <em>Extension Id</em>}</li>
+ * <li>{@link org.eclipse.egf.model.pattern.Query#getQueryContext <em>Query Context</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getQuery()
+ * @model abstract="true"
+ * @generated
+ */
+public interface Query extends ModelElement {
+ /**
+ * Returns the value of the '<em><b>Parameter</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.egf.model.pattern.PatternParameter#getQuery <em>Query</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Parameter</em>' container reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Parameter</em>' container reference.
+ * @see #setParameter(PatternParameter)
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getQuery_Parameter()
+ * @see org.eclipse.egf.model.pattern.PatternParameter#getQuery
+ * @model opposite="query" resolveProxies="false" required="true" transient="false"
+ * @generated
+ */
+ PatternParameter getParameter();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.pattern.Query#getParameter <em>Parameter</em>}' container reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ * @param value the new value of the '<em>Parameter</em>' container reference.
+ * @see #getParameter()
+ * @generated
+ */
+ void setParameter(PatternParameter value);
+
+ /**
+ * Returns the value of the '<em><b>Extension Id</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Extension Id</em>' attribute isn't clear, there
+ * really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Extension Id</em>' attribute.
+ * @see #setExtensionId(String)
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getQuery_ExtensionId()
+ * @model required="true"
+ * @generated
+ */
+ String getExtensionId();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.pattern.Query#getExtensionId <em>Extension Id</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Extension Id</em>' attribute.
+ * @see #getExtensionId()
+ * @generated
+ */
+ void setExtensionId(String value);
+
+ /**
+ * Returns the value of the '<em><b>Query Context</b></em>' map.
+ * The key is of type {@link java.lang.String},
+ * and the value is of type {@link java.lang.String},
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @return the value of the '<em>Query Context</em>' map.
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getQuery_QueryContext()
+ * @model mapType="org.eclipse.egf.model.pattern.String2String<org.eclipse.emf.ecore.EString, org.eclipse.emf.ecore.EString>"
+ * @generated
+ */
+ EMap<String, String> getQueryContext();
+
+} // Query
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/StringQuery.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/StringQuery.java
new file mode 100644
index 0000000..5fcf9bc
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/StringQuery.java
@@ -0,0 +1,26 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>String Query</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getStringQuery()
+ * @model
+ * @generated
+ */
+public interface StringQuery extends Query {
+} // StringQuery
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/SuperCall.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/SuperCall.java
new file mode 100644
index 0000000..97bcfb6
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/SuperCall.java
@@ -0,0 +1,26 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Super Call</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getSuperCall()
+ * @model
+ * @generated
+ */
+public interface SuperCall extends Call {
+} // SuperCall
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/TypePatternCallBackHandler.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/TypePatternCallBackHandler.java
new file mode 100644
index 0000000..e9e0a2c
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/TypePatternCallBackHandler.java
@@ -0,0 +1,38 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern;
+
+import org.eclipse.egf.model.types.TypeAbstractClass;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Type Pattern Call Back Handler</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getTypePatternCallBackHandler()
+ * @model
+ * @generated
+ */
+public interface TypePatternCallBackHandler extends TypeAbstractClass {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation" required="true"
+ * annotation="http://www.eclipse.org/emf/2002/GenModel body='return org.eclipse.egf.model.pattern.CallBackHandler.class;'"
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ Class<?> getType();
+
+} // TypePatternCallBackHandler
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/TypePatternDomainVisitor.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/TypePatternDomainVisitor.java
new file mode 100644
index 0000000..3fe64af
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/TypePatternDomainVisitor.java
@@ -0,0 +1,38 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern;
+
+import org.eclipse.egf.model.types.TypeAbstractClass;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Type Pattern Domain Visitor</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getTypePatternDomainVisitor()
+ * @model
+ * @generated
+ */
+public interface TypePatternDomainVisitor extends TypeAbstractClass {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation" required="true"
+ * annotation="http://www.eclipse.org/emf/2002/GenModel body='return org.eclipse.egf.model.pattern.DomainVisitor.class;'"
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ Class<?> getType();
+
+} // TypePatternDomainVisitor
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/TypePatternExecutionReporter.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/TypePatternExecutionReporter.java
new file mode 100644
index 0000000..dc24364
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/TypePatternExecutionReporter.java
@@ -0,0 +1,39 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern;
+
+import org.eclipse.egf.model.types.TypeAbstractClass;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Type Pattern Execution Reporter</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getTypePatternExecutionReporter()
+ * @model
+ * @generated
+ */
+public interface TypePatternExecutionReporter extends TypeAbstractClass {
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation" required="true"
+ * annotation="http://www.eclipse.org/emf/2002/GenModel body='return org.eclipse.egf.model.pattern.PatternExecutionReporter.class;'"
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ Class<?> getType();
+
+} // TypePatternExecutionReporter
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/TypePatternList.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/TypePatternList.java
new file mode 100644
index 0000000..732b3e6
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/TypePatternList.java
@@ -0,0 +1,62 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern;
+
+import org.eclipse.egf.model.types.Type;
+import org.eclipse.egf.model.types.TypeAbstractClass;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Type Pattern List</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.pattern.TypePatternList#getElements <em>Elements</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getTypePatternList()
+ * @model
+ * @generated
+ */
+public interface TypePatternList extends Type {
+ /**
+ * Returns the value of the '<em><b>Elements</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.egf.model.pattern.PatternElement}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Elements</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Elements</em>' reference list.
+ * @see org.eclipse.egf.model.pattern.PatternPackage#getTypePatternList_Elements()
+ * @model
+ * @generated
+ */
+ EList<PatternElement> getElements();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation" required="true"
+ * annotation="http://www.eclipse.org/emf/2002/GenModel body='return org.eclipse.egf.model.pattern.TypePatternList.class;'"
+ * @generated
+ */
+ Class<?> getType();
+
+} // TypePatternList
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/AbstractPatternCallImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/AbstractPatternCallImpl.java
new file mode 100644
index 0000000..275f36d
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/AbstractPatternCallImpl.java
@@ -0,0 +1,165 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.impl;
+
+import org.eclipse.egf.model.pattern.AbstractPatternCall;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Abstract Pattern Call</b></em>
+ * '.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.pattern.impl.AbstractPatternCallImpl#getCalled <em>Called</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class AbstractPatternCallImpl extends CallImpl implements AbstractPatternCall {
+ /**
+ * The cached value of the '{@link #getCalled() <em>Called</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCalled()
+ * @generated
+ * @ordered
+ */
+ protected Pattern called;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected AbstractPatternCallImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PatternPackage.Literals.ABSTRACT_PATTERN_CALL;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Pattern getCalled() {
+ if (called != null && called.eIsProxy()) {
+ InternalEObject oldCalled = (InternalEObject) called;
+ called = (Pattern) eResolveProxy(oldCalled);
+ if (called != oldCalled) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, PatternPackage.ABSTRACT_PATTERN_CALL__CALLED, oldCalled, called));
+ }
+ }
+ return called;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Pattern basicGetCalled() {
+ return called;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCalled(Pattern newCalled) {
+ Pattern oldCalled = called;
+ called = newCalled;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PatternPackage.ABSTRACT_PATTERN_CALL__CALLED, oldCalled, called));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PatternPackage.ABSTRACT_PATTERN_CALL__CALLED:
+ if (resolve)
+ return getCalled();
+ return basicGetCalled();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case PatternPackage.ABSTRACT_PATTERN_CALL__CALLED:
+ setCalled((Pattern) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PatternPackage.ABSTRACT_PATTERN_CALL__CALLED:
+ setCalled((Pattern) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PatternPackage.ABSTRACT_PATTERN_CALL__CALLED:
+ return called != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // AbstractPatternCallImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/BackCallImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/BackCallImpl.java
new file mode 100644
index 0000000..61cc3ff
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/BackCallImpl.java
@@ -0,0 +1,48 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.impl;
+
+import org.eclipse.egf.model.pattern.BackCall;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Back Call</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class BackCallImpl extends CallImpl implements BackCall {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected BackCallImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PatternPackage.Literals.BACK_CALL;
+ }
+
+} // BackCallImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/BasicQueryImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/BasicQueryImpl.java
new file mode 100644
index 0000000..cc472a2
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/BasicQueryImpl.java
@@ -0,0 +1,46 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.impl;
+
+import org.eclipse.egf.model.pattern.BasicQuery;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '
+ * <em><b>Basic Query</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class BasicQueryImpl extends QueryImpl implements BasicQuery {
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ protected BasicQueryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PatternPackage.Literals.BASIC_QUERY;
+ }
+
+} // BasicQueryImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/CallImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/CallImpl.java
new file mode 100644
index 0000000..529515f
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/CallImpl.java
@@ -0,0 +1,212 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.impl;
+
+import org.eclipse.egf.model.fcore.impl.ModelElementImpl;
+import org.eclipse.egf.model.pattern.Call;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Call</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.pattern.impl.CallImpl#getPattern <em>Pattern</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class CallImpl extends ModelElementImpl implements Call {
+ /**
+ * A set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected int eFlags = 0;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CallImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PatternPackage.Literals.CALL;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Pattern getPattern() {
+ if (eContainerFeatureID() != PatternPackage.CALL__PATTERN)
+ return null;
+ return (Pattern) eContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetPattern(Pattern newPattern, NotificationChain msgs) {
+ msgs = eBasicSetContainer((InternalEObject) newPattern, PatternPackage.CALL__PATTERN, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setPattern(Pattern newPattern) {
+ if (newPattern != eInternalContainer() || (eContainerFeatureID() != PatternPackage.CALL__PATTERN && newPattern != null)) {
+ if (EcoreUtil.isAncestor(this, newPattern))
+ throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); //$NON-NLS-1$
+ NotificationChain msgs = null;
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ if (newPattern != null)
+ msgs = ((InternalEObject) newPattern).eInverseAdd(this, PatternPackage.PATTERN__ORCHESTRATION, Pattern.class, msgs);
+ msgs = basicSetPattern(newPattern, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ } else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PatternPackage.CALL__PATTERN, newPattern, newPattern));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case PatternPackage.CALL__PATTERN:
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ return basicSetPattern((Pattern) otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case PatternPackage.CALL__PATTERN:
+ return basicSetPattern(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
+ switch (eContainerFeatureID()) {
+ case PatternPackage.CALL__PATTERN:
+ return eInternalContainer().eInverseRemove(this, PatternPackage.PATTERN__ORCHESTRATION, Pattern.class, msgs);
+ }
+ return super.eBasicRemoveFromContainerFeature(msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PatternPackage.CALL__PATTERN:
+ return getPattern();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case PatternPackage.CALL__PATTERN:
+ setPattern((Pattern) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PatternPackage.CALL__PATTERN:
+ setPattern((Pattern) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PatternPackage.CALL__PATTERN:
+ return getPattern() != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // CallImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/CustomQueryImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/CustomQueryImpl.java
new file mode 100644
index 0000000..9d3c4a7
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/CustomQueryImpl.java
@@ -0,0 +1,48 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.impl;
+
+import org.eclipse.egf.model.pattern.CustomQuery;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Custom Query</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class CustomQueryImpl extends QueryImpl implements CustomQuery {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CustomQueryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PatternPackage.Literals.CUSTOM_QUERY;
+ }
+
+} // CustomQueryImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/MethodCallImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/MethodCallImpl.java
new file mode 100644
index 0000000..ecc2c86
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/MethodCallImpl.java
@@ -0,0 +1,164 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.impl;
+
+import org.eclipse.egf.model.pattern.MethodCall;
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Method Call</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.pattern.impl.MethodCallImpl#getCalled <em>Called</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class MethodCallImpl extends CallImpl implements MethodCall {
+ /**
+ * The cached value of the '{@link #getCalled() <em>Called</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCalled()
+ * @generated
+ * @ordered
+ */
+ protected PatternMethod called;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected MethodCallImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PatternPackage.Literals.METHOD_CALL;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PatternMethod getCalled() {
+ if (called != null && called.eIsProxy()) {
+ InternalEObject oldCalled = (InternalEObject) called;
+ called = (PatternMethod) eResolveProxy(oldCalled);
+ if (called != oldCalled) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, PatternPackage.METHOD_CALL__CALLED, oldCalled, called));
+ }
+ }
+ return called;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PatternMethod basicGetCalled() {
+ return called;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCalled(PatternMethod newCalled) {
+ PatternMethod oldCalled = called;
+ called = newCalled;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PatternPackage.METHOD_CALL__CALLED, oldCalled, called));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PatternPackage.METHOD_CALL__CALLED:
+ if (resolve)
+ return getCalled();
+ return basicGetCalled();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case PatternPackage.METHOD_CALL__CALLED:
+ setCalled((PatternMethod) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PatternPackage.METHOD_CALL__CALLED:
+ setCalled((PatternMethod) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PatternPackage.METHOD_CALL__CALLED:
+ return called != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // MethodCallImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/Paramerter2ParameterMapImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/Paramerter2ParameterMapImpl.java
new file mode 100644
index 0000000..9d7b210
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/Paramerter2ParameterMapImpl.java
@@ -0,0 +1,297 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.impl;
+
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.egf.model.pattern.PatternParameter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.BasicEMap;
+import org.eclipse.emf.common.util.EMap;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl.Container;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '
+ * <em><b>Paramerter2 Parameter Map</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.pattern.impl.Paramerter2ParameterMapImpl#getTypedValue <em>Value</em>}</li>
+ * <li>{@link org.eclipse.egf.model.pattern.impl.Paramerter2ParameterMapImpl#getTypedKey <em>Key</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class Paramerter2ParameterMapImpl extends Container implements BasicEMap.Entry<PatternParameter, PatternParameter> {
+ /**
+ * A set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected int eFlags = 0;
+
+ /**
+ * The cached value of the '{@link #getTypedValue() <em>Value</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTypedValue()
+ * @generated
+ * @ordered
+ */
+ protected PatternParameter value;
+
+ /**
+ * The cached value of the '{@link #getTypedKey() <em>Key</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTypedKey()
+ * @generated
+ * @ordered
+ */
+ protected PatternParameter key;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Paramerter2ParameterMapImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PatternPackage.Literals.PARAMERTER2_PARAMETER_MAP;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PatternParameter getTypedKey() {
+ return key;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setTypedKey(PatternParameter newKey) {
+ PatternParameter oldKey = key;
+ key = newKey;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PatternPackage.PARAMERTER2_PARAMETER_MAP__KEY, oldKey, key));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PatternParameter getTypedValue() {
+ if (value != null && value.eIsProxy()) {
+ InternalEObject oldValue = (InternalEObject) value;
+ value = (PatternParameter) eResolveProxy(oldValue);
+ if (value != oldValue) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, PatternPackage.PARAMERTER2_PARAMETER_MAP__VALUE, oldValue, value));
+ }
+ }
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PatternParameter basicGetTypedValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setTypedValue(PatternParameter newValue) {
+ PatternParameter oldValue = value;
+ value = newValue;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PatternPackage.PARAMERTER2_PARAMETER_MAP__VALUE, oldValue, value));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PatternPackage.PARAMERTER2_PARAMETER_MAP__VALUE:
+ if (resolve)
+ return getTypedValue();
+ return basicGetTypedValue();
+ case PatternPackage.PARAMERTER2_PARAMETER_MAP__KEY:
+ return getTypedKey();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case PatternPackage.PARAMERTER2_PARAMETER_MAP__VALUE:
+ setTypedValue((PatternParameter) newValue);
+ return;
+ case PatternPackage.PARAMERTER2_PARAMETER_MAP__KEY:
+ setTypedKey((PatternParameter) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PatternPackage.PARAMERTER2_PARAMETER_MAP__VALUE:
+ setTypedValue((PatternParameter) null);
+ return;
+ case PatternPackage.PARAMERTER2_PARAMETER_MAP__KEY:
+ setTypedKey((PatternParameter) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PatternPackage.PARAMERTER2_PARAMETER_MAP__VALUE:
+ return value != null;
+ case PatternPackage.PARAMERTER2_PARAMETER_MAP__KEY:
+ return key != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected int hash = -1;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getHash() {
+ if (hash == -1) {
+ Object theKey = getKey();
+ hash = (theKey == null ? 0 : theKey.hashCode());
+ }
+ return hash;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setHash(int hash) {
+ this.hash = hash;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PatternParameter getKey() {
+ return getTypedKey();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setKey(PatternParameter key) {
+ setTypedKey(key);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PatternParameter getValue() {
+ return getTypedValue();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PatternParameter setValue(PatternParameter value) {
+ PatternParameter oldValue = getValue();
+ setTypedValue(value);
+ return oldValue;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ public EMap<PatternParameter, PatternParameter> getEMap() {
+ EObject container = eContainer();
+ return container == null ? null : (EMap<PatternParameter, PatternParameter>) container.eGet(eContainmentFeature());
+ }
+
+} // Paramerter2ParameterMapImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternCallImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternCallImpl.java
new file mode 100644
index 0000000..e513314
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternCallImpl.java
@@ -0,0 +1,157 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.impl;
+
+import org.eclipse.egf.model.pattern.PatternCall;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.egf.model.pattern.PatternParameter;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EMap;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.util.EcoreEMap;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Call</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.pattern.impl.PatternCallImpl#getParameterMatching <em>Parameter Matching</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class PatternCallImpl extends AbstractPatternCallImpl implements PatternCall {
+ /**
+ * The cached value of the '{@link #getParameterMatching() <em>Parameter Matching</em>}' map.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getParameterMatching()
+ * @generated
+ * @ordered
+ */
+ protected EMap<PatternParameter, PatternParameter> parameterMatching;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PatternCallImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PatternPackage.Literals.PATTERN_CALL;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EMap<PatternParameter, PatternParameter> getParameterMatching() {
+ if (parameterMatching == null) {
+ parameterMatching = new EcoreEMap<PatternParameter, PatternParameter>(PatternPackage.Literals.PARAMERTER2_PARAMETER_MAP, Paramerter2ParameterMapImpl.class, this, PatternPackage.PATTERN_CALL__PARAMETER_MATCHING);
+ }
+ return parameterMatching;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_CALL__PARAMETER_MATCHING:
+ return ((InternalEList<?>) getParameterMatching()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ @SuppressWarnings("all")
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_CALL__PARAMETER_MATCHING:
+ if (coreType)
+ return getParameterMatching();
+ else
+ return getParameterMatching().map();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_CALL__PARAMETER_MATCHING:
+ ((EStructuralFeature.Setting) getParameterMatching()).set(newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_CALL__PARAMETER_MATCHING:
+ getParameterMatching().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_CALL__PARAMETER_MATCHING:
+ return parameterMatching != null && !parameterMatching.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // PatternCallImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternElementImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternElementImpl.java
new file mode 100644
index 0000000..0a5a1b2
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternElementImpl.java
@@ -0,0 +1,212 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.impl;
+
+import org.eclipse.egf.model.fcore.impl.NamedModelElementImpl;
+import org.eclipse.egf.model.pattern.PatternElement;
+import org.eclipse.egf.model.pattern.PatternLibrary;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Element</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.pattern.impl.PatternElementImpl#getContainer <em>Container</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class PatternElementImpl extends NamedModelElementImpl implements PatternElement {
+ /**
+ * A set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected int eFlags = 0;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PatternElementImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PatternPackage.Literals.PATTERN_ELEMENT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PatternLibrary getContainer() {
+ if (eContainerFeatureID() != PatternPackage.PATTERN_ELEMENT__CONTAINER)
+ return null;
+ return (PatternLibrary) eContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetContainer(PatternLibrary newContainer, NotificationChain msgs) {
+ msgs = eBasicSetContainer((InternalEObject) newContainer, PatternPackage.PATTERN_ELEMENT__CONTAINER, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setContainer(PatternLibrary newContainer) {
+ if (newContainer != eInternalContainer() || (eContainerFeatureID() != PatternPackage.PATTERN_ELEMENT__CONTAINER && newContainer != null)) {
+ if (EcoreUtil.isAncestor(this, newContainer))
+ throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); //$NON-NLS-1$
+ NotificationChain msgs = null;
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ if (newContainer != null)
+ msgs = ((InternalEObject) newContainer).eInverseAdd(this, PatternPackage.PATTERN_LIBRARY__ELEMENTS, PatternLibrary.class, msgs);
+ msgs = basicSetContainer(newContainer, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ } else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PatternPackage.PATTERN_ELEMENT__CONTAINER, newContainer, newContainer));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_ELEMENT__CONTAINER:
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ return basicSetContainer((PatternLibrary) otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_ELEMENT__CONTAINER:
+ return basicSetContainer(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
+ switch (eContainerFeatureID()) {
+ case PatternPackage.PATTERN_ELEMENT__CONTAINER:
+ return eInternalContainer().eInverseRemove(this, PatternPackage.PATTERN_LIBRARY__ELEMENTS, PatternLibrary.class, msgs);
+ }
+ return super.eBasicRemoveFromContainerFeature(msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_ELEMENT__CONTAINER:
+ return getContainer();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_ELEMENT__CONTAINER:
+ setContainer((PatternLibrary) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_ELEMENT__CONTAINER:
+ setContainer((PatternLibrary) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_ELEMENT__CONTAINER:
+ return getContainer() != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // PatternElementImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternFactoryImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternFactoryImpl.java
new file mode 100644
index 0000000..c4102b4
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternFactoryImpl.java
@@ -0,0 +1,445 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.impl;
+
+import java.util.Map;
+
+import org.eclipse.egf.model.pattern.*;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.egf.model.pattern.BasicQuery;
+import org.eclipse.egf.model.pattern.CustomQuery;
+import org.eclipse.egf.model.pattern.MethodCall;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternCall;
+import org.eclipse.egf.model.pattern.PatternContext;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.model.pattern.PatternFactory;
+import org.eclipse.egf.model.pattern.PatternInjectedCall;
+import org.eclipse.egf.model.pattern.PatternLibrary;
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.egf.model.pattern.PatternParameter;
+import org.eclipse.egf.model.pattern.PatternVariable;
+import org.eclipse.egf.model.pattern.PatternViewpoint;
+import org.eclipse.egf.model.pattern.StringQuery;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!--
+ * end-user-doc -->
+ * @generated
+ */
+public class PatternFactoryImpl extends EFactoryImpl implements PatternFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ * @generated
+ */
+ public static PatternFactory init() {
+ try {
+ PatternFactory thePatternFactory = (PatternFactory) EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/egf/1.0.0/pattern"); //$NON-NLS-1$
+ if (thePatternFactory != null) {
+ return thePatternFactory;
+ }
+ } catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new PatternFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ * @generated
+ */
+ public PatternFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case PatternPackage.PATTERN:
+ return createPattern();
+ case PatternPackage.PATTERN_METHOD:
+ return createPatternMethod();
+ case PatternPackage.PATTERN_PARAMETER:
+ return createPatternParameter();
+ case PatternPackage.PATTERN_LIBRARY:
+ return createPatternLibrary();
+ case PatternPackage.PATTERN_VIEWPOINT:
+ return createPatternViewpoint();
+ case PatternPackage.PATTERN_CALL:
+ return createPatternCall();
+ case PatternPackage.SUPER_CALL:
+ return createSuperCall();
+ case PatternPackage.PARAMERTER2_PARAMETER_MAP:
+ return (EObject) createParamerter2ParameterMap();
+ case PatternPackage.METHOD_CALL:
+ return createMethodCall();
+ case PatternPackage.PATTERN_VARIABLE:
+ return createPatternVariable();
+ case PatternPackage.PATTERN_INJECTED_CALL:
+ return createPatternInjectedCall();
+ case PatternPackage.BASIC_QUERY:
+ return createBasicQuery();
+ case PatternPackage.STRING_QUERY:
+ return createStringQuery();
+ case PatternPackage.CUSTOM_QUERY:
+ return createCustomQuery();
+ case PatternPackage.STRING2_PATTERN_LIST:
+ return (EObject) createString2PatternList();
+ case PatternPackage.STRING2_STRING:
+ return (EObject) createString2String();
+ case PatternPackage.TYPE_PATTERN_EXECUTION_REPORTER:
+ return createTypePatternExecutionReporter();
+ case PatternPackage.BACK_CALL:
+ return createBackCall();
+ case PatternPackage.TYPE_PATTERN_CALL_BACK_HANDLER:
+ return createTypePatternCallBackHandler();
+ case PatternPackage.TYPE_PATTERN_DOMAIN_VISITOR:
+ return createTypePatternDomainVisitor();
+ case PatternPackage.TYPE_PATTERN_LIST:
+ return createTypePatternList();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object createFromString(EDataType eDataType, String initialValue) {
+ switch (eDataType.getClassifierID()) {
+ case PatternPackage.PATTERN_CONTEXT:
+ return createPatternContextFromString(eDataType, initialValue);
+ case PatternPackage.PATTERN_EXCEPTION:
+ return createPatternExceptionFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String convertToString(EDataType eDataType, Object instanceValue) {
+ switch (eDataType.getClassifierID()) {
+ case PatternPackage.PATTERN_CONTEXT:
+ return convertPatternContextToString(eDataType, instanceValue);
+ case PatternPackage.PATTERN_EXCEPTION:
+ return convertPatternExceptionToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public Pattern createPattern() {
+ PatternImpl pattern = new PatternImpl();
+ return pattern;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public PatternMethod createPatternMethod() {
+ PatternMethodImpl patternMethod = new PatternMethodImpl();
+ return patternMethod;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public PatternParameter createPatternParameter() {
+ PatternParameterImpl patternParameter = new PatternParameterImpl();
+ return patternParameter;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public PatternLibrary createPatternLibrary() {
+ PatternLibraryImpl patternLibrary = new PatternLibraryImpl();
+ return patternLibrary;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public PatternViewpoint createPatternViewpoint() {
+ PatternViewpointImpl patternViewpoint = new PatternViewpointImpl();
+ return patternViewpoint;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public PatternCall createPatternCall() {
+ PatternCallImpl patternCall = new PatternCallImpl();
+ return patternCall;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SuperCall createSuperCall() {
+ SuperCallImpl superCall = new SuperCallImpl();
+ return superCall;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public Map.Entry<PatternParameter, PatternParameter> createParamerter2ParameterMap() {
+ Paramerter2ParameterMapImpl paramerter2ParameterMap = new Paramerter2ParameterMapImpl();
+ return paramerter2ParameterMap;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public MethodCall createMethodCall() {
+ MethodCallImpl methodCall = new MethodCallImpl();
+ return methodCall;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public PatternVariable createPatternVariable() {
+ PatternVariableImpl patternVariable = new PatternVariableImpl();
+ return patternVariable;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public PatternInjectedCall createPatternInjectedCall() {
+ PatternInjectedCallImpl patternInjectedCall = new PatternInjectedCallImpl();
+ return patternInjectedCall;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public BasicQuery createBasicQuery() {
+ BasicQueryImpl basicQuery = new BasicQueryImpl();
+ return basicQuery;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public StringQuery createStringQuery() {
+ StringQueryImpl stringQuery = new StringQueryImpl();
+ return stringQuery;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public CustomQuery createCustomQuery() {
+ CustomQueryImpl customQuery = new CustomQueryImpl();
+ return customQuery;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Map.Entry<String, EList<PatternElement>> createString2PatternList() {
+ String2PatternListImpl string2PatternList = new String2PatternListImpl();
+ return string2PatternList;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Map.Entry<String, String> createString2String() {
+ String2StringImpl string2String = new String2StringImpl();
+ return string2String;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TypePatternExecutionReporter createTypePatternExecutionReporter() {
+ TypePatternExecutionReporterImpl typePatternExecutionReporter = new TypePatternExecutionReporterImpl();
+ return typePatternExecutionReporter;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public BackCall createBackCall() {
+ BackCallImpl backCall = new BackCallImpl();
+ return backCall;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TypePatternCallBackHandler createTypePatternCallBackHandler() {
+ TypePatternCallBackHandlerImpl typePatternCallBackHandler = new TypePatternCallBackHandlerImpl();
+ return typePatternCallBackHandler;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TypePatternDomainVisitor createTypePatternDomainVisitor() {
+ TypePatternDomainVisitorImpl typePatternDomainVisitor = new TypePatternDomainVisitorImpl();
+ return typePatternDomainVisitor;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TypePatternList createTypePatternList() {
+ TypePatternListImpl typePatternList = new TypePatternListImpl();
+ return typePatternList;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PatternContext createPatternContext(String literal) {
+ return (PatternContext) super.createFromString(PatternPackage.Literals.PATTERN_CONTEXT, literal);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public PatternContext createPatternContextFromString(EDataType eDataType, String initialValue) {
+ return (PatternContext) super.createFromString(eDataType, initialValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertPatternContext(PatternContext instanceValue) {
+ return super.convertToString(PatternPackage.Literals.PATTERN_CONTEXT, instanceValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertPatternContextToString(EDataType eDataType, Object instanceValue) {
+ return super.convertToString(eDataType, instanceValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PatternException createPatternException(String literal) {
+ return (PatternException) super.createFromString(PatternPackage.Literals.PATTERN_EXCEPTION, literal);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public PatternException createPatternExceptionFromString(EDataType eDataType, String initialValue) {
+ return (PatternException) super.createFromString(eDataType, initialValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertPatternException(PatternException instanceValue) {
+ return super.convertToString(PatternPackage.Literals.PATTERN_EXCEPTION, instanceValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertPatternExceptionToString(EDataType eDataType, Object instanceValue) {
+ return super.convertToString(eDataType, instanceValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public PatternPackage getPatternPackage() {
+ return (PatternPackage) getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static PatternPackage getPackage() {
+ return PatternPackage.eINSTANCE;
+ }
+
+} // PatternFactoryImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternImpl.java
new file mode 100644
index 0000000..7a63278
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternImpl.java
@@ -0,0 +1,656 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.impl;
+
+import java.util.Collection;
+
+import org.eclipse.egf.model.pattern.Call;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.model.pattern.PatternNature;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.egf.model.pattern.PatternParameter;
+import org.eclipse.egf.model.pattern.PatternVariable;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.BasicEList;
+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.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '
+ * <em><b>Pattern</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.pattern.impl.PatternImpl#getHeaderMethod
+ * <em>Header Method</em>}</li>
+ * <li>{@link org.eclipse.egf.model.pattern.impl.PatternImpl#getMethods <em>
+ * Methods</em>}</li>
+ * <li>{@link org.eclipse.egf.model.pattern.impl.PatternImpl#getFooterMethod
+ * <em>Footer Method</em>}</li>
+ * <li>{@link org.eclipse.egf.model.pattern.impl.PatternImpl#getSuperPattern
+ * <em>Super Pattern</em>}</li>
+ * <li>{@link org.eclipse.egf.model.pattern.impl.PatternImpl#getOrchestration
+ * <em>Orchestration</em>}</li>
+ * <li>{@link org.eclipse.egf.model.pattern.impl.PatternImpl#getParameters <em>
+ * Parameters</em>}</li>
+ * <li>{@link org.eclipse.egf.model.pattern.impl.PatternImpl#getNature <em>
+ * Nature</em>}</li>
+ * <li>{@link org.eclipse.egf.model.pattern.impl.PatternImpl#getVariables <em>
+ * Variables</em>}</li>
+ * <li>{@link org.eclipse.egf.model.pattern.impl.PatternImpl#getInitMethod <em>
+ * Init Method</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class PatternImpl extends PatternElementImpl implements Pattern {
+ /**
+ * The cached value of the '{@link #getHeaderMethod()
+ * <em>Header Method</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getHeaderMethod()
+ * @generated
+ * @ordered
+ */
+ protected PatternMethod headerMethod;
+
+ /**
+ * The cached value of the '{@link #getMethods() <em>Methods</em>}'
+ * containment reference list.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getMethods()
+ * @generated
+ * @ordered
+ */
+ protected EList<PatternMethod> methods;
+
+ /**
+ * The cached value of the '{@link #getFooterMethod()
+ * <em>Footer Method</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getFooterMethod()
+ * @generated
+ * @ordered
+ */
+ protected PatternMethod footerMethod;
+
+ /**
+ * The cached value of the '{@link #getSuperPattern()
+ * <em>Super Pattern</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getSuperPattern()
+ * @generated
+ * @ordered
+ */
+ protected Pattern superPattern;
+
+ /**
+ * The cached value of the '{@link #getOrchestration()
+ * <em>Orchestration</em>}' containment reference list.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @see #getOrchestration()
+ * @generated
+ * @ordered
+ */
+ protected EList<Call> orchestration;
+
+ /**
+ * The cached value of the '{@link #getParameters() <em>Parameters</em>}'
+ * containment reference list.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getParameters()
+ * @generated
+ * @ordered
+ */
+ protected EList<PatternParameter> parameters;
+
+ /**
+ * The cached value of the '{@link #getNature() <em>Nature</em>}'
+ * containment reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getNature()
+ * @generated
+ * @ordered
+ */
+ protected PatternNature nature;
+
+ /**
+ * The cached value of the '{@link #getVariables() <em>Variables</em>}'
+ * containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getVariables()
+ * @generated
+ * @ordered
+ */
+ protected EList<PatternVariable> variables;
+
+ /**
+ * The cached value of the '{@link #getInitMethod() <em>Init Method</em>}'
+ * reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getInitMethod()
+ * @generated
+ * @ordered
+ */
+ protected PatternMethod initMethod;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected PatternImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PatternPackage.Literals.PATTERN;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public PatternMethod getHeaderMethod() {
+ return headerMethod;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setHeaderMethod(PatternMethod newHeaderMethod) {
+ PatternMethod oldHeaderMethod = headerMethod;
+ headerMethod = newHeaderMethod;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PatternPackage.PATTERN__HEADER_METHOD, oldHeaderMethod, headerMethod));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EList<PatternMethod> getMethods() {
+ if (methods == null) {
+ methods = new EObjectContainmentWithInverseEList<PatternMethod>(PatternMethod.class, this, PatternPackage.PATTERN__METHODS, PatternPackage.PATTERN_METHOD__PATTERN);
+ }
+ return methods;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Pattern getSuperPattern() {
+ if (superPattern != null && superPattern.eIsProxy()) {
+ InternalEObject oldSuperPattern = (InternalEObject) superPattern;
+ superPattern = (Pattern) eResolveProxy(oldSuperPattern);
+ if (superPattern != oldSuperPattern) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, PatternPackage.PATTERN__SUPER_PATTERN, oldSuperPattern, superPattern));
+ }
+ }
+ return superPattern;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Pattern basicGetSuperPattern() {
+ return superPattern;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setSuperPattern(Pattern newSuperPattern) {
+ Pattern oldSuperPattern = superPattern;
+ superPattern = newSuperPattern;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PatternPackage.PATTERN__SUPER_PATTERN, oldSuperPattern, superPattern));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public PatternMethod getFooterMethod() {
+ return footerMethod;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setFooterMethod(PatternMethod newFooterMethod) {
+ PatternMethod oldFooterMethod = footerMethod;
+ footerMethod = newFooterMethod;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PatternPackage.PATTERN__FOOTER_METHOD, oldFooterMethod, footerMethod));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EList<Call> getOrchestration() {
+ if (orchestration == null) {
+ orchestration = new EObjectContainmentWithInverseEList<Call>(Call.class, this, PatternPackage.PATTERN__ORCHESTRATION, PatternPackage.CALL__PATTERN);
+ }
+ return orchestration;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EList<PatternParameter> getParameters() {
+ if (parameters == null) {
+ parameters = new EObjectContainmentEList<PatternParameter>(PatternParameter.class, this, PatternPackage.PATTERN__PARAMETERS);
+ }
+ return parameters;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public PatternNature getNature() {
+ return nature;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NotificationChain basicSetNature(PatternNature newNature, NotificationChain msgs) {
+ PatternNature oldNature = nature;
+ nature = newNature;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PatternPackage.PATTERN__NATURE, oldNature, newNature);
+ if (msgs == null)
+ msgs = notification;
+ else
+ msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setNature(PatternNature newNature) {
+ if (newNature != nature) {
+ NotificationChain msgs = null;
+ if (nature != null)
+ msgs = ((InternalEObject) nature).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - PatternPackage.PATTERN__NATURE, null, msgs);
+ if (newNature != null)
+ msgs = ((InternalEObject) newNature).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - PatternPackage.PATTERN__NATURE, null, msgs);
+ msgs = basicSetNature(newNature, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ } else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PatternPackage.PATTERN__NATURE, newNature, newNature));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EList<PatternVariable> getVariables() {
+ if (variables == null) {
+ variables = new EObjectContainmentEList<PatternVariable>(PatternVariable.class, this, PatternPackage.PATTERN__VARIABLES);
+ }
+ return variables;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public PatternMethod getInitMethod() {
+ return initMethod;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setInitMethod(PatternMethod newInitMethod) {
+ PatternMethod oldInitMethod = initMethod;
+ initMethod = newInitMethod;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PatternPackage.PATTERN__INIT_METHOD, oldInitMethod, initMethod));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public PatternMethod getMethod(String innerName) {
+ for (PatternMethod method : getMethods()) {
+ if (method.getName().equals(innerName))
+ return method;
+ }
+ if (getSuperPattern() == null)
+ return null;
+ return getSuperPattern().getMethod(innerName);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<PatternParameter> getAllParameters() {
+ BasicEList<PatternParameter> result = new BasicEList<PatternParameter>();
+ result.addAll(getParameters());
+ Pattern innerSuperPattern = getSuperPattern();
+ while (innerSuperPattern != null) {
+ result.addAll(innerSuperPattern.getParameters());
+ innerSuperPattern = innerSuperPattern.getSuperPattern();
+ }
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<PatternVariable> getAllVariables() {
+ BasicEList<PatternVariable> result = new BasicEList<PatternVariable>();
+ result.addAll(getVariables());
+ Pattern innerSuperPattern = getSuperPattern();
+ while (innerSuperPattern != null) {
+ result.addAll(innerSuperPattern.getVariables());
+ innerSuperPattern = innerSuperPattern.getSuperPattern();
+ }
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<PatternMethod> getAllMethods() {
+ BasicEList<PatternMethod> result = new BasicEList<PatternMethod>();
+ result.addAll(getMethods());
+ Pattern innerSuperPattern = getSuperPattern();
+ while (innerSuperPattern != null) {
+ result.addAll(innerSuperPattern.getMethods());
+ innerSuperPattern = innerSuperPattern.getSuperPattern();
+ }
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public PatternParameter getParameter(String innerName) {
+ for (PatternParameter param : getParameters()) {
+ if (param.getName().equals(innerName)) {
+ return param;
+ }
+ }
+ if (getSuperPattern() == null) {
+ return null;
+ }
+ return getSuperPattern().getParameter(innerName);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case PatternPackage.PATTERN__METHODS:
+ return ((InternalEList<InternalEObject>) (InternalEList<?>) getMethods()).basicAdd(otherEnd, msgs);
+ case PatternPackage.PATTERN__ORCHESTRATION:
+ return ((InternalEList<InternalEObject>) (InternalEList<?>) getOrchestration()).basicAdd(otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case PatternPackage.PATTERN__METHODS:
+ return ((InternalEList<?>) getMethods()).basicRemove(otherEnd, msgs);
+ case PatternPackage.PATTERN__ORCHESTRATION:
+ return ((InternalEList<?>) getOrchestration()).basicRemove(otherEnd, msgs);
+ case PatternPackage.PATTERN__PARAMETERS:
+ return ((InternalEList<?>) getParameters()).basicRemove(otherEnd, msgs);
+ case PatternPackage.PATTERN__NATURE:
+ return basicSetNature(null, msgs);
+ case PatternPackage.PATTERN__VARIABLES:
+ return ((InternalEList<?>) getVariables()).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 PatternPackage.PATTERN__HEADER_METHOD:
+ return getHeaderMethod();
+ case PatternPackage.PATTERN__METHODS:
+ return getMethods();
+ case PatternPackage.PATTERN__FOOTER_METHOD:
+ return getFooterMethod();
+ case PatternPackage.PATTERN__SUPER_PATTERN:
+ if (resolve)
+ return getSuperPattern();
+ return basicGetSuperPattern();
+ case PatternPackage.PATTERN__ORCHESTRATION:
+ return getOrchestration();
+ case PatternPackage.PATTERN__PARAMETERS:
+ return getParameters();
+ case PatternPackage.PATTERN__NATURE:
+ return getNature();
+ case PatternPackage.PATTERN__VARIABLES:
+ return getVariables();
+ case PatternPackage.PATTERN__INIT_METHOD:
+ return getInitMethod();
+ }
+ 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 PatternPackage.PATTERN__HEADER_METHOD:
+ setHeaderMethod((PatternMethod) newValue);
+ return;
+ case PatternPackage.PATTERN__METHODS:
+ getMethods().clear();
+ getMethods().addAll((Collection<? extends PatternMethod>) newValue);
+ return;
+ case PatternPackage.PATTERN__FOOTER_METHOD:
+ setFooterMethod((PatternMethod) newValue);
+ return;
+ case PatternPackage.PATTERN__SUPER_PATTERN:
+ setSuperPattern((Pattern) newValue);
+ return;
+ case PatternPackage.PATTERN__ORCHESTRATION:
+ getOrchestration().clear();
+ getOrchestration().addAll((Collection<? extends Call>) newValue);
+ return;
+ case PatternPackage.PATTERN__PARAMETERS:
+ getParameters().clear();
+ getParameters().addAll((Collection<? extends PatternParameter>) newValue);
+ return;
+ case PatternPackage.PATTERN__NATURE:
+ setNature((PatternNature) newValue);
+ return;
+ case PatternPackage.PATTERN__VARIABLES:
+ getVariables().clear();
+ getVariables().addAll((Collection<? extends PatternVariable>) newValue);
+ return;
+ case PatternPackage.PATTERN__INIT_METHOD:
+ setInitMethod((PatternMethod) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PatternPackage.PATTERN__HEADER_METHOD:
+ setHeaderMethod((PatternMethod) null);
+ return;
+ case PatternPackage.PATTERN__METHODS:
+ getMethods().clear();
+ return;
+ case PatternPackage.PATTERN__FOOTER_METHOD:
+ setFooterMethod((PatternMethod) null);
+ return;
+ case PatternPackage.PATTERN__SUPER_PATTERN:
+ setSuperPattern((Pattern) null);
+ return;
+ case PatternPackage.PATTERN__ORCHESTRATION:
+ getOrchestration().clear();
+ return;
+ case PatternPackage.PATTERN__PARAMETERS:
+ getParameters().clear();
+ return;
+ case PatternPackage.PATTERN__NATURE:
+ setNature((PatternNature) null);
+ return;
+ case PatternPackage.PATTERN__VARIABLES:
+ getVariables().clear();
+ return;
+ case PatternPackage.PATTERN__INIT_METHOD:
+ setInitMethod((PatternMethod) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PatternPackage.PATTERN__HEADER_METHOD:
+ return headerMethod != null;
+ case PatternPackage.PATTERN__METHODS:
+ return methods != null && !methods.isEmpty();
+ case PatternPackage.PATTERN__FOOTER_METHOD:
+ return footerMethod != null;
+ case PatternPackage.PATTERN__SUPER_PATTERN:
+ return superPattern != null;
+ case PatternPackage.PATTERN__ORCHESTRATION:
+ return orchestration != null && !orchestration.isEmpty();
+ case PatternPackage.PATTERN__PARAMETERS:
+ return parameters != null && !parameters.isEmpty();
+ case PatternPackage.PATTERN__NATURE:
+ return nature != null;
+ case PatternPackage.PATTERN__VARIABLES:
+ return variables != null && !variables.isEmpty();
+ case PatternPackage.PATTERN__INIT_METHOD:
+ return initMethod != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // PatternImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternInjectedCallImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternInjectedCallImpl.java
new file mode 100644
index 0000000..7f1b98c
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternInjectedCallImpl.java
@@ -0,0 +1,144 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.impl;
+
+import org.eclipse.egf.model.pattern.PatternInjectedCall;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.egf.model.pattern.PatternVariable;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Injected Call</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.pattern.impl.PatternInjectedCallImpl#getContext <em>Context</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class PatternInjectedCallImpl extends AbstractPatternCallImpl implements PatternInjectedCall {
+ /**
+ * The cached value of the '{@link #getContext() <em>Context</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getContext()
+ * @generated
+ * @ordered
+ */
+ protected PatternVariable context;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PatternInjectedCallImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PatternPackage.Literals.PATTERN_INJECTED_CALL;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PatternVariable getContext() {
+ return context;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setContext(PatternVariable newContext) {
+ PatternVariable oldContext = context;
+ context = newContext;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PatternPackage.PATTERN_INJECTED_CALL__CONTEXT, oldContext, context));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_INJECTED_CALL__CONTEXT:
+ return getContext();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_INJECTED_CALL__CONTEXT:
+ setContext((PatternVariable) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_INJECTED_CALL__CONTEXT:
+ setContext((PatternVariable) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_INJECTED_CALL__CONTEXT:
+ return context != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // PatternInjectedCallImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternLibraryImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternLibraryImpl.java
new file mode 100644
index 0000000..ebe512d
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternLibraryImpl.java
@@ -0,0 +1,213 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.impl;
+
+import java.util.Collection;
+
+import org.eclipse.egf.model.pattern.PatternElement;
+import org.eclipse.egf.model.pattern.PatternLibrary;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.EMap;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
+import org.eclipse.emf.ecore.util.EcoreEMap;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Library</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.pattern.impl.PatternLibraryImpl#getElements <em>Elements</em>}</li>
+ * <li>{@link org.eclipse.egf.model.pattern.impl.PatternLibraryImpl#getFilters <em>Filters</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class PatternLibraryImpl extends PatternElementImpl implements PatternLibrary {
+ /**
+ * The cached value of the '{@link #getElements() <em>Elements</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getElements()
+ * @generated
+ * @ordered
+ */
+ protected EList<PatternElement> elements;
+
+ /**
+ * The cached value of the '{@link #getFilters() <em>Filters</em>}' map.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getFilters()
+ * @generated
+ * @ordered
+ */
+ protected EMap<String, EList<PatternElement>> filters;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PatternLibraryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PatternPackage.Literals.PATTERN_LIBRARY;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<PatternElement> getElements() {
+ if (elements == null) {
+ elements = new EObjectContainmentWithInverseEList<PatternElement>(PatternElement.class, this, PatternPackage.PATTERN_LIBRARY__ELEMENTS, PatternPackage.PATTERN_ELEMENT__CONTAINER);
+ }
+ return elements;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EMap<String, EList<PatternElement>> getFilters() {
+ if (filters == null) {
+ filters = new EcoreEMap<String, EList<PatternElement>>(PatternPackage.Literals.STRING2_PATTERN_LIST, String2PatternListImpl.class, this, PatternPackage.PATTERN_LIBRARY__FILTERS);
+ }
+ return filters;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_LIBRARY__ELEMENTS:
+ return ((InternalEList<InternalEObject>) (InternalEList<?>) getElements()).basicAdd(otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_LIBRARY__ELEMENTS:
+ return ((InternalEList<?>) getElements()).basicRemove(otherEnd, msgs);
+ case PatternPackage.PATTERN_LIBRARY__FILTERS:
+ return ((InternalEList<?>) getFilters()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ @SuppressWarnings("all")
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_LIBRARY__ELEMENTS:
+ return getElements();
+ case PatternPackage.PATTERN_LIBRARY__FILTERS:
+ if (coreType)
+ return getFilters();
+ else
+ return getFilters().map();
+ }
+ 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 PatternPackage.PATTERN_LIBRARY__ELEMENTS:
+ getElements().clear();
+ getElements().addAll((Collection<? extends PatternElement>) newValue);
+ return;
+ case PatternPackage.PATTERN_LIBRARY__FILTERS:
+ ((EStructuralFeature.Setting) getFilters()).set(newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_LIBRARY__ELEMENTS:
+ getElements().clear();
+ return;
+ case PatternPackage.PATTERN_LIBRARY__FILTERS:
+ getFilters().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_LIBRARY__ELEMENTS:
+ return elements != null && !elements.isEmpty();
+ case PatternPackage.PATTERN_LIBRARY__FILTERS:
+ return filters != null && !filters.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // PatternLibraryImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternMethodImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternMethodImpl.java
new file mode 100644
index 0000000..eb40b1f
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternMethodImpl.java
@@ -0,0 +1,282 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.impl;
+
+import org.eclipse.egf.model.fcore.impl.NamedModelElementImpl;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Method</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.pattern.impl.PatternMethodImpl#getPattern <em>Pattern</em>}</li>
+ * <li>{@link org.eclipse.egf.model.pattern.impl.PatternMethodImpl#getPatternFilePath <em>Pattern File Path</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class PatternMethodImpl extends NamedModelElementImpl implements PatternMethod {
+ /**
+ * A set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected int eFlags = 0;
+
+ /**
+ * The default value of the '{@link #getPatternFilePath() <em>Pattern File Path</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPatternFilePath()
+ * @generated
+ * @ordered
+ */
+ protected static final URI PATTERN_FILE_PATH_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getPatternFilePath() <em>Pattern File Path</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPatternFilePath()
+ * @generated
+ * @ordered
+ */
+ protected URI patternFilePath = PATTERN_FILE_PATH_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PatternMethodImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PatternPackage.Literals.PATTERN_METHOD;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Pattern getPattern() {
+ if (eContainerFeatureID() != PatternPackage.PATTERN_METHOD__PATTERN)
+ return null;
+ return (Pattern) eContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetPattern(Pattern newPattern, NotificationChain msgs) {
+ msgs = eBasicSetContainer((InternalEObject) newPattern, PatternPackage.PATTERN_METHOD__PATTERN, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setPattern(Pattern newPattern) {
+ if (newPattern != eInternalContainer() || (eContainerFeatureID() != PatternPackage.PATTERN_METHOD__PATTERN && newPattern != null)) {
+ if (EcoreUtil.isAncestor(this, newPattern))
+ throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); //$NON-NLS-1$
+ NotificationChain msgs = null;
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ if (newPattern != null)
+ msgs = ((InternalEObject) newPattern).eInverseAdd(this, PatternPackage.PATTERN__METHODS, Pattern.class, msgs);
+ msgs = basicSetPattern(newPattern, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ } else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PatternPackage.PATTERN_METHOD__PATTERN, newPattern, newPattern));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public URI getPatternFilePath() {
+ return patternFilePath;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setPatternFilePath(URI newPatternFilePath) {
+ URI oldPatternFilePath = patternFilePath;
+ patternFilePath = newPatternFilePath;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PatternPackage.PATTERN_METHOD__PATTERN_FILE_PATH, oldPatternFilePath, patternFilePath));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_METHOD__PATTERN:
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ return basicSetPattern((Pattern) otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_METHOD__PATTERN:
+ return basicSetPattern(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
+ switch (eContainerFeatureID()) {
+ case PatternPackage.PATTERN_METHOD__PATTERN:
+ return eInternalContainer().eInverseRemove(this, PatternPackage.PATTERN__METHODS, Pattern.class, msgs);
+ }
+ return super.eBasicRemoveFromContainerFeature(msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_METHOD__PATTERN:
+ return getPattern();
+ case PatternPackage.PATTERN_METHOD__PATTERN_FILE_PATH:
+ return getPatternFilePath();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_METHOD__PATTERN:
+ setPattern((Pattern) newValue);
+ return;
+ case PatternPackage.PATTERN_METHOD__PATTERN_FILE_PATH:
+ setPatternFilePath((URI) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_METHOD__PATTERN:
+ setPattern((Pattern) null);
+ return;
+ case PatternPackage.PATTERN_METHOD__PATTERN_FILE_PATH:
+ setPatternFilePath(PATTERN_FILE_PATH_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_METHOD__PATTERN:
+ return getPattern() != null;
+ case PatternPackage.PATTERN_METHOD__PATTERN_FILE_PATH:
+ return PATTERN_FILE_PATH_EDEFAULT == null ? patternFilePath != null : !PATTERN_FILE_PATH_EDEFAULT.equals(patternFilePath);
+ }
+ 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(" (patternFilePath: "); //$NON-NLS-1$
+ result.append(patternFilePath);
+ result.append(')');
+ return result.toString();
+ }
+
+} // PatternMethodImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternNatureImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternNatureImpl.java
new file mode 100644
index 0000000..aa98128
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternNatureImpl.java
@@ -0,0 +1,58 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.impl;
+
+import org.eclipse.egf.model.fcore.impl.NamedModelElementImpl;
+import org.eclipse.egf.model.pattern.PatternNature;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Nature</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class PatternNatureImpl extends NamedModelElementImpl implements PatternNature {
+ /**
+ * A set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected int eFlags = 0;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PatternNatureImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PatternPackage.Literals.PATTERN_NATURE;
+ }
+
+} // PatternNatureImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternPackageImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternPackageImpl.java
new file mode 100644
index 0000000..9bd4b19
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternPackageImpl.java
@@ -0,0 +1,1148 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.impl;
+
+import java.util.Map;
+
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.pattern.AbstractPatternCall;
+import org.eclipse.egf.model.pattern.BackCall;
+import org.eclipse.egf.model.pattern.BasicQuery;
+import org.eclipse.egf.model.pattern.Call;
+import org.eclipse.egf.model.pattern.CustomQuery;
+import org.eclipse.egf.model.pattern.MethodCall;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternCall;
+import org.eclipse.egf.model.pattern.PatternContext;
+import org.eclipse.egf.model.pattern.PatternElement;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.model.pattern.PatternFactory;
+import org.eclipse.egf.model.pattern.PatternInjectedCall;
+import org.eclipse.egf.model.pattern.PatternLibrary;
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.model.pattern.PatternNature;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.egf.model.pattern.PatternParameter;
+import org.eclipse.egf.model.pattern.PatternVariable;
+import org.eclipse.egf.model.pattern.PatternViewpoint;
+import org.eclipse.egf.model.pattern.Query;
+import org.eclipse.egf.model.pattern.StringQuery;
+import org.eclipse.egf.model.pattern.SuperCall;
+import org.eclipse.egf.model.pattern.TypePatternCallBackHandler;
+import org.eclipse.egf.model.pattern.TypePatternDomainVisitor;
+import org.eclipse.egf.model.pattern.TypePatternExecutionReporter;
+import org.eclipse.egf.model.pattern.TypePatternList;
+import org.eclipse.egf.model.pattern.util.PatternValidator;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EGenericType;
+import org.eclipse.emf.ecore.EOperation;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EValidator;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!--
+ * end-user-doc -->
+ * @generated
+ */
+public class PatternPackageImpl extends EPackageImpl implements PatternPackage {
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass patternEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass patternMethodEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass patternParameterEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass patternLibraryEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass patternElementEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass patternViewpointEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass patternNatureEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass patternCallEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass superCallEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass paramerter2ParameterMapEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass callEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass methodCallEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass patternVariableEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass abstractPatternCallEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass patternInjectedCallEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass queryEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass basicQueryEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass stringQueryEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass customQueryEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass string2PatternListEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass string2StringEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass typePatternExecutionReporterEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass backCallEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass typePatternCallBackHandlerEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass typePatternDomainVisitorEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass typePatternListEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ private EDataType patternContextEDataType = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ private EDataType patternExceptionEDataType = 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.egf.model.pattern.PatternPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private PatternPackageImpl() {
+ super(eNS_URI, PatternFactory.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 PatternPackage#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 PatternPackage init() {
+ if (isInited)
+ return (PatternPackage) EPackage.Registry.INSTANCE.getEPackage(PatternPackage.eNS_URI);
+
+ // Obtain or create and register package
+ PatternPackageImpl thePatternPackage = (PatternPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof PatternPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new PatternPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ FcorePackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ thePatternPackage.createPackageContents();
+
+ // Initialize created meta-data
+ thePatternPackage.initializePackageContents();
+
+ // Register package validator
+ EValidator.Registry.INSTANCE.put(thePatternPackage, new EValidator.Descriptor() {
+ public EValidator getEValidator() {
+ return PatternValidator.INSTANCE;
+ }
+ });
+
+ // Mark meta-data to indicate it can't be changed
+ thePatternPackage.freeze();
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(PatternPackage.eNS_URI, thePatternPackage);
+ return thePatternPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPattern() {
+ return patternEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPattern_HeaderMethod() {
+ return (EReference) patternEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPattern_Methods() {
+ return (EReference) patternEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPattern_SuperPattern() {
+ return (EReference) patternEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPattern_FooterMethod() {
+ return (EReference) patternEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPattern_Orchestration() {
+ return (EReference) patternEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPattern_Parameters() {
+ return (EReference) patternEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPattern_Nature() {
+ return (EReference) patternEClass.getEStructuralFeatures().get(6);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPattern_Variables() {
+ return (EReference) patternEClass.getEStructuralFeatures().get(7);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPattern_InitMethod() {
+ return (EReference) patternEClass.getEStructuralFeatures().get(8);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPatternMethod() {
+ return patternMethodEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPatternMethod_Pattern() {
+ return (EReference) patternMethodEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPatternMethod_PatternFilePath() {
+ return (EAttribute) patternMethodEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPatternParameter() {
+ return patternParameterEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPatternParameter_Type() {
+ return (EAttribute) patternParameterEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPatternParameter_Query() {
+ return (EReference) patternParameterEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPatternLibrary() {
+ return patternLibraryEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPatternLibrary_Elements() {
+ return (EReference) patternLibraryEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPatternLibrary_Filters() {
+ return (EReference) patternLibraryEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPatternElement() {
+ return patternElementEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPatternElement_Container() {
+ return (EReference) patternElementEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPatternViewpoint() {
+ return patternViewpointEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPatternViewpoint_Libraries() {
+ return (EReference) patternViewpointEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPatternNature() {
+ return patternNatureEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPatternCall() {
+ return patternCallEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPatternCall_ParameterMatching() {
+ return (EReference) patternCallEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getSuperCall() {
+ return superCallEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getParamerter2ParameterMap() {
+ return paramerter2ParameterMapEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getParamerter2ParameterMap_Key() {
+ return (EReference) paramerter2ParameterMapEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getCall() {
+ return callEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getCall_Pattern() {
+ return (EReference) callEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getMethodCall() {
+ return methodCallEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getMethodCall_Called() {
+ return (EReference) methodCallEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPatternVariable() {
+ return patternVariableEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPatternVariable_Type() {
+ return (EAttribute) patternVariableEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getAbstractPatternCall() {
+ return abstractPatternCallEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getAbstractPatternCall_Called() {
+ return (EReference) abstractPatternCallEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPatternInjectedCall() {
+ return patternInjectedCallEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPatternInjectedCall_Context() {
+ return (EReference) patternInjectedCallEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getQuery() {
+ return queryEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getQuery_Parameter() {
+ return (EReference) queryEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getQuery_ExtensionId() {
+ return (EAttribute) queryEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getQuery_QueryContext() {
+ return (EReference) queryEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getBasicQuery() {
+ return basicQueryEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getStringQuery() {
+ return stringQueryEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getCustomQuery() {
+ return customQueryEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getString2PatternList() {
+ return string2PatternListEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getString2PatternList_Key() {
+ return (EAttribute) string2PatternListEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getString2PatternList_Value() {
+ return (EReference) string2PatternListEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getString2String() {
+ return string2StringEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getString2String_Key() {
+ return (EAttribute) string2StringEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getString2String_Value() {
+ return (EAttribute) string2StringEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTypePatternExecutionReporter() {
+ return typePatternExecutionReporterEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getBackCall() {
+ return backCallEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTypePatternCallBackHandler() {
+ return typePatternCallBackHandlerEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTypePatternDomainVisitor() {
+ return typePatternDomainVisitorEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTypePatternList() {
+ return typePatternListEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getTypePatternList_Elements() {
+ return (EReference) typePatternListEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getParamerter2ParameterMap_Value() {
+ return (EReference) paramerter2ParameterMapEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EDataType getPatternContext() {
+ return patternContextEDataType;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EDataType getPatternException() {
+ return patternExceptionEDataType;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public PatternFactory getPatternFactory() {
+ return (PatternFactory) 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
+ patternEClass = createEClass(PATTERN);
+ createEReference(patternEClass, PATTERN__HEADER_METHOD);
+ createEReference(patternEClass, PATTERN__METHODS);
+ createEReference(patternEClass, PATTERN__FOOTER_METHOD);
+ createEReference(patternEClass, PATTERN__SUPER_PATTERN);
+ createEReference(patternEClass, PATTERN__ORCHESTRATION);
+ createEReference(patternEClass, PATTERN__PARAMETERS);
+ createEReference(patternEClass, PATTERN__NATURE);
+ createEReference(patternEClass, PATTERN__VARIABLES);
+ createEReference(patternEClass, PATTERN__INIT_METHOD);
+
+ patternMethodEClass = createEClass(PATTERN_METHOD);
+ createEReference(patternMethodEClass, PATTERN_METHOD__PATTERN);
+ createEAttribute(patternMethodEClass, PATTERN_METHOD__PATTERN_FILE_PATH);
+
+ patternParameterEClass = createEClass(PATTERN_PARAMETER);
+ createEAttribute(patternParameterEClass, PATTERN_PARAMETER__TYPE);
+ createEReference(patternParameterEClass, PATTERN_PARAMETER__QUERY);
+
+ patternLibraryEClass = createEClass(PATTERN_LIBRARY);
+ createEReference(patternLibraryEClass, PATTERN_LIBRARY__ELEMENTS);
+ createEReference(patternLibraryEClass, PATTERN_LIBRARY__FILTERS);
+
+ patternElementEClass = createEClass(PATTERN_ELEMENT);
+ createEReference(patternElementEClass, PATTERN_ELEMENT__CONTAINER);
+
+ patternViewpointEClass = createEClass(PATTERN_VIEWPOINT);
+ createEReference(patternViewpointEClass, PATTERN_VIEWPOINT__LIBRARIES);
+
+ patternNatureEClass = createEClass(PATTERN_NATURE);
+
+ patternCallEClass = createEClass(PATTERN_CALL);
+ createEReference(patternCallEClass, PATTERN_CALL__PARAMETER_MATCHING);
+
+ superCallEClass = createEClass(SUPER_CALL);
+
+ paramerter2ParameterMapEClass = createEClass(PARAMERTER2_PARAMETER_MAP);
+ createEReference(paramerter2ParameterMapEClass, PARAMERTER2_PARAMETER_MAP__VALUE);
+ createEReference(paramerter2ParameterMapEClass, PARAMERTER2_PARAMETER_MAP__KEY);
+
+ callEClass = createEClass(CALL);
+ createEReference(callEClass, CALL__PATTERN);
+
+ methodCallEClass = createEClass(METHOD_CALL);
+ createEReference(methodCallEClass, METHOD_CALL__CALLED);
+
+ patternVariableEClass = createEClass(PATTERN_VARIABLE);
+ createEAttribute(patternVariableEClass, PATTERN_VARIABLE__TYPE);
+
+ abstractPatternCallEClass = createEClass(ABSTRACT_PATTERN_CALL);
+ createEReference(abstractPatternCallEClass, ABSTRACT_PATTERN_CALL__CALLED);
+
+ patternInjectedCallEClass = createEClass(PATTERN_INJECTED_CALL);
+ createEReference(patternInjectedCallEClass, PATTERN_INJECTED_CALL__CONTEXT);
+
+ queryEClass = createEClass(QUERY);
+ createEReference(queryEClass, QUERY__PARAMETER);
+ createEAttribute(queryEClass, QUERY__EXTENSION_ID);
+ createEReference(queryEClass, QUERY__QUERY_CONTEXT);
+
+ basicQueryEClass = createEClass(BASIC_QUERY);
+
+ stringQueryEClass = createEClass(STRING_QUERY);
+
+ customQueryEClass = createEClass(CUSTOM_QUERY);
+
+ string2PatternListEClass = createEClass(STRING2_PATTERN_LIST);
+ createEAttribute(string2PatternListEClass, STRING2_PATTERN_LIST__KEY);
+ createEReference(string2PatternListEClass, STRING2_PATTERN_LIST__VALUE);
+
+ string2StringEClass = createEClass(STRING2_STRING);
+ createEAttribute(string2StringEClass, STRING2_STRING__KEY);
+ createEAttribute(string2StringEClass, STRING2_STRING__VALUE);
+
+ typePatternExecutionReporterEClass = createEClass(TYPE_PATTERN_EXECUTION_REPORTER);
+
+ backCallEClass = createEClass(BACK_CALL);
+
+ typePatternCallBackHandlerEClass = createEClass(TYPE_PATTERN_CALL_BACK_HANDLER);
+
+ typePatternDomainVisitorEClass = createEClass(TYPE_PATTERN_DOMAIN_VISITOR);
+
+ typePatternListEClass = createEClass(TYPE_PATTERN_LIST);
+ createEReference(typePatternListEClass, TYPE_PATTERN_LIST__ELEMENTS);
+
+ // Create data types
+ patternContextEDataType = createEDataType(PATTERN_CONTEXT);
+ patternExceptionEDataType = createEDataType(PATTERN_EXCEPTION);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized)
+ return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ EcorePackage theEcorePackage = (EcorePackage) EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
+ FcorePackage theFcorePackage = (FcorePackage) EPackage.Registry.INSTANCE.getEPackage(FcorePackage.eNS_URI);
+ TypesPackage theTypesPackage = (TypesPackage) EPackage.Registry.INSTANCE.getEPackage(TypesPackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ patternEClass.getESuperTypes().add(this.getPatternElement());
+ patternMethodEClass.getESuperTypes().add(theFcorePackage.getNamedModelElement());
+ patternParameterEClass.getESuperTypes().add(theFcorePackage.getNamedModelElement());
+ patternLibraryEClass.getESuperTypes().add(this.getPatternElement());
+ patternElementEClass.getESuperTypes().add(theFcorePackage.getNamedModelElement());
+ patternViewpointEClass.getESuperTypes().add(theFcorePackage.getViewpoint());
+ patternNatureEClass.getESuperTypes().add(theFcorePackage.getNamedModelElement());
+ patternCallEClass.getESuperTypes().add(this.getAbstractPatternCall());
+ superCallEClass.getESuperTypes().add(this.getCall());
+ callEClass.getESuperTypes().add(theFcorePackage.getModelElement());
+ methodCallEClass.getESuperTypes().add(this.getCall());
+ patternVariableEClass.getESuperTypes().add(theFcorePackage.getNamedModelElement());
+ abstractPatternCallEClass.getESuperTypes().add(this.getCall());
+ patternInjectedCallEClass.getESuperTypes().add(this.getAbstractPatternCall());
+ queryEClass.getESuperTypes().add(theFcorePackage.getModelElement());
+ basicQueryEClass.getESuperTypes().add(this.getQuery());
+ stringQueryEClass.getESuperTypes().add(this.getQuery());
+ customQueryEClass.getESuperTypes().add(this.getQuery());
+ typePatternExecutionReporterEClass.getESuperTypes().add(theTypesPackage.getTypeAbstractClass());
+ backCallEClass.getESuperTypes().add(this.getCall());
+ typePatternCallBackHandlerEClass.getESuperTypes().add(theTypesPackage.getTypeAbstractClass());
+ typePatternDomainVisitorEClass.getESuperTypes().add(theTypesPackage.getTypeAbstractClass());
+ typePatternListEClass.getESuperTypes().add(theTypesPackage.getType());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(patternEClass, Pattern.class, "Pattern", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getPattern_HeaderMethod(), this.getPatternMethod(), null, "headerMethod", null, 1, 1, Pattern.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getPattern_Methods(), this.getPatternMethod(), this.getPatternMethod_Pattern(), "methods", null, 0, -1, Pattern.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getPattern_FooterMethod(), this.getPatternMethod(), null, "footerMethod", null, 1, 1, Pattern.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getPattern_SuperPattern(), this.getPattern(), null, "superPattern", null, 0, 1, Pattern.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getPattern_Orchestration(), this.getCall(), this.getCall_Pattern(), "orchestration", null, 0, -1, Pattern.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getPattern_Parameters(), this.getPatternParameter(), null, "parameters", null, 0, -1, Pattern.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getPattern_Nature(), this.getPatternNature(), null, "nature", null, 1, 1, Pattern.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getPattern_Variables(), this.getPatternVariable(), null, "variables", null, 0, -1, Pattern.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getPattern_InitMethod(), this.getPatternMethod(), null, "initMethod", null, 1, 1, Pattern.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ EOperation op = addEOperation(patternEClass, this.getPatternMethod(), "getMethod", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, theEcorePackage.getEString(), "name", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ addEOperation(patternEClass, this.getPatternParameter(), "getAllParameters", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ addEOperation(patternEClass, this.getPatternVariable(), "getAllVariables", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ addEOperation(patternEClass, this.getPatternMethod(), "getAllMethods", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ op = addEOperation(patternEClass, this.getPatternParameter(), "getParameter", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ addEParameter(op, ecorePackage.getEString(), "name", 1, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(patternMethodEClass, PatternMethod.class, "PatternMethod", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getPatternMethod_Pattern(), this.getPattern(), this.getPattern_Methods(), "pattern", null, 1, 1, PatternMethod.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getPatternMethod_PatternFilePath(), theTypesPackage.getURI(), "patternFilePath", null, 1, 1, PatternMethod.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(patternParameterEClass, PatternParameter.class, "PatternParameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getPatternParameter_Type(), ecorePackage.getEString(), "type", null, 1, 1, PatternParameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getPatternParameter_Query(), this.getQuery(), this.getQuery_Parameter(), "query", null, 0, 1, PatternParameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(patternLibraryEClass, PatternLibrary.class, "PatternLibrary", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getPatternLibrary_Elements(), this.getPatternElement(), this.getPatternElement_Container(), "elements", null, 0, -1, PatternLibrary.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getPatternLibrary_Filters(), this.getString2PatternList(), null, "filters", null, 0, -1, PatternLibrary.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(patternElementEClass, PatternElement.class, "PatternElement", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getPatternElement_Container(), this.getPatternLibrary(), this.getPatternLibrary_Elements(), "container", null, 0, 1, PatternElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(patternViewpointEClass, PatternViewpoint.class, "PatternViewpoint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getPatternViewpoint_Libraries(), this.getPatternLibrary(), null, "libraries", null, 0, -1, PatternViewpoint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(patternNatureEClass, PatternNature.class, "PatternNature", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+
+ initEClass(patternCallEClass, PatternCall.class, "PatternCall", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getPatternCall_ParameterMatching(), this.getParamerter2ParameterMap(), null, "parameterMatching", null, 0, -1, PatternCall.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(superCallEClass, SuperCall.class, "SuperCall", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+
+ initEClass(paramerter2ParameterMapEClass, Map.Entry.class, "Paramerter2ParameterMap", !IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getParamerter2ParameterMap_Value(), this.getPatternParameter(), null, "value", null, 0, 1, Map.Entry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getParamerter2ParameterMap_Key(), this.getPatternParameter(), null, "key", null, 0, 1, Map.Entry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(callEClass, Call.class, "Call", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getCall_Pattern(), this.getPattern(), this.getPattern_Orchestration(), "pattern", null, 1, 1, Call.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(methodCallEClass, MethodCall.class, "MethodCall", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getMethodCall_Called(), this.getPatternMethod(), null, "called", null, 1, 1, MethodCall.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(patternVariableEClass, PatternVariable.class, "PatternVariable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getPatternVariable_Type(), ecorePackage.getEString(), "type", null, 1, 1, PatternVariable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(abstractPatternCallEClass, AbstractPatternCall.class, "AbstractPatternCall", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getAbstractPatternCall_Called(), this.getPattern(), null, "called", null, 1, 1, AbstractPatternCall.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(patternInjectedCallEClass, PatternInjectedCall.class, "PatternInjectedCall", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getPatternInjectedCall_Context(), this.getPatternVariable(), null, "context", null, 1, 1, PatternInjectedCall.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(queryEClass, Query.class, "Query", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getQuery_Parameter(), this.getPatternParameter(), this.getPatternParameter_Query(), "parameter", null, 1, 1, Query.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getQuery_ExtensionId(), theEcorePackage.getEString(), "extensionId", null, 1, 1, Query.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getQuery_QueryContext(), this.getString2String(), null, "queryContext", null, 0, -1, Query.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(basicQueryEClass, BasicQuery.class, "BasicQuery", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+
+ initEClass(stringQueryEClass, StringQuery.class, "StringQuery", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+
+ initEClass(customQueryEClass, CustomQuery.class, "CustomQuery", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+
+ initEClass(string2PatternListEClass, Map.Entry.class, "String2PatternList", !IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getString2PatternList_Key(), ecorePackage.getEString(), "key", null, 1, 1, Map.Entry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getString2PatternList_Value(), this.getPatternElement(), null, "value", null, 0, -1, Map.Entry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(string2StringEClass, Map.Entry.class, "String2String", !IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getString2String_Key(), ecorePackage.getEString(), "key", null, 1, 1, Map.Entry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getString2String_Value(), ecorePackage.getEString(), "value", null, 1, 1, Map.Entry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(typePatternExecutionReporterEClass, TypePatternExecutionReporter.class, "TypePatternExecutionReporter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+
+ op = addEOperation(typePatternExecutionReporterEClass, null, "getType", 1, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ EGenericType g1 = createEGenericType(theEcorePackage.getEJavaClass());
+ EGenericType g2 = createEGenericType();
+ g1.getETypeArguments().add(g2);
+ initEOperation(op, g1);
+
+ initEClass(backCallEClass, BackCall.class, "BackCall", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+
+ initEClass(typePatternCallBackHandlerEClass, TypePatternCallBackHandler.class, "TypePatternCallBackHandler", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+
+ op = addEOperation(typePatternCallBackHandlerEClass, null, "getType", 1, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ g1 = createEGenericType(theEcorePackage.getEJavaClass());
+ g2 = createEGenericType();
+ g1.getETypeArguments().add(g2);
+ initEOperation(op, g1);
+
+ initEClass(typePatternDomainVisitorEClass, TypePatternDomainVisitor.class, "TypePatternDomainVisitor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+
+ op = addEOperation(typePatternDomainVisitorEClass, null, "getType", 1, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ g1 = createEGenericType(theEcorePackage.getEJavaClass());
+ g2 = createEGenericType();
+ g1.getETypeArguments().add(g2);
+ initEOperation(op, g1);
+
+ initEClass(typePatternListEClass, TypePatternList.class, "TypePatternList", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getTypePatternList_Elements(), this.getPatternElement(), null, "elements", null, 0, -1, TypePatternList.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ op = addEOperation(typePatternListEClass, null, "getType", 1, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ g1 = createEGenericType(theEcorePackage.getEJavaClass());
+ g2 = createEGenericType();
+ g1.getETypeArguments().add(g2);
+ initEOperation(op, g1);
+
+ // Initialize data types
+ initEDataType(patternContextEDataType, PatternContext.class, "PatternContext", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEDataType(patternExceptionEDataType, PatternException.class, "PatternException", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+
+ // Create resource
+ createResource(eNS_URI);
+
+ // Create annotations
+ // http://www.eclipse.org/emf/2002/Ecore
+ createEcoreAnnotations();
+ }
+
+ /**
+ * Initializes the annotations for <b>http://www.eclipse.org/emf/2002/Ecore</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void createEcoreAnnotations() {
+ String source = "http://www.eclipse.org/emf/2002/Ecore"; //$NON-NLS-1$
+ addAnnotation(patternEClass, source, new String[] { "constraints", "HeaderMethod FooterMethod" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ addAnnotation(patternMethodEClass, source, new String[] { "constraints", "MandatoryName" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ addAnnotation(patternParameterEClass, source, new String[] { "constraints", "MandatoryName" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ addAnnotation(patternElementEClass, source, new String[] { "constraints", "MandatoryName" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ addAnnotation(patternNatureEClass, source, new String[] { "constraints", "MandatoryName" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ addAnnotation(patternVariableEClass, source, new String[] { "constraints", "MandatoryName" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ }
+
+} // PatternPackageImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternParameterImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternParameterImpl.java
new file mode 100644
index 0000000..138b6e4
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternParameterImpl.java
@@ -0,0 +1,280 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.impl;
+
+import org.eclipse.egf.model.fcore.impl.NamedModelElementImpl;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.egf.model.pattern.PatternParameter;
+import org.eclipse.egf.model.pattern.Query;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Parameter</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.pattern.impl.PatternParameterImpl#getType <em>Type</em>}</li>
+ * <li>{@link org.eclipse.egf.model.pattern.impl.PatternParameterImpl#getQuery <em>Query</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class PatternParameterImpl extends NamedModelElementImpl implements PatternParameter {
+ /**
+ * A set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected int eFlags = 0;
+
+ /**
+ * The default value of the '{@link #getType() <em>Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getType()
+ * @generated
+ * @ordered
+ */
+ protected static final String TYPE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getType() <em>Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getType()
+ * @generated
+ * @ordered
+ */
+ protected String type = TYPE_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getQuery() <em>Query</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getQuery()
+ * @generated
+ * @ordered
+ */
+ protected Query query;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PatternParameterImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PatternPackage.Literals.PATTERN_PARAMETER;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setType(String newType) {
+ String oldType = type;
+ type = newType;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PatternPackage.PATTERN_PARAMETER__TYPE, oldType, type));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Query getQuery() {
+ return query;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetQuery(Query newQuery, NotificationChain msgs) {
+ Query oldQuery = query;
+ query = newQuery;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PatternPackage.PATTERN_PARAMETER__QUERY, oldQuery, newQuery);
+ if (msgs == null)
+ msgs = notification;
+ else
+ msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setQuery(Query newQuery) {
+ if (newQuery != query) {
+ NotificationChain msgs = null;
+ if (query != null)
+ msgs = ((InternalEObject) query).eInverseRemove(this, PatternPackage.QUERY__PARAMETER, Query.class, msgs);
+ if (newQuery != null)
+ msgs = ((InternalEObject) newQuery).eInverseAdd(this, PatternPackage.QUERY__PARAMETER, Query.class, msgs);
+ msgs = basicSetQuery(newQuery, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ } else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PatternPackage.PATTERN_PARAMETER__QUERY, newQuery, newQuery));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_PARAMETER__QUERY:
+ if (query != null)
+ msgs = ((InternalEObject) query).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - PatternPackage.PATTERN_PARAMETER__QUERY, null, msgs);
+ return basicSetQuery((Query) otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_PARAMETER__QUERY:
+ return basicSetQuery(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_PARAMETER__TYPE:
+ return getType();
+ case PatternPackage.PATTERN_PARAMETER__QUERY:
+ return getQuery();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_PARAMETER__TYPE:
+ setType((String) newValue);
+ return;
+ case PatternPackage.PATTERN_PARAMETER__QUERY:
+ setQuery((Query) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_PARAMETER__TYPE:
+ setType(TYPE_EDEFAULT);
+ return;
+ case PatternPackage.PATTERN_PARAMETER__QUERY:
+ setQuery((Query) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_PARAMETER__TYPE:
+ return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type);
+ case PatternPackage.PATTERN_PARAMETER__QUERY:
+ return query != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy())
+ return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (type: "); //$NON-NLS-1$
+ result.append(type);
+ result.append(')');
+ return result.toString();
+ }
+
+} // PatternParameterImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternVariableImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternVariableImpl.java
new file mode 100644
index 0000000..60af99e
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternVariableImpl.java
@@ -0,0 +1,179 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.impl;
+
+import org.eclipse.egf.model.fcore.impl.NamedModelElementImpl;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.egf.model.pattern.PatternVariable;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Variable</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.pattern.impl.PatternVariableImpl#getType <em>Type</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class PatternVariableImpl extends NamedModelElementImpl implements PatternVariable {
+ /**
+ * A set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected int eFlags = 0;
+
+ /**
+ * The default value of the '{@link #getType() <em>Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getType()
+ * @generated
+ * @ordered
+ */
+ protected static final String TYPE_EDEFAULT = null;
+ /**
+ * The cached value of the '{@link #getType() <em>Type</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getType()
+ * @generated
+ * @ordered
+ */
+ protected String type = TYPE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PatternVariableImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PatternPackage.Literals.PATTERN_VARIABLE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setType(String newType) {
+ String oldType = type;
+ type = newType;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PatternPackage.PATTERN_VARIABLE__TYPE, oldType, type));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_VARIABLE__TYPE:
+ return getType();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_VARIABLE__TYPE:
+ setType((String) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_VARIABLE__TYPE:
+ setType(TYPE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_VARIABLE__TYPE:
+ return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy())
+ return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (type: "); //$NON-NLS-1$
+ result.append(type);
+ result.append(')');
+ return result.toString();
+ }
+
+} // PatternVariableImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternViewpointImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternViewpointImpl.java
new file mode 100644
index 0000000..09ff515
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/PatternViewpointImpl.java
@@ -0,0 +1,166 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.impl;
+
+import java.util.Collection;
+
+import org.eclipse.egf.model.fcore.impl.ViewpointImpl;
+import org.eclipse.egf.model.pattern.PatternLibrary;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.egf.model.pattern.PatternViewpoint;
+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;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Viewpoint</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.pattern.impl.PatternViewpointImpl#getLibraries <em>Libraries</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class PatternViewpointImpl extends ViewpointImpl implements PatternViewpoint {
+ /**
+ * A set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected int eFlags = 0;
+
+ /**
+ * The cached value of the '{@link #getLibraries() <em>Libraries</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLibraries()
+ * @generated
+ * @ordered
+ */
+ protected EList<PatternLibrary> libraries;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PatternViewpointImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PatternPackage.Literals.PATTERN_VIEWPOINT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<PatternLibrary> getLibraries() {
+ if (libraries == null) {
+ libraries = new EObjectContainmentEList<PatternLibrary>(PatternLibrary.class, this, PatternPackage.PATTERN_VIEWPOINT__LIBRARIES);
+ }
+ return libraries;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_VIEWPOINT__LIBRARIES:
+ return ((InternalEList<?>) getLibraries()).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 PatternPackage.PATTERN_VIEWPOINT__LIBRARIES:
+ return getLibraries();
+ }
+ 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 PatternPackage.PATTERN_VIEWPOINT__LIBRARIES:
+ getLibraries().clear();
+ getLibraries().addAll((Collection<? extends PatternLibrary>) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_VIEWPOINT__LIBRARIES:
+ getLibraries().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PatternPackage.PATTERN_VIEWPOINT__LIBRARIES:
+ return libraries != null && !libraries.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // PatternViewpointImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/QueryImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/QueryImpl.java
new file mode 100644
index 0000000..18ac8c4
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/QueryImpl.java
@@ -0,0 +1,309 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.impl;
+
+import org.eclipse.egf.model.fcore.impl.ModelElementImpl;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.egf.model.pattern.PatternParameter;
+import org.eclipse.egf.model.pattern.Query;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EMap;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EcoreEMap;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '
+ * <em><b>Query</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.pattern.impl.QueryImpl#getParameter <em>Parameter</em>}</li>
+ * <li>{@link org.eclipse.egf.model.pattern.impl.QueryImpl#getExtensionId <em>Extension Id</em>}</li>
+ * <li>{@link org.eclipse.egf.model.pattern.impl.QueryImpl#getQueryContext <em>Query Context</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class QueryImpl extends ModelElementImpl implements Query {
+ /**
+ * A set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected int eFlags = 0;
+
+ /**
+ * The default value of the '{@link #getExtensionId() <em>Extension Id</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getExtensionId()
+ * @generated
+ * @ordered
+ */
+ protected static final String EXTENSION_ID_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getExtensionId() <em>Extension Id</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getExtensionId()
+ * @generated
+ * @ordered
+ */
+ protected String extensionId = EXTENSION_ID_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getQueryContext() <em>Query Context</em>}' map.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getQueryContext()
+ * @generated
+ * @ordered
+ */
+ protected EMap<String, String> queryContext;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ protected QueryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PatternPackage.Literals.QUERY;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public PatternParameter getParameter() {
+ if (eContainerFeatureID() != PatternPackage.QUERY__PARAMETER)
+ return null;
+ return (PatternParameter) eContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetParameter(PatternParameter newParameter, NotificationChain msgs) {
+ msgs = eBasicSetContainer((InternalEObject) newParameter, PatternPackage.QUERY__PARAMETER, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParameter(PatternParameter newParameter) {
+ if (newParameter != eInternalContainer() || (eContainerFeatureID() != PatternPackage.QUERY__PARAMETER && newParameter != null)) {
+ if (EcoreUtil.isAncestor(this, newParameter))
+ throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); //$NON-NLS-1$
+ NotificationChain msgs = null;
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ if (newParameter != null)
+ msgs = ((InternalEObject) newParameter).eInverseAdd(this, PatternPackage.PATTERN_PARAMETER__QUERY, PatternParameter.class, msgs);
+ msgs = basicSetParameter(newParameter, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ } else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PatternPackage.QUERY__PARAMETER, newParameter, newParameter));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getExtensionId() {
+ return extensionId;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setExtensionId(String newExtensionId) {
+ String oldExtensionId = extensionId;
+ extensionId = newExtensionId;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PatternPackage.QUERY__EXTENSION_ID, oldExtensionId, extensionId));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EMap<String, String> getQueryContext() {
+ if (queryContext == null) {
+ queryContext = new EcoreEMap<String, String>(PatternPackage.Literals.STRING2_STRING, String2StringImpl.class, this, PatternPackage.QUERY__QUERY_CONTEXT);
+ }
+ return queryContext;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case PatternPackage.QUERY__PARAMETER:
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ return basicSetParameter((PatternParameter) otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case PatternPackage.QUERY__PARAMETER:
+ return basicSetParameter(null, msgs);
+ case PatternPackage.QUERY__QUERY_CONTEXT:
+ return ((InternalEList<?>) getQueryContext()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
+ switch (eContainerFeatureID()) {
+ case PatternPackage.QUERY__PARAMETER:
+ return eInternalContainer().eInverseRemove(this, PatternPackage.PATTERN_PARAMETER__QUERY, PatternParameter.class, msgs);
+ }
+ return super.eBasicRemoveFromContainerFeature(msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ @SuppressWarnings("all")
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PatternPackage.QUERY__PARAMETER:
+ return getParameter();
+ case PatternPackage.QUERY__EXTENSION_ID:
+ return getExtensionId();
+ case PatternPackage.QUERY__QUERY_CONTEXT:
+ if (coreType)
+ return getQueryContext();
+ else
+ return getQueryContext().map();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case PatternPackage.QUERY__PARAMETER:
+ setParameter((PatternParameter) newValue);
+ return;
+ case PatternPackage.QUERY__EXTENSION_ID:
+ setExtensionId((String) newValue);
+ return;
+ case PatternPackage.QUERY__QUERY_CONTEXT:
+ ((EStructuralFeature.Setting) getQueryContext()).set(newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PatternPackage.QUERY__PARAMETER:
+ setParameter((PatternParameter) null);
+ return;
+ case PatternPackage.QUERY__EXTENSION_ID:
+ setExtensionId(EXTENSION_ID_EDEFAULT);
+ return;
+ case PatternPackage.QUERY__QUERY_CONTEXT:
+ getQueryContext().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PatternPackage.QUERY__PARAMETER:
+ return getParameter() != null;
+ case PatternPackage.QUERY__EXTENSION_ID:
+ return EXTENSION_ID_EDEFAULT == null ? extensionId != null : !EXTENSION_ID_EDEFAULT.equals(extensionId);
+ case PatternPackage.QUERY__QUERY_CONTEXT:
+ return queryContext != null && !queryContext.isEmpty();
+ }
+ 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(" (extensionId: "); //$NON-NLS-1$
+ result.append(extensionId);
+ result.append(')');
+ return result.toString();
+ }
+
+} // QueryImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/String2PatternListImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/String2PatternListImpl.java
new file mode 100644
index 0000000..e80a435
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/String2PatternListImpl.java
@@ -0,0 +1,301 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.impl;
+
+import java.util.Collection;
+
+import org.eclipse.egf.model.pattern.PatternElement;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.BasicEMap;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.EMap;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl.Container;
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>String2 Pattern List</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.pattern.impl.String2PatternListImpl#getTypedKey <em>Key</em>}</li>
+ * <li>{@link org.eclipse.egf.model.pattern.impl.String2PatternListImpl#getTypedValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class String2PatternListImpl extends Container implements BasicEMap.Entry<String, EList<PatternElement>> {
+ /**
+ * A set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected int eFlags = 0;
+
+ /**
+ * The default value of the '{@link #getTypedKey() <em>Key</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTypedKey()
+ * @generated
+ * @ordered
+ */
+ protected static final String KEY_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getTypedKey() <em>Key</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTypedKey()
+ * @generated
+ * @ordered
+ */
+ protected String key = KEY_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getTypedValue() <em>Value</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTypedValue()
+ * @generated
+ * @ordered
+ */
+ protected EList<PatternElement> value;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected String2PatternListImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PatternPackage.Literals.STRING2_PATTERN_LIST;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getTypedKey() {
+ return key;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setTypedKey(String newKey) {
+ String oldKey = key;
+ key = newKey;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PatternPackage.STRING2_PATTERN_LIST__KEY, oldKey, key));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<PatternElement> getTypedValue() {
+ if (value == null) {
+ value = new EObjectResolvingEList<PatternElement>(PatternElement.class, this, PatternPackage.STRING2_PATTERN_LIST__VALUE);
+ }
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PatternPackage.STRING2_PATTERN_LIST__KEY:
+ return getTypedKey();
+ case PatternPackage.STRING2_PATTERN_LIST__VALUE:
+ return getTypedValue();
+ }
+ 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 PatternPackage.STRING2_PATTERN_LIST__KEY:
+ setTypedKey((String) newValue);
+ return;
+ case PatternPackage.STRING2_PATTERN_LIST__VALUE:
+ getTypedValue().clear();
+ getTypedValue().addAll((Collection<? extends PatternElement>) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PatternPackage.STRING2_PATTERN_LIST__KEY:
+ setTypedKey(KEY_EDEFAULT);
+ return;
+ case PatternPackage.STRING2_PATTERN_LIST__VALUE:
+ getTypedValue().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PatternPackage.STRING2_PATTERN_LIST__KEY:
+ return KEY_EDEFAULT == null ? key != null : !KEY_EDEFAULT.equals(key);
+ case PatternPackage.STRING2_PATTERN_LIST__VALUE:
+ return value != null && !value.isEmpty();
+ }
+ 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(" (key: "); //$NON-NLS-1$
+ result.append(key);
+ result.append(')');
+ return result.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected int hash = -1;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getHash() {
+ if (hash == -1) {
+ Object theKey = getKey();
+ hash = (theKey == null ? 0 : theKey.hashCode());
+ }
+ return hash;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setHash(int hash) {
+ this.hash = hash;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getKey() {
+ return getTypedKey();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setKey(String key) {
+ setTypedKey(key);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<PatternElement> getValue() {
+ return getTypedValue();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<PatternElement> setValue(EList<PatternElement> value) {
+ EList<PatternElement> oldValue = getValue();
+ getTypedValue().clear();
+ getTypedValue().addAll(value);
+ return oldValue;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ public EMap<String, EList<PatternElement>> getEMap() {
+ EObject container = eContainer();
+ return container == null ? null : (EMap<String, EList<PatternElement>>) container.eGet(eContainmentFeature());
+ }
+
+} // String2PatternListImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/String2StringImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/String2StringImpl.java
new file mode 100644
index 0000000..a96c1eb
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/String2StringImpl.java
@@ -0,0 +1,319 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.impl;
+
+import org.eclipse.egf.model.pattern.PatternPackage;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.BasicEMap;
+import org.eclipse.emf.common.util.EMap;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl.Container;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>String2 String</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.pattern.impl.String2StringImpl#getTypedKey <em>Key</em>}</li>
+ * <li>{@link org.eclipse.egf.model.pattern.impl.String2StringImpl#getTypedValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class String2StringImpl extends Container implements BasicEMap.Entry<String, String> {
+ /**
+ * A set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected int eFlags = 0;
+
+ /**
+ * The default value of the '{@link #getTypedKey() <em>Key</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTypedKey()
+ * @generated
+ * @ordered
+ */
+ protected static final String KEY_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getTypedKey() <em>Key</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTypedKey()
+ * @generated
+ * @ordered
+ */
+ protected String key = KEY_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getTypedValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTypedValue()
+ * @generated
+ * @ordered
+ */
+ protected static final String VALUE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getTypedValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTypedValue()
+ * @generated
+ * @ordered
+ */
+ protected String value = VALUE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected String2StringImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PatternPackage.Literals.STRING2_STRING;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getTypedKey() {
+ return key;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setTypedKey(String newKey) {
+ String oldKey = key;
+ key = newKey;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PatternPackage.STRING2_STRING__KEY, oldKey, key));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getTypedValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setTypedValue(String newValue) {
+ String oldValue = value;
+ value = newValue;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PatternPackage.STRING2_STRING__VALUE, oldValue, value));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PatternPackage.STRING2_STRING__KEY:
+ return getTypedKey();
+ case PatternPackage.STRING2_STRING__VALUE:
+ return getTypedValue();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case PatternPackage.STRING2_STRING__KEY:
+ setTypedKey((String) newValue);
+ return;
+ case PatternPackage.STRING2_STRING__VALUE:
+ setTypedValue((String) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PatternPackage.STRING2_STRING__KEY:
+ setTypedKey(KEY_EDEFAULT);
+ return;
+ case PatternPackage.STRING2_STRING__VALUE:
+ setTypedValue(VALUE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PatternPackage.STRING2_STRING__KEY:
+ return KEY_EDEFAULT == null ? key != null : !KEY_EDEFAULT.equals(key);
+ case PatternPackage.STRING2_STRING__VALUE:
+ return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
+ }
+ 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(" (key: "); //$NON-NLS-1$
+ result.append(key);
+ result.append(", value: "); //$NON-NLS-1$
+ result.append(value);
+ result.append(')');
+ return result.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected int hash = -1;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getHash() {
+ if (hash == -1) {
+ Object theKey = getKey();
+ hash = (theKey == null ? 0 : theKey.hashCode());
+ }
+ return hash;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setHash(int hash) {
+ this.hash = hash;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getKey() {
+ return getTypedKey();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setKey(String key) {
+ setTypedKey(key);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getValue() {
+ return getTypedValue();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String setValue(String value) {
+ String oldValue = getValue();
+ setTypedValue(value);
+ return oldValue;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ public EMap<String, String> getEMap() {
+ EObject container = eContainer();
+ return container == null ? null : (EMap<String, String>) container.eGet(eContainmentFeature());
+ }
+
+} //String2StringImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/StringQueryImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/StringQueryImpl.java
new file mode 100644
index 0000000..b9457ce
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/StringQueryImpl.java
@@ -0,0 +1,48 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.impl;
+
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.egf.model.pattern.StringQuery;
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>String Query</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class StringQueryImpl extends QueryImpl implements StringQuery {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected StringQueryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PatternPackage.Literals.STRING_QUERY;
+ }
+
+} // StringQueryImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/SuperCallImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/SuperCallImpl.java
new file mode 100644
index 0000000..d42a131
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/SuperCallImpl.java
@@ -0,0 +1,49 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.impl;
+
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.egf.model.pattern.SuperCall;
+
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Super Call</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class SuperCallImpl extends CallImpl implements SuperCall {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected SuperCallImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PatternPackage.Literals.SUPER_CALL;
+ }
+
+} //SuperCallImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/TypePatternCallBackHandlerImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/TypePatternCallBackHandlerImpl.java
new file mode 100644
index 0000000..a68dabf
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/TypePatternCallBackHandlerImpl.java
@@ -0,0 +1,69 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.impl;
+
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.egf.model.pattern.TypePatternCallBackHandler;
+import org.eclipse.egf.model.types.impl.TypeAbstractClassImpl;
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Type Pattern Call Back Handler</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class TypePatternCallBackHandlerImpl extends TypeAbstractClassImpl implements TypePatternCallBackHandler {
+ /**
+ * A set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected int eFlags = 0;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypePatternCallBackHandlerImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PatternPackage.Literals.TYPE_PATTERN_CALL_BACK_HANDLER;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ @SuppressWarnings("unchecked")
+ public Class<?> getType() {
+ return org.eclipse.egf.model.pattern.CallBackHandler.class;
+ }
+
+} // TypePatternCallBackHandlerImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/TypePatternDomainVisitorImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/TypePatternDomainVisitorImpl.java
new file mode 100644
index 0000000..a6e7d21
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/TypePatternDomainVisitorImpl.java
@@ -0,0 +1,69 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.impl;
+
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.egf.model.pattern.TypePatternDomainVisitor;
+import org.eclipse.egf.model.types.impl.TypeAbstractClassImpl;
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Type Pattern Domain Visitor</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class TypePatternDomainVisitorImpl extends TypeAbstractClassImpl implements TypePatternDomainVisitor {
+ /**
+ * A set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected int eFlags = 0;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypePatternDomainVisitorImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PatternPackage.Literals.TYPE_PATTERN_DOMAIN_VISITOR;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ @SuppressWarnings("unchecked")
+ public Class<?> getType() {
+ return org.eclipse.egf.model.pattern.DomainVisitor.class;
+ }
+
+} // TypePatternDomainVisitorImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/TypePatternExecutionReporterImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/TypePatternExecutionReporterImpl.java
new file mode 100644
index 0000000..7241d3d
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/TypePatternExecutionReporterImpl.java
@@ -0,0 +1,69 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.impl;
+
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.egf.model.pattern.TypePatternExecutionReporter;
+import org.eclipse.egf.model.types.impl.TypeAbstractClassImpl;
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Type Pattern Execution Reporter</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class TypePatternExecutionReporterImpl extends TypeAbstractClassImpl implements TypePatternExecutionReporter {
+ /**
+ * A set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected int eFlags = 0;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypePatternExecutionReporterImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PatternPackage.Literals.TYPE_PATTERN_EXECUTION_REPORTER;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ @SuppressWarnings("unchecked")
+ public Class<?> getType() {
+ return org.eclipse.egf.model.pattern.PatternExecutionReporter.class;
+ }
+
+} // TypePatternExecutionReporterImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/TypePatternListImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/TypePatternListImpl.java
new file mode 100644
index 0000000..217355b
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/impl/TypePatternListImpl.java
@@ -0,0 +1,177 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.impl;
+
+import java.util.Collection;
+
+import org.eclipse.egf.model.pattern.PatternElement;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.egf.model.pattern.TypePatternList;
+import org.eclipse.egf.model.types.impl.TypeImpl;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Type Pattern List</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>
+ * {@link org.eclipse.egf.model.pattern.impl.TypePatternListImpl#getElements
+ * <em>Elements</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class TypePatternListImpl extends TypeImpl implements TypePatternList {
+ /**
+ * A set of bit flags representing the values of boolean attributes and
+ * whether unsettable features have been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ protected int eFlags = 0;
+
+ /**
+ * The cached value of the '{@link #getElements() <em>Elements</em>}'
+ * reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getElements()
+ * @generated
+ * @ordered
+ */
+ protected EList<PatternElement> elements;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected TypePatternListImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PatternPackage.Literals.TYPE_PATTERN_LIST;
+ }
+
+ @Override
+ public Object getValue() {
+ return this;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EList<PatternElement> getElements() {
+ if (elements == null) {
+ elements = new EObjectResolvingEList<PatternElement>(PatternElement.class, this, PatternPackage.TYPE_PATTERN_LIST__ELEMENTS);
+ }
+ return elements;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Class<?> getType() {
+ return org.eclipse.egf.model.pattern.TypePatternList.class;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PatternPackage.TYPE_PATTERN_LIST__ELEMENTS:
+ return getElements();
+ }
+ 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 PatternPackage.TYPE_PATTERN_LIST__ELEMENTS:
+ getElements().clear();
+ getElements().addAll((Collection<? extends PatternElement>) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PatternPackage.TYPE_PATTERN_LIST__ELEMENTS:
+ getElements().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PatternPackage.TYPE_PATTERN_LIST__ELEMENTS:
+ return elements != null && !elements.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // TypePatternListImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/util/PatternAdapterFactory.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/util/PatternAdapterFactory.java
new file mode 100644
index 0000000..5b10ddb
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/util/PatternAdapterFactory.java
@@ -0,0 +1,811 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.util;
+
+import java.util.Map;
+
+import org.eclipse.egf.model.fcore.ModelElement;
+import org.eclipse.egf.model.fcore.NamedModelElement;
+import org.eclipse.egf.model.fcore.Viewpoint;
+import org.eclipse.egf.model.pattern.*;
+import org.eclipse.egf.model.pattern.AbstractPatternCall;
+import org.eclipse.egf.model.pattern.BackCall;
+import org.eclipse.egf.model.pattern.BasicQuery;
+import org.eclipse.egf.model.pattern.Call;
+import org.eclipse.egf.model.pattern.CustomQuery;
+import org.eclipse.egf.model.pattern.MethodCall;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternCall;
+import org.eclipse.egf.model.pattern.PatternElement;
+import org.eclipse.egf.model.pattern.PatternInjectedCall;
+import org.eclipse.egf.model.pattern.PatternLibrary;
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.model.pattern.PatternNature;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.egf.model.pattern.PatternParameter;
+import org.eclipse.egf.model.pattern.PatternVariable;
+import org.eclipse.egf.model.pattern.PatternViewpoint;
+import org.eclipse.egf.model.pattern.Query;
+import org.eclipse.egf.model.pattern.StringQuery;
+import org.eclipse.egf.model.pattern.SuperCall;
+import org.eclipse.egf.model.pattern.TypePatternCallBackHandler;
+import org.eclipse.egf.model.pattern.TypePatternDomainVisitor;
+import org.eclipse.egf.model.pattern.TypePatternExecutionReporter;
+import org.eclipse.egf.model.types.Type;
+import org.eclipse.egf.model.types.TypeAbstractClass;
+import org.eclipse.egf.model.types.TypeElement;
+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.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- 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.egf.model.pattern.PatternPackage
+ * @generated
+ */
+public class PatternAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static PatternPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PatternAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = PatternPackage.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 PatternSwitch<Adapter> modelSwitch = new PatternSwitch<Adapter>() {
+ @Override
+ public Adapter casePattern(Pattern object) {
+ return createPatternAdapter();
+ }
+
+ @Override
+ public Adapter casePatternMethod(PatternMethod object) {
+ return createPatternMethodAdapter();
+ }
+
+ @Override
+ public Adapter casePatternParameter(PatternParameter object) {
+ return createPatternParameterAdapter();
+ }
+
+ @Override
+ public Adapter casePatternLibrary(PatternLibrary object) {
+ return createPatternLibraryAdapter();
+ }
+
+ @Override
+ public Adapter casePatternElement(PatternElement object) {
+ return createPatternElementAdapter();
+ }
+
+ @Override
+ public Adapter casePatternViewpoint(PatternViewpoint object) {
+ return createPatternViewpointAdapter();
+ }
+
+ @Override
+ public Adapter casePatternNature(PatternNature object) {
+ return createPatternNatureAdapter();
+ }
+
+ @Override
+ public Adapter casePatternCall(PatternCall object) {
+ return createPatternCallAdapter();
+ }
+
+ @Override
+ public Adapter caseSuperCall(SuperCall object) {
+ return createSuperCallAdapter();
+ }
+
+ @Override
+ public Adapter caseParamerter2ParameterMap(Map.Entry<PatternParameter, PatternParameter> object) {
+ return createParamerter2ParameterMapAdapter();
+ }
+
+ @Override
+ public Adapter caseCall(Call object) {
+ return createCallAdapter();
+ }
+
+ @Override
+ public Adapter caseMethodCall(MethodCall object) {
+ return createMethodCallAdapter();
+ }
+
+ @Override
+ public Adapter casePatternVariable(PatternVariable object) {
+ return createPatternVariableAdapter();
+ }
+
+ @Override
+ public Adapter caseAbstractPatternCall(AbstractPatternCall object) {
+ return createAbstractPatternCallAdapter();
+ }
+
+ @Override
+ public Adapter casePatternInjectedCall(PatternInjectedCall object) {
+ return createPatternInjectedCallAdapter();
+ }
+
+ @Override
+ public Adapter caseQuery(Query object) {
+ return createQueryAdapter();
+ }
+
+ @Override
+ public Adapter caseBasicQuery(BasicQuery object) {
+ return createBasicQueryAdapter();
+ }
+
+ @Override
+ public Adapter caseStringQuery(StringQuery object) {
+ return createStringQueryAdapter();
+ }
+
+ @Override
+ public Adapter caseCustomQuery(CustomQuery object) {
+ return createCustomQueryAdapter();
+ }
+
+ @Override
+ public Adapter caseString2PatternList(Map.Entry<String, EList<PatternElement>> object) {
+ return createString2PatternListAdapter();
+ }
+
+ @Override
+ public Adapter caseString2String(Map.Entry<String, String> object) {
+ return createString2StringAdapter();
+ }
+
+ @Override
+ public Adapter caseTypePatternExecutionReporter(TypePatternExecutionReporter object) {
+ return createTypePatternExecutionReporterAdapter();
+ }
+
+ @Override
+ public Adapter caseBackCall(BackCall object) {
+ return createBackCallAdapter();
+ }
+
+ @Override
+ public Adapter caseTypePatternCallBackHandler(TypePatternCallBackHandler object) {
+ return createTypePatternCallBackHandlerAdapter();
+ }
+
+ @Override
+ public Adapter caseTypePatternDomainVisitor(TypePatternDomainVisitor object) {
+ return createTypePatternDomainVisitorAdapter();
+ }
+
+ @Override
+ public Adapter caseTypePatternList(TypePatternList object) {
+ return createTypePatternListAdapter();
+ }
+
+ @Override
+ public Adapter caseModelElement(ModelElement object) {
+ return createModelElementAdapter();
+ }
+
+ @Override
+ public Adapter caseNamedModelElement(NamedModelElement object) {
+ return createNamedModelElementAdapter();
+ }
+
+ @Override
+ public Adapter caseViewpoint(Viewpoint object) {
+ return createViewpointAdapter();
+ }
+
+ @Override
+ public Adapter caseTypeElement(TypeElement object) {
+ return createTypeElementAdapter();
+ }
+
+ @Override
+ public Adapter caseType(Type object) {
+ return createTypeAdapter();
+ }
+
+ @Override
+ public Adapter caseTypeAbstractClass(TypeAbstractClass object) {
+ return createTypeAbstractClassAdapter();
+ }
+
+ @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.egf.model.pattern.Pattern <em>Pattern</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.egf.model.pattern.Pattern
+ * @generated
+ */
+ public Adapter createPatternAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.pattern.PatternMethod <em>Method</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.egf.model.pattern.PatternMethod
+ * @generated
+ */
+ public Adapter createPatternMethodAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.pattern.PatternParameter <em>Parameter</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.egf.model.pattern.PatternParameter
+ * @generated
+ */
+ public Adapter createPatternParameterAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.pattern.PatternLibrary <em>Library</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.egf.model.pattern.PatternLibrary
+ * @generated
+ */
+ public Adapter createPatternLibraryAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.pattern.PatternElement <em>Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore
+ * cases;
+ * it's useful to ignore a case when inheritance will catch all the cases
+ * anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.egf.model.pattern.PatternElement
+ * @generated
+ */
+ public Adapter createPatternElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.pattern.PatternViewpoint <em>Viewpoint</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.egf.model.pattern.PatternViewpoint
+ * @generated
+ */
+ public Adapter createPatternViewpointAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.pattern.PatternNature <em>Nature</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.egf.model.pattern.PatternNature
+ * @generated
+ */
+ public Adapter createPatternNatureAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.pattern.PatternCall <em>Call</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.egf.model.pattern.PatternCall
+ * @generated
+ */
+ public Adapter createPatternCallAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.pattern.SuperCall <em>Super Call</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.egf.model.pattern.SuperCall
+ * @generated
+ */
+ public Adapter createSuperCallAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link java.util.Map.Entry <em>Paramerter2 Parameter Map</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 java.util.Map.Entry
+ * @generated
+ */
+ public Adapter createParamerter2ParameterMapAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.pattern.Call <em>Call</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.egf.model.pattern.Call
+ * @generated
+ */
+ public Adapter createCallAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.pattern.MethodCall <em>Method Call</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.egf.model.pattern.MethodCall
+ * @generated
+ */
+ public Adapter createMethodCallAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.pattern.PatternVariable <em>Variable</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.egf.model.pattern.PatternVariable
+ * @generated
+ */
+ public Adapter createPatternVariableAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.pattern.AbstractPatternCall <em>Abstract Pattern Call</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.egf.model.pattern.AbstractPatternCall
+ * @generated
+ */
+ public Adapter createAbstractPatternCallAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.pattern.PatternInjectedCall <em>Injected Call</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.egf.model.pattern.PatternInjectedCall
+ * @generated
+ */
+ public Adapter createPatternInjectedCallAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.pattern.Query <em>Query</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.egf.model.pattern.Query
+ * @generated
+ */
+ public Adapter createQueryAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.pattern.BasicQuery <em>Basic Query</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.egf.model.pattern.BasicQuery
+ * @generated
+ */
+ public Adapter createBasicQueryAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.pattern.StringQuery <em>String Query</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.egf.model.pattern.StringQuery
+ * @generated
+ */
+ public Adapter createStringQueryAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.pattern.CustomQuery <em>Custom Query</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.egf.model.pattern.CustomQuery
+ * @generated
+ */
+ public Adapter createCustomQueryAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link java.util.Map.Entry <em>String2 Pattern List</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 java.util.Map.Entry
+ * @generated
+ */
+ public Adapter createString2PatternListAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link java.util.Map.Entry <em>String2 String</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 java.util.Map.Entry
+ * @generated
+ */
+ public Adapter createString2StringAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.pattern.TypePatternExecutionReporter <em>Type Pattern Execution Reporter</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.egf.model.pattern.TypePatternExecutionReporter
+ * @generated
+ */
+ public Adapter createTypePatternExecutionReporterAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.pattern.BackCall <em>Back Call</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.egf.model.pattern.BackCall
+ * @generated
+ */
+ public Adapter createBackCallAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.pattern.TypePatternCallBackHandler <em>Type Pattern Call Back Handler</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.egf.model.pattern.TypePatternCallBackHandler
+ * @generated
+ */
+ public Adapter createTypePatternCallBackHandlerAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.pattern.TypePatternDomainVisitor <em>Type Pattern Domain Visitor</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.egf.model.pattern.TypePatternDomainVisitor
+ * @generated
+ */
+ public Adapter createTypePatternDomainVisitorAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.pattern.TypePatternList <em>Type Pattern List</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.egf.model.pattern.TypePatternList
+ * @generated
+ */
+ public Adapter createTypePatternListAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fcore.ModelElement <em>Model Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore
+ * cases;
+ * it's useful to ignore a case when inheritance will catch all the cases
+ * anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.egf.model.fcore.ModelElement
+ * @generated
+ */
+ public Adapter createModelElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fcore.NamedModelElement <em>Named Model Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore
+ * cases;
+ * it's useful to ignore a case when inheritance will catch all the cases
+ * anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.egf.model.fcore.NamedModelElement
+ * @generated
+ */
+ public Adapter createNamedModelElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.fcore.Viewpoint <em>Viewpoint</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.egf.model.fcore.Viewpoint
+ * @generated
+ */
+ public Adapter createViewpointAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.types.TypeElement <em>Type Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore
+ * cases;
+ * it's useful to ignore a case when inheritance will catch all the cases
+ * anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.egf.model.types.TypeElement
+ * @generated
+ */
+ public Adapter createTypeElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.types.Type <em>Type</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.egf.model.types.Type
+ * @generated
+ */
+ public Adapter createTypeAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.types.TypeAbstractClass <em>Type Abstract Class</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.egf.model.types.TypeAbstractClass
+ * @generated
+ */
+ public Adapter createTypeAbstractClassAdapter() {
+ 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;
+ }
+
+} // PatternAdapterFactory
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/util/PatternResourceFactoryImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/util/PatternResourceFactoryImpl.java
new file mode 100644
index 0000000..fb2e443
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/util/PatternResourceFactoryImpl.java
@@ -0,0 +1,49 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.util;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource Factory</b> associated with the package.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.util.PatternResourceImpl
+ * @generated
+ */
+public class PatternResourceFactoryImpl extends ResourceFactoryImpl {
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PatternResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ Resource result = new PatternResourceImpl(uri);
+ return result;
+ }
+
+} // PatternResourceFactoryImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/util/PatternResourceImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/util/PatternResourceImpl.java
new file mode 100644
index 0000000..1419773
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/util/PatternResourceImpl.java
@@ -0,0 +1,167 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.util;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.egf.model.uri.ModelSchemeAware;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.xmi.XMIResource;
+import org.eclipse.emf.ecore.xmi.XMLParserPool;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+import org.eclipse.emf.ecore.xmi.XMLSave.XMLTypeInfo;
+import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl;
+import org.eclipse.emf.ecore.xmi.impl.XMLParserPoolImpl;
+import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource </b> associated with the package.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.pattern.util.PatternResourceFactoryImpl
+ * @generated
+ */
+public class PatternResourceImpl extends XMIResourceImpl {
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private List<Object> lookupTable = new ArrayList<Object>();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private XMLParserPool parserPool = new XMLParserPoolImpl();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private Map<Object, Object> nameToFeatureMap = new HashMap<Object, Object>();
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param uri the URI of the new resource.
+ * @generated
+ */
+ public PatternResourceImpl(URI uri) {
+ super(uri);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean useIDAttributes() {
+ return false;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean useUUIDs() {
+ return true;
+ }
+
+ /**
+ * Called when the object is unloaded.
+ * This implementation
+ * {@link InternalEObject#eSetProxyURI sets} the object to be a proxy
+ * and clears the {@link #eAdapters adapters}.
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=292866
+ * Fix available in HEAD: 2.6.0.I200911020144
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void unloaded(InternalEObject internalEObject) {
+ // Ensure that an unresolved containment proxy's URI isn't reset.
+ //
+ if (!internalEObject.eIsProxy()) {
+ internalEObject.eSetProxyURI(uri.appendFragment(getURIFragment(internalEObject)));
+ }
+ internalEObject.eAdapters().clear();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void init() {
+ super.init();
+ setTrackingModification(true);
+ setEncoding("UTF-8"); //$NON-NLS-1$
+ setXMIVersion("2.1"); //$NON-NLS-1$
+ // Save Options
+ getDefaultSaveOptions().put(XMLResource.OPTION_DISABLE_NOTIFY, Boolean.TRUE);
+ getDefaultSaveOptions().put(XMLResource.OPTION_CONFIGURATION_CACHE, Boolean.TRUE);
+ getDefaultSaveOptions().put(XMLResource.OPTION_USE_CACHED_LOOKUP_TABLE, lookupTable);
+ getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ getDefaultSaveOptions().put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
+ getDefaultSaveOptions().put(XMLResource.OPTION_SAVE_TYPE_INFORMATION, new XMLTypeInfo() {
+ public boolean shouldSaveType(EClass objectType, EClassifier featureType, EStructuralFeature feature) {
+ return objectType != featureType && objectType != XMLTypePackage.Literals.ANY_TYPE;
+ }
+
+ public boolean shouldSaveType(EClass objectType, EClass featureType, EStructuralFeature feature) {
+ return objectType != featureType && objectType != XMLTypePackage.Literals.ANY_TYPE;
+ }
+ });
+ getDefaultSaveOptions().put(XMLResource.OPTION_LINE_WIDTH, new Integer(80));
+ // Avoid relative paths from workspace resources to plugin resources.
+ getDefaultSaveOptions().put(XMLResource.OPTION_URI_HANDLER, new ModelSchemeAware());
+ getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ getDefaultSaveOptions().put(XMIResource.OPTION_USE_XMI_TYPE, Boolean.TRUE);
+ // Load Options
+ getDefaultLoadOptions().put(XMLResource.OPTION_DISABLE_NOTIFY, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_DEFER_ATTACHMENT, Boolean.FALSE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_DEFER_IDREF_RESOLUTION, Boolean.FALSE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_DEPRECATED_METHODS, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_PARSER_POOL, parserPool);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_XML_NAME_TO_FEATURE_MAP, nameToFeatureMap);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ }
+
+} // PatternResourceImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/util/PatternSwitch.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/util/PatternSwitch.java
new file mode 100644
index 0000000..0ecc175
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/util/PatternSwitch.java
@@ -0,0 +1,912 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.util;
+
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.egf.model.fcore.ModelElement;
+import org.eclipse.egf.model.fcore.NamedModelElement;
+import org.eclipse.egf.model.fcore.Viewpoint;
+import org.eclipse.egf.model.pattern.*;
+import org.eclipse.egf.model.pattern.AbstractPatternCall;
+import org.eclipse.egf.model.pattern.BackCall;
+import org.eclipse.egf.model.pattern.BasicQuery;
+import org.eclipse.egf.model.pattern.Call;
+import org.eclipse.egf.model.pattern.CustomQuery;
+import org.eclipse.egf.model.pattern.MethodCall;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternCall;
+import org.eclipse.egf.model.pattern.PatternElement;
+import org.eclipse.egf.model.pattern.PatternInjectedCall;
+import org.eclipse.egf.model.pattern.PatternLibrary;
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.model.pattern.PatternNature;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.egf.model.pattern.PatternParameter;
+import org.eclipse.egf.model.pattern.PatternVariable;
+import org.eclipse.egf.model.pattern.PatternViewpoint;
+import org.eclipse.egf.model.pattern.Query;
+import org.eclipse.egf.model.pattern.StringQuery;
+import org.eclipse.egf.model.pattern.SuperCall;
+import org.eclipse.egf.model.pattern.TypePatternCallBackHandler;
+import org.eclipse.egf.model.pattern.TypePatternDomainVisitor;
+import org.eclipse.egf.model.pattern.TypePatternExecutionReporter;
+import org.eclipse.egf.model.types.Type;
+import org.eclipse.egf.model.types.TypeAbstractClass;
+import org.eclipse.egf.model.types.TypeElement;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- 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.egf.model.pattern.PatternPackage
+ * @generated
+ */
+public class PatternSwitch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static PatternPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PatternSwitch() {
+ if (modelPackage == null) {
+ modelPackage = PatternPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * 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
+ */
+ public T doSwitch(EObject theEObject) {
+ return doSwitch(theEObject.eClass(), theEObject);
+ }
+
+ /**
+ * 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
+ */
+ @SuppressWarnings("all")
+ protected T doSwitch(EClass theEClass, EObject theEObject) {
+ if (theEClass.eContainer() == modelPackage) {
+ return doSwitch(theEClass.getClassifierID(), theEObject);
+ } else {
+ List<EClass> eSuperTypes = theEClass.getESuperTypes();
+ return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject);
+ }
+ }
+
+ /**
+ * 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
+ */
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case PatternPackage.PATTERN: {
+ Pattern pattern = (Pattern) theEObject;
+ T result = casePattern(pattern);
+ if (result == null)
+ result = casePatternElement(pattern);
+ if (result == null)
+ result = caseNamedModelElement(pattern);
+ if (result == null)
+ result = caseModelElement(pattern);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case PatternPackage.PATTERN_METHOD: {
+ PatternMethod patternMethod = (PatternMethod) theEObject;
+ T result = casePatternMethod(patternMethod);
+ if (result == null)
+ result = caseNamedModelElement(patternMethod);
+ if (result == null)
+ result = caseModelElement(patternMethod);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case PatternPackage.PATTERN_PARAMETER: {
+ PatternParameter patternParameter = (PatternParameter) theEObject;
+ T result = casePatternParameter(patternParameter);
+ if (result == null)
+ result = caseNamedModelElement(patternParameter);
+ if (result == null)
+ result = caseModelElement(patternParameter);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case PatternPackage.PATTERN_LIBRARY: {
+ PatternLibrary patternLibrary = (PatternLibrary) theEObject;
+ T result = casePatternLibrary(patternLibrary);
+ if (result == null)
+ result = casePatternElement(patternLibrary);
+ if (result == null)
+ result = caseNamedModelElement(patternLibrary);
+ if (result == null)
+ result = caseModelElement(patternLibrary);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case PatternPackage.PATTERN_ELEMENT: {
+ PatternElement patternElement = (PatternElement) theEObject;
+ T result = casePatternElement(patternElement);
+ if (result == null)
+ result = caseNamedModelElement(patternElement);
+ if (result == null)
+ result = caseModelElement(patternElement);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case PatternPackage.PATTERN_VIEWPOINT: {
+ PatternViewpoint patternViewpoint = (PatternViewpoint) theEObject;
+ T result = casePatternViewpoint(patternViewpoint);
+ if (result == null)
+ result = caseViewpoint(patternViewpoint);
+ if (result == null)
+ result = caseModelElement(patternViewpoint);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case PatternPackage.PATTERN_NATURE: {
+ PatternNature patternNature = (PatternNature) theEObject;
+ T result = casePatternNature(patternNature);
+ if (result == null)
+ result = caseNamedModelElement(patternNature);
+ if (result == null)
+ result = caseModelElement(patternNature);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case PatternPackage.PATTERN_CALL: {
+ PatternCall patternCall = (PatternCall) theEObject;
+ T result = casePatternCall(patternCall);
+ if (result == null)
+ result = caseAbstractPatternCall(patternCall);
+ if (result == null)
+ result = caseCall(patternCall);
+ if (result == null)
+ result = caseModelElement(patternCall);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case PatternPackage.SUPER_CALL: {
+ SuperCall superCall = (SuperCall) theEObject;
+ T result = caseSuperCall(superCall);
+ if (result == null)
+ result = caseCall(superCall);
+ if (result == null)
+ result = caseModelElement(superCall);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case PatternPackage.PARAMERTER2_PARAMETER_MAP: {
+ @SuppressWarnings("unchecked")
+ Map.Entry<PatternParameter, PatternParameter> paramerter2ParameterMap = (Map.Entry<PatternParameter, PatternParameter>) theEObject;
+ T result = caseParamerter2ParameterMap(paramerter2ParameterMap);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case PatternPackage.CALL: {
+ Call call = (Call) theEObject;
+ T result = caseCall(call);
+ if (result == null)
+ result = caseModelElement(call);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case PatternPackage.METHOD_CALL: {
+ MethodCall methodCall = (MethodCall) theEObject;
+ T result = caseMethodCall(methodCall);
+ if (result == null)
+ result = caseCall(methodCall);
+ if (result == null)
+ result = caseModelElement(methodCall);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case PatternPackage.PATTERN_VARIABLE: {
+ PatternVariable patternVariable = (PatternVariable) theEObject;
+ T result = casePatternVariable(patternVariable);
+ if (result == null)
+ result = caseNamedModelElement(patternVariable);
+ if (result == null)
+ result = caseModelElement(patternVariable);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case PatternPackage.ABSTRACT_PATTERN_CALL: {
+ AbstractPatternCall abstractPatternCall = (AbstractPatternCall) theEObject;
+ T result = caseAbstractPatternCall(abstractPatternCall);
+ if (result == null)
+ result = caseCall(abstractPatternCall);
+ if (result == null)
+ result = caseModelElement(abstractPatternCall);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case PatternPackage.PATTERN_INJECTED_CALL: {
+ PatternInjectedCall patternInjectedCall = (PatternInjectedCall) theEObject;
+ T result = casePatternInjectedCall(patternInjectedCall);
+ if (result == null)
+ result = caseAbstractPatternCall(patternInjectedCall);
+ if (result == null)
+ result = caseCall(patternInjectedCall);
+ if (result == null)
+ result = caseModelElement(patternInjectedCall);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case PatternPackage.QUERY: {
+ Query query = (Query) theEObject;
+ T result = caseQuery(query);
+ if (result == null)
+ result = caseModelElement(query);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case PatternPackage.BASIC_QUERY: {
+ BasicQuery basicQuery = (BasicQuery) theEObject;
+ T result = caseBasicQuery(basicQuery);
+ if (result == null)
+ result = caseQuery(basicQuery);
+ if (result == null)
+ result = caseModelElement(basicQuery);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case PatternPackage.STRING_QUERY: {
+ StringQuery stringQuery = (StringQuery) theEObject;
+ T result = caseStringQuery(stringQuery);
+ if (result == null)
+ result = caseQuery(stringQuery);
+ if (result == null)
+ result = caseModelElement(stringQuery);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case PatternPackage.CUSTOM_QUERY: {
+ CustomQuery customQuery = (CustomQuery) theEObject;
+ T result = caseCustomQuery(customQuery);
+ if (result == null)
+ result = caseQuery(customQuery);
+ if (result == null)
+ result = caseModelElement(customQuery);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case PatternPackage.STRING2_PATTERN_LIST: {
+ @SuppressWarnings("unchecked")
+ Map.Entry<String, EList<PatternElement>> string2PatternList = (Map.Entry<String, EList<PatternElement>>) theEObject;
+ T result = caseString2PatternList(string2PatternList);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case PatternPackage.STRING2_STRING: {
+ @SuppressWarnings("unchecked")
+ Map.Entry<String, String> string2String = (Map.Entry<String, String>) theEObject;
+ T result = caseString2String(string2String);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case PatternPackage.TYPE_PATTERN_EXECUTION_REPORTER: {
+ TypePatternExecutionReporter typePatternExecutionReporter = (TypePatternExecutionReporter) theEObject;
+ T result = caseTypePatternExecutionReporter(typePatternExecutionReporter);
+ if (result == null)
+ result = caseTypeAbstractClass(typePatternExecutionReporter);
+ if (result == null)
+ result = caseType(typePatternExecutionReporter);
+ if (result == null)
+ result = caseTypeElement(typePatternExecutionReporter);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case PatternPackage.BACK_CALL: {
+ BackCall backCall = (BackCall) theEObject;
+ T result = caseBackCall(backCall);
+ if (result == null)
+ result = caseCall(backCall);
+ if (result == null)
+ result = caseModelElement(backCall);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case PatternPackage.TYPE_PATTERN_CALL_BACK_HANDLER: {
+ TypePatternCallBackHandler typePatternCallBackHandler = (TypePatternCallBackHandler) theEObject;
+ T result = caseTypePatternCallBackHandler(typePatternCallBackHandler);
+ if (result == null)
+ result = caseTypeAbstractClass(typePatternCallBackHandler);
+ if (result == null)
+ result = caseType(typePatternCallBackHandler);
+ if (result == null)
+ result = caseTypeElement(typePatternCallBackHandler);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case PatternPackage.TYPE_PATTERN_DOMAIN_VISITOR: {
+ TypePatternDomainVisitor typePatternDomainVisitor = (TypePatternDomainVisitor) theEObject;
+ T result = caseTypePatternDomainVisitor(typePatternDomainVisitor);
+ if (result == null)
+ result = caseTypeAbstractClass(typePatternDomainVisitor);
+ if (result == null)
+ result = caseType(typePatternDomainVisitor);
+ if (result == null)
+ result = caseTypeElement(typePatternDomainVisitor);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case PatternPackage.TYPE_PATTERN_LIST: {
+ TypePatternList typePatternList = (TypePatternList) theEObject;
+ T result = caseTypePatternList(typePatternList);
+ if (result == null)
+ result = caseType(typePatternList);
+ if (result == null)
+ result = caseTypeElement(typePatternList);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ default:
+ return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Pattern</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>Pattern</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePattern(Pattern object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Method</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>Method</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePatternMethod(PatternMethod object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Parameter</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>Parameter</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePatternParameter(PatternParameter object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Library</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>Library</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePatternLibrary(PatternLibrary object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePatternElement(PatternElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Viewpoint</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>Viewpoint</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePatternViewpoint(PatternViewpoint object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Nature</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>Nature</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePatternNature(PatternNature object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Call</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>Call</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePatternCall(PatternCall object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Super Call</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>Super Call</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseSuperCall(SuperCall object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Paramerter2 Parameter Map</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>Paramerter2 Parameter Map</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseParamerter2ParameterMap(Map.Entry<PatternParameter, PatternParameter> object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Call</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>Call</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseCall(Call object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Method Call</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>Method Call</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseMethodCall(MethodCall object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Variable</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>Variable</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePatternVariable(PatternVariable object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Abstract Pattern Call</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>Abstract Pattern Call</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAbstractPatternCall(AbstractPatternCall object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Injected Call</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>Injected Call</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePatternInjectedCall(PatternInjectedCall object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Query</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>Query</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseQuery(Query object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Basic Query</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>Basic Query</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseBasicQuery(BasicQuery object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>String Query</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>String Query</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseStringQuery(StringQuery object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Custom Query</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>Custom Query</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseCustomQuery(CustomQuery object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>String2 Pattern List</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>String2 Pattern List</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseString2PatternList(Map.Entry<String, EList<PatternElement>> object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>String2 String</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>String2 String</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseString2String(Map.Entry<String, String> object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Type Pattern Execution Reporter</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>Type Pattern Execution Reporter</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTypePatternExecutionReporter(TypePatternExecutionReporter object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Back Call</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>Back Call</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseBackCall(BackCall object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Type Pattern Call Back Handler</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>Type Pattern Call Back Handler</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTypePatternCallBackHandler(TypePatternCallBackHandler object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Type Pattern Domain Visitor</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>Type Pattern Domain Visitor</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTypePatternDomainVisitor(TypePatternDomainVisitor object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Type Pattern List</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>Type Pattern List</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTypePatternList(TypePatternList object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Model Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Model Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseModelElement(ModelElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Named Model Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Named Model Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseNamedModelElement(NamedModelElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Viewpoint</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>Viewpoint</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseViewpoint(Viewpoint object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Type Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Type Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTypeElement(TypeElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Type</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>Type</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseType(Type object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Type Abstract Class</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>Type Abstract Class</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTypeAbstractClass(TypeAbstractClass 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
+ */
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} // PatternSwitch
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/util/PatternValidator.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/util/PatternValidator.java
new file mode 100644
index 0000000..90affff
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/pattern/util/PatternValidator.java
@@ -0,0 +1,839 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.pattern.util;
+
+import java.util.Map;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.egf.model.EGFModelPlugin;
+import org.eclipse.egf.model.pattern.*;
+import org.eclipse.egf.model.pattern.AbstractPatternCall;
+import org.eclipse.egf.model.pattern.BackCall;
+import org.eclipse.egf.model.pattern.BasicQuery;
+import org.eclipse.egf.model.pattern.Call;
+import org.eclipse.egf.model.pattern.CustomQuery;
+import org.eclipse.egf.model.pattern.MethodCall;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternCall;
+import org.eclipse.egf.model.pattern.PatternContext;
+import org.eclipse.egf.model.pattern.PatternElement;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.model.pattern.PatternInjectedCall;
+import org.eclipse.egf.model.pattern.PatternLibrary;
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.model.pattern.PatternNature;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.egf.model.pattern.PatternParameter;
+import org.eclipse.egf.model.pattern.PatternVariable;
+import org.eclipse.egf.model.pattern.PatternViewpoint;
+import org.eclipse.egf.model.pattern.Query;
+import org.eclipse.egf.model.pattern.StringQuery;
+import org.eclipse.egf.model.pattern.SuperCall;
+import org.eclipse.egf.model.pattern.TypePatternCallBackHandler;
+import org.eclipse.egf.model.pattern.TypePatternDomainVisitor;
+import org.eclipse.egf.model.pattern.TypePatternExecutionReporter;
+import org.eclipse.egf.model.types.util.TypesValidator;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.DiagnosticChain;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.util.EObjectValidator;
+import org.eclipse.emf.validation.model.EvaluationMode;
+import org.eclipse.emf.validation.model.IConstraintStatus;
+import org.eclipse.emf.validation.service.IBatchValidator;
+import org.eclipse.emf.validation.service.ModelValidationService;
+import org.eclipse.emf.validation.service.ITraversalStrategy.Recursive;
+
+/**
+ * <!-- begin-user-doc --> The <b>Validator</b> for the model. <!-- end-user-doc
+ * -->
+ *
+ * @see org.eclipse.egf.model.pattern.PatternPackage
+ * @generated
+ */
+public class PatternValidator extends EObjectValidator {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ public static final PatternValidator INSTANCE = new PatternValidator();
+
+ /**
+ * A constant for the {@link org.eclipse.emf.common.util.Diagnostic#getSource() source} of diagnostic {@link org.eclipse.emf.common.util.Diagnostic#getCode() codes} from this package.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @see org.eclipse.emf.common.util.Diagnostic#getSource()
+ * @see org.eclipse.emf.common.util.Diagnostic#getCode()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ public static final String DIAGNOSTIC_SOURCE = "org.eclipse.egf.model.pattern"; //$NON-NLS-1$
+
+ /**
+ * A constant with a fixed name that can be used as the base value for additional hand written constants.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ * @generated
+ */
+ private static final int GENERATED_DIAGNOSTIC_CODE_COUNT = 0;
+
+ /**
+ * A constant with a fixed name that can be used as the base value for additional hand written constants in a derived class.
+ * <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ * @generated
+ */
+ protected static final int DIAGNOSTIC_CODE_COUNT = GENERATED_DIAGNOSTIC_CODE_COUNT;
+
+ /**
+ * Model Validation Service interface for batch validation of EMF elements.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ private final IBatchValidator batchValidator;
+
+ /**
+ * The cached base package validator.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypesValidator typesValidator;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ * @generated
+ */
+ public PatternValidator() {
+ super();
+ typesValidator = TypesValidator.INSTANCE;
+ batchValidator = (IBatchValidator) ModelValidationService.getInstance().newValidator(EvaluationMode.BATCH);
+ batchValidator.setTraversalStrategy(new Recursive());
+ batchValidator.setIncludeLiveConstraints(true);
+ batchValidator.setReportSuccesses(false);
+ }
+
+ /**
+ * Returns the package of this validator switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EPackage getEPackage() {
+ return PatternPackage.eINSTANCE;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean validate(EClass eClass, EObject eObject, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ IStatus status = Status.OK_STATUS;
+ // do whatever the basic EcoreValidator does
+ super.validate(eClass, eObject, diagnostics, context);
+ // no point in validating if we can't report results
+ if (diagnostics != null) {
+ // if EMF Mode Validation Service already covered the sub-tree,
+ // which it does for efficient computation and error reporting,
+ // then don't repeat (the Diagnostician does the recursion
+ // externally). If there is no context map, then we can't
+ // help it
+ if (hasProcessed(eObject, context) == false) {
+ status = batchValidator.validate(eObject, new NullProgressMonitor());
+ processed(eObject, context, status);
+ appendDiagnostics(status, diagnostics);
+ }
+ }
+ return status.isOK();
+ }
+
+ /**
+ * Calls <code>validateXXX</code> for the corresponding classifier of the model.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected boolean validate(int classifierID, Object value, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ switch (classifierID) {
+ case PatternPackage.PATTERN:
+ return validatePattern((Pattern) value, diagnostics, context);
+ case PatternPackage.PATTERN_METHOD:
+ return validatePatternMethod((PatternMethod) value, diagnostics, context);
+ case PatternPackage.PATTERN_PARAMETER:
+ return validatePatternParameter((PatternParameter) value, diagnostics, context);
+ case PatternPackage.PATTERN_LIBRARY:
+ return validatePatternLibrary((PatternLibrary) value, diagnostics, context);
+ case PatternPackage.PATTERN_ELEMENT:
+ return validatePatternElement((PatternElement) value, diagnostics, context);
+ case PatternPackage.PATTERN_VIEWPOINT:
+ return validatePatternViewpoint((PatternViewpoint) value, diagnostics, context);
+ case PatternPackage.PATTERN_NATURE:
+ return validatePatternNature((PatternNature) value, diagnostics, context);
+ case PatternPackage.PATTERN_CALL:
+ return validatePatternCall((PatternCall) value, diagnostics, context);
+ case PatternPackage.SUPER_CALL:
+ return validateSuperCall((SuperCall) value, diagnostics, context);
+ case PatternPackage.PARAMERTER2_PARAMETER_MAP:
+ return validateParamerter2ParameterMap((Map.Entry<?, ?>) value, diagnostics, context);
+ case PatternPackage.CALL:
+ return validateCall((Call) value, diagnostics, context);
+ case PatternPackage.METHOD_CALL:
+ return validateMethodCall((MethodCall) value, diagnostics, context);
+ case PatternPackage.PATTERN_VARIABLE:
+ return validatePatternVariable((PatternVariable) value, diagnostics, context);
+ case PatternPackage.ABSTRACT_PATTERN_CALL:
+ return validateAbstractPatternCall((AbstractPatternCall) value, diagnostics, context);
+ case PatternPackage.PATTERN_INJECTED_CALL:
+ return validatePatternInjectedCall((PatternInjectedCall) value, diagnostics, context);
+ case PatternPackage.QUERY:
+ return validateQuery((Query) value, diagnostics, context);
+ case PatternPackage.BASIC_QUERY:
+ return validateBasicQuery((BasicQuery) value, diagnostics, context);
+ case PatternPackage.STRING_QUERY:
+ return validateStringQuery((StringQuery) value, diagnostics, context);
+ case PatternPackage.CUSTOM_QUERY:
+ return validateCustomQuery((CustomQuery) value, diagnostics, context);
+ case PatternPackage.STRING2_PATTERN_LIST:
+ return validateString2PatternList((Map.Entry<?, ?>) value, diagnostics, context);
+ case PatternPackage.STRING2_STRING:
+ return validateString2String((Map.Entry<?, ?>) value, diagnostics, context);
+ case PatternPackage.TYPE_PATTERN_EXECUTION_REPORTER:
+ return validateTypePatternExecutionReporter((TypePatternExecutionReporter) value, diagnostics, context);
+ case PatternPackage.BACK_CALL:
+ return validateBackCall((BackCall) value, diagnostics, context);
+ case PatternPackage.TYPE_PATTERN_CALL_BACK_HANDLER:
+ return validateTypePatternCallBackHandler((TypePatternCallBackHandler) value, diagnostics, context);
+ case PatternPackage.TYPE_PATTERN_DOMAIN_VISITOR:
+ return validateTypePatternDomainVisitor((TypePatternDomainVisitor) value, diagnostics, context);
+ case PatternPackage.TYPE_PATTERN_LIST:
+ return validateTypePatternList((TypePatternList) value, diagnostics, context);
+ case PatternPackage.PATTERN_CONTEXT:
+ return validatePatternContext((PatternContext) value, diagnostics, context);
+ case PatternPackage.PATTERN_EXCEPTION:
+ return validatePatternException((PatternException) value, diagnostics, context);
+ default:
+ return true;
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validatePattern(Pattern pattern, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(pattern, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(pattern, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(pattern, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(pattern, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(pattern, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(pattern, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(pattern, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validatePatternElement_MandatoryName(pattern, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validatePattern_HeaderMethod(pattern, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validatePattern_FooterMethod(pattern, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * Validates the HeaderMethod constraint of '<em>Pattern</em>'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validatePattern_HeaderMethod(Pattern pattern, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (pattern.getHeaderMethod() != null && pattern.getMethods().contains(pattern.getHeaderMethod()) == false) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "HeaderMethod", getObjectLabel(pattern, context), "Header Method should be a Pattern Method" }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { pattern }, context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Validates the FooterMethod constraint of '<em>Pattern</em>'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validatePattern_FooterMethod(Pattern pattern, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (pattern.getFooterMethod() != null && pattern.getMethods().contains(pattern.getFooterMethod()) == false) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "FooterMethod", getObjectLabel(pattern, context), "Footer Method should be a Pattern Method" }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { pattern }, context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validatePatternMethod(PatternMethod patternMethod, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(patternMethod, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(patternMethod, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(patternMethod, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(patternMethod, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(patternMethod, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(patternMethod, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(patternMethod, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validatePatternMethod_MandatoryName(patternMethod, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * Validates the MandatoryName constraint of '<em>Method</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validatePatternMethod_MandatoryName(PatternMethod patternMethod, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (patternMethod.getName() == null || patternMethod.getName().trim().length() == 0) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "MandatoryName", getObjectLabel(patternMethod, context), "The attribute name is mandatory" }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { patternMethod }, context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validatePatternParameter(PatternParameter patternParameter, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(patternParameter, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(patternParameter, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(patternParameter, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(patternParameter, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(patternParameter, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(patternParameter, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(patternParameter, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validatePatternParameter_MandatoryName(patternParameter, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * Validates the MandatoryName constraint of '<em>Parameter</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validatePatternParameter_MandatoryName(PatternParameter patternParameter, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (patternParameter.getName() == null || patternParameter.getName().trim().length() == 0) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "MandatoryName", getObjectLabel(patternParameter, context), "The attribute name is mandatory" }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { patternParameter }, context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validatePatternLibrary(PatternLibrary patternLibrary, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(patternLibrary, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(patternLibrary, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(patternLibrary, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(patternLibrary, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(patternLibrary, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(patternLibrary, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(patternLibrary, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validatePatternElement_MandatoryName(patternLibrary, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validatePatternElement(PatternElement patternElement, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(patternElement, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(patternElement, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(patternElement, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(patternElement, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(patternElement, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(patternElement, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(patternElement, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validatePatternElement_MandatoryName(patternElement, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * Validates the MandatoryName constraint of '<em>Element</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validatePatternElement_MandatoryName(PatternElement patternElement, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (patternElement.getName() == null || patternElement.getName().trim().length() == 0) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "MandatoryName", getObjectLabel(patternElement, context), "The attribute name is mandatory" }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { patternElement }, context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validatePatternViewpoint(PatternViewpoint patternViewpoint, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(patternViewpoint, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validatePatternNature(PatternNature patternNature, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(patternNature, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(patternNature, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(patternNature, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(patternNature, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(patternNature, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(patternNature, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(patternNature, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validatePatternNature_MandatoryName(patternNature, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * Validates the MandatoryName constraint of '<em>Nature</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validatePatternNature_MandatoryName(PatternNature patternNature, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (patternNature.getName() == null || patternNature.getName().trim().length() == 0) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "MandatoryName", getObjectLabel(patternNature, context), "The attribute name is mandatory" }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { patternNature }, context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validatePatternCall(PatternCall patternCall, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(patternCall, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateSuperCall(SuperCall superCall, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(superCall, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateParamerter2ParameterMap(Map.Entry<?, ?> paramerter2ParameterMap, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint((EObject) paramerter2ParameterMap, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateCall(Call call, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(call, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateMethodCall(MethodCall methodCall, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(methodCall, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validatePatternVariable(PatternVariable patternVariable, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(patternVariable, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(patternVariable, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(patternVariable, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(patternVariable, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(patternVariable, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(patternVariable, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(patternVariable, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validatePatternVariable_MandatoryName(patternVariable, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * Validates the MandatoryName constraint of '<em>Variable</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validatePatternVariable_MandatoryName(PatternVariable patternVariable, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (patternVariable.getName() == null || patternVariable.getName().trim().length() == 0) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "MandatoryName", getObjectLabel(patternVariable, context), "The attribute name is mandatory" }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { patternVariable }, context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateAbstractPatternCall(AbstractPatternCall abstractPatternCall, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(abstractPatternCall, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validatePatternInjectedCall(PatternInjectedCall patternInjectedCall, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(patternInjectedCall, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateQuery(Query query, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(query, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateBasicQuery(BasicQuery basicQuery, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(basicQuery, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateStringQuery(StringQuery stringQuery, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(stringQuery, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateCustomQuery(CustomQuery customQuery, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(customQuery, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateString2PatternList(Map.Entry<?, ?> string2PatternList, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint((EObject) string2PatternList, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateString2String(Map.Entry<?, ?> string2String, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint((EObject) string2String, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateTypePatternExecutionReporter(TypePatternExecutionReporter typePatternExecutionReporter, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(typePatternExecutionReporter, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(typePatternExecutionReporter, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(typePatternExecutionReporter, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(typePatternExecutionReporter, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(typePatternExecutionReporter, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(typePatternExecutionReporter, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(typePatternExecutionReporter, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= typesValidator.validateTypeAbstractClass_LoadableType(typePatternExecutionReporter, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= typesValidator.validateTypeAbstractClass_ValidValue(typePatternExecutionReporter, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateBackCall(BackCall backCall, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(backCall, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateTypePatternCallBackHandler(TypePatternCallBackHandler typePatternCallBackHandler, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(typePatternCallBackHandler, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(typePatternCallBackHandler, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(typePatternCallBackHandler, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(typePatternCallBackHandler, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(typePatternCallBackHandler, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(typePatternCallBackHandler, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(typePatternCallBackHandler, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= typesValidator.validateTypeAbstractClass_LoadableType(typePatternCallBackHandler, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= typesValidator.validateTypeAbstractClass_ValidValue(typePatternCallBackHandler, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateTypePatternDomainVisitor(TypePatternDomainVisitor typePatternDomainVisitor, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(typePatternDomainVisitor, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(typePatternDomainVisitor, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(typePatternDomainVisitor, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(typePatternDomainVisitor, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(typePatternDomainVisitor, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(typePatternDomainVisitor, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(typePatternDomainVisitor, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= typesValidator.validateTypeAbstractClass_LoadableType(typePatternDomainVisitor, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= typesValidator.validateTypeAbstractClass_ValidValue(typePatternDomainVisitor, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validateTypePatternList(TypePatternList typePatternList, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(typePatternList, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validatePatternContext(PatternContext patternContext, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validatePatternException(PatternException patternException, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return true;
+ }
+
+ /**
+ * Returns the resource locator that will be used to fetch messages for this validator's diagnostics.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EGFModelPlugin.INSTANCE;
+ }
+
+ /**
+ * If we have a context map, record this object's <code>status</code> in it
+ * so that we will know later that we have processed it and its sub-tree.
+ *
+ * @param eObject an element that we have validated
+ * @param context the context (may be <code>null</code>)
+ * @param status the element's validation status
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ * @generated
+ */
+ private void processed(EObject eObject, Map<Object, Object> context, IStatus status) {
+ if (context != null) {
+ context.put(eObject, status);
+ }
+ }
+
+ /**
+ * Determines whether we have processed this <code>eObject</code> before,
+ * by automatic recursion of the EMF Model Validation Service. This is
+ * only possible if we do, indeed, have a context.
+ *
+ * @param eObject an element to be validated (we hope not)
+ * @param context the context (may be <code>null</code>)
+ * @return <code>true</code> if the context is not <code>null</code> and
+ * the <code>eObject</code> or one of its containers has already been
+ * validated; <code>false</code>, otherwise
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean hasProcessed(EObject eObject, Map<Object, Object> context) {
+ boolean result = false;
+ if (context != null) {
+ // this is O(NlogN) but there's no helping it
+ while (eObject != null) {
+ if (context.containsKey(eObject)) {
+ result = true;
+ eObject = null;
+ } else {
+ eObject = eObject.eContainer();
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Converts a status result from the EMF validation service to diagnostics.
+ *
+ * @param status
+ * the EMF validation service's status result
+ * @param diagnostics
+ * a diagnostic chain to accumulate results on <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ private void appendDiagnostics(IStatus status, DiagnosticChain diagnostics) {
+ if (status.isMultiStatus()) {
+ IStatus[] children = status.getChildren();
+ for (int i = 0; i < children.length; i++) {
+ appendDiagnostics(children[i], diagnostics);
+ }
+ } else if (status instanceof IConstraintStatus) {
+ diagnostics.add(new BasicDiagnostic(status.getSeverity(), status.getPlugin(), status.getCode(), status.getMessage(), ((IConstraintStatus) status).getResultLocus().toArray()));
+ }
+ }
+} // PatternValidator
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/Type.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/Type.java
new file mode 100644
index 0000000..debb05b
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/Type.java
@@ -0,0 +1,42 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Type</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.egf.model.types.TypesPackage#getType()
+ * @model abstract="true"
+ * @generated
+ */
+public interface Type extends TypeElement {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation" required="true" TBounds="org.eclipse.emf.ecore.EJavaObject"
+ * @generated
+ */
+ <T extends Object> Class<T> getType();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation"
+ * @generated
+ */
+ Object getValue();
+
+} // Type
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeAbstractClass.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeAbstractClass.java
new file mode 100644
index 0000000..78ab1bb
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeAbstractClass.java
@@ -0,0 +1,59 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Type Abstract Class</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.types.TypeAbstractClass#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeAbstractClass()
+ * @model abstract="true"
+ * annotation="http://www.eclipse.org/emf/2002/Ecore constraints='LoadableType ValidValue'"
+ * @generated
+ */
+public interface TypeAbstractClass extends Type {
+ /**
+ * Returns the value of the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Value</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Value</em>' attribute.
+ * @see #setValue(String)
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeAbstractClass_Value()
+ * @model
+ * @generated
+ */
+ String getValue();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.types.TypeAbstractClass#getValue <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Value</em>' attribute.
+ * @see #getValue()
+ * @generated
+ */
+ void setValue(String value);
+
+} // TypeAbstractClass
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeBigDecimal.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeBigDecimal.java
new file mode 100644
index 0000000..cae8cce
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeBigDecimal.java
@@ -0,0 +1,60 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types;
+
+import java.math.BigDecimal;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Type Big Decimal</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.types.TypeBigDecimal#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeBigDecimal()
+ * @model
+ * @generated
+ */
+public interface TypeBigDecimal extends TypeObject {
+ /**
+ * Returns the value of the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Value</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Value</em>' attribute.
+ * @see #setValue(BigDecimal)
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeBigDecimal_Value()
+ * @model
+ * @generated
+ */
+ BigDecimal getValue();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.types.TypeBigDecimal#getValue <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Value</em>' attribute.
+ * @see #getValue()
+ * @generated
+ */
+ void setValue(BigDecimal value);
+
+} // TypeBigDecimal
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeBigInteger.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeBigInteger.java
new file mode 100644
index 0000000..0874a6f
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeBigInteger.java
@@ -0,0 +1,60 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types;
+
+import java.math.BigInteger;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Type Big Integer</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.types.TypeBigInteger#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeBigInteger()
+ * @model
+ * @generated
+ */
+public interface TypeBigInteger extends TypeObject {
+ /**
+ * Returns the value of the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Value</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Value</em>' attribute.
+ * @see #setValue(BigInteger)
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeBigInteger_Value()
+ * @model
+ * @generated
+ */
+ BigInteger getValue();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.types.TypeBigInteger#getValue <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Value</em>' attribute.
+ * @see #getValue()
+ * @generated
+ */
+ void setValue(BigInteger value);
+
+} // TypeBigInteger
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeBoolean.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeBoolean.java
new file mode 100644
index 0000000..79565cc
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeBoolean.java
@@ -0,0 +1,58 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Type Boolean</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.types.TypeBoolean#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeBoolean()
+ * @model
+ * @generated
+ */
+public interface TypeBoolean extends TypeObject {
+ /**
+ * Returns the value of the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Value</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Value</em>' attribute.
+ * @see #setValue(Boolean)
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeBoolean_Value()
+ * @model
+ * @generated
+ */
+ Boolean getValue();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.types.TypeBoolean#getValue <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Value</em>' attribute.
+ * @see #getValue()
+ * @generated
+ */
+ void setValue(Boolean value);
+
+} // TypeBoolean
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeByte.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeByte.java
new file mode 100644
index 0000000..7f79108
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeByte.java
@@ -0,0 +1,58 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Type Byte</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.types.TypeByte#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeByte()
+ * @model
+ * @generated
+ */
+public interface TypeByte extends TypeObject {
+ /**
+ * Returns the value of the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Value</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Value</em>' attribute.
+ * @see #setValue(Byte)
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeByte_Value()
+ * @model
+ * @generated
+ */
+ Byte getValue();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.types.TypeByte#getValue <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Value</em>' attribute.
+ * @see #getValue()
+ * @generated
+ */
+ void setValue(Byte value);
+
+} // TypeByte
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeCharacter.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeCharacter.java
new file mode 100644
index 0000000..52bc9d1
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeCharacter.java
@@ -0,0 +1,58 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Type Character</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.types.TypeCharacter#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeCharacter()
+ * @model
+ * @generated
+ */
+public interface TypeCharacter extends TypeObject {
+ /**
+ * Returns the value of the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Value</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Value</em>' attribute.
+ * @see #setValue(Character)
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeCharacter_Value()
+ * @model
+ * @generated
+ */
+ Character getValue();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.types.TypeCharacter#getValue <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Value</em>' attribute.
+ * @see #getValue()
+ * @generated
+ */
+ void setValue(Character value);
+
+} // TypeCharacter
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeCollection.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeCollection.java
new file mode 100644
index 0000000..874fecd
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeCollection.java
@@ -0,0 +1,37 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Type Collection</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeCollection()
+ * @model
+ * @generated
+ */
+public interface TypeCollection extends TypeAbstractClass {
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation" required="true"
+ * annotation="http://www.eclipse.org/emf/2002/GenModel body='return java.util.Collection.class;'"
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ Class<?> getType();
+
+} // TypeCollection
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeDate.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeDate.java
new file mode 100644
index 0000000..32cabeb
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeDate.java
@@ -0,0 +1,60 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types;
+
+import java.util.Date;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Type Date</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.types.TypeDate#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeDate()
+ * @model
+ * @generated
+ */
+public interface TypeDate extends TypeObject {
+ /**
+ * Returns the value of the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Value</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Value</em>' attribute.
+ * @see #setValue(Date)
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeDate_Value()
+ * @model
+ * @generated
+ */
+ Date getValue();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.types.TypeDate#getValue <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Value</em>' attribute.
+ * @see #getValue()
+ * @generated
+ */
+ void setValue(Date value);
+
+} // TypeDate
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeDouble.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeDouble.java
new file mode 100644
index 0000000..936bb33
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeDouble.java
@@ -0,0 +1,58 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Type Double</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.types.TypeDouble#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeDouble()
+ * @model
+ * @generated
+ */
+public interface TypeDouble extends TypeObject {
+ /**
+ * Returns the value of the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Value</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Value</em>' attribute.
+ * @see #setValue(Double)
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeDouble_Value()
+ * @model
+ * @generated
+ */
+ Double getValue();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.types.TypeDouble#getValue <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Value</em>' attribute.
+ * @see #getValue()
+ * @generated
+ */
+ void setValue(Double value);
+
+} // TypeDouble
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeElement.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeElement.java
new file mode 100644
index 0000000..0534a7a
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeElement.java
@@ -0,0 +1,87 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Type Element</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.types.TypeElement#getID <em>ID</em>}</li>
+ * <li>{@link org.eclipse.egf.model.types.TypeElement#getDescription <em>Description</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeElement()
+ * @model abstract="true"
+ * @generated
+ */
+public interface TypeElement extends EObject {
+ /**
+ * Returns the value of the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>ID</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>ID</em>' attribute.
+ * @see #isSetID()
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeElement_ID()
+ * @model unsettable="true" transient="true" changeable="false" volatile="true" derived="true"
+ * @generated
+ */
+ String getID();
+
+ /**
+ * Returns whether the value of the '{@link org.eclipse.egf.model.types.TypeElement#getID <em>ID</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>ID</em>' attribute is set.
+ * @see #getID()
+ * @generated
+ */
+ boolean isSetID();
+
+ /**
+ * Returns the value of the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Description</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Description</em>' attribute.
+ * @see #setDescription(String)
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeElement_Description()
+ * @model
+ * @generated
+ */
+ String getDescription();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.types.TypeElement#getDescription <em>Description</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Description</em>' attribute.
+ * @see #getDescription()
+ * @generated
+ */
+ void setDescription(String value);
+
+} // TypeElement
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeFloat.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeFloat.java
new file mode 100644
index 0000000..a059da5
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeFloat.java
@@ -0,0 +1,58 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Type Float</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.types.TypeFloat#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeFloat()
+ * @model
+ * @generated
+ */
+public interface TypeFloat extends TypeObject {
+ /**
+ * Returns the value of the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Value</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Value</em>' attribute.
+ * @see #setValue(Float)
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeFloat_Value()
+ * @model
+ * @generated
+ */
+ Float getValue();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.types.TypeFloat#getValue <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Value</em>' attribute.
+ * @see #getValue()
+ * @generated
+ */
+ void setValue(Float value);
+
+} // TypeFloat
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeGeneratorAdapterFactory.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeGeneratorAdapterFactory.java
new file mode 100644
index 0000000..397bf9b
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeGeneratorAdapterFactory.java
@@ -0,0 +1,37 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Type Generator Adapter Factory</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeGeneratorAdapterFactory()
+ * @model
+ * @generated
+ */
+public interface TypeGeneratorAdapterFactory extends TypeAbstractClass {
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation" required="true"
+ * annotation="http://www.eclipse.org/emf/2002/GenModel body='return org.eclipse.emf.codegen.ecore.generator.GeneratorAdapterFactory.class;'"
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ Class<?> getType();
+
+} // TypeGeneratorAdapterFactory
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeInteger.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeInteger.java
new file mode 100644
index 0000000..929ed21
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeInteger.java
@@ -0,0 +1,58 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Type Integer</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.types.TypeInteger#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeInteger()
+ * @model
+ * @generated
+ */
+public interface TypeInteger extends TypeObject {
+ /**
+ * Returns the value of the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Value</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Value</em>' attribute.
+ * @see #setValue(Integer)
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeInteger_Value()
+ * @model
+ * @generated
+ */
+ Integer getValue();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.types.TypeInteger#getValue <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Value</em>' attribute.
+ * @see #getValue()
+ * @generated
+ */
+ void setValue(Integer value);
+
+} // TypeInteger
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeList.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeList.java
new file mode 100644
index 0000000..c34bf5e
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeList.java
@@ -0,0 +1,37 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Type List</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeList()
+ * @model
+ * @generated
+ */
+public interface TypeList extends TypeAbstractClass {
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation" required="true"
+ * annotation="http://www.eclipse.org/emf/2002/GenModel body='return java.util.List.class;'"
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ Class<?> getType();
+
+} // TypeList
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeLong.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeLong.java
new file mode 100644
index 0000000..32cb600
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeLong.java
@@ -0,0 +1,58 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Type Long</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.types.TypeLong#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeLong()
+ * @model
+ * @generated
+ */
+public interface TypeLong extends TypeObject {
+ /**
+ * Returns the value of the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Value</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Value</em>' attribute.
+ * @see #setValue(Long)
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeLong_Value()
+ * @model
+ * @generated
+ */
+ Long getValue();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.types.TypeLong#getValue <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Value</em>' attribute.
+ * @see #getValue()
+ * @generated
+ */
+ void setValue(Long value);
+
+} // TypeLong
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeMap.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeMap.java
new file mode 100644
index 0000000..0486ddf
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeMap.java
@@ -0,0 +1,37 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Type Map</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeMap()
+ * @model
+ * @generated
+ */
+public interface TypeMap extends TypeAbstractClass {
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation" required="true"
+ * annotation="http://www.eclipse.org/emf/2002/GenModel body='return java.util.Map.class;'"
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ Class<?> getType();
+
+} // TypeMap
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeObject.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeObject.java
new file mode 100644
index 0000000..bba87b8
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeObject.java
@@ -0,0 +1,35 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Type Object</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeObject()
+ * @model abstract="true"
+ * annotation="http://www.eclipse.org/emf/2002/Ecore constraints='ValidValue'"
+ * @generated
+ */
+public interface TypeObject extends Type {
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation" required="true" TBounds="org.eclipse.emf.ecore.EJavaObject"
+ * @generated
+ */
+ <T extends Object> Class<T> getType();
+} // TypeObject
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeSet.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeSet.java
new file mode 100644
index 0000000..8acb210
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeSet.java
@@ -0,0 +1,37 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Type Set</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeSet()
+ * @model
+ * @generated
+ */
+public interface TypeSet extends TypeAbstractClass {
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation" required="true"
+ * annotation="http://www.eclipse.org/emf/2002/GenModel body='return java.util.Set.class;'"
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ Class<?> getType();
+
+} // TypeSet
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeShort.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeShort.java
new file mode 100644
index 0000000..fe24a8d
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeShort.java
@@ -0,0 +1,58 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Type Short</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.types.TypeShort#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeShort()
+ * @model
+ * @generated
+ */
+public interface TypeShort extends TypeObject {
+ /**
+ * Returns the value of the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Value</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Value</em>' attribute.
+ * @see #setValue(Short)
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeShort_Value()
+ * @model
+ * @generated
+ */
+ Short getValue();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.types.TypeShort#getValue <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Value</em>' attribute.
+ * @see #getValue()
+ * @generated
+ */
+ void setValue(Short value);
+
+} // TypeShort
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeString.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeString.java
new file mode 100644
index 0000000..966577e
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypeString.java
@@ -0,0 +1,58 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Type String</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.types.TypeString#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeString()
+ * @model
+ * @generated
+ */
+public interface TypeString extends TypeObject {
+ /**
+ * Returns the value of the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Value</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Value</em>' attribute.
+ * @see #setValue(String)
+ * @see org.eclipse.egf.model.types.TypesPackage#getTypeString_Value()
+ * @model
+ * @generated
+ */
+ String getValue();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.egf.model.types.TypeString#getValue <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Value</em>' attribute.
+ * @see #getValue()
+ * @generated
+ */
+ void setValue(String value);
+
+} // TypeString
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypesFactory.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypesFactory.java
new file mode 100644
index 0000000..482a170
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypesFactory.java
@@ -0,0 +1,280 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Set;
+import org.eclipse.emf.common.util.URI;
+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.egf.model.types.TypesPackage
+ * @generated
+ */
+public interface TypesFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ TypesFactory eINSTANCE = org.eclipse.egf.model.types.impl.TypesFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Type Collection</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Type Collection</em>'.
+ * @generated
+ */
+ TypeCollection createTypeCollection();
+
+ /**
+ * Returns a new object of class '<em>Type List</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Type List</em>'.
+ * @generated
+ */
+ TypeList createTypeList();
+
+ /**
+ * Returns a new object of class '<em>Type Set</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Type Set</em>'.
+ * @generated
+ */
+ TypeSet createTypeSet();
+
+ /**
+ * Returns a new object of class '<em>Type Generator Adapter Factory</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Type Generator Adapter Factory</em>'.
+ * @generated
+ */
+ TypeGeneratorAdapterFactory createTypeGeneratorAdapterFactory();
+
+ /**
+ * Returns a new object of class '<em>Type Map</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Type Map</em>'.
+ * @generated
+ */
+ TypeMap createTypeMap();
+
+ /**
+ * Returns a new object of class '<em>Type Big Decimal</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Type Big Decimal</em>'.
+ * @generated
+ */
+ TypeBigDecimal createTypeBigDecimal();
+
+ /**
+ * Returns a new object of class '<em>Type Big Integer</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Type Big Integer</em>'.
+ * @generated
+ */
+ TypeBigInteger createTypeBigInteger();
+
+ /**
+ * Returns a new object of class '<em>Type Boolean</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Type Boolean</em>'.
+ * @generated
+ */
+ TypeBoolean createTypeBoolean();
+
+ /**
+ * Returns a new object of class '<em>Type Byte</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Type Byte</em>'.
+ * @generated
+ */
+ TypeByte createTypeByte();
+
+ /**
+ * Returns a new object of class '<em>Type Character</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Type Character</em>'.
+ * @generated
+ */
+ TypeCharacter createTypeCharacter();
+
+ /**
+ * Returns a new object of class '<em>Type Date</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Type Date</em>'.
+ * @generated
+ */
+ TypeDate createTypeDate();
+
+ /**
+ * Returns a new object of class '<em>Type Double</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Type Double</em>'.
+ * @generated
+ */
+ TypeDouble createTypeDouble();
+
+ /**
+ * Returns a new object of class '<em>Type Float</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Type Float</em>'.
+ * @generated
+ */
+ TypeFloat createTypeFloat();
+
+ /**
+ * Returns a new object of class '<em>Type Integer</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Type Integer</em>'.
+ * @generated
+ */
+ TypeInteger createTypeInteger();
+
+ /**
+ * Returns a new object of class '<em>Type Long</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Type Long</em>'.
+ * @generated
+ */
+ TypeLong createTypeLong();
+
+ /**
+ * Returns a new object of class '<em>Type Short</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Type Short</em>'.
+ * @generated
+ */
+ TypeShort createTypeShort();
+
+ /**
+ * Returns a new object of class '<em>Type String</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Type String</em>'.
+ * @generated
+ */
+ TypeString createTypeString();
+
+ /**
+ * Returns an instance of data type '<em>Set</em>' corresponding the given literal.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param literal a literal of the data type.
+ * @return a new instance value of the data type.
+ * @generated
+ */
+ Set<?> createSet(String literal);
+
+ /**
+ * Returns a literal representation of an instance of data type '<em>Set</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param instanceValue an instance value of the data type.
+ * @return a literal representation of the instance value.
+ * @generated
+ */
+ String convertSet(Set<?> instanceValue);
+
+ /**
+ * Returns an instance of data type '<em>List</em>' corresponding the given literal.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param literal a literal of the data type.
+ * @return a new instance value of the data type.
+ * @generated
+ */
+ List<?> createList(String literal);
+
+ /**
+ * Returns a literal representation of an instance of data type '<em>List</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param instanceValue an instance value of the data type.
+ * @return a literal representation of the instance value.
+ * @generated
+ */
+ String convertList(List<?> instanceValue);
+
+ /**
+ * Returns an instance of data type '<em>Collection</em>' corresponding the given literal.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param literal a literal of the data type.
+ * @return a new instance value of the data type.
+ * @generated
+ */
+ Collection<?> createCollection(String literal);
+
+ /**
+ * Returns a literal representation of an instance of data type '<em>Collection</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param instanceValue an instance value of the data type.
+ * @return a literal representation of the instance value.
+ * @generated
+ */
+ String convertCollection(Collection<?> instanceValue);
+
+ /**
+ * Returns an instance of data type '<em>URI</em>' corresponding the given literal.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param literal a literal of the data type.
+ * @return a new instance value of the data type.
+ * @generated
+ */
+ URI createURI(String literal);
+
+ /**
+ * Returns a literal representation of an instance of data type '<em>URI</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param instanceValue an instance value of the data type.
+ * @return a literal representation of the instance value.
+ * @generated
+ */
+ String convertURI(URI instanceValue);
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ TypesPackage getTypesPackage();
+
+} // TypesFactory
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypesPackage.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypesPackage.java
new file mode 100644
index 0000000..b3c2879
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/TypesPackage.java
@@ -0,0 +1,1932 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.TypesFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface TypesPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "types"; //$NON-NLS-1$
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/egf/1.0.0/types"; //$NON-NLS-1$
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "types"; //$NON-NLS-1$
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ TypesPackage eINSTANCE = org.eclipse.egf.model.types.impl.TypesPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.types.impl.TypeElementImpl <em>Type Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeElementImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeElement()
+ * @generated
+ */
+ int TYPE_ELEMENT = 0;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_ELEMENT__ID = 0;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_ELEMENT__DESCRIPTION = 1;
+
+ /**
+ * The number of structural features of the '<em>Type Element</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_ELEMENT_FEATURE_COUNT = 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.types.impl.TypeImpl <em>Type</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getType()
+ * @generated
+ */
+ int TYPE = 1;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE__ID = TYPE_ELEMENT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE__DESCRIPTION = TYPE_ELEMENT__DESCRIPTION;
+
+ /**
+ * The number of structural features of the '<em>Type</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_FEATURE_COUNT = TYPE_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.types.impl.TypeObjectImpl <em>Type Object</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeObjectImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeObject()
+ * @generated
+ */
+ int TYPE_OBJECT = 2;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_OBJECT__ID = TYPE__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_OBJECT__DESCRIPTION = TYPE__DESCRIPTION;
+
+ /**
+ * The number of structural features of the '<em>Type Object</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_OBJECT_FEATURE_COUNT = TYPE_FEATURE_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.types.impl.TypeAbstractClassImpl <em>Type Abstract Class</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeAbstractClassImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeAbstractClass()
+ * @generated
+ */
+ int TYPE_ABSTRACT_CLASS = 3;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_ABSTRACT_CLASS__ID = TYPE__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_ABSTRACT_CLASS__DESCRIPTION = TYPE__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_ABSTRACT_CLASS__VALUE = TYPE_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Type Abstract Class</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_ABSTRACT_CLASS_FEATURE_COUNT = TYPE_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.types.impl.TypeCollectionImpl <em>Type Collection</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeCollectionImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeCollection()
+ * @generated
+ */
+ int TYPE_COLLECTION = 4;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_COLLECTION__ID = TYPE_ABSTRACT_CLASS__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_COLLECTION__DESCRIPTION = TYPE_ABSTRACT_CLASS__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_COLLECTION__VALUE = TYPE_ABSTRACT_CLASS__VALUE;
+
+ /**
+ * The number of structural features of the '<em>Type Collection</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_COLLECTION_FEATURE_COUNT = TYPE_ABSTRACT_CLASS_FEATURE_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.types.impl.TypeListImpl <em>Type List</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeListImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeList()
+ * @generated
+ */
+ int TYPE_LIST = 5;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_LIST__ID = TYPE_ABSTRACT_CLASS__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_LIST__DESCRIPTION = TYPE_ABSTRACT_CLASS__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_LIST__VALUE = TYPE_ABSTRACT_CLASS__VALUE;
+
+ /**
+ * The number of structural features of the '<em>Type List</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_LIST_FEATURE_COUNT = TYPE_ABSTRACT_CLASS_FEATURE_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.types.impl.TypeSetImpl <em>Type Set</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeSetImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeSet()
+ * @generated
+ */
+ int TYPE_SET = 6;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_SET__ID = TYPE_ABSTRACT_CLASS__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_SET__DESCRIPTION = TYPE_ABSTRACT_CLASS__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_SET__VALUE = TYPE_ABSTRACT_CLASS__VALUE;
+
+ /**
+ * The number of structural features of the '<em>Type Set</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_SET_FEATURE_COUNT = TYPE_ABSTRACT_CLASS_FEATURE_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.types.impl.TypeGeneratorAdapterFactoryImpl <em>Type Generator Adapter Factory</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeGeneratorAdapterFactoryImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeGeneratorAdapterFactory()
+ * @generated
+ */
+ int TYPE_GENERATOR_ADAPTER_FACTORY = 7;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_GENERATOR_ADAPTER_FACTORY__ID = TYPE_ABSTRACT_CLASS__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_GENERATOR_ADAPTER_FACTORY__DESCRIPTION = TYPE_ABSTRACT_CLASS__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_GENERATOR_ADAPTER_FACTORY__VALUE = TYPE_ABSTRACT_CLASS__VALUE;
+
+ /**
+ * The number of structural features of the '<em>Type Generator Adapter Factory</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_GENERATOR_ADAPTER_FACTORY_FEATURE_COUNT = TYPE_ABSTRACT_CLASS_FEATURE_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.types.impl.TypeMapImpl <em>Type Map</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeMapImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeMap()
+ * @generated
+ */
+ int TYPE_MAP = 8;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_MAP__ID = TYPE_ABSTRACT_CLASS__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_MAP__DESCRIPTION = TYPE_ABSTRACT_CLASS__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_MAP__VALUE = TYPE_ABSTRACT_CLASS__VALUE;
+
+ /**
+ * The number of structural features of the '<em>Type Map</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_MAP_FEATURE_COUNT = TYPE_ABSTRACT_CLASS_FEATURE_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.types.impl.TypeBigDecimalImpl <em>Type Big Decimal</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeBigDecimalImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeBigDecimal()
+ * @generated
+ */
+ int TYPE_BIG_DECIMAL = 9;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_BIG_DECIMAL__ID = TYPE_OBJECT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_BIG_DECIMAL__DESCRIPTION = TYPE_OBJECT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_BIG_DECIMAL__VALUE = TYPE_OBJECT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Type Big Decimal</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_BIG_DECIMAL_FEATURE_COUNT = TYPE_OBJECT_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.types.impl.TypeBigIntegerImpl <em>Type Big Integer</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeBigIntegerImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeBigInteger()
+ * @generated
+ */
+ int TYPE_BIG_INTEGER = 10;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_BIG_INTEGER__ID = TYPE_OBJECT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_BIG_INTEGER__DESCRIPTION = TYPE_OBJECT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_BIG_INTEGER__VALUE = TYPE_OBJECT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Type Big Integer</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_BIG_INTEGER_FEATURE_COUNT = TYPE_OBJECT_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.types.impl.TypeBooleanImpl <em>Type Boolean</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeBooleanImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeBoolean()
+ * @generated
+ */
+ int TYPE_BOOLEAN = 11;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_BOOLEAN__ID = TYPE_OBJECT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_BOOLEAN__DESCRIPTION = TYPE_OBJECT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_BOOLEAN__VALUE = TYPE_OBJECT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Type Boolean</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_BOOLEAN_FEATURE_COUNT = TYPE_OBJECT_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.types.impl.TypeByteImpl <em>Type Byte</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeByteImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeByte()
+ * @generated
+ */
+ int TYPE_BYTE = 12;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_BYTE__ID = TYPE_OBJECT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_BYTE__DESCRIPTION = TYPE_OBJECT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_BYTE__VALUE = TYPE_OBJECT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Type Byte</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_BYTE_FEATURE_COUNT = TYPE_OBJECT_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.types.impl.TypeCharacterImpl <em>Type Character</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeCharacterImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeCharacter()
+ * @generated
+ */
+ int TYPE_CHARACTER = 13;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_CHARACTER__ID = TYPE_OBJECT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_CHARACTER__DESCRIPTION = TYPE_OBJECT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_CHARACTER__VALUE = TYPE_OBJECT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Type Character</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_CHARACTER_FEATURE_COUNT = TYPE_OBJECT_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.types.impl.TypeDateImpl <em>Type Date</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeDateImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeDate()
+ * @generated
+ */
+ int TYPE_DATE = 14;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_DATE__ID = TYPE_OBJECT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_DATE__DESCRIPTION = TYPE_OBJECT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_DATE__VALUE = TYPE_OBJECT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Type Date</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_DATE_FEATURE_COUNT = TYPE_OBJECT_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.types.impl.TypeDoubleImpl <em>Type Double</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeDoubleImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeDouble()
+ * @generated
+ */
+ int TYPE_DOUBLE = 15;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_DOUBLE__ID = TYPE_OBJECT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_DOUBLE__DESCRIPTION = TYPE_OBJECT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_DOUBLE__VALUE = TYPE_OBJECT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Type Double</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_DOUBLE_FEATURE_COUNT = TYPE_OBJECT_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.types.impl.TypeFloatImpl <em>Type Float</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeFloatImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeFloat()
+ * @generated
+ */
+ int TYPE_FLOAT = 16;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_FLOAT__ID = TYPE_OBJECT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_FLOAT__DESCRIPTION = TYPE_OBJECT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_FLOAT__VALUE = TYPE_OBJECT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Type Float</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_FLOAT_FEATURE_COUNT = TYPE_OBJECT_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.types.impl.TypeIntegerImpl <em>Type Integer</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeIntegerImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeInteger()
+ * @generated
+ */
+ int TYPE_INTEGER = 17;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_INTEGER__ID = TYPE_OBJECT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_INTEGER__DESCRIPTION = TYPE_OBJECT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_INTEGER__VALUE = TYPE_OBJECT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Type Integer</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_INTEGER_FEATURE_COUNT = TYPE_OBJECT_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.types.impl.TypeLongImpl <em>Type Long</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeLongImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeLong()
+ * @generated
+ */
+ int TYPE_LONG = 18;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_LONG__ID = TYPE_OBJECT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_LONG__DESCRIPTION = TYPE_OBJECT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_LONG__VALUE = TYPE_OBJECT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Type Long</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_LONG_FEATURE_COUNT = TYPE_OBJECT_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.types.impl.TypeShortImpl <em>Type Short</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeShortImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeShort()
+ * @generated
+ */
+ int TYPE_SHORT = 19;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_SHORT__ID = TYPE_OBJECT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_SHORT__DESCRIPTION = TYPE_OBJECT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_SHORT__VALUE = TYPE_OBJECT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Type Short</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_SHORT_FEATURE_COUNT = TYPE_OBJECT_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.egf.model.types.impl.TypeStringImpl <em>Type String</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeStringImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeString()
+ * @generated
+ */
+ int TYPE_STRING = 20;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_STRING__ID = TYPE_OBJECT__ID;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_STRING__DESCRIPTION = TYPE_OBJECT__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_STRING__VALUE = TYPE_OBJECT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Type String</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TYPE_STRING_FEATURE_COUNT = TYPE_OBJECT_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '<em>EGenerator Adapter Factory</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.codegen.ecore.generator.GeneratorAdapterFactory
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getEGeneratorAdapterFactory()
+ * @generated
+ */
+ int EGENERATOR_ADAPTER_FACTORY = 21;
+
+ /**
+ * The meta object id for the '<em>URI</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.common.util.URI
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getURI()
+ * @generated
+ */
+ int URI = 25;
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.types.TypeElement <em>Type Element</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Type Element</em>'.
+ * @see org.eclipse.egf.model.types.TypeElement
+ * @generated
+ */
+ EClass getTypeElement();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.egf.model.types.TypeElement#getID <em>ID</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>ID</em>'.
+ * @see org.eclipse.egf.model.types.TypeElement#getID()
+ * @see #getTypeElement()
+ * @generated
+ */
+ EAttribute getTypeElement_ID();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.egf.model.types.TypeElement#getDescription <em>Description</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Description</em>'.
+ * @see org.eclipse.egf.model.types.TypeElement#getDescription()
+ * @see #getTypeElement()
+ * @generated
+ */
+ EAttribute getTypeElement_Description();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.types.Type <em>Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Type</em>'.
+ * @see org.eclipse.egf.model.types.Type
+ * @generated
+ */
+ EClass getType();
+
+ /**
+ * The meta object id for the '<em>Collection</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see java.util.Collection
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getCollection()
+ * @generated
+ */
+ int COLLECTION = 24;
+
+ /**
+ * The meta object id for the '<em>List</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see java.util.List
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getList()
+ * @generated
+ */
+ int LIST = 23;
+
+ /**
+ * The meta object id for the '<em>Set</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see java.util.Set
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getSet()
+ * @generated
+ */
+ int SET = 22;
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.types.TypeObject <em>Type Object</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Type Object</em>'.
+ * @see org.eclipse.egf.model.types.TypeObject
+ * @generated
+ */
+ EClass getTypeObject();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.types.TypeAbstractClass <em>Type Abstract Class</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Type Abstract Class</em>'.
+ * @see org.eclipse.egf.model.types.TypeAbstractClass
+ * @generated
+ */
+ EClass getTypeAbstractClass();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.egf.model.types.TypeAbstractClass#getValue <em>Value</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Value</em>'.
+ * @see org.eclipse.egf.model.types.TypeAbstractClass#getValue()
+ * @see #getTypeAbstractClass()
+ * @generated
+ */
+ EAttribute getTypeAbstractClass_Value();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.types.TypeCollection <em>Type Collection</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Type Collection</em>'.
+ * @see org.eclipse.egf.model.types.TypeCollection
+ * @generated
+ */
+ EClass getTypeCollection();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.types.TypeList <em>Type List</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Type List</em>'.
+ * @see org.eclipse.egf.model.types.TypeList
+ * @generated
+ */
+ EClass getTypeList();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.types.TypeSet <em>Type Set</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Type Set</em>'.
+ * @see org.eclipse.egf.model.types.TypeSet
+ * @generated
+ */
+ EClass getTypeSet();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.types.TypeGeneratorAdapterFactory <em>Type Generator Adapter Factory</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Type Generator Adapter Factory</em>'.
+ * @see org.eclipse.egf.model.types.TypeGeneratorAdapterFactory
+ * @generated
+ */
+ EClass getTypeGeneratorAdapterFactory();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.types.TypeMap <em>Type Map</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Type Map</em>'.
+ * @see org.eclipse.egf.model.types.TypeMap
+ * @generated
+ */
+ EClass getTypeMap();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.types.TypeBigDecimal <em>Type Big Decimal</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Type Big Decimal</em>'.
+ * @see org.eclipse.egf.model.types.TypeBigDecimal
+ * @generated
+ */
+ EClass getTypeBigDecimal();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.egf.model.types.TypeBigDecimal#getValue <em>Value</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Value</em>'.
+ * @see org.eclipse.egf.model.types.TypeBigDecimal#getValue()
+ * @see #getTypeBigDecimal()
+ * @generated
+ */
+ EAttribute getTypeBigDecimal_Value();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.types.TypeBigInteger <em>Type Big Integer</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Type Big Integer</em>'.
+ * @see org.eclipse.egf.model.types.TypeBigInteger
+ * @generated
+ */
+ EClass getTypeBigInteger();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.egf.model.types.TypeBigInteger#getValue <em>Value</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Value</em>'.
+ * @see org.eclipse.egf.model.types.TypeBigInteger#getValue()
+ * @see #getTypeBigInteger()
+ * @generated
+ */
+ EAttribute getTypeBigInteger_Value();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.types.TypeBoolean <em>Type Boolean</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Type Boolean</em>'.
+ * @see org.eclipse.egf.model.types.TypeBoolean
+ * @generated
+ */
+ EClass getTypeBoolean();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.egf.model.types.TypeBoolean#getValue <em>Value</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Value</em>'.
+ * @see org.eclipse.egf.model.types.TypeBoolean#getValue()
+ * @see #getTypeBoolean()
+ * @generated
+ */
+ EAttribute getTypeBoolean_Value();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.types.TypeByte <em>Type Byte</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Type Byte</em>'.
+ * @see org.eclipse.egf.model.types.TypeByte
+ * @generated
+ */
+ EClass getTypeByte();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.egf.model.types.TypeByte#getValue <em>Value</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Value</em>'.
+ * @see org.eclipse.egf.model.types.TypeByte#getValue()
+ * @see #getTypeByte()
+ * @generated
+ */
+ EAttribute getTypeByte_Value();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.types.TypeCharacter <em>Type Character</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Type Character</em>'.
+ * @see org.eclipse.egf.model.types.TypeCharacter
+ * @generated
+ */
+ EClass getTypeCharacter();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.egf.model.types.TypeCharacter#getValue <em>Value</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Value</em>'.
+ * @see org.eclipse.egf.model.types.TypeCharacter#getValue()
+ * @see #getTypeCharacter()
+ * @generated
+ */
+ EAttribute getTypeCharacter_Value();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.types.TypeDate <em>Type Date</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Type Date</em>'.
+ * @see org.eclipse.egf.model.types.TypeDate
+ * @generated
+ */
+ EClass getTypeDate();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.egf.model.types.TypeDate#getValue <em>Value</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Value</em>'.
+ * @see org.eclipse.egf.model.types.TypeDate#getValue()
+ * @see #getTypeDate()
+ * @generated
+ */
+ EAttribute getTypeDate_Value();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.types.TypeDouble <em>Type Double</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Type Double</em>'.
+ * @see org.eclipse.egf.model.types.TypeDouble
+ * @generated
+ */
+ EClass getTypeDouble();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.egf.model.types.TypeDouble#getValue <em>Value</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Value</em>'.
+ * @see org.eclipse.egf.model.types.TypeDouble#getValue()
+ * @see #getTypeDouble()
+ * @generated
+ */
+ EAttribute getTypeDouble_Value();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.types.TypeFloat <em>Type Float</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Type Float</em>'.
+ * @see org.eclipse.egf.model.types.TypeFloat
+ * @generated
+ */
+ EClass getTypeFloat();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.egf.model.types.TypeFloat#getValue <em>Value</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Value</em>'.
+ * @see org.eclipse.egf.model.types.TypeFloat#getValue()
+ * @see #getTypeFloat()
+ * @generated
+ */
+ EAttribute getTypeFloat_Value();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.types.TypeInteger <em>Type Integer</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Type Integer</em>'.
+ * @see org.eclipse.egf.model.types.TypeInteger
+ * @generated
+ */
+ EClass getTypeInteger();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.egf.model.types.TypeInteger#getValue <em>Value</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Value</em>'.
+ * @see org.eclipse.egf.model.types.TypeInteger#getValue()
+ * @see #getTypeInteger()
+ * @generated
+ */
+ EAttribute getTypeInteger_Value();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.types.TypeLong <em>Type Long</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Type Long</em>'.
+ * @see org.eclipse.egf.model.types.TypeLong
+ * @generated
+ */
+ EClass getTypeLong();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.egf.model.types.TypeLong#getValue <em>Value</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Value</em>'.
+ * @see org.eclipse.egf.model.types.TypeLong#getValue()
+ * @see #getTypeLong()
+ * @generated
+ */
+ EAttribute getTypeLong_Value();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.types.TypeShort <em>Type Short</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Type Short</em>'.
+ * @see org.eclipse.egf.model.types.TypeShort
+ * @generated
+ */
+ EClass getTypeShort();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.egf.model.types.TypeShort#getValue <em>Value</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Value</em>'.
+ * @see org.eclipse.egf.model.types.TypeShort#getValue()
+ * @see #getTypeShort()
+ * @generated
+ */
+ EAttribute getTypeShort_Value();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.egf.model.types.TypeString <em>Type String</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Type String</em>'.
+ * @see org.eclipse.egf.model.types.TypeString
+ * @generated
+ */
+ EClass getTypeString();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.egf.model.types.TypeString#getValue <em>Value</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Value</em>'.
+ * @see org.eclipse.egf.model.types.TypeString#getValue()
+ * @see #getTypeString()
+ * @generated
+ */
+ EAttribute getTypeString_Value();
+
+ /**
+ * Returns the meta object for data type '{@link org.eclipse.emf.codegen.ecore.generator.GeneratorAdapterFactory <em>EGenerator Adapter Factory</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for data type '<em>EGenerator Adapter Factory</em>'.
+ * @see org.eclipse.emf.codegen.ecore.generator.GeneratorAdapterFactory
+ * @model instanceClass="org.eclipse.emf.codegen.ecore.generator.GeneratorAdapterFactory" serializeable="false"
+ * @generated
+ */
+ EDataType getEGeneratorAdapterFactory();
+
+ /**
+ * Returns the meta object for data type '{@link org.eclipse.emf.common.util.URI <em>URI</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for data type '<em>URI</em>'.
+ * @see org.eclipse.emf.common.util.URI
+ * @model instanceClass="org.eclipse.emf.common.util.URI"
+ * @generated
+ */
+ EDataType getURI();
+
+ /**
+ * Returns the meta object for data type '{@link java.util.Collection <em>Collection</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for data type '<em>Collection</em>'.
+ * @see java.util.Collection
+ * @model instanceClass="java.util.Collection" typeParameters="E"
+ * @generated
+ */
+ EDataType getCollection();
+
+ /**
+ * Returns the meta object for data type '{@link java.util.List <em>List</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for data type '<em>List</em>'.
+ * @see java.util.List
+ * @model instanceClass="java.util.List" typeParameters="E"
+ * @generated
+ */
+ EDataType getList();
+
+ /**
+ * Returns the meta object for data type '{@link java.util.Set <em>Set</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for data type '<em>Set</em>'.
+ * @see java.util.Set
+ * @model instanceClass="java.util.Set" typeParameters="E"
+ * @generated
+ */
+ EDataType getSet();
+
+ /**
+ * 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
+ */
+ TypesFactory getTypesFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.types.impl.TypeElementImpl <em>Type Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeElementImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeElement()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass TYPE_ELEMENT = eINSTANCE.getTypeElement();
+
+ /**
+ * The meta object literal for the '<em><b>ID</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EAttribute TYPE_ELEMENT__ID = eINSTANCE.getTypeElement_ID();
+
+ /**
+ * The meta object literal for the '<em><b>Description</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EAttribute TYPE_ELEMENT__DESCRIPTION = eINSTANCE.getTypeElement_Description();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.types.impl.TypeImpl <em>Type</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getType()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass TYPE = eINSTANCE.getType();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.types.impl.TypeObjectImpl <em>Type Object</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeObjectImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeObject()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass TYPE_OBJECT = eINSTANCE.getTypeObject();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.types.impl.TypeAbstractClassImpl <em>Type Abstract Class</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeAbstractClassImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeAbstractClass()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass TYPE_ABSTRACT_CLASS = eINSTANCE.getTypeAbstractClass();
+
+ /**
+ * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EAttribute TYPE_ABSTRACT_CLASS__VALUE = eINSTANCE.getTypeAbstractClass_Value();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.types.impl.TypeCollectionImpl <em>Type Collection</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeCollectionImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeCollection()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass TYPE_COLLECTION = eINSTANCE.getTypeCollection();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.types.impl.TypeListImpl <em>Type List</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeListImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeList()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass TYPE_LIST = eINSTANCE.getTypeList();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.types.impl.TypeSetImpl <em>Type Set</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeSetImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeSet()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass TYPE_SET = eINSTANCE.getTypeSet();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.types.impl.TypeGeneratorAdapterFactoryImpl <em>Type Generator Adapter Factory</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeGeneratorAdapterFactoryImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeGeneratorAdapterFactory()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass TYPE_GENERATOR_ADAPTER_FACTORY = eINSTANCE.getTypeGeneratorAdapterFactory();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.types.impl.TypeMapImpl <em>Type Map</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeMapImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeMap()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass TYPE_MAP = eINSTANCE.getTypeMap();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.types.impl.TypeBigDecimalImpl <em>Type Big Decimal</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeBigDecimalImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeBigDecimal()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass TYPE_BIG_DECIMAL = eINSTANCE.getTypeBigDecimal();
+
+ /**
+ * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EAttribute TYPE_BIG_DECIMAL__VALUE = eINSTANCE.getTypeBigDecimal_Value();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.types.impl.TypeBigIntegerImpl <em>Type Big Integer</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeBigIntegerImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeBigInteger()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass TYPE_BIG_INTEGER = eINSTANCE.getTypeBigInteger();
+
+ /**
+ * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EAttribute TYPE_BIG_INTEGER__VALUE = eINSTANCE.getTypeBigInteger_Value();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.types.impl.TypeBooleanImpl <em>Type Boolean</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeBooleanImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeBoolean()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass TYPE_BOOLEAN = eINSTANCE.getTypeBoolean();
+
+ /**
+ * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EAttribute TYPE_BOOLEAN__VALUE = eINSTANCE.getTypeBoolean_Value();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.types.impl.TypeByteImpl <em>Type Byte</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeByteImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeByte()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass TYPE_BYTE = eINSTANCE.getTypeByte();
+
+ /**
+ * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EAttribute TYPE_BYTE__VALUE = eINSTANCE.getTypeByte_Value();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.types.impl.TypeCharacterImpl <em>Type Character</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeCharacterImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeCharacter()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass TYPE_CHARACTER = eINSTANCE.getTypeCharacter();
+
+ /**
+ * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EAttribute TYPE_CHARACTER__VALUE = eINSTANCE.getTypeCharacter_Value();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.types.impl.TypeDateImpl <em>Type Date</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeDateImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeDate()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass TYPE_DATE = eINSTANCE.getTypeDate();
+
+ /**
+ * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EAttribute TYPE_DATE__VALUE = eINSTANCE.getTypeDate_Value();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.types.impl.TypeDoubleImpl <em>Type Double</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeDoubleImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeDouble()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass TYPE_DOUBLE = eINSTANCE.getTypeDouble();
+
+ /**
+ * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EAttribute TYPE_DOUBLE__VALUE = eINSTANCE.getTypeDouble_Value();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.types.impl.TypeFloatImpl <em>Type Float</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeFloatImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeFloat()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass TYPE_FLOAT = eINSTANCE.getTypeFloat();
+
+ /**
+ * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EAttribute TYPE_FLOAT__VALUE = eINSTANCE.getTypeFloat_Value();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.types.impl.TypeIntegerImpl <em>Type Integer</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeIntegerImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeInteger()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass TYPE_INTEGER = eINSTANCE.getTypeInteger();
+
+ /**
+ * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EAttribute TYPE_INTEGER__VALUE = eINSTANCE.getTypeInteger_Value();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.types.impl.TypeLongImpl <em>Type Long</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeLongImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeLong()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass TYPE_LONG = eINSTANCE.getTypeLong();
+
+ /**
+ * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EAttribute TYPE_LONG__VALUE = eINSTANCE.getTypeLong_Value();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.types.impl.TypeShortImpl <em>Type Short</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeShortImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeShort()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass TYPE_SHORT = eINSTANCE.getTypeShort();
+
+ /**
+ * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EAttribute TYPE_SHORT__VALUE = eINSTANCE.getTypeShort_Value();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.egf.model.types.impl.TypeStringImpl <em>Type String</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.impl.TypeStringImpl
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getTypeString()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EClass TYPE_STRING = eINSTANCE.getTypeString();
+
+ /**
+ * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EAttribute TYPE_STRING__VALUE = eINSTANCE.getTypeString_Value();
+
+ /**
+ * The meta object literal for the '<em>EGenerator Adapter Factory</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.codegen.ecore.generator.GeneratorAdapterFactory
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getEGeneratorAdapterFactory()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EDataType EGENERATOR_ADAPTER_FACTORY = eINSTANCE.getEGeneratorAdapterFactory();
+
+ /**
+ * The meta object literal for the '<em>URI</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.common.util.URI
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getURI()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EDataType URI = eINSTANCE.getURI();
+
+ /**
+ * The meta object literal for the '<em>Collection</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see java.util.Collection
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getCollection()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EDataType COLLECTION = eINSTANCE.getCollection();
+
+ /**
+ * The meta object literal for the '<em>List</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see java.util.List
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getList()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EDataType LIST = eINSTANCE.getList();
+
+ /**
+ * The meta object literal for the '<em>Set</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see java.util.Set
+ * @see org.eclipse.egf.model.types.impl.TypesPackageImpl#getSet()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ EDataType SET = eINSTANCE.getSet();
+
+ }
+
+} // TypesPackage
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeAbstractClassImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeAbstractClassImpl.java
new file mode 100644
index 0000000..fe3a0b1
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeAbstractClassImpl.java
@@ -0,0 +1,171 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.impl;
+
+import org.eclipse.egf.model.types.TypeAbstractClass;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Type Abstract Class</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.types.impl.TypeAbstractClassImpl#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class TypeAbstractClassImpl extends TypeImpl implements TypeAbstractClass {
+ /**
+ * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected static final String VALUE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected String value = VALUE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeAbstractClassImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TypesPackage.Literals.TYPE_ABSTRACT_CLASS;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setValue(String newValue) {
+ String oldValue = value;
+ value = newValue;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, TypesPackage.TYPE_ABSTRACT_CLASS__VALUE, oldValue, value));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case TypesPackage.TYPE_ABSTRACT_CLASS__VALUE:
+ return getValue();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case TypesPackage.TYPE_ABSTRACT_CLASS__VALUE:
+ setValue((String) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case TypesPackage.TYPE_ABSTRACT_CLASS__VALUE:
+ setValue(VALUE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case TypesPackage.TYPE_ABSTRACT_CLASS__VALUE:
+ return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
+ }
+ 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(" (value: "); //$NON-NLS-1$
+ result.append(value);
+ result.append(')');
+ return result.toString();
+ }
+
+} // TypeAbstractClassImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeBigDecimalImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeBigDecimalImpl.java
new file mode 100644
index 0000000..6a51f22
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeBigDecimalImpl.java
@@ -0,0 +1,173 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.impl;
+
+import java.math.BigDecimal;
+
+import org.eclipse.egf.model.types.TypeBigDecimal;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Type Big Decimal</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.types.impl.TypeBigDecimalImpl#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class TypeBigDecimalImpl extends TypeObjectImpl implements TypeBigDecimal {
+ /**
+ * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected static final BigDecimal VALUE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected BigDecimal value = VALUE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeBigDecimalImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TypesPackage.Literals.TYPE_BIG_DECIMAL;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public BigDecimal getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setValue(BigDecimal newValue) {
+ BigDecimal oldValue = value;
+ value = newValue;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, TypesPackage.TYPE_BIG_DECIMAL__VALUE, oldValue, value));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case TypesPackage.TYPE_BIG_DECIMAL__VALUE:
+ return getValue();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case TypesPackage.TYPE_BIG_DECIMAL__VALUE:
+ setValue((BigDecimal) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case TypesPackage.TYPE_BIG_DECIMAL__VALUE:
+ setValue(VALUE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case TypesPackage.TYPE_BIG_DECIMAL__VALUE:
+ return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
+ }
+ 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(" (value: "); //$NON-NLS-1$
+ result.append(value);
+ result.append(')');
+ return result.toString();
+ }
+
+} // TypeBigDecimalImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeBigIntegerImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeBigIntegerImpl.java
new file mode 100644
index 0000000..34a8d54
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeBigIntegerImpl.java
@@ -0,0 +1,173 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.impl;
+
+import java.math.BigInteger;
+
+import org.eclipse.egf.model.types.TypeBigInteger;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Type Big Integer</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.types.impl.TypeBigIntegerImpl#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class TypeBigIntegerImpl extends TypeObjectImpl implements TypeBigInteger {
+ /**
+ * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected static final BigInteger VALUE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected BigInteger value = VALUE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeBigIntegerImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TypesPackage.Literals.TYPE_BIG_INTEGER;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public BigInteger getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setValue(BigInteger newValue) {
+ BigInteger oldValue = value;
+ value = newValue;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, TypesPackage.TYPE_BIG_INTEGER__VALUE, oldValue, value));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case TypesPackage.TYPE_BIG_INTEGER__VALUE:
+ return getValue();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case TypesPackage.TYPE_BIG_INTEGER__VALUE:
+ setValue((BigInteger) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case TypesPackage.TYPE_BIG_INTEGER__VALUE:
+ setValue(VALUE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case TypesPackage.TYPE_BIG_INTEGER__VALUE:
+ return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
+ }
+ 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(" (value: "); //$NON-NLS-1$
+ result.append(value);
+ result.append(')');
+ return result.toString();
+ }
+
+} // TypeBigIntegerImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeBooleanImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeBooleanImpl.java
new file mode 100644
index 0000000..b6dd3aa
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeBooleanImpl.java
@@ -0,0 +1,171 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.impl;
+
+import org.eclipse.egf.model.types.TypeBoolean;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Type Boolean</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.types.impl.TypeBooleanImpl#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class TypeBooleanImpl extends TypeObjectImpl implements TypeBoolean {
+ /**
+ * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected static final Boolean VALUE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected Boolean value = VALUE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeBooleanImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TypesPackage.Literals.TYPE_BOOLEAN;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Boolean getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setValue(Boolean newValue) {
+ Boolean oldValue = value;
+ value = newValue;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, TypesPackage.TYPE_BOOLEAN__VALUE, oldValue, value));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case TypesPackage.TYPE_BOOLEAN__VALUE:
+ return getValue();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case TypesPackage.TYPE_BOOLEAN__VALUE:
+ setValue((Boolean) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case TypesPackage.TYPE_BOOLEAN__VALUE:
+ setValue(VALUE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case TypesPackage.TYPE_BOOLEAN__VALUE:
+ return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
+ }
+ 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(" (value: "); //$NON-NLS-1$
+ result.append(value);
+ result.append(')');
+ return result.toString();
+ }
+
+} // TypeBooleanImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeByteImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeByteImpl.java
new file mode 100644
index 0000000..036dab1
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeByteImpl.java
@@ -0,0 +1,171 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.impl;
+
+import org.eclipse.egf.model.types.TypeByte;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Type Byte</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.types.impl.TypeByteImpl#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class TypeByteImpl extends TypeObjectImpl implements TypeByte {
+ /**
+ * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected static final Byte VALUE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected Byte value = VALUE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeByteImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TypesPackage.Literals.TYPE_BYTE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Byte getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setValue(Byte newValue) {
+ Byte oldValue = value;
+ value = newValue;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, TypesPackage.TYPE_BYTE__VALUE, oldValue, value));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case TypesPackage.TYPE_BYTE__VALUE:
+ return getValue();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case TypesPackage.TYPE_BYTE__VALUE:
+ setValue((Byte) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case TypesPackage.TYPE_BYTE__VALUE:
+ setValue(VALUE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case TypesPackage.TYPE_BYTE__VALUE:
+ return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
+ }
+ 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(" (value: "); //$NON-NLS-1$
+ result.append(value);
+ result.append(')');
+ return result.toString();
+ }
+
+} // TypeByteImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeCharacterImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeCharacterImpl.java
new file mode 100644
index 0000000..2bd9cca
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeCharacterImpl.java
@@ -0,0 +1,171 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.impl;
+
+import org.eclipse.egf.model.types.TypeCharacter;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Type Character</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.types.impl.TypeCharacterImpl#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class TypeCharacterImpl extends TypeObjectImpl implements TypeCharacter {
+ /**
+ * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected static final Character VALUE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected Character value = VALUE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeCharacterImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TypesPackage.Literals.TYPE_CHARACTER;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Character getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setValue(Character newValue) {
+ Character oldValue = value;
+ value = newValue;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, TypesPackage.TYPE_CHARACTER__VALUE, oldValue, value));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case TypesPackage.TYPE_CHARACTER__VALUE:
+ return getValue();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case TypesPackage.TYPE_CHARACTER__VALUE:
+ setValue((Character) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case TypesPackage.TYPE_CHARACTER__VALUE:
+ setValue(VALUE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case TypesPackage.TYPE_CHARACTER__VALUE:
+ return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
+ }
+ 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(" (value: "); //$NON-NLS-1$
+ result.append(value);
+ result.append(')');
+ return result.toString();
+ }
+
+} // TypeCharacterImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeCollectionImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeCollectionImpl.java
new file mode 100644
index 0000000..478fcbf
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeCollectionImpl.java
@@ -0,0 +1,58 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.impl;
+
+import org.eclipse.egf.model.types.TypeCollection;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Type Collection</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class TypeCollectionImpl extends TypeAbstractClassImpl implements TypeCollection {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeCollectionImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TypesPackage.Literals.TYPE_COLLECTION;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ @SuppressWarnings("unchecked")
+ public Class<?> getType() {
+ return java.util.Collection.class;
+ }
+} // TypeCollectionImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeDateImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeDateImpl.java
new file mode 100644
index 0000000..4e33510
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeDateImpl.java
@@ -0,0 +1,173 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.impl;
+
+import java.util.Date;
+
+import org.eclipse.egf.model.types.TypeDate;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Type Date</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.types.impl.TypeDateImpl#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class TypeDateImpl extends TypeObjectImpl implements TypeDate {
+ /**
+ * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected static final Date VALUE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected Date value = VALUE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeDateImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TypesPackage.Literals.TYPE_DATE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Date getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setValue(Date newValue) {
+ Date oldValue = value;
+ value = newValue;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, TypesPackage.TYPE_DATE__VALUE, oldValue, value));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case TypesPackage.TYPE_DATE__VALUE:
+ return getValue();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case TypesPackage.TYPE_DATE__VALUE:
+ setValue((Date) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case TypesPackage.TYPE_DATE__VALUE:
+ setValue(VALUE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case TypesPackage.TYPE_DATE__VALUE:
+ return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
+ }
+ 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(" (value: "); //$NON-NLS-1$
+ result.append(value);
+ result.append(')');
+ return result.toString();
+ }
+
+} // TypeDateImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeDoubleImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeDoubleImpl.java
new file mode 100644
index 0000000..b23be55
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeDoubleImpl.java
@@ -0,0 +1,171 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.impl;
+
+import org.eclipse.egf.model.types.TypeDouble;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Type Double</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.types.impl.TypeDoubleImpl#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class TypeDoubleImpl extends TypeObjectImpl implements TypeDouble {
+ /**
+ * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected static final Double VALUE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected Double value = VALUE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeDoubleImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TypesPackage.Literals.TYPE_DOUBLE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Double getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setValue(Double newValue) {
+ Double oldValue = value;
+ value = newValue;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, TypesPackage.TYPE_DOUBLE__VALUE, oldValue, value));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case TypesPackage.TYPE_DOUBLE__VALUE:
+ return getValue();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case TypesPackage.TYPE_DOUBLE__VALUE:
+ setValue((Double) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case TypesPackage.TYPE_DOUBLE__VALUE:
+ setValue(VALUE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case TypesPackage.TYPE_DOUBLE__VALUE:
+ return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
+ }
+ 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(" (value: "); //$NON-NLS-1$
+ result.append(value);
+ result.append(')');
+ return result.toString();
+ }
+
+} // TypeDoubleImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeElementImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeElementImpl.java
new file mode 100644
index 0000000..e1a42a6
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeElementImpl.java
@@ -0,0 +1,230 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.impl;
+
+import org.eclipse.egf.model.types.TypeElement;
+import org.eclipse.egf.model.types.TypesPackage;
+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.Container;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Type Element</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.types.impl.TypeElementImpl#getID <em>ID</em>}</li>
+ * <li>{@link org.eclipse.egf.model.types.impl.TypeElementImpl#getDescription <em>Description</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+
+public abstract class TypeElementImpl extends Container implements TypeElement {
+ /**
+ * A set of bit flags representing the values of boolean attributes and whether unsettable features have been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ protected int eFlags = 0;
+
+ /**
+ * The default value of the '{@link #getID() <em>ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getID()
+ * @generated
+ * @ordered
+ */
+ protected static final String ID_EDEFAULT = null;
+
+ /**
+ * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getDescription()
+ * @generated
+ * @ordered
+ */
+ protected static final String DESCRIPTION_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getDescription()
+ * @generated
+ * @ordered
+ */
+ protected String description = DESCRIPTION_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected TypeElementImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TypesPackage.Literals.TYPE_ELEMENT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public String getID() {
+ return this.eResource() != null && this.eResource() instanceof XMLResource ? ((XMLResource) this.eResource()).getID(this) : null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean isSetID() {
+ return getID() != null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setDescription(String newDescription) {
+ String oldDescription = description;
+ description = newDescription;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, TypesPackage.TYPE_ELEMENT__DESCRIPTION, oldDescription, description));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case TypesPackage.TYPE_ELEMENT__ID:
+ return getID();
+ case TypesPackage.TYPE_ELEMENT__DESCRIPTION:
+ return getDescription();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case TypesPackage.TYPE_ELEMENT__DESCRIPTION:
+ setDescription((String) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case TypesPackage.TYPE_ELEMENT__DESCRIPTION:
+ setDescription(DESCRIPTION_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case TypesPackage.TYPE_ELEMENT__ID:
+ return isSetID();
+ case TypesPackage.TYPE_ELEMENT__DESCRIPTION:
+ return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
+ }
+ 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(" (description: "); //$NON-NLS-1$
+ result.append(description);
+ result.append(')');
+ return result.toString();
+ }
+
+} // TypeElementImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeFloatImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeFloatImpl.java
new file mode 100644
index 0000000..34a6555
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeFloatImpl.java
@@ -0,0 +1,171 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.impl;
+
+import org.eclipse.egf.model.types.TypeFloat;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Type Float</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.types.impl.TypeFloatImpl#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class TypeFloatImpl extends TypeObjectImpl implements TypeFloat {
+ /**
+ * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected static final Float VALUE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected Float value = VALUE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeFloatImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TypesPackage.Literals.TYPE_FLOAT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Float getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setValue(Float newValue) {
+ Float oldValue = value;
+ value = newValue;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, TypesPackage.TYPE_FLOAT__VALUE, oldValue, value));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case TypesPackage.TYPE_FLOAT__VALUE:
+ return getValue();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case TypesPackage.TYPE_FLOAT__VALUE:
+ setValue((Float) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case TypesPackage.TYPE_FLOAT__VALUE:
+ setValue(VALUE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case TypesPackage.TYPE_FLOAT__VALUE:
+ return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
+ }
+ 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(" (value: "); //$NON-NLS-1$
+ result.append(value);
+ result.append(')');
+ return result.toString();
+ }
+
+} // TypeFloatImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeGeneratorAdapterFactoryImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeGeneratorAdapterFactoryImpl.java
new file mode 100644
index 0000000..73109ed
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeGeneratorAdapterFactoryImpl.java
@@ -0,0 +1,59 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.impl;
+
+import org.eclipse.egf.model.types.TypeGeneratorAdapterFactory;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Type Generator Adapter Factory</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class TypeGeneratorAdapterFactoryImpl extends TypeAbstractClassImpl implements TypeGeneratorAdapterFactory {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeGeneratorAdapterFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TypesPackage.Literals.TYPE_GENERATOR_ADAPTER_FACTORY;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ @SuppressWarnings("unchecked")
+ public Class<?> getType() {
+ return org.eclipse.emf.codegen.ecore.generator.GeneratorAdapterFactory.class;
+ }
+
+} // TypeGeneratorAdapterFactoryImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeImpl.java
new file mode 100644
index 0000000..485849e
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeImpl.java
@@ -0,0 +1,70 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.impl;
+
+import org.eclipse.egf.model.types.Type;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Type</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class TypeImpl extends TypeElementImpl implements Type {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TypesPackage.Literals.TYPE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public <T extends Object> Class<T> getType() {
+ // TODO: implement this method
+ // Ensure that you remove @generated or mark it @generated NOT
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object getValue() {
+ // TODO: implement this method
+ // Ensure that you remove @generated or mark it @generated NOT
+ throw new UnsupportedOperationException();
+ }
+
+} // TypeImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeIntegerImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeIntegerImpl.java
new file mode 100644
index 0000000..99c7bc0
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeIntegerImpl.java
@@ -0,0 +1,171 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.impl;
+
+import org.eclipse.egf.model.types.TypeInteger;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Type Integer</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.types.impl.TypeIntegerImpl#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class TypeIntegerImpl extends TypeObjectImpl implements TypeInteger {
+ /**
+ * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected static final Integer VALUE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected Integer value = VALUE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeIntegerImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TypesPackage.Literals.TYPE_INTEGER;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Integer getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setValue(Integer newValue) {
+ Integer oldValue = value;
+ value = newValue;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, TypesPackage.TYPE_INTEGER__VALUE, oldValue, value));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case TypesPackage.TYPE_INTEGER__VALUE:
+ return getValue();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case TypesPackage.TYPE_INTEGER__VALUE:
+ setValue((Integer) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case TypesPackage.TYPE_INTEGER__VALUE:
+ setValue(VALUE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case TypesPackage.TYPE_INTEGER__VALUE:
+ return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
+ }
+ 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(" (value: "); //$NON-NLS-1$
+ result.append(value);
+ result.append(')');
+ return result.toString();
+ }
+
+} // TypeIntegerImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeListImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeListImpl.java
new file mode 100644
index 0000000..72683c7
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeListImpl.java
@@ -0,0 +1,59 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.impl;
+
+import org.eclipse.egf.model.types.TypeList;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Type List</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class TypeListImpl extends TypeAbstractClassImpl implements TypeList {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeListImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TypesPackage.Literals.TYPE_LIST;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ @SuppressWarnings("unchecked")
+ public Class<?> getType() {
+ return java.util.List.class;
+ }
+
+} // TypeListImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeLongImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeLongImpl.java
new file mode 100644
index 0000000..f06b51d
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeLongImpl.java
@@ -0,0 +1,171 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.impl;
+
+import org.eclipse.egf.model.types.TypeLong;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Type Long</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.types.impl.TypeLongImpl#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class TypeLongImpl extends TypeObjectImpl implements TypeLong {
+ /**
+ * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected static final Long VALUE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected Long value = VALUE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeLongImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TypesPackage.Literals.TYPE_LONG;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Long getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setValue(Long newValue) {
+ Long oldValue = value;
+ value = newValue;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, TypesPackage.TYPE_LONG__VALUE, oldValue, value));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case TypesPackage.TYPE_LONG__VALUE:
+ return getValue();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case TypesPackage.TYPE_LONG__VALUE:
+ setValue((Long) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case TypesPackage.TYPE_LONG__VALUE:
+ setValue(VALUE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case TypesPackage.TYPE_LONG__VALUE:
+ return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
+ }
+ 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(" (value: "); //$NON-NLS-1$
+ result.append(value);
+ result.append(')');
+ return result.toString();
+ }
+
+} // TypeLongImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeMapImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeMapImpl.java
new file mode 100644
index 0000000..658d4eb
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeMapImpl.java
@@ -0,0 +1,59 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.impl;
+
+import org.eclipse.egf.model.types.TypeMap;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Type Map</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class TypeMapImpl extends TypeAbstractClassImpl implements TypeMap {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeMapImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TypesPackage.Literals.TYPE_MAP;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ @SuppressWarnings("unchecked")
+ public Class<?> getType() {
+ return java.util.Map.class;
+ }
+
+} // TypeMapImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeObjectImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeObjectImpl.java
new file mode 100644
index 0000000..c482b30
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeObjectImpl.java
@@ -0,0 +1,65 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.impl;
+
+import org.eclipse.egf.model.types.TypeObject;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Type Object</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class TypeObjectImpl extends TypeImpl implements TypeObject {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeObjectImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TypesPackage.Literals.TYPE_OBJECT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ @SuppressWarnings("unchecked")
+ public <T extends Object> Class<T> getType() {
+ EStructuralFeature feature = eClass().getEStructuralFeature("value"); //$NON-NLS-1$
+ if (feature == null) {
+ throw new UnsupportedOperationException();
+ }
+ return (Class<T>) feature.getEType().getInstanceClass();
+ }
+
+} // TypeObjectImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeSetImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeSetImpl.java
new file mode 100644
index 0000000..92f32b6
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeSetImpl.java
@@ -0,0 +1,59 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.impl;
+
+import org.eclipse.egf.model.types.TypeSet;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Type Set</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class TypeSetImpl extends TypeAbstractClassImpl implements TypeSet {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeSetImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TypesPackage.Literals.TYPE_SET;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ @SuppressWarnings("unchecked")
+ public Class<?> getType() {
+ return java.util.Set.class;
+ }
+
+} // TypeSetImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeShortImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeShortImpl.java
new file mode 100644
index 0000000..c4f131b
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeShortImpl.java
@@ -0,0 +1,171 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.impl;
+
+import org.eclipse.egf.model.types.TypeShort;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Type Short</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.types.impl.TypeShortImpl#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class TypeShortImpl extends TypeObjectImpl implements TypeShort {
+ /**
+ * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected static final Short VALUE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected Short value = VALUE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeShortImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TypesPackage.Literals.TYPE_SHORT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Short getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setValue(Short newValue) {
+ Short oldValue = value;
+ value = newValue;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, TypesPackage.TYPE_SHORT__VALUE, oldValue, value));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case TypesPackage.TYPE_SHORT__VALUE:
+ return getValue();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case TypesPackage.TYPE_SHORT__VALUE:
+ setValue((Short) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case TypesPackage.TYPE_SHORT__VALUE:
+ setValue(VALUE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case TypesPackage.TYPE_SHORT__VALUE:
+ return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
+ }
+ 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(" (value: "); //$NON-NLS-1$
+ result.append(value);
+ result.append(')');
+ return result.toString();
+ }
+
+} // TypeShortImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeStringImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeStringImpl.java
new file mode 100644
index 0000000..3a212f4
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypeStringImpl.java
@@ -0,0 +1,171 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.impl;
+
+import org.eclipse.egf.model.types.TypeString;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Type String</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.egf.model.types.impl.TypeStringImpl#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class TypeStringImpl extends TypeObjectImpl implements TypeString {
+ /**
+ * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected static final String VALUE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected String value = VALUE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TypeStringImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TypesPackage.Literals.TYPE_STRING;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setValue(String newValue) {
+ String oldValue = value;
+ value = newValue;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, TypesPackage.TYPE_STRING__VALUE, oldValue, value));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case TypesPackage.TYPE_STRING__VALUE:
+ return getValue();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case TypesPackage.TYPE_STRING__VALUE:
+ setValue((String) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case TypesPackage.TYPE_STRING__VALUE:
+ setValue(VALUE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case TypesPackage.TYPE_STRING__VALUE:
+ return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
+ }
+ 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(" (value: "); //$NON-NLS-1$
+ result.append(value);
+ result.append(')');
+ return result.toString();
+ }
+
+} // TypeStringImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypesFactoryImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypesFactoryImpl.java
new file mode 100644
index 0000000..5446392
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypesFactoryImpl.java
@@ -0,0 +1,545 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.impl;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.egf.model.types.TypeBigDecimal;
+import org.eclipse.egf.model.types.TypeBigInteger;
+import org.eclipse.egf.model.types.TypeBoolean;
+import org.eclipse.egf.model.types.TypeByte;
+import org.eclipse.egf.model.types.TypeCharacter;
+import org.eclipse.egf.model.types.TypeCollection;
+import org.eclipse.egf.model.types.TypeDate;
+import org.eclipse.egf.model.types.TypeDouble;
+import org.eclipse.egf.model.types.TypeFloat;
+import org.eclipse.egf.model.types.TypeGeneratorAdapterFactory;
+import org.eclipse.egf.model.types.TypeInteger;
+import org.eclipse.egf.model.types.TypeList;
+import org.eclipse.egf.model.types.TypeLong;
+import org.eclipse.egf.model.types.TypeMap;
+import org.eclipse.egf.model.types.TypeSet;
+import org.eclipse.egf.model.types.TypeShort;
+import org.eclipse.egf.model.types.TypeString;
+import org.eclipse.egf.model.types.TypesFactory;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class TypesFactoryImpl extends EFactoryImpl implements TypesFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static TypesFactory init() {
+ try {
+ TypesFactory theTypesFactory = (TypesFactory) EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/egf/1.0.0/types"); //$NON-NLS-1$
+ if (theTypesFactory != null) {
+ return theTypesFactory;
+ }
+ } catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new TypesFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypesFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case TypesPackage.TYPE_COLLECTION:
+ return createTypeCollection();
+ case TypesPackage.TYPE_LIST:
+ return createTypeList();
+ case TypesPackage.TYPE_SET:
+ return createTypeSet();
+ case TypesPackage.TYPE_GENERATOR_ADAPTER_FACTORY:
+ return createTypeGeneratorAdapterFactory();
+ case TypesPackage.TYPE_MAP:
+ return createTypeMap();
+ case TypesPackage.TYPE_BIG_DECIMAL:
+ return createTypeBigDecimal();
+ case TypesPackage.TYPE_BIG_INTEGER:
+ return createTypeBigInteger();
+ case TypesPackage.TYPE_BOOLEAN:
+ return createTypeBoolean();
+ case TypesPackage.TYPE_BYTE:
+ return createTypeByte();
+ case TypesPackage.TYPE_CHARACTER:
+ return createTypeCharacter();
+ case TypesPackage.TYPE_DATE:
+ return createTypeDate();
+ case TypesPackage.TYPE_DOUBLE:
+ return createTypeDouble();
+ case TypesPackage.TYPE_FLOAT:
+ return createTypeFloat();
+ case TypesPackage.TYPE_INTEGER:
+ return createTypeInteger();
+ case TypesPackage.TYPE_LONG:
+ return createTypeLong();
+ case TypesPackage.TYPE_SHORT:
+ return createTypeShort();
+ case TypesPackage.TYPE_STRING:
+ return createTypeString();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object createFromString(EDataType eDataType, String initialValue) {
+ switch (eDataType.getClassifierID()) {
+ case TypesPackage.SET:
+ return createSetFromString(eDataType, initialValue);
+ case TypesPackage.LIST:
+ return createListFromString(eDataType, initialValue);
+ case TypesPackage.COLLECTION:
+ return createCollectionFromString(eDataType, initialValue);
+ case TypesPackage.URI:
+ return createURIFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String convertToString(EDataType eDataType, Object instanceValue) {
+ switch (eDataType.getClassifierID()) {
+ case TypesPackage.SET:
+ return convertSetToString(eDataType, instanceValue);
+ case TypesPackage.LIST:
+ return convertListToString(eDataType, instanceValue);
+ case TypesPackage.COLLECTION:
+ return convertCollectionToString(eDataType, instanceValue);
+ case TypesPackage.URI:
+ return convertURIToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypeCollection createTypeCollection() {
+ TypeCollectionImpl typeCollection = new TypeCollectionImpl();
+ return typeCollection;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypeList createTypeList() {
+ TypeListImpl typeList = new TypeListImpl();
+ return typeList;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypeSet createTypeSet() {
+ TypeSetImpl typeSet = new TypeSetImpl();
+ return typeSet;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypeGeneratorAdapterFactory createTypeGeneratorAdapterFactory() {
+ TypeGeneratorAdapterFactoryImpl typeGeneratorAdapterFactory = new TypeGeneratorAdapterFactoryImpl();
+ return typeGeneratorAdapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypeMap createTypeMap() {
+ TypeMapImpl typeMap = new TypeMapImpl();
+ return typeMap;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypeBigDecimal createTypeBigDecimal() {
+ TypeBigDecimalImpl typeBigDecimal = new TypeBigDecimalImpl();
+ return typeBigDecimal;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypeBigInteger createTypeBigInteger() {
+ TypeBigIntegerImpl typeBigInteger = new TypeBigIntegerImpl();
+ return typeBigInteger;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypeBoolean createTypeBoolean() {
+ TypeBooleanImpl typeBoolean = new TypeBooleanImpl();
+ return typeBoolean;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypeByte createTypeByte() {
+ TypeByteImpl typeByte = new TypeByteImpl();
+ return typeByte;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypeCharacter createTypeCharacter() {
+ TypeCharacterImpl typeCharacter = new TypeCharacterImpl();
+ return typeCharacter;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypeDate createTypeDate() {
+ TypeDateImpl typeDate = new TypeDateImpl();
+ return typeDate;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypeDouble createTypeDouble() {
+ TypeDoubleImpl typeDouble = new TypeDoubleImpl();
+ return typeDouble;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypeFloat createTypeFloat() {
+ TypeFloatImpl typeFloat = new TypeFloatImpl();
+ return typeFloat;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypeInteger createTypeInteger() {
+ TypeIntegerImpl typeInteger = new TypeIntegerImpl();
+ return typeInteger;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypeLong createTypeLong() {
+ TypeLongImpl typeLong = new TypeLongImpl();
+ return typeLong;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypeShort createTypeShort() {
+ TypeShortImpl typeShort = new TypeShortImpl();
+ return typeShort;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypeString createTypeString() {
+ TypeStringImpl typeString = new TypeStringImpl();
+ return typeString;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Set<?> createSet(String literal) {
+ return (Set<?>) super.createFromString(literal);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Collection<?> createCollectionFromString(EDataType eDataType, String initialValue) {
+ return (Collection<?>) super.createFromString(initialValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String convertCollection(Collection<?> instanceValue) {
+ return super.convertToString(instanceValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String convertCollectionToString(EDataType eDataType, Object instanceValue) {
+ return super.convertToString(instanceValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public URI createURI(String literal) {
+ return (URI) super.createFromString(TypesPackage.Literals.URI, literal);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public List<?> createListFromString(EDataType eDataType, String initialValue) {
+ return (List<?>) super.createFromString(initialValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String convertList(List<?> instanceValue) {
+ return super.convertToString(instanceValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String convertListToString(EDataType eDataType, Object instanceValue) {
+ return super.convertToString(instanceValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Collection<?> createCollection(String literal) {
+ return (Collection<?>) super.createFromString(literal);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Set<?> createSetFromString(EDataType eDataType, String initialValue) {
+ return (Set<?>) super.createFromString(initialValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String convertSet(Set<?> instanceValue) {
+ return super.convertToString(instanceValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String convertSetToString(EDataType eDataType, Object instanceValue) {
+ return super.convertToString(instanceValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public List<?> createList(String literal) {
+ return (List<?>) super.createFromString(literal);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public URI createURIFromString(EDataType eDataType, String initialValue) {
+ return URI.createURI(initialValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String convertURI(URI instanceValue) {
+ return super.convertToString(TypesPackage.Literals.URI, instanceValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String convertURIToString(EDataType eDataType, Object instanceValue) {
+ return super.convertToString(eDataType, instanceValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypesPackage getTypesPackage() {
+ return (TypesPackage) getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static TypesPackage getPackage() {
+ return TypesPackage.eINSTANCE;
+ }
+
+} // TypesFactoryImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypesPackageImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypesPackageImpl.java
new file mode 100644
index 0000000..5dbcd3b
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/impl/TypesPackageImpl.java
@@ -0,0 +1,971 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.impl;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.egf.model.types.Type;
+import org.eclipse.egf.model.types.TypeAbstractClass;
+import org.eclipse.egf.model.types.TypeBigDecimal;
+import org.eclipse.egf.model.types.TypeBigInteger;
+import org.eclipse.egf.model.types.TypeBoolean;
+import org.eclipse.egf.model.types.TypeByte;
+import org.eclipse.egf.model.types.TypeCharacter;
+import org.eclipse.egf.model.types.TypeCollection;
+import org.eclipse.egf.model.types.TypeDate;
+import org.eclipse.egf.model.types.TypeDouble;
+import org.eclipse.egf.model.types.TypeElement;
+import org.eclipse.egf.model.types.TypeFloat;
+import org.eclipse.egf.model.types.TypeGeneratorAdapterFactory;
+import org.eclipse.egf.model.types.TypeInteger;
+import org.eclipse.egf.model.types.TypeList;
+import org.eclipse.egf.model.types.TypeLong;
+import org.eclipse.egf.model.types.TypeMap;
+import org.eclipse.egf.model.types.TypeObject;
+import org.eclipse.egf.model.types.TypeSet;
+import org.eclipse.egf.model.types.TypeShort;
+import org.eclipse.egf.model.types.TypeString;
+import org.eclipse.egf.model.types.TypesFactory;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.egf.model.types.util.TypesValidator;
+import org.eclipse.emf.codegen.ecore.generator.GeneratorAdapterFactory;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EGenericType;
+import org.eclipse.emf.ecore.EOperation;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.ETypeParameter;
+import org.eclipse.emf.ecore.EValidator;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TypesPackageImpl extends EPackageImpl implements TypesPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass typeElementEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass typeEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass typeObjectEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass typeAbstractClassEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass typeCollectionEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass typeListEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass typeSetEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass typeGeneratorAdapterFactoryEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass typeMapEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass typeBigDecimalEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass typeBigIntegerEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass typeBooleanEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass typeByteEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass typeCharacterEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass typeDateEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass typeDoubleEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass typeFloatEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass typeIntegerEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass typeLongEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass typeShortEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass typeStringEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EDataType eGeneratorAdapterFactoryEDataType = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EDataType uriEDataType = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EDataType collectionEDataType = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EDataType listEDataType = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EDataType setEDataType = 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.egf.model.types.TypesPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private TypesPackageImpl() {
+ super(eNS_URI, TypesFactory.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 TypesPackage#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 TypesPackage init() {
+ if (isInited)
+ return (TypesPackage) EPackage.Registry.INSTANCE.getEPackage(TypesPackage.eNS_URI);
+
+ // Obtain or create and register package
+ TypesPackageImpl theTypesPackage = (TypesPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof TypesPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new TypesPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ EcorePackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theTypesPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theTypesPackage.initializePackageContents();
+
+ // Register package validator
+ EValidator.Registry.INSTANCE.put(theTypesPackage, new EValidator.Descriptor() {
+ public EValidator getEValidator() {
+ return TypesValidator.INSTANCE;
+ }
+ });
+
+ // Mark meta-data to indicate it can't be changed
+ theTypesPackage.freeze();
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(TypesPackage.eNS_URI, theTypesPackage);
+ return theTypesPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTypeElement() {
+ return typeElementEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getTypeElement_ID() {
+ return (EAttribute) typeElementEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getTypeElement_Description() {
+ return (EAttribute) typeElementEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getType() {
+ return typeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTypeObject() {
+ return typeObjectEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTypeAbstractClass() {
+ return typeAbstractClassEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getTypeAbstractClass_Value() {
+ return (EAttribute) typeAbstractClassEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTypeCollection() {
+ return typeCollectionEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTypeList() {
+ return typeListEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTypeSet() {
+ return typeSetEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTypeGeneratorAdapterFactory() {
+ return typeGeneratorAdapterFactoryEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTypeMap() {
+ return typeMapEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTypeBigDecimal() {
+ return typeBigDecimalEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getTypeBigDecimal_Value() {
+ return (EAttribute) typeBigDecimalEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTypeBigInteger() {
+ return typeBigIntegerEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getTypeBigInteger_Value() {
+ return (EAttribute) typeBigIntegerEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTypeBoolean() {
+ return typeBooleanEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getTypeBoolean_Value() {
+ return (EAttribute) typeBooleanEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTypeByte() {
+ return typeByteEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getTypeByte_Value() {
+ return (EAttribute) typeByteEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTypeCharacter() {
+ return typeCharacterEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getTypeCharacter_Value() {
+ return (EAttribute) typeCharacterEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTypeDate() {
+ return typeDateEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getTypeDate_Value() {
+ return (EAttribute) typeDateEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTypeDouble() {
+ return typeDoubleEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getTypeDouble_Value() {
+ return (EAttribute) typeDoubleEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTypeFloat() {
+ return typeFloatEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getTypeFloat_Value() {
+ return (EAttribute) typeFloatEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTypeInteger() {
+ return typeIntegerEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getTypeInteger_Value() {
+ return (EAttribute) typeIntegerEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTypeLong() {
+ return typeLongEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getTypeLong_Value() {
+ return (EAttribute) typeLongEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTypeShort() {
+ return typeShortEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getTypeShort_Value() {
+ return (EAttribute) typeShortEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTypeString() {
+ return typeStringEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getTypeString_Value() {
+ return (EAttribute) typeStringEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EDataType getEGeneratorAdapterFactory() {
+ return eGeneratorAdapterFactoryEDataType;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EDataType getURI() {
+ return uriEDataType;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EDataType getCollection() {
+ return collectionEDataType;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EDataType getList() {
+ return listEDataType;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EDataType getSet() {
+ return setEDataType;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TypesFactory getTypesFactory() {
+ return (TypesFactory) 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
+ typeElementEClass = createEClass(TYPE_ELEMENT);
+ createEAttribute(typeElementEClass, TYPE_ELEMENT__ID);
+ createEAttribute(typeElementEClass, TYPE_ELEMENT__DESCRIPTION);
+
+ typeEClass = createEClass(TYPE);
+
+ typeObjectEClass = createEClass(TYPE_OBJECT);
+
+ typeAbstractClassEClass = createEClass(TYPE_ABSTRACT_CLASS);
+ createEAttribute(typeAbstractClassEClass, TYPE_ABSTRACT_CLASS__VALUE);
+
+ typeCollectionEClass = createEClass(TYPE_COLLECTION);
+
+ typeListEClass = createEClass(TYPE_LIST);
+
+ typeSetEClass = createEClass(TYPE_SET);
+
+ typeGeneratorAdapterFactoryEClass = createEClass(TYPE_GENERATOR_ADAPTER_FACTORY);
+
+ typeMapEClass = createEClass(TYPE_MAP);
+
+ typeBigDecimalEClass = createEClass(TYPE_BIG_DECIMAL);
+ createEAttribute(typeBigDecimalEClass, TYPE_BIG_DECIMAL__VALUE);
+
+ typeBigIntegerEClass = createEClass(TYPE_BIG_INTEGER);
+ createEAttribute(typeBigIntegerEClass, TYPE_BIG_INTEGER__VALUE);
+
+ typeBooleanEClass = createEClass(TYPE_BOOLEAN);
+ createEAttribute(typeBooleanEClass, TYPE_BOOLEAN__VALUE);
+
+ typeByteEClass = createEClass(TYPE_BYTE);
+ createEAttribute(typeByteEClass, TYPE_BYTE__VALUE);
+
+ typeCharacterEClass = createEClass(TYPE_CHARACTER);
+ createEAttribute(typeCharacterEClass, TYPE_CHARACTER__VALUE);
+
+ typeDateEClass = createEClass(TYPE_DATE);
+ createEAttribute(typeDateEClass, TYPE_DATE__VALUE);
+
+ typeDoubleEClass = createEClass(TYPE_DOUBLE);
+ createEAttribute(typeDoubleEClass, TYPE_DOUBLE__VALUE);
+
+ typeFloatEClass = createEClass(TYPE_FLOAT);
+ createEAttribute(typeFloatEClass, TYPE_FLOAT__VALUE);
+
+ typeIntegerEClass = createEClass(TYPE_INTEGER);
+ createEAttribute(typeIntegerEClass, TYPE_INTEGER__VALUE);
+
+ typeLongEClass = createEClass(TYPE_LONG);
+ createEAttribute(typeLongEClass, TYPE_LONG__VALUE);
+
+ typeShortEClass = createEClass(TYPE_SHORT);
+ createEAttribute(typeShortEClass, TYPE_SHORT__VALUE);
+
+ typeStringEClass = createEClass(TYPE_STRING);
+ createEAttribute(typeStringEClass, TYPE_STRING__VALUE);
+
+ // Create data types
+ eGeneratorAdapterFactoryEDataType = createEDataType(EGENERATOR_ADAPTER_FACTORY);
+ setEDataType = createEDataType(SET);
+ listEDataType = createEDataType(LIST);
+ collectionEDataType = createEDataType(COLLECTION);
+ uriEDataType = createEDataType(URI);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized)
+ return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ EcorePackage theEcorePackage = (EcorePackage) EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
+
+ // Create type parameters
+ addETypeParameter(setEDataType, "E"); //$NON-NLS-1$
+ addETypeParameter(listEDataType, "E"); //$NON-NLS-1$
+ addETypeParameter(collectionEDataType, "E"); //$NON-NLS-1$
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ typeEClass.getESuperTypes().add(this.getTypeElement());
+ typeObjectEClass.getESuperTypes().add(this.getType());
+ typeAbstractClassEClass.getESuperTypes().add(this.getType());
+ typeCollectionEClass.getESuperTypes().add(this.getTypeAbstractClass());
+ typeListEClass.getESuperTypes().add(this.getTypeAbstractClass());
+ typeSetEClass.getESuperTypes().add(this.getTypeAbstractClass());
+ typeGeneratorAdapterFactoryEClass.getESuperTypes().add(this.getTypeAbstractClass());
+ typeMapEClass.getESuperTypes().add(this.getTypeAbstractClass());
+ typeBigDecimalEClass.getESuperTypes().add(this.getTypeObject());
+ typeBigIntegerEClass.getESuperTypes().add(this.getTypeObject());
+ typeBooleanEClass.getESuperTypes().add(this.getTypeObject());
+ typeByteEClass.getESuperTypes().add(this.getTypeObject());
+ typeCharacterEClass.getESuperTypes().add(this.getTypeObject());
+ typeDateEClass.getESuperTypes().add(this.getTypeObject());
+ typeDoubleEClass.getESuperTypes().add(this.getTypeObject());
+ typeFloatEClass.getESuperTypes().add(this.getTypeObject());
+ typeIntegerEClass.getESuperTypes().add(this.getTypeObject());
+ typeLongEClass.getESuperTypes().add(this.getTypeObject());
+ typeShortEClass.getESuperTypes().add(this.getTypeObject());
+ typeStringEClass.getESuperTypes().add(this.getTypeObject());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(typeElementEClass, TypeElement.class, "TypeElement", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getTypeElement_ID(), theEcorePackage.getEString(), "iD", null, 0, 1, TypeElement.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getTypeElement_Description(), theEcorePackage.getEString(), "description", null, 0, 1, TypeElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(typeEClass, Type.class, "Type", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+
+ EOperation op = addEOperation(typeEClass, null, "getType", 1, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ ETypeParameter t1 = addETypeParameter(op, "T"); //$NON-NLS-1$
+ EGenericType g1 = createEGenericType(theEcorePackage.getEJavaObject());
+ t1.getEBounds().add(g1);
+ g1 = createEGenericType(theEcorePackage.getEJavaClass());
+ EGenericType g2 = createEGenericType(t1);
+ g1.getETypeArguments().add(g2);
+ initEOperation(op, g1);
+
+ addEOperation(typeEClass, theEcorePackage.getEJavaObject(), "getValue", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(typeObjectEClass, TypeObject.class, "TypeObject", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+
+ op = addEOperation(typeObjectEClass, null, "getType", 1, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ t1 = addETypeParameter(op, "T"); //$NON-NLS-1$
+ g1 = createEGenericType(theEcorePackage.getEJavaObject());
+ t1.getEBounds().add(g1);
+ g1 = createEGenericType(theEcorePackage.getEJavaClass());
+ g2 = createEGenericType(t1);
+ g1.getETypeArguments().add(g2);
+ initEOperation(op, g1);
+
+ initEClass(typeAbstractClassEClass, TypeAbstractClass.class, "TypeAbstractClass", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getTypeAbstractClass_Value(), theEcorePackage.getEString(), "value", null, 0, 1, TypeAbstractClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(typeCollectionEClass, TypeCollection.class, "TypeCollection", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+
+ op = addEOperation(typeCollectionEClass, null, "getType", 1, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ g1 = createEGenericType(theEcorePackage.getEJavaClass());
+ g2 = createEGenericType();
+ g1.getETypeArguments().add(g2);
+ initEOperation(op, g1);
+
+ initEClass(typeListEClass, TypeList.class, "TypeList", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+
+ op = addEOperation(typeListEClass, null, "getType", 1, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ g1 = createEGenericType(theEcorePackage.getEJavaClass());
+ g2 = createEGenericType();
+ g1.getETypeArguments().add(g2);
+ initEOperation(op, g1);
+
+ initEClass(typeSetEClass, TypeSet.class, "TypeSet", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+
+ op = addEOperation(typeSetEClass, null, "getType", 1, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ g1 = createEGenericType(theEcorePackage.getEJavaClass());
+ g2 = createEGenericType();
+ g1.getETypeArguments().add(g2);
+ initEOperation(op, g1);
+
+ initEClass(typeGeneratorAdapterFactoryEClass, TypeGeneratorAdapterFactory.class, "TypeGeneratorAdapterFactory", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+
+ op = addEOperation(typeGeneratorAdapterFactoryEClass, null, "getType", 1, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ g1 = createEGenericType(theEcorePackage.getEJavaClass());
+ g2 = createEGenericType();
+ g1.getETypeArguments().add(g2);
+ initEOperation(op, g1);
+
+ initEClass(typeMapEClass, TypeMap.class, "TypeMap", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+
+ op = addEOperation(typeMapEClass, null, "getType", 1, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+ g1 = createEGenericType(theEcorePackage.getEJavaClass());
+ g2 = createEGenericType();
+ g1.getETypeArguments().add(g2);
+ initEOperation(op, g1);
+
+ initEClass(typeBigDecimalEClass, TypeBigDecimal.class, "TypeBigDecimal", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getTypeBigDecimal_Value(), theEcorePackage.getEBigDecimal(), "value", null, 0, 1, TypeBigDecimal.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(typeBigIntegerEClass, TypeBigInteger.class, "TypeBigInteger", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getTypeBigInteger_Value(), theEcorePackage.getEBigInteger(), "value", null, 0, 1, TypeBigInteger.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(typeBooleanEClass, TypeBoolean.class, "TypeBoolean", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getTypeBoolean_Value(), theEcorePackage.getEBooleanObject(), "value", null, 0, 1, TypeBoolean.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(typeByteEClass, TypeByte.class, "TypeByte", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getTypeByte_Value(), theEcorePackage.getEByteObject(), "value", null, 0, 1, TypeByte.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(typeCharacterEClass, TypeCharacter.class, "TypeCharacter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getTypeCharacter_Value(), theEcorePackage.getECharacterObject(), "value", null, 0, 1, TypeCharacter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(typeDateEClass, TypeDate.class, "TypeDate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getTypeDate_Value(), theEcorePackage.getEDate(), "value", null, 0, 1, TypeDate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(typeDoubleEClass, TypeDouble.class, "TypeDouble", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getTypeDouble_Value(), theEcorePackage.getEDoubleObject(), "value", null, 0, 1, TypeDouble.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(typeFloatEClass, TypeFloat.class, "TypeFloat", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getTypeFloat_Value(), theEcorePackage.getEFloatObject(), "value", null, 0, 1, TypeFloat.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(typeIntegerEClass, TypeInteger.class, "TypeInteger", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getTypeInteger_Value(), theEcorePackage.getEIntegerObject(), "value", null, 0, 1, TypeInteger.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(typeLongEClass, TypeLong.class, "TypeLong", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getTypeLong_Value(), theEcorePackage.getELongObject(), "value", null, 0, 1, TypeLong.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(typeShortEClass, TypeShort.class, "TypeShort", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getTypeShort_Value(), theEcorePackage.getEShortObject(), "value", null, 0, 1, TypeShort.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(typeStringEClass, TypeString.class, "TypeString", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getTypeString_Value(), theEcorePackage.getEString(), "value", null, 0, 1, TypeString.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ // Initialize data types
+ initEDataType(eGeneratorAdapterFactoryEDataType, GeneratorAdapterFactory.class, "EGeneratorAdapterFactory", !IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEDataType(setEDataType, Set.class, "Set", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEDataType(listEDataType, List.class, "List", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEDataType(collectionEDataType, Collection.class, "Collection", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEDataType(uriEDataType, org.eclipse.emf.common.util.URI.class, "URI", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+
+ // Create resource
+ createResource(eNS_URI);
+
+ // Create annotations
+ // http://www.eclipse.org/emf/2002/Ecore
+ createEcoreAnnotations();
+ }
+
+ /**
+ * Initializes the annotations for <b>http://www.eclipse.org/emf/2002/Ecore</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void createEcoreAnnotations() {
+ String source = "http://www.eclipse.org/emf/2002/Ecore"; //$NON-NLS-1$
+ addAnnotation(typeObjectEClass, source, new String[] { "constraints", "ValidValue" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ addAnnotation(typeAbstractClassEClass, source, new String[] { "constraints", "LoadableType ValidValue" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ }
+
+} // TypesPackageImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/util/TypesAdapterFactory.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/util/TypesAdapterFactory.java
new file mode 100644
index 0000000..b791837
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/util/TypesAdapterFactory.java
@@ -0,0 +1,558 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.util;
+
+import org.eclipse.egf.model.types.Type;
+import org.eclipse.egf.model.types.TypeAbstractClass;
+import org.eclipse.egf.model.types.TypeBigDecimal;
+import org.eclipse.egf.model.types.TypeBigInteger;
+import org.eclipse.egf.model.types.TypeBoolean;
+import org.eclipse.egf.model.types.TypeByte;
+import org.eclipse.egf.model.types.TypeCharacter;
+import org.eclipse.egf.model.types.TypeCollection;
+import org.eclipse.egf.model.types.TypeDate;
+import org.eclipse.egf.model.types.TypeDouble;
+import org.eclipse.egf.model.types.TypeElement;
+import org.eclipse.egf.model.types.TypeFloat;
+import org.eclipse.egf.model.types.TypeGeneratorAdapterFactory;
+import org.eclipse.egf.model.types.TypeInteger;
+import org.eclipse.egf.model.types.TypeList;
+import org.eclipse.egf.model.types.TypeLong;
+import org.eclipse.egf.model.types.TypeMap;
+import org.eclipse.egf.model.types.TypeObject;
+import org.eclipse.egf.model.types.TypeSet;
+import org.eclipse.egf.model.types.TypeShort;
+import org.eclipse.egf.model.types.TypeString;
+import org.eclipse.egf.model.types.TypesPackage;
+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;
+
+/**
+ * <!-- 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.egf.model.types.TypesPackage
+ * @generated
+ */
+public class TypesAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static TypesPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypesAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = TypesPackage.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 TypesSwitch<Adapter> modelSwitch = new TypesSwitch<Adapter>() {
+ @Override
+ public Adapter caseTypeElement(TypeElement object) {
+ return createTypeElementAdapter();
+ }
+
+ @Override
+ public Adapter caseType(Type object) {
+ return createTypeAdapter();
+ }
+
+ @Override
+ public Adapter caseTypeObject(TypeObject object) {
+ return createTypeObjectAdapter();
+ }
+
+ @Override
+ public Adapter caseTypeAbstractClass(TypeAbstractClass object) {
+ return createTypeAbstractClassAdapter();
+ }
+
+ @Override
+ public Adapter caseTypeCollection(TypeCollection object) {
+ return createTypeCollectionAdapter();
+ }
+
+ @Override
+ public Adapter caseTypeList(TypeList object) {
+ return createTypeListAdapter();
+ }
+
+ @Override
+ public Adapter caseTypeSet(TypeSet object) {
+ return createTypeSetAdapter();
+ }
+
+ @Override
+ public Adapter caseTypeGeneratorAdapterFactory(TypeGeneratorAdapterFactory object) {
+ return createTypeGeneratorAdapterFactoryAdapter();
+ }
+
+ @Override
+ public Adapter caseTypeMap(TypeMap object) {
+ return createTypeMapAdapter();
+ }
+
+ @Override
+ public Adapter caseTypeBigDecimal(TypeBigDecimal object) {
+ return createTypeBigDecimalAdapter();
+ }
+
+ @Override
+ public Adapter caseTypeBigInteger(TypeBigInteger object) {
+ return createTypeBigIntegerAdapter();
+ }
+
+ @Override
+ public Adapter caseTypeBoolean(TypeBoolean object) {
+ return createTypeBooleanAdapter();
+ }
+
+ @Override
+ public Adapter caseTypeByte(TypeByte object) {
+ return createTypeByteAdapter();
+ }
+
+ @Override
+ public Adapter caseTypeCharacter(TypeCharacter object) {
+ return createTypeCharacterAdapter();
+ }
+
+ @Override
+ public Adapter caseTypeDate(TypeDate object) {
+ return createTypeDateAdapter();
+ }
+
+ @Override
+ public Adapter caseTypeDouble(TypeDouble object) {
+ return createTypeDoubleAdapter();
+ }
+
+ @Override
+ public Adapter caseTypeFloat(TypeFloat object) {
+ return createTypeFloatAdapter();
+ }
+
+ @Override
+ public Adapter caseTypeInteger(TypeInteger object) {
+ return createTypeIntegerAdapter();
+ }
+
+ @Override
+ public Adapter caseTypeLong(TypeLong object) {
+ return createTypeLongAdapter();
+ }
+
+ @Override
+ public Adapter caseTypeShort(TypeShort object) {
+ return createTypeShortAdapter();
+ }
+
+ @Override
+ public Adapter caseTypeString(TypeString object) {
+ return createTypeStringAdapter();
+ }
+
+ @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.egf.model.types.TypeElement <em>Type Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ *
+ * @return the new adapter.
+ * @see org.eclipse.egf.model.types.TypeElement
+ * @generated
+ */
+ public Adapter createTypeElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.types.Type <em>Type</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.egf.model.types.Type
+ * @generated
+ */
+ public Adapter createTypeAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.types.TypeObject <em>Type Object</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.egf.model.types.TypeObject
+ * @generated
+ */
+ public Adapter createTypeObjectAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.types.TypeAbstractClass <em>Type Abstract Class</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.egf.model.types.TypeAbstractClass
+ * @generated
+ */
+ public Adapter createTypeAbstractClassAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.types.TypeCollection <em>Type Collection</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.egf.model.types.TypeCollection
+ * @generated
+ */
+ public Adapter createTypeCollectionAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.types.TypeList <em>Type List</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.egf.model.types.TypeList
+ * @generated
+ */
+ public Adapter createTypeListAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.types.TypeSet <em>Type Set</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.egf.model.types.TypeSet
+ * @generated
+ */
+ public Adapter createTypeSetAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.types.TypeGeneratorAdapterFactory <em>Type Generator Adapter Factory</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.egf.model.types.TypeGeneratorAdapterFactory
+ * @generated
+ */
+ public Adapter createTypeGeneratorAdapterFactoryAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.types.TypeMap <em>Type Map</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.egf.model.types.TypeMap
+ * @generated
+ */
+ public Adapter createTypeMapAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.types.TypeBigDecimal <em>Type Big Decimal</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.egf.model.types.TypeBigDecimal
+ * @generated
+ */
+ public Adapter createTypeBigDecimalAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.types.TypeBigInteger <em>Type Big Integer</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.egf.model.types.TypeBigInteger
+ * @generated
+ */
+ public Adapter createTypeBigIntegerAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.types.TypeBoolean <em>Type Boolean</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.egf.model.types.TypeBoolean
+ * @generated
+ */
+ public Adapter createTypeBooleanAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.types.TypeByte <em>Type Byte</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.egf.model.types.TypeByte
+ * @generated
+ */
+ public Adapter createTypeByteAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.types.TypeCharacter <em>Type Character</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.egf.model.types.TypeCharacter
+ * @generated
+ */
+ public Adapter createTypeCharacterAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.types.TypeDate <em>Type Date</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.egf.model.types.TypeDate
+ * @generated
+ */
+ public Adapter createTypeDateAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.types.TypeDouble <em>Type Double</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.egf.model.types.TypeDouble
+ * @generated
+ */
+ public Adapter createTypeDoubleAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.types.TypeFloat <em>Type Float</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.egf.model.types.TypeFloat
+ * @generated
+ */
+ public Adapter createTypeFloatAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.types.TypeInteger <em>Type Integer</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.egf.model.types.TypeInteger
+ * @generated
+ */
+ public Adapter createTypeIntegerAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.types.TypeLong <em>Type Long</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.egf.model.types.TypeLong
+ * @generated
+ */
+ public Adapter createTypeLongAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.types.TypeShort <em>Type Short</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.egf.model.types.TypeShort
+ * @generated
+ */
+ public Adapter createTypeShortAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.egf.model.types.TypeString <em>Type String</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.egf.model.types.TypeString
+ * @generated
+ */
+ public Adapter createTypeStringAdapter() {
+ 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;
+ }
+
+} // TypesAdapterFactory
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/util/TypesResourceFactoryImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/util/TypesResourceFactoryImpl.java
new file mode 100644
index 0000000..1854ccc
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/util/TypesResourceFactoryImpl.java
@@ -0,0 +1,49 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.util;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource Factory</b> associated with the package.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.egf.model.types.util.TypesResourceImpl
+ * @generated
+ */
+public class TypesResourceFactoryImpl extends ResourceFactoryImpl {
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TypesResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ Resource result = new TypesResourceImpl(uri);
+ return result;
+ }
+
+} // TypesResourceFactoryImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/util/TypesResourceImpl.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/util/TypesResourceImpl.java
new file mode 100644
index 0000000..9fecacc
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/util/TypesResourceImpl.java
@@ -0,0 +1,169 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.util;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.egf.model.uri.ModelSchemeAware;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.xmi.XMIResource;
+import org.eclipse.emf.ecore.xmi.XMLParserPool;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+import org.eclipse.emf.ecore.xmi.XMLSave.XMLTypeInfo;
+import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl;
+import org.eclipse.emf.ecore.xmi.impl.XMLParserPoolImpl;
+import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource </b> associated with the package.
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.egf.model.types.util.TypesResourceFactoryImpl
+ * @generated
+ */
+public class TypesResourceImpl extends XMIResourceImpl {
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private List<Object> lookupTable = new ArrayList<Object>();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private XMLParserPool parserPool = new XMLParserPoolImpl();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private Map<Object, Object> nameToFeatureMap = new HashMap<Object, Object>();
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param uri
+ * the URI of the new resource.
+ * @generated
+ */
+ public TypesResourceImpl(URI uri) {
+ super(uri);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean useIDAttributes() {
+ return false;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean useUUIDs() {
+ return true;
+ }
+
+ /**
+ * Called when the object is unloaded.
+ * This implementation {@link InternalEObject#eSetProxyURI sets} the object to be a proxy
+ * and clears the {@link #eAdapters adapters}.
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=292866
+ * Fix available in HEAD: 2.6.0.I200911020144
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void unloaded(InternalEObject internalEObject) {
+ // Ensure that an unresolved containment proxy's URI isn't reset.
+ //
+ if (!internalEObject.eIsProxy()) {
+ internalEObject.eSetProxyURI(uri.appendFragment(getURIFragment(internalEObject)));
+ }
+ internalEObject.eAdapters().clear();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void init() {
+ super.init();
+ setTrackingModification(true);
+ setEncoding("UTF-8"); //$NON-NLS-1$
+ setXMIVersion("2.1"); //$NON-NLS-1$
+ // Save Options
+ getDefaultSaveOptions().put(XMLResource.OPTION_DISABLE_NOTIFY, Boolean.TRUE);
+ getDefaultSaveOptions().put(XMLResource.OPTION_CONFIGURATION_CACHE, Boolean.TRUE);
+ getDefaultSaveOptions().put(XMLResource.OPTION_USE_CACHED_LOOKUP_TABLE, lookupTable);
+ getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ getDefaultSaveOptions().put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
+ getDefaultSaveOptions().put(XMLResource.OPTION_SAVE_TYPE_INFORMATION, new XMLTypeInfo() {
+ public boolean shouldSaveType(EClass objectType, EClassifier featureType, EStructuralFeature feature) {
+ return objectType != featureType && objectType != XMLTypePackage.Literals.ANY_TYPE;
+ }
+
+ public boolean shouldSaveType(EClass objectType, EClass featureType, EStructuralFeature feature) {
+ return objectType != featureType && objectType != XMLTypePackage.Literals.ANY_TYPE;
+ }
+ });
+ getDefaultSaveOptions().put(XMLResource.OPTION_LINE_WIDTH, new Integer(80));
+ // Avoid relative paths from workspace resources to plugin resources.
+ getDefaultSaveOptions().put(XMLResource.OPTION_URI_HANDLER, new ModelSchemeAware());
+ getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ getDefaultSaveOptions().put(XMIResource.OPTION_USE_XMI_TYPE, Boolean.TRUE);
+ // Load Options
+ getDefaultLoadOptions().put(XMLResource.OPTION_DEFER_ATTACHMENT, Boolean.FALSE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_DEFER_IDREF_RESOLUTION, Boolean.FALSE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_DISABLE_NOTIFY, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_DEPRECATED_METHODS, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_PARSER_POOL, parserPool);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_XML_NAME_TO_FEATURE_MAP, nameToFeatureMap);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ }
+
+} // TypesResourceImpl
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/util/TypesSwitch.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/util/TypesSwitch.java
new file mode 100644
index 0000000..ff406a0
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/util/TypesSwitch.java
@@ -0,0 +1,757 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.util;
+
+import java.util.List;
+
+import org.eclipse.egf.model.types.Type;
+import org.eclipse.egf.model.types.TypeAbstractClass;
+import org.eclipse.egf.model.types.TypeBigDecimal;
+import org.eclipse.egf.model.types.TypeBigInteger;
+import org.eclipse.egf.model.types.TypeBoolean;
+import org.eclipse.egf.model.types.TypeByte;
+import org.eclipse.egf.model.types.TypeCharacter;
+import org.eclipse.egf.model.types.TypeCollection;
+import org.eclipse.egf.model.types.TypeDate;
+import org.eclipse.egf.model.types.TypeDouble;
+import org.eclipse.egf.model.types.TypeElement;
+import org.eclipse.egf.model.types.TypeFloat;
+import org.eclipse.egf.model.types.TypeGeneratorAdapterFactory;
+import org.eclipse.egf.model.types.TypeInteger;
+import org.eclipse.egf.model.types.TypeList;
+import org.eclipse.egf.model.types.TypeLong;
+import org.eclipse.egf.model.types.TypeMap;
+import org.eclipse.egf.model.types.TypeObject;
+import org.eclipse.egf.model.types.TypeSet;
+import org.eclipse.egf.model.types.TypeShort;
+import org.eclipse.egf.model.types.TypeString;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- 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.egf.model.types.TypesPackage
+ * @generated
+ */
+public class TypesSwitch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static TypesPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypesSwitch() {
+ if (modelPackage == null) {
+ modelPackage = TypesPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * 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
+ */
+ public T doSwitch(EObject theEObject) {
+ return doSwitch(theEObject.eClass(), theEObject);
+ }
+
+ /**
+ * 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
+ */
+ @SuppressWarnings("all")
+ protected T doSwitch(EClass theEClass, EObject theEObject) {
+ if (theEClass.eContainer() == modelPackage) {
+ return doSwitch(theEClass.getClassifierID(), theEObject);
+ } else {
+ List<EClass> eSuperTypes = theEClass.getESuperTypes();
+ return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject);
+ }
+ }
+
+ /**
+ * 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
+ */
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case TypesPackage.TYPE_ELEMENT: {
+ TypeElement typeElement = (TypeElement) theEObject;
+ T result = caseTypeElement(typeElement);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case TypesPackage.TYPE: {
+ Type type = (Type) theEObject;
+ T result = caseType(type);
+ if (result == null)
+ result = caseTypeElement(type);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case TypesPackage.TYPE_OBJECT: {
+ TypeObject typeObject = (TypeObject) theEObject;
+ T result = caseTypeObject(typeObject);
+ if (result == null)
+ result = caseType(typeObject);
+ if (result == null)
+ result = caseTypeElement(typeObject);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case TypesPackage.TYPE_ABSTRACT_CLASS: {
+ TypeAbstractClass typeAbstractClass = (TypeAbstractClass) theEObject;
+ T result = caseTypeAbstractClass(typeAbstractClass);
+ if (result == null)
+ result = caseType(typeAbstractClass);
+ if (result == null)
+ result = caseTypeElement(typeAbstractClass);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case TypesPackage.TYPE_COLLECTION: {
+ TypeCollection typeCollection = (TypeCollection) theEObject;
+ T result = caseTypeCollection(typeCollection);
+ if (result == null)
+ result = caseTypeAbstractClass(typeCollection);
+ if (result == null)
+ result = caseType(typeCollection);
+ if (result == null)
+ result = caseTypeElement(typeCollection);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case TypesPackage.TYPE_LIST: {
+ TypeList typeList = (TypeList) theEObject;
+ T result = caseTypeList(typeList);
+ if (result == null)
+ result = caseTypeAbstractClass(typeList);
+ if (result == null)
+ result = caseType(typeList);
+ if (result == null)
+ result = caseTypeElement(typeList);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case TypesPackage.TYPE_SET: {
+ TypeSet typeSet = (TypeSet) theEObject;
+ T result = caseTypeSet(typeSet);
+ if (result == null)
+ result = caseTypeAbstractClass(typeSet);
+ if (result == null)
+ result = caseType(typeSet);
+ if (result == null)
+ result = caseTypeElement(typeSet);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case TypesPackage.TYPE_GENERATOR_ADAPTER_FACTORY: {
+ TypeGeneratorAdapterFactory typeGeneratorAdapterFactory = (TypeGeneratorAdapterFactory) theEObject;
+ T result = caseTypeGeneratorAdapterFactory(typeGeneratorAdapterFactory);
+ if (result == null)
+ result = caseTypeAbstractClass(typeGeneratorAdapterFactory);
+ if (result == null)
+ result = caseType(typeGeneratorAdapterFactory);
+ if (result == null)
+ result = caseTypeElement(typeGeneratorAdapterFactory);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case TypesPackage.TYPE_MAP: {
+ TypeMap typeMap = (TypeMap) theEObject;
+ T result = caseTypeMap(typeMap);
+ if (result == null)
+ result = caseTypeAbstractClass(typeMap);
+ if (result == null)
+ result = caseType(typeMap);
+ if (result == null)
+ result = caseTypeElement(typeMap);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case TypesPackage.TYPE_BIG_DECIMAL: {
+ TypeBigDecimal typeBigDecimal = (TypeBigDecimal) theEObject;
+ T result = caseTypeBigDecimal(typeBigDecimal);
+ if (result == null)
+ result = caseTypeObject(typeBigDecimal);
+ if (result == null)
+ result = caseType(typeBigDecimal);
+ if (result == null)
+ result = caseTypeElement(typeBigDecimal);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case TypesPackage.TYPE_BIG_INTEGER: {
+ TypeBigInteger typeBigInteger = (TypeBigInteger) theEObject;
+ T result = caseTypeBigInteger(typeBigInteger);
+ if (result == null)
+ result = caseTypeObject(typeBigInteger);
+ if (result == null)
+ result = caseType(typeBigInteger);
+ if (result == null)
+ result = caseTypeElement(typeBigInteger);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case TypesPackage.TYPE_BOOLEAN: {
+ TypeBoolean typeBoolean = (TypeBoolean) theEObject;
+ T result = caseTypeBoolean(typeBoolean);
+ if (result == null)
+ result = caseTypeObject(typeBoolean);
+ if (result == null)
+ result = caseType(typeBoolean);
+ if (result == null)
+ result = caseTypeElement(typeBoolean);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case TypesPackage.TYPE_BYTE: {
+ TypeByte typeByte = (TypeByte) theEObject;
+ T result = caseTypeByte(typeByte);
+ if (result == null)
+ result = caseTypeObject(typeByte);
+ if (result == null)
+ result = caseType(typeByte);
+ if (result == null)
+ result = caseTypeElement(typeByte);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case TypesPackage.TYPE_CHARACTER: {
+ TypeCharacter typeCharacter = (TypeCharacter) theEObject;
+ T result = caseTypeCharacter(typeCharacter);
+ if (result == null)
+ result = caseTypeObject(typeCharacter);
+ if (result == null)
+ result = caseType(typeCharacter);
+ if (result == null)
+ result = caseTypeElement(typeCharacter);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case TypesPackage.TYPE_DATE: {
+ TypeDate typeDate = (TypeDate) theEObject;
+ T result = caseTypeDate(typeDate);
+ if (result == null)
+ result = caseTypeObject(typeDate);
+ if (result == null)
+ result = caseType(typeDate);
+ if (result == null)
+ result = caseTypeElement(typeDate);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case TypesPackage.TYPE_DOUBLE: {
+ TypeDouble typeDouble = (TypeDouble) theEObject;
+ T result = caseTypeDouble(typeDouble);
+ if (result == null)
+ result = caseTypeObject(typeDouble);
+ if (result == null)
+ result = caseType(typeDouble);
+ if (result == null)
+ result = caseTypeElement(typeDouble);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case TypesPackage.TYPE_FLOAT: {
+ TypeFloat typeFloat = (TypeFloat) theEObject;
+ T result = caseTypeFloat(typeFloat);
+ if (result == null)
+ result = caseTypeObject(typeFloat);
+ if (result == null)
+ result = caseType(typeFloat);
+ if (result == null)
+ result = caseTypeElement(typeFloat);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case TypesPackage.TYPE_INTEGER: {
+ TypeInteger typeInteger = (TypeInteger) theEObject;
+ T result = caseTypeInteger(typeInteger);
+ if (result == null)
+ result = caseTypeObject(typeInteger);
+ if (result == null)
+ result = caseType(typeInteger);
+ if (result == null)
+ result = caseTypeElement(typeInteger);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case TypesPackage.TYPE_LONG: {
+ TypeLong typeLong = (TypeLong) theEObject;
+ T result = caseTypeLong(typeLong);
+ if (result == null)
+ result = caseTypeObject(typeLong);
+ if (result == null)
+ result = caseType(typeLong);
+ if (result == null)
+ result = caseTypeElement(typeLong);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case TypesPackage.TYPE_SHORT: {
+ TypeShort typeShort = (TypeShort) theEObject;
+ T result = caseTypeShort(typeShort);
+ if (result == null)
+ result = caseTypeObject(typeShort);
+ if (result == null)
+ result = caseType(typeShort);
+ if (result == null)
+ result = caseTypeElement(typeShort);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case TypesPackage.TYPE_STRING: {
+ TypeString typeString = (TypeString) theEObject;
+ T result = caseTypeString(typeString);
+ if (result == null)
+ result = caseTypeObject(typeString);
+ if (result == null)
+ result = caseType(typeString);
+ if (result == null)
+ result = caseTypeElement(typeString);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ default:
+ return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Type Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Type Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTypeElement(TypeElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Type</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>Type</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseType(Type object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Type Object</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>Type Object</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTypeObject(TypeObject object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Type Abstract Class</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>Type Abstract Class</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTypeAbstractClass(TypeAbstractClass object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Type Collection</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>Type Collection</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTypeCollection(TypeCollection object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Type List</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>Type List</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTypeList(TypeList object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Type Set</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>Type Set</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTypeSet(TypeSet object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Type Generator Adapter Factory</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>Type Generator Adapter Factory</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTypeGeneratorAdapterFactory(TypeGeneratorAdapterFactory object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Type Map</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>Type Map</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTypeMap(TypeMap object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Type Big Decimal</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>Type Big Decimal</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTypeBigDecimal(TypeBigDecimal object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Type Big Integer</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>Type Big Integer</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTypeBigInteger(TypeBigInteger object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Type Boolean</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>Type Boolean</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTypeBoolean(TypeBoolean object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Type Byte</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>Type Byte</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTypeByte(TypeByte object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Type Character</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>Type Character</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTypeCharacter(TypeCharacter object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Type Date</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>Type Date</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTypeDate(TypeDate object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Type Double</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>Type Double</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTypeDouble(TypeDouble object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Type Float</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>Type Float</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTypeFloat(TypeFloat object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Type Integer</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>Type Integer</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTypeInteger(TypeInteger object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Type Long</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>Type Long</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTypeLong(TypeLong object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Type Short</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>Type Short</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTypeShort(TypeShort object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Type String</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>Type String</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTypeString(TypeString 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
+ */
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} // TypesSwitch
diff --git a/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/util/TypesValidator.java b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/util/TypesValidator.java
new file mode 100644
index 0000000..277b5ef
--- /dev/null
+++ b/org.eclipse.egf.model/generated/org/eclipse/egf/model/types/util/TypesValidator.java
@@ -0,0 +1,954 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.model.types.util;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.egf.model.EGFModelPlugin;
+import org.eclipse.egf.model.helper.ValidationHelper;
+import org.eclipse.egf.model.types.Type;
+import org.eclipse.egf.model.types.TypeAbstractClass;
+import org.eclipse.egf.model.types.TypeBigDecimal;
+import org.eclipse.egf.model.types.TypeBigInteger;
+import org.eclipse.egf.model.types.TypeBoolean;
+import org.eclipse.egf.model.types.TypeByte;
+import org.eclipse.egf.model.types.TypeCharacter;
+import org.eclipse.egf.model.types.TypeCollection;
+import org.eclipse.egf.model.types.TypeDate;
+import org.eclipse.egf.model.types.TypeDouble;
+import org.eclipse.egf.model.types.TypeElement;
+import org.eclipse.egf.model.types.TypeFloat;
+import org.eclipse.egf.model.types.TypeGeneratorAdapterFactory;
+import org.eclipse.egf.model.types.TypeInteger;
+import org.eclipse.egf.model.types.TypeList;
+import org.eclipse.egf.model.types.TypeLong;
+import org.eclipse.egf.model.types.TypeMap;
+import org.eclipse.egf.model.types.TypeObject;
+import org.eclipse.egf.model.types.TypeSet;
+import org.eclipse.egf.model.types.TypeShort;
+import org.eclipse.egf.model.types.TypeString;
+import org.eclipse.egf.model.types.TypesPackage;
+import org.eclipse.emf.codegen.ecore.generator.GeneratorAdapterFactory;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.DiagnosticChain;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.util.EObjectValidator;
+import org.eclipse.emf.validation.model.EvaluationMode;
+import org.eclipse.emf.validation.model.IConstraintStatus;
+import org.eclipse.emf.validation.service.IBatchValidator;
+import org.eclipse.emf.validation.service.ModelValidationService;
+import org.eclipse.emf.validation.service.ITraversalStrategy.Recursive;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Validator</b> for the model.
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.egf.model.types.TypesPackage
+ * @generated
+ */
+public class TypesValidator extends EObjectValidator {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ public static final TypesValidator INSTANCE = new TypesValidator();
+
+ /**
+ * A constant for the {@link org.eclipse.emf.common.util.Diagnostic#getSource() source} of diagnostic {@link org.eclipse.emf.common.util.Diagnostic#getCode() codes} from this package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.common.util.Diagnostic#getSource()
+ * @see org.eclipse.emf.common.util.Diagnostic#getCode()
+ * @generated
+ */
+ @SuppressWarnings("hiding")
+ public static final String DIAGNOSTIC_SOURCE = "org.eclipse.egf.model.types"; //$NON-NLS-1$
+
+ /**
+ * A constant with a fixed name that can be used as the base value for additional hand written constants.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static final int GENERATED_DIAGNOSTIC_CODE_COUNT = 0;
+
+ /**
+ * A constant with a fixed name that can be used as the base value for additional hand written constants in a derived class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static final int DIAGNOSTIC_CODE_COUNT = GENERATED_DIAGNOSTIC_CODE_COUNT;
+
+ /**
+ * Model Validation Service interface for batch validation of EMF elements.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private final IBatchValidator batchValidator;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public TypesValidator() {
+ super();
+ batchValidator = (IBatchValidator) ModelValidationService.getInstance().newValidator(EvaluationMode.BATCH);
+ batchValidator.setTraversalStrategy(new Recursive());
+ batchValidator.setIncludeLiveConstraints(true);
+ batchValidator.setReportSuccesses(false);
+ }
+
+ /**
+ * Returns the package of this validator switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EPackage getEPackage() {
+ return TypesPackage.eINSTANCE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean validate(EClass eClass, EObject eObject, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ IStatus status = Status.OK_STATUS;
+ // do whatever the basic EcoreValidator does
+ super.validate(eClass, eObject, diagnostics, context);
+ // no point in validating if we can't report results
+ if (diagnostics != null) {
+ // if EMF Mode Validation Service already covered the sub-tree,
+ // which it does for efficient computation and error reporting,
+ // then don't repeat (the Diagnostician does the recursion
+ // externally). If there is no context map, then we can't
+ // help it
+ if (hasProcessed(eObject, context) == false) {
+ status = batchValidator.validate(eObject, new NullProgressMonitor());
+ processed(eObject, context, status);
+ appendDiagnostics(status, diagnostics);
+ }
+ }
+ return status.isOK();
+ }
+
+ /**
+ * Calls <code>validateXXX</code> for the corresponding classifier of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean validate(int classifierID, Object value, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ switch (classifierID) {
+ case TypesPackage.TYPE_ELEMENT:
+ return validateTypeElement((TypeElement) value, diagnostics, context);
+ case TypesPackage.TYPE:
+ return validateType((Type) value, diagnostics, context);
+ case TypesPackage.TYPE_OBJECT:
+ return validateTypeObject((TypeObject) value, diagnostics, context);
+ case TypesPackage.TYPE_ABSTRACT_CLASS:
+ return validateTypeAbstractClass((TypeAbstractClass) value, diagnostics, context);
+ case TypesPackage.TYPE_COLLECTION:
+ return validateTypeCollection((TypeCollection) value, diagnostics, context);
+ case TypesPackage.TYPE_LIST:
+ return validateTypeList((TypeList) value, diagnostics, context);
+ case TypesPackage.TYPE_SET:
+ return validateTypeSet((TypeSet) value, diagnostics, context);
+ case TypesPackage.TYPE_GENERATOR_ADAPTER_FACTORY:
+ return validateTypeGeneratorAdapterFactory((TypeGeneratorAdapterFactory) value, diagnostics, context);
+ case TypesPackage.TYPE_MAP:
+ return validateTypeMap((TypeMap) value, diagnostics, context);
+ case TypesPackage.TYPE_BIG_DECIMAL:
+ return validateTypeBigDecimal((TypeBigDecimal) value, diagnostics, context);
+ case TypesPackage.TYPE_BIG_INTEGER:
+ return validateTypeBigInteger((TypeBigInteger) value, diagnostics, context);
+ case TypesPackage.TYPE_BOOLEAN:
+ return validateTypeBoolean((TypeBoolean) value, diagnostics, context);
+ case TypesPackage.TYPE_BYTE:
+ return validateTypeByte((TypeByte) value, diagnostics, context);
+ case TypesPackage.TYPE_CHARACTER:
+ return validateTypeCharacter((TypeCharacter) value, diagnostics, context);
+ case TypesPackage.TYPE_DATE:
+ return validateTypeDate((TypeDate) value, diagnostics, context);
+ case TypesPackage.TYPE_DOUBLE:
+ return validateTypeDouble((TypeDouble) value, diagnostics, context);
+ case TypesPackage.TYPE_FLOAT:
+ return validateTypeFloat((TypeFloat) value, diagnostics, context);
+ case TypesPackage.TYPE_INTEGER:
+ return validateTypeInteger((TypeInteger) value, diagnostics, context);
+ case TypesPackage.TYPE_LONG:
+ return validateTypeLong((TypeLong) value, diagnostics, context);
+ case TypesPackage.TYPE_SHORT:
+ return validateTypeShort((TypeShort) value, diagnostics, context);
+ case TypesPackage.TYPE_STRING:
+ return validateTypeString((TypeString) value, diagnostics, context);
+ case TypesPackage.EGENERATOR_ADAPTER_FACTORY:
+ return validateEGeneratorAdapterFactory((GeneratorAdapterFactory) value, diagnostics, context);
+ case TypesPackage.SET:
+ return validateSet((Set<?>) value, diagnostics, context);
+ case TypesPackage.LIST:
+ return validateList((List<?>) value, diagnostics, context);
+ case TypesPackage.COLLECTION:
+ return validateCollection((Collection<?>) value, diagnostics, context);
+ case TypesPackage.URI:
+ return validateURI((URI) value, diagnostics, context);
+ default:
+ return true;
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateTypeElement(TypeElement typeElement, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(typeElement, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateType(Type type, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return validate_EveryDefaultConstraint(type, diagnostics, context);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateTypeObject(TypeObject typeObject, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(typeObject, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(typeObject, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(typeObject, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(typeObject, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(typeObject, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(typeObject, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(typeObject, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateTypeObject_ValidValue(typeObject, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * Validates the ValidValue constraint of '<em>Type Object</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validateTypeObject_ValidValue(TypeObject typeObject, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (typeObject.getValue() == null) {
+ return true;
+ }
+ // Valid Value
+ if (ValidationHelper.isValidClass(typeObject, typeObject.getType(), typeObject.getValue().getClass().getName(), context) == false) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "ValidValue", getObjectLabel(typeObject, context), NLS.bind("Type mismatch ''{0}'' with ''{1}''", typeObject.getType().getClass().getName(), typeObject.getValue().getClass().getName()) }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { typeObject }, context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateTypeAbstractClass(TypeAbstractClass typeAbstractClass, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(typeAbstractClass, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(typeAbstractClass, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(typeAbstractClass, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(typeAbstractClass, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(typeAbstractClass, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(typeAbstractClass, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(typeAbstractClass, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateTypeAbstractClass_LoadableType(typeAbstractClass, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateTypeAbstractClass_ValidValue(typeAbstractClass, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * Validates the LoadableType constraint of '<em>Type Abstract Class</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validateTypeAbstractClass_LoadableType(TypeAbstractClass typeAbstractClass, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (typeAbstractClass.getValue() == null) {
+ return true;
+ }
+ // Loadable Value
+ if (ValidationHelper.isLoadableClass(typeAbstractClass, typeAbstractClass.getValue(), context) == false) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "LoadableType", getObjectLabel(typeAbstractClass, context), NLS.bind("Unable to load ''{0}''", typeAbstractClass.getValue()) }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { typeAbstractClass }, context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Validates the ValidValue constraint of '<em>Type Abstract Class</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean validateTypeAbstractClass_ValidValue(TypeAbstractClass typeAbstractClass, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ if (typeAbstractClass.getValue() == null) {
+ return true;
+ }
+ // Valid Value
+ if (ValidationHelper.isValidClass(typeAbstractClass, typeAbstractClass.getType(), typeAbstractClass.getValue(), context) == false) {
+ if (diagnostics != null) {
+ diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, "_UI_EGFConstraint_diagnostic", //$NON-NLS-1$
+ new Object[] { "ValidValue", getObjectLabel(typeAbstractClass, context), NLS.bind("Type mismatch ''{0}'' with ''{1}''", typeAbstractClass.getType().getName(), typeAbstractClass.getValue()) }, //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { typeAbstractClass }, context));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateTypeCollection(TypeCollection typeCollection, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(typeCollection, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(typeCollection, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(typeCollection, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(typeCollection, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(typeCollection, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(typeCollection, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(typeCollection, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateTypeAbstractClass_LoadableType(typeCollection, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateTypeAbstractClass_ValidValue(typeCollection, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateTypeList(TypeList typeList, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(typeList, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(typeList, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(typeList, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(typeList, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(typeList, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(typeList, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(typeList, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateTypeAbstractClass_LoadableType(typeList, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateTypeAbstractClass_ValidValue(typeList, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateTypeSet(TypeSet typeSet, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(typeSet, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(typeSet, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(typeSet, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(typeSet, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(typeSet, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(typeSet, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(typeSet, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateTypeAbstractClass_LoadableType(typeSet, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateTypeAbstractClass_ValidValue(typeSet, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateTypeGeneratorAdapterFactory(TypeGeneratorAdapterFactory typeGeneratorAdapterFactory, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(typeGeneratorAdapterFactory, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(typeGeneratorAdapterFactory, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(typeGeneratorAdapterFactory, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(typeGeneratorAdapterFactory, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(typeGeneratorAdapterFactory, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(typeGeneratorAdapterFactory, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(typeGeneratorAdapterFactory, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateTypeAbstractClass_LoadableType(typeGeneratorAdapterFactory, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateTypeAbstractClass_ValidValue(typeGeneratorAdapterFactory, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateTypeMap(TypeMap typeMap, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(typeMap, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(typeMap, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(typeMap, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(typeMap, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(typeMap, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(typeMap, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(typeMap, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateTypeAbstractClass_LoadableType(typeMap, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateTypeAbstractClass_ValidValue(typeMap, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateTypeBigDecimal(TypeBigDecimal typeBigDecimal, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(typeBigDecimal, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(typeBigDecimal, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(typeBigDecimal, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(typeBigDecimal, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(typeBigDecimal, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(typeBigDecimal, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(typeBigDecimal, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateTypeObject_ValidValue(typeBigDecimal, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateTypeBigInteger(TypeBigInteger typeBigInteger, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(typeBigInteger, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(typeBigInteger, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(typeBigInteger, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(typeBigInteger, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(typeBigInteger, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(typeBigInteger, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(typeBigInteger, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateTypeObject_ValidValue(typeBigInteger, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateTypeBoolean(TypeBoolean typeBoolean, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(typeBoolean, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(typeBoolean, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(typeBoolean, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(typeBoolean, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(typeBoolean, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(typeBoolean, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(typeBoolean, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateTypeObject_ValidValue(typeBoolean, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateTypeByte(TypeByte typeByte, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(typeByte, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(typeByte, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(typeByte, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(typeByte, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(typeByte, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(typeByte, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(typeByte, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateTypeObject_ValidValue(typeByte, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateTypeCharacter(TypeCharacter typeCharacter, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(typeCharacter, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(typeCharacter, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(typeCharacter, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(typeCharacter, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(typeCharacter, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(typeCharacter, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(typeCharacter, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateTypeObject_ValidValue(typeCharacter, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateTypeDate(TypeDate typeDate, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(typeDate, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(typeDate, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(typeDate, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(typeDate, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(typeDate, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(typeDate, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(typeDate, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateTypeObject_ValidValue(typeDate, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateTypeDouble(TypeDouble typeDouble, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(typeDouble, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(typeDouble, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(typeDouble, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(typeDouble, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(typeDouble, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(typeDouble, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(typeDouble, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateTypeObject_ValidValue(typeDouble, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateTypeFloat(TypeFloat typeFloat, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(typeFloat, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(typeFloat, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(typeFloat, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(typeFloat, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(typeFloat, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(typeFloat, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(typeFloat, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateTypeObject_ValidValue(typeFloat, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateTypeInteger(TypeInteger typeInteger, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(typeInteger, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(typeInteger, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(typeInteger, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(typeInteger, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(typeInteger, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(typeInteger, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(typeInteger, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateTypeObject_ValidValue(typeInteger, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateTypeLong(TypeLong typeLong, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(typeLong, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(typeLong, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(typeLong, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(typeLong, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(typeLong, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(typeLong, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(typeLong, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateTypeObject_ValidValue(typeLong, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateTypeShort(TypeShort typeShort, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(typeShort, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(typeShort, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(typeShort, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(typeShort, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(typeShort, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(typeShort, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(typeShort, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateTypeObject_ValidValue(typeShort, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateTypeString(TypeString typeString, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ boolean result = validate_EveryMultiplicityConforms(typeString, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryDataValueConforms(typeString, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryReferenceIsContained(typeString, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryProxyResolves(typeString, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_UniqueID(typeString, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryKeyUnique(typeString, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validate_EveryMapEntryUnique(typeString, diagnostics, context);
+ if (result || diagnostics != null)
+ result &= validateTypeObject_ValidValue(typeString, diagnostics, context);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateEGeneratorAdapterFactory(GeneratorAdapterFactory eGeneratorAdapterFactory, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateURI(URI uri, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateCollection(Collection<?> collection, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateList(List<?> list, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateSet(Set<?> set, DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return true;
+ }
+
+ /**
+ * Returns the resource locator that will be used to fetch messages for this validator's diagnostics.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return EGFModelPlugin.INSTANCE;
+ }
+
+ /**
+ * If we have a context map, record this object's <code>status</code> in it
+ * so that we will know later that we have processed it and its sub-tree.
+ *
+ * @param eObject
+ * an element that we have validated
+ * @param context
+ * the context (may be <code>null</code>)
+ * @param status
+ * the element's validation status
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private void processed(EObject eObject, Map<Object, Object> context, IStatus status) {
+ if (context != null) {
+ context.put(eObject, status);
+ }
+ }
+
+ /**
+ * Determines whether we have processed this <code>eObject</code> before,
+ * by automatic recursion of the EMF Model Validation Service. This is
+ * only possible if we do, indeed, have a context.
+ *
+ * @param eObject
+ * an element to be validated (we hope not)
+ * @param context
+ * the context (may be <code>null</code>)
+ * @return <code>true</code> if the context is not <code>null</code> and
+ * the <code>eObject</code> or one of its containers has already been
+ * validated; <code>false</code>, otherwise
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean hasProcessed(EObject eObject, Map<Object, Object> context) {
+ boolean result = false;
+ if (context != null) {
+ // this is O(NlogN) but there's no helping it
+ while (eObject != null) {
+ if (context.containsKey(eObject)) {
+ result = true;
+ eObject = null;
+ } else {
+ eObject = eObject.eContainer();
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Converts a status result from the EMF validation service to diagnostics.
+ *
+ * @param status
+ * the EMF validation service's status result
+ * @param diagnostics
+ * a diagnostic chain to accumulate results on
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private void appendDiagnostics(IStatus status, DiagnosticChain diagnostics) {
+ if (status.isMultiStatus()) {
+ IStatus[] children = status.getChildren();
+ for (int i = 0; i < children.length; i++) {
+ appendDiagnostics(children[i], diagnostics);
+ }
+ } else if (status instanceof IConstraintStatus) {
+ diagnostics.add(new BasicDiagnostic(status.getSeverity(), status.getPlugin(), status.getCode(), status.getMessage(), ((IConstraintStatus) status).getResultLocus().toArray()));
+ }
+ }
+} // TypesValidator
diff --git a/org.eclipse.egf.model/model/Domain.ecd b/org.eclipse.egf.model/model/Domain.ecd
new file mode 100644
index 0000000..41b5a4b
--- /dev/null
+++ b/org.eclipse.egf.model/model/Domain.ecd
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<editmodel:ClassDiagramEditModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editmodel="editmodel.xmi" xmlns:options="options.xmi" name="Domain" size="1308,481" id="platform:/resource/org.eclipse.egf.fc/model/Domain.ecore#/" metadata="emf-1.0" initialized="true" tag="100" key="32303037303533312D313030206F72672E65636C697073652E6567662E6663">
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.2/@sourceConnections.0 //@children.1/@sourceConnections.0" name="Domain" location="60,150" size="100,30" id="platform:/resource/org.eclipse.egf.fc/model/Domain.ecore#//Domain">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <model href="Domain.ecore#//Domain"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="DomainViewpoint" location="80,50" size="179,30" id="platform:/resource/org.eclipse.egf.fc/model/Domain.ecore#//DomainViewpoint">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" autoLocated="true" source="//@children.1" target="//@children.0" targetEnd="//@children.1/@sourceConnections.0/@children.0" sourceEnd="//@children.1/@sourceConnections.0/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" name="domains" location="59,0" id="platform:/resource/org.eclipse.egf.fc/model/Domain.ecore#//DomainViewpoint/domains" multiplicityLabel="//@children.1/@sourceConnections.0/@children.0/@children.0" roleLabel="//@children.1/@sourceConnections.0/@children.0/@children.1" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name="*" location="106,129" size="6,14" anchorKind="LastPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="domains" location="126,129" size="49,14" anchorKind="LastPart"/>
+ <model href="Domain.ecore#//DomainViewpoint/domains"/>
+ </children>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="39,30" attachSource="true"/>
+ </sourceConnections>
+ <model href="Domain.ecore#//DomainViewpoint"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="DomainValue" location="239,235" size="143,30" id="platform:/resource/org.eclipse.egf.fc/model/Domain.ecore#//DomainValue">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" autoLocated="true" source="//@children.2" target="//@children.0" targetEnd="//@children.2/@sourceConnections.0/@children.0" sourceEnd="//@children.2/@sourceConnections.0/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" name="domain" location="100,20" id="platform:/resource/org.eclipse.egf.fc/model/Domain.ecore#//DomainValue/domain" multiplicityLabel="//@children.2/@sourceConnections.0/@children.0/@children.0" roleLabel="//@children.2/@sourceConnections.0/@children.0/@children.1" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name="1" location="167,177" size="7,14" anchorKind="LastPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="domain" location="167,149" size="42,14" anchorKind="LastPart"/>
+ <model href="Domain.ecore#//DomainValue/domain"/>
+ </children>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="10,0" attachSource="true"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" source="//@children.2" target="//@children.3" targetEnd="//@children.2/@sourceConnections.1/@children.1" sourceEnd="//@children.2/@sourceConnections.1/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="109,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="33,30"/>
+ </sourceConnections>
+ <model href="Domain.ecore#//DomainValue"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.2/@sourceConnections.1" name="ContextValue" location="315,105" size="304,30" id="platform:/resource/org.eclipse.egf.fc/model/FactoryComponent.ecore#//ContextValue">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <model href="FactoryComponent.ecore#//ContextValue"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="26,217" size="134,66" fontInfo="Sans-8-0" note="sur domain, il faut:

un name
un obj model"/>
+ <model href="Domain.ecore#/"/>
+ <diagramOptions xsi:type="options:ClassDiagramOptions" properties="wireOptions=3;Product=eEmf"/>
+ <boardSetting snapToGeometry="true" gridEnabled="true" gridSpacing="15,15" gridOrigin="0,0" rulerUnit="pixel" gridVisibility="false">
+ <leftRuler/>
+ <topRuler/>
+ </boardSetting>
+ <classDiagramPreferences xsi:type="editmodel:EMFClassDiagramPreference" showPopupBars="true" showConnectionHandles="true" attributeSorter="Natural" methodSorter="Natural" showClassStereotype="true" showPackageStereotype="true"/>
+</editmodel:ClassDiagramEditModel>
diff --git a/org.eclipse.egf.model/model/Domain.ecore b/org.eclipse.egf.model/model/Domain.ecore
new file mode 100644
index 0000000..3fa1224
--- /dev/null
+++ b/org.eclipse.egf.model/model/Domain.ecore
@@ -0,0 +1,39 @@
+<?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="domain"
+ nsURI="http://www.eclipse.org/egf/1.0.0/domain" nsPrefix="domain">
+ <eClassifiers xsi:type="ecore:EClass" name="DomainViewpoint" eSuperTypes="Fcore.ecore#//Viewpoint">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="domains" upperBound="-1"
+ eType="#//Domain" containment="true" resolveProxies="false"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Domain" abstract="true" eSuperTypes="Fcore.ecore#//ModelElement"/>
+ <eClassifiers xsi:type="ecore:EClass" name="DomainEPackage" eSuperTypes="#//Domain">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+ <details key="constraints" value="ValidPackage"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="ePackage" lowerBound="1"
+ eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EPackage"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="TypeDomainEPackage" eSuperTypes="Types.ecore#//TypeObject">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="domain" eType="#//DomainEPackage"
+ resolveProxies="false"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="value" eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EPackage"
+ changeable="false" volatile="true" transient="true" derived="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="DomainURI" eSuperTypes="#//Domain">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+ <details key="constraints" value="ValidURI"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="uri" lowerBound="1" eType="ecore:EDataType Types.ecore#//URI"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="TypeDomainURI" eSuperTypes="Types.ecore#//TypeObject">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+ <details key="constraints" value="ValidDomainURI"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="domain" eType="#//DomainURI"
+ resolveProxies="false"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType Types.ecore#//URI"
+ changeable="false" volatile="true" transient="true" derived="true"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/org.eclipse.egf.model/model/Domain.genmodel b/org.eclipse.egf.model/model/Domain.genmodel
new file mode 100644
index 0000000..d33df3e
--- /dev/null
+++ b/org.eclipse.egf.model/model/Domain.genmodel
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText=""
+ modelDirectory="/org.eclipse.egf.model/generated" editDirectory="/org.eclipse.egf.model.edit/generated"
+ editorDirectory="/org.eclipse.egf.model.editor/generated" modelPluginID="org.eclipse.egf.model"
+ templateDirectory="/org.eclipse.egf.model/templates" dynamicTemplates="true" modelName="Domain"
+ modelPluginClass="org.eclipse.egf.model.EGFModelPlugin" editPluginClass="org.eclipse.egf.model.edit.EGFModelEditPlugin"
+ editorPluginClass="org.eclipse.egf.model.editor.EGFModelEditorPlugin" nonNLSMarkers="true"
+ rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl.Container" codeFormatting="true"
+ testsDirectory="/org.eclipse.egf.model.tests/generated" booleanFlagsField="eFlags"
+ importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0" copyrightFields="false"
+ optimizedHasChildren="true" tableProviders="true" colorProviders="true" fontProviders="true"
+ packedEnums="true" usedGenPackages="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore Fcore.genmodel#//fcore Types.genmodel#//types">
+ <foreignModel>Domain.ecore</foreignModel>
+ <templatePluginVariables>org.eclipse.egf.model</templatePluginVariables>
+ <genPackages prefix="Domain" basePackage="org.eclipse.egf.model" resource="XMI"
+ disposableProviderFactory="true" generateExampleClass="false" dataTypeConverters="true"
+ multipleEditorPages="false" childCreationExtenders="true" contentTypeIdentifier=""
+ ecorePackage="Domain.ecore#/">
+ <genClasses ecoreClass="Domain.ecore#//DomainViewpoint">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Domain.ecore#//DomainViewpoint/domains"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="Domain.ecore#//Domain"/>
+ <genClasses ecoreClass="Domain.ecore#//DomainEPackage">
+ <genFeatures createChild="false" propertyCategory="Data" propertySortChoices="true"
+ ecoreFeature="ecore:EReference Domain.ecore#//DomainEPackage/ePackage"/>
+ </genClasses>
+ <genClasses ecoreClass="Domain.ecore#//TypeDomainEPackage">
+ <genFeatures createChild="false" propertyCategory="Domain" propertySortChoices="true"
+ ecoreFeature="ecore:EReference Domain.ecore#//TypeDomainEPackage/domain"/>
+ <genFeatures property="Readonly" createChild="false" propertyCategory="Data"
+ ecoreFeature="ecore:EReference Domain.ecore#//TypeDomainEPackage/value"/>
+ </genClasses>
+ <genClasses ecoreClass="Domain.ecore#//DomainURI">
+ <genFeatures createChild="false" propertyCategory="Data" ecoreFeature="ecore:EAttribute Domain.ecore#//DomainURI/uri"/>
+ </genClasses>
+ <genClasses ecoreClass="Domain.ecore#//TypeDomainURI">
+ <genFeatures createChild="false" propertyCategory="Domain" propertySortChoices="true"
+ ecoreFeature="ecore:EReference Domain.ecore#//TypeDomainURI/domain"/>
+ <genFeatures property="Readonly" createChild="false" propertyCategory="Data"
+ ecoreFeature="ecore:EAttribute Domain.ecore#//TypeDomainURI/value"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/org.eclipse.egf.model/model/Fcore.ecd b/org.eclipse.egf.model/model/Fcore.ecd
new file mode 100644
index 0000000..0ece063
--- /dev/null
+++ b/org.eclipse.egf.model/model/Fcore.ecd
@@ -0,0 +1,260 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<editmodel:ClassDiagramEditModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editmodel="editmodel.xmi" xmlns:options="options.xmi" name="Fcore" size="1925,594" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#/" metadata="emf-1.0" initialized="true" scrolledX="573" tag="100" key="32303037303533312D313030206F72672E65636C697073652E6567662E6D6F64656C">
+ <children xsi:type="editmodel:EnumerationEditModel" name="ContractMode" location="50,484" size="153,90" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//ContractMode">
+ <children xsi:type="editmodel:CompartmentEditModel" size="57,36">
+ <children xsi:type="editmodel:EnumerationLiteralEditModel" name="IN" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//ContractMode/IN">
+ <model href="Fcore.ecore#//ContractMode/IN"/>
+ </children>
+ <children xsi:type="editmodel:EnumerationLiteralEditModel" name="OUT" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//ContractMode/OUT">
+ <model href="Fcore.ecore#//ContractMode/OUT"/>
+ </children>
+ </children>
+ <model href="Fcore.ecore#//ContractMode"/>
+ </children>
+ <children xsi:type="editmodel:PrimitiveTypeEditModel" name="InvocationException" location="253,484" size="181,44" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//InvocationException">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <model href="Fcore.ecore#//InvocationException"/>
+ </children>
+ <children xsi:type="editmodel:PrimitiveTypeEditModel" name="IProductionContext" location="484,484" size="175,44" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//IProductionContext">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <model href="Fcore.ecore#//IProductionContext"/>
+ </children>
+ <children xsi:type="editmodel:PrimitiveTypeEditModel" name="IProgressMonitor" location="709,484" size="159,44" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//IProgressMonitor">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <model href="Fcore.ecore#//IProgressMonitor"/>
+ </children>
+ <children xsi:type="editmodel:PrimitiveTypeEditModel" name="URI" location="918,484" size="86,44" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//URI">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <model href="Fcore.ecore#//URI"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="ContractValue" location="50,358" size="155,76" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//ContractValue">
+ <children xsi:type="editmodel:CompartmentEditModel" size="132,36">
+ <children xsi:type="editmodel:AttributeEditModel" name="pluginId" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//ContractValue/pluginId">
+ <model href="Fcore.ecore#//ContractValue/pluginId"/>
+ </children>
+ <children xsi:type="editmodel:AttributeEditModel" name="value" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//ContractValue/value">
+ <model href="Fcore.ecore#//ContractValue/value"/>
+ </children>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" source="//@children.5" target="//@children.15" targetEnd="//@children.5/@sourceConnections.0/@children.1" sourceEnd="//@children.5/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="129,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="52,30"/>
+ </sourceConnections>
+ <model href="Fcore.ecore#//ContractValue"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="Viewpoint" location="1126,222" size="121,30" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//Viewpoint">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" source="//@children.6" target="//@children.14/@sourceConnections.0" targetEnd="//@children.6/@sourceConnections.0/@children.1" sourceEnd="//@children.6/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="60,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <model href="Fcore.ecore#//Viewpoint"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.18/@sourceConnections.0" name="Activity" location="450,222" size="103,86" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//Activity">
+ <children xsi:type="editmodel:CompartmentEditModel" size="80,18">
+ <children xsi:type="editmodel:AttributeEditModel" name="steps" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//Activity/steps">
+ <model href="Fcore.ecore#//Activity/steps"/>
+ </children>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="67,18">
+ <children xsi:type="editmodel:MethodEditModel" name="invoke" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//Activity/invoke">
+ <model href="Fcore.ecore#//Activity/invoke"/>
+ </children>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" source="//@children.7" target="//@children.14/@sourceConnections.0" targetEnd="//@children.7/@sourceConnections.0/@children.1" sourceEnd="//@children.7/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="51,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <model href="Fcore.ecore#//Activity"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="FactoryComponent" location="675,375" size="191,30" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//FactoryComponent">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" source="//@children.8" target="//@children.18/@sourceConnections.0" targetEnd="//@children.8/@sourceConnections.0/@children.1" sourceEnd="//@children.8/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="95,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" autoLocated="true" source="//@children.8" target="//@children.17" targetEnd="//@children.8/@sourceConnections.1/@children.1" sourceEnd="//@children.8/@sourceConnections.1/@children.0" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" name="factoryComponent" location="139,0" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//ViewpointContainer/factoryComponent" attachSource="true" multiplicityLabel="//@children.8/@sourceConnections.1/@children.0/@children.0" roleLabel="//@children.8/@sourceConnections.1/@children.0/@children.1" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name="1" location="800,354" size="7,14" anchorKind="LastPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="factoryComponent" location="821,354" size="104,14" anchorKind="LastPart"/>
+ <model href="Fcore.ecore#//ViewpointContainer/factoryComponent"/>
+ </children>
+ <children xsi:type="editmodel:AssociationEndEditModel" name="viewpointContainer" location="50,30" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//FactoryComponent/viewpointContainer" multiplicityLabel="//@children.8/@sourceConnections.1/@children.1/@children.0" roleLabel="//@children.8/@sourceConnections.1/@children.1/@children.1" aggregationKind="Composition" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name="0..1" location="785,259" size="22,14" anchorKind="LastPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="viewpointContainer" location="821,259" size="108,14" anchorKind="LastPart"/>
+ <model href="Fcore.ecore#//FactoryComponent/viewpointContainer"/>
+ </children>
+ </sourceConnections>
+ <model href="Fcore.ecore#//FactoryComponent"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="Orchestration" location="583,222" size="151,86" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//Orchestration">
+ <children xsi:type="editmodel:CompartmentEditModel" size="80,18">
+ <children xsi:type="editmodel:AttributeEditModel" name="steps" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//Orchestration/steps">
+ <model href="Fcore.ecore#//Orchestration/steps"/>
+ </children>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="67,18">
+ <children xsi:type="editmodel:MethodEditModel" name="invoke" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//Orchestration/invoke">
+ <model href="Fcore.ecore#//Orchestration/invoke"/>
+ </children>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" source="//@children.9" target="//@children.14/@sourceConnections.0" targetEnd="//@children.9/@sourceConnections.0/@children.1" sourceEnd="//@children.9/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="75,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <model href="Fcore.ecore#//Orchestration"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="Contract" location="1494,222" size="258,72" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//Contract">
+ <children xsi:type="editmodel:CompartmentEditModel" size="137,18">
+ <children xsi:type="editmodel:AttributeEditModel" name="mode" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//Contract/mode">
+ <model href="Fcore.ecore#//Contract/mode"/>
+ </children>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" source="//@children.10" target="//@children.14/@sourceConnections.0" targetEnd="//@children.10/@sourceConnections.0/@children.1" sourceEnd="//@children.10/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="129,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <model href="Fcore.ecore#//Contract"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.14/@sourceConnections.0" name="ModelElement" location="881,50" size="154,122" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//ModelElement">
+ <children xsi:type="editmodel:CompartmentEditModel" size="131,54">
+ <children xsi:type="editmodel:AttributeEditModel" name="description" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//ModelElement/description">
+ <model href="Fcore.ecore#//ModelElement/description"/>
+ </children>
+ <children xsi:type="editmodel:AttributeEditModel" name="iD" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//ModelElement/iD">
+ <model href="Fcore.ecore#//ModelElement/iD"/>
+ </children>
+ <children xsi:type="editmodel:AttributeEditModel" name="name" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//ModelElement/name">
+ <model href="Fcore.ecore#//ModelElement/name"/>
+ </children>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="128,18">
+ <children xsi:type="editmodel:MethodEditModel" name="getExternalName" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//ModelElement/getExternalName">
+ <model href="Fcore.ecore#//ModelElement/getExternalName"/>
+ </children>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <model href="Fcore.ecore#//ModelElement"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="Context" location="992,222" size="104,30" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//Context">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" source="//@children.12" target="//@children.14/@sourceConnections.0" targetEnd="//@children.12/@sourceConnections.0/@children.1" sourceEnd="//@children.12/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="52,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <model href="Fcore.ecore#//Context"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="ContractContainer" location="1277,222" size="187,30" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//ContractContainer">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" source="//@children.13" target="//@children.14/@sourceConnections.0" targetEnd="//@children.13/@sourceConnections.0/@children.1" sourceEnd="//@children.13/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="93,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <model href="Fcore.ecore#//ContractContainer"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="ContractConnector" location="50,222" size="193,30" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//ContractConnector">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.9/@sourceConnections.0 //@children.17/@sourceConnections.0 //@children.15/@sourceConnections.0 //@children.12/@sourceConnections.0 //@children.6/@sourceConnections.0 //@children.7/@sourceConnections.0 //@children.13/@sourceConnections.0 //@children.10/@sourceConnections.0 //@children.16/@sourceConnections.0" autoLocated="true" source="//@children.14" target="//@children.11" targetEnd="//@children.14/@sourceConnections.0/@children.1" sourceEnd="//@children.14/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="96,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="77,122" anchorKind="FixedAtEdge"/>
+ </sourceConnections>
+ <model href="Fcore.ecore#//ContractConnector"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.5/@sourceConnections.0" name="ContextValue" location="273,222" size="147,30" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//ContextValue">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" source="//@children.15" target="//@children.14/@sourceConnections.0" targetEnd="//@children.15/@sourceConnections.0/@children.1" sourceEnd="//@children.15/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="73,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <model href="Fcore.ecore#//ContextValue"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="Invocation" location="1782,222" size="123,86" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//Invocation">
+ <children xsi:type="editmodel:CompartmentEditModel" size="80,18">
+ <children xsi:type="editmodel:AttributeEditModel" name="steps" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//Invocation/steps">
+ <model href="Fcore.ecore#//Invocation/steps"/>
+ </children>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="67,18">
+ <children xsi:type="editmodel:MethodEditModel" name="invoke" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//Invocation/invoke">
+ <model href="Fcore.ecore#//Invocation/invoke"/>
+ </children>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" source="//@children.16" target="//@children.14/@sourceConnections.0" targetEnd="//@children.16/@sourceConnections.0/@children.1" sourceEnd="//@children.16/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="61,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <model href="Fcore.ecore#//Invocation"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.8/@sourceConnections.1" name="ViewpointContainer" location="764,222" size="198,30" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//ViewpointContainer">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" source="//@children.17" target="//@children.14/@sourceConnections.0" targetEnd="//@children.17/@sourceConnections.0/@children.1" sourceEnd="//@children.17/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="99,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <model href="Fcore.ecore#//ViewpointContainer"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="Task" location="235,358" size="258,72" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//Task">
+ <children xsi:type="editmodel:CompartmentEditModel" size="136,18">
+ <children xsi:type="editmodel:AttributeEditModel" name="taskId" id="platform:/resource/org.eclipse.egf.model/model/Fcore.ecore#//Task/taskId">
+ <model href="Fcore.ecore#//Task/taskId"/>
+ </children>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.8/@sourceConnections.0" autoLocated="true" source="//@children.18" target="//@children.7" targetEnd="//@children.18/@sourceConnections.0/@children.1" sourceEnd="//@children.18/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="129,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="51,86" anchorKind="FixedAtEdge"/>
+ </sourceConnections>
+ <model href="Fcore.ecore#//Task"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <model href="Fcore.ecore#/"/>
+ <diagramOptions xsi:type="options:ClassDiagramOptions" properties="wireOptions=1;Product=eEmf"/>
+ <boardSetting snapToGeometry="true" gridEnabled="true" gridSpacing="15,15" gridOrigin="0,0" rulerUnit="pixel" gridVisibility="false">
+ <leftRuler/>
+ <topRuler/>
+ </boardSetting>
+ <classDiagramPreferences xsi:type="editmodel:EMFClassDiagramPreference" showPopupBars="true" showConnectionHandles="true" attributeSorter="Natural" methodSorter="Natural" showClassStereotype="true" showPackageStereotype="true"/>
+</editmodel:ClassDiagramEditModel>
diff --git a/org.eclipse.egf.model/model/Fcore.ecore b/org.eclipse.egf.model/model/Fcore.ecore
new file mode 100644
index 0000000..0d20f7c
--- /dev/null
+++ b/org.eclipse.egf.model/model/Fcore.ecore
@@ -0,0 +1,239 @@
+<?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="fcore"
+ nsURI="http://www.eclipse.org/egf/1.0.0/fcore" nsPrefix="fcore">
+ <eClassifiers xsi:type="ecore:EClass" name="ModelElement" abstract="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="iD" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"
+ changeable="false" volatile="true" transient="true" unsettable="true" derived="true"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="NamedModelElement" abstract="true" eSuperTypes="#//ModelElement">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Activity" abstract="true" eSuperTypes="#//NamedModelElement">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+ <details key="constraints" value="MandatoryName ActivityCycle"/>
+ </eAnnotations>
+ <eOperations name="getContracts" upperBound="-1" eType="#//Contract"/>
+ <eOperations name="getContracts" upperBound="-1" eType="#//Contract">
+ <eParameters name="type" eType="ecore:EClass Types.ecore#//Type"/>
+ </eOperations>
+ <eOperations name="getContracts" upperBound="-1" eType="#//Contract">
+ <eParameters name="mode" eType="#//ContractMode"/>
+ </eOperations>
+ <eOperations name="getContracts" upperBound="-1" eType="#//Contract">
+ <eParameters name="type" eType="ecore:EClass Types.ecore#//Type"/>
+ <eParameters name="mode" eType="#//ContractMode"/>
+ </eOperations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="contractContainer" eType="#//ContractContainer"
+ containment="true" resolveProxies="false" eOpposite="#//ContractContainer/activity"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Contract" eSuperTypes="#//NamedModelElement">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+ <details key="constraints" value="UniqueName UselessMandatoryMode"/>
+ </eAnnotations>
+ <eOperations name="getActivity" lowerBound="1" eType="#//Activity"/>
+ <eOperations name="getContracts" upperBound="-1" eType="#//Contract"/>
+ <eOperations name="getContracts" upperBound="-1" eType="#//Contract">
+ <eParameters name="type" eType="ecore:EClass Types.ecore#//Type"/>
+ </eOperations>
+ <eOperations name="getContracts" upperBound="-1" eType="#//Contract">
+ <eParameters name="mode" eType="#//ContractMode"/>
+ </eOperations>
+ <eOperations name="getContracts" upperBound="-1" eType="#//Contract">
+ <eParameters name="type" eType="ecore:EClass Types.ecore#//Type"/>
+ <eParameters name="mode" eType="#//ContractMode"/>
+ </eOperations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="contractContainer" lowerBound="1"
+ eType="#//ContractContainer" eOpposite="#//ContractContainer/contracts"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="mandatory" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EBoolean"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="mode" eType="#//ContractMode"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="type" lowerBound="1" eType="ecore:EClass Types.ecore#//Type"
+ containment="true" resolveProxies="false"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="FactoryComponent" eSuperTypes="#//Activity">
+ <eOperations name="getInvocationContracts" upperBound="-1" eType="#//InvocationContract"/>
+ <eOperations name="getInvocationContracts" upperBound="-1" eType="#//InvocationContract">
+ <eParameters name="type" eType="ecore:EClass Types.ecore#//Type"/>
+ </eOperations>
+ <eOperations name="getInvocationContracts" upperBound="-1" eType="#//InvocationContract">
+ <eParameters name="mode" eType="#//ContractMode"/>
+ </eOperations>
+ <eOperations name="getInvocationContracts" upperBound="-1" eType="#//InvocationContract">
+ <eParameters name="type" eType="ecore:EClass Types.ecore#//Type"/>
+ <eParameters name="mode" eType="#//ContractMode"/>
+ </eOperations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="viewpointContainer" eType="#//ViewpointContainer"
+ containment="true" resolveProxies="false" eOpposite="#//ViewpointContainer/factoryComponent"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="orchestration" eType="#//Orchestration"
+ containment="true" resolveProxies="false" eOpposite="#//Orchestration/factoryComponent"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ContractContainer" eSuperTypes="#//ModelElement">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+ <details key="constraints" value="FactoryComponentContract"/>
+ </eAnnotations>
+ <eOperations name="getContracts" upperBound="-1" eType="#//Contract">
+ <eParameters name="type" eType="ecore:EClass Types.ecore#//Type"/>
+ </eOperations>
+ <eOperations name="getContracts" upperBound="-1" eType="#//Contract">
+ <eParameters name="mode" eType="#//ContractMode"/>
+ </eOperations>
+ <eOperations name="getContracts" upperBound="-1" eType="#//Contract">
+ <eParameters name="type" eType="ecore:EClass Types.ecore#//Type"/>
+ <eParameters name="mode" eType="#//ContractMode"/>
+ </eOperations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="activity" lowerBound="1"
+ eType="#//Activity" resolveProxies="false" eOpposite="#//Activity/contractContainer"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="contracts" lowerBound="1"
+ upperBound="-1" eType="#//Contract" containment="true" resolveProxies="false"
+ eOpposite="#//Contract/contractContainer"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="FactoryComponentContract" eSuperTypes="#//Contract">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+ <details key="constraints" value="UselessFactoryComponentContract OutModeIsRestricted"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="invocationContracts" upperBound="-1"
+ eType="#//InvocationContract" resolveProxies="false" eOpposite="#//InvocationContract/factoryComponentContract"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ViewpointContainer" eSuperTypes="#//ModelElement">
+ <eOperations name="getViewpoint" eType="#//Viewpoint">
+ <eParameters name="clazz">
+ <eGenericType eClassifier="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EJavaClass">
+ <eTypeArguments/>
+ </eGenericType>
+ </eParameters>
+ </eOperations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="factoryComponent" lowerBound="1"
+ eType="#//FactoryComponent" resolveProxies="false" eOpposite="#//FactoryComponent/viewpointContainer"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="viewpoints" upperBound="-1"
+ eType="#//Viewpoint" containment="true" resolveProxies="false" eOpposite="#//Viewpoint/viewpointContainer"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Viewpoint" abstract="true" eSuperTypes="#//ModelElement">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="viewpointContainer" lowerBound="1"
+ eType="#//ViewpointContainer" resolveProxies="false" eOpposite="#//ViewpointContainer/viewpoints"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Orchestration" abstract="true" eSuperTypes="#//ModelElement">
+ <eOperations name="getInvocations" upperBound="-1">
+ <eGenericType eTypeParameter="#//Orchestration/getInvocations/T"/>
+ <eTypeParameters name="T">
+ <eBounds eClassifier="#//Invocation"/>
+ </eTypeParameters>
+ </eOperations>
+ <eOperations name="getOrchestrationParameters" upperBound="-1" eType="#//OrchestrationParameter"/>
+ <eOperations name="getOrchestrationParameters" upperBound="-1" eType="#//OrchestrationParameter">
+ <eParameters name="type" eType="ecore:EClass Types.ecore#//Type"/>
+ </eOperations>
+ <eOperations name="getInvocationContracts" upperBound="-1" eType="#//InvocationContract"/>
+ <eOperations name="getInvocationContracts" upperBound="-1" eType="#//InvocationContract">
+ <eParameters name="type" eType="ecore:EClass Types.ecore#//Type"/>
+ </eOperations>
+ <eOperations name="getInvocationContracts" upperBound="-1" eType="#//InvocationContract">
+ <eParameters name="mode" eType="#//ContractMode"/>
+ </eOperations>
+ <eOperations name="getInvocationContracts" upperBound="-1" eType="#//InvocationContract">
+ <eParameters name="type" eType="ecore:EClass Types.ecore#//Type"/>
+ <eParameters name="mode" eType="#//ContractMode"/>
+ </eOperations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="factoryComponent" lowerBound="1"
+ eType="#//FactoryComponent" resolveProxies="false" eOpposite="#//FactoryComponent/orchestration"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="orchestrationParameterContainer"
+ eType="#//OrchestrationParameterContainer" containment="true" resolveProxies="false"
+ eOpposite="#//OrchestrationParameterContainer/orchestration"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="OrchestrationParameterContainer" eSuperTypes="#//ModelElement">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+ <details key="constraints" value="UselessOrchestrationParameterContainer"/>
+ </eAnnotations>
+ <eOperations name="getFactoryComponent" lowerBound="1" eType="#//FactoryComponent"/>
+ <eOperations name="getOrchestrationParameters" upperBound="-1" eType="#//OrchestrationParameter">
+ <eParameters name="type" eType="ecore:EClass Types.ecore#//Type"/>
+ </eOperations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="orchestration" lowerBound="1"
+ eType="#//Orchestration" eOpposite="#//Orchestration/orchestrationParameterContainer"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="orchestrationParameters"
+ upperBound="-1" eType="#//OrchestrationParameter" containment="true" eOpposite="#//OrchestrationParameter/orchestrationParameterContainer"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="OrchestrationParameter" eSuperTypes="#//NamedModelElement">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+ <details key="constraints" value="UselessOrchestrationParameter"/>
+ </eAnnotations>
+ <eOperations name="getFactoryComponent" lowerBound="1" eType="#//FactoryComponent"/>
+ <eOperations name="getOrchestration" lowerBound="1" eType="#//Orchestration"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="orchestrationParameterContainer"
+ lowerBound="1" eType="#//OrchestrationParameterContainer" resolveProxies="false"
+ eOpposite="#//OrchestrationParameterContainer/orchestrationParameters"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="invocationContracts" upperBound="-1"
+ eType="#//InvocationContract" resolveProxies="false" eOpposite="#//InvocationContract/orchestrationParameter"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="type" lowerBound="1" eType="ecore:EClass Types.ecore#//Type"
+ containment="true" resolveProxies="false"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Invocation" abstract="true" eSuperTypes="#//NamedModelElement">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+ <details key="constraints" value="MandatoryInvokedContract"/>
+ </eAnnotations>
+ <eOperations name="getFactoryComponent" lowerBound="1" eType="#//FactoryComponent"/>
+ <eOperations name="getInvocationContracts" upperBound="-1" eType="#//InvocationContract"/>
+ <eOperations name="getInvocationContracts" upperBound="-1" eType="#//InvocationContract">
+ <eParameters name="type" eType="ecore:EClass Types.ecore#//Type"/>
+ </eOperations>
+ <eOperations name="getInvocationContracts" upperBound="-1" eType="#//InvocationContract">
+ <eParameters name="mode" eType="#//ContractMode"/>
+ </eOperations>
+ <eOperations name="getInvocationContracts" upperBound="-1" eType="#//InvocationContract">
+ <eParameters name="type" eType="ecore:EClass Types.ecore#//Type"/>
+ <eParameters name="mode" eType="#//ContractMode"/>
+ </eOperations>
+ <eOperations name="getInvokedContracts" upperBound="-1" eType="#//Contract"/>
+ <eOperations name="getInvokedContracts" upperBound="-1" eType="#//Contract">
+ <eParameters name="type" eType="ecore:EClass Types.ecore#//Type"/>
+ </eOperations>
+ <eOperations name="getInvokedContracts" upperBound="-1" eType="#//Contract">
+ <eParameters name="mode" eType="#//ContractMode"/>
+ </eOperations>
+ <eOperations name="getInvokedContracts" upperBound="-1" eType="#//Contract">
+ <eParameters name="type" eType="ecore:EClass Types.ecore#//Type"/>
+ <eParameters name="mode" eType="#//ContractMode"/>
+ </eOperations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="invocationContractContainer"
+ eType="#//InvocationContractContainer" containment="true" resolveProxies="false"
+ eOpposite="#//InvocationContractContainer/invocation"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="invokedActivity" lowerBound="1"
+ eType="#//Activity"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="InvocationContractContainer" eSuperTypes="#//ModelElement">
+ <eOperations name="getFactoryComponent" lowerBound="1" eType="#//FactoryComponent"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="invocation" lowerBound="1"
+ eType="#//Invocation" resolveProxies="false" eOpposite="#//Invocation/invocationContractContainer"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="invocationContracts" upperBound="-1"
+ eType="#//InvocationContract" containment="true" resolveProxies="false" eOpposite="#//InvocationContract/invocationContractContainer"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="InvocationContract" eSuperTypes="#//ModelElement">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+ <details key="constraints" value="ValidInvokedContract ValidInvokedContractType ValidFactoryComponentContract ValidFactoryComponentContractType ValidOrchestrationParameter ValidOrchestrationParameterType ValidSourceInvocationContract ValidSourceInvocationContractType UselessTypeValue"/>
+ </eAnnotations>
+ <eOperations name="getFactoryComponent" lowerBound="1" eType="#//FactoryComponent"/>
+ <eOperations name="getInvocation" lowerBound="1" eType="#//Invocation"/>
+ <eOperations name="getInvokedMode" eType="#//ContractMode"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="invocationContractContainer"
+ lowerBound="1" eType="#//InvocationContractContainer" resolveProxies="false"
+ eOpposite="#//InvocationContractContainer/invocationContracts"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="factoryComponentContract"
+ eType="#//FactoryComponentContract" resolveProxies="false" eOpposite="#//FactoryComponentContract/invocationContracts"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="orchestrationParameter"
+ eType="#//OrchestrationParameter" resolveProxies="false" eOpposite="#//OrchestrationParameter/invocationContracts"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="sourceInvocationContract"
+ eType="#//InvocationContract" resolveProxies="false" eOpposite="#//InvocationContract/targetInvocationContract"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="targetInvocationContract"
+ upperBound="-1" eType="#//InvocationContract" resolveProxies="false" eOpposite="#//InvocationContract/sourceInvocationContract"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="invokedContract" lowerBound="1"
+ eType="#//Contract"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="type" eType="ecore:EClass Types.ecore#//Type"
+ containment="true" resolveProxies="false"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EEnum" name="ContractMode">
+ <eLiterals name="In" literal="In"/>
+ <eLiterals name="Out" value="1" literal="Out"/>
+ <eLiterals name="In_Out" value="2"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/org.eclipse.egf.model/model/Fcore.genmodel b/org.eclipse.egf.model/model/Fcore.genmodel
new file mode 100644
index 0000000..bd1af9a
--- /dev/null
+++ b/org.eclipse.egf.model/model/Fcore.genmodel
@@ -0,0 +1,204 @@
+<?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.egf.model/generated"
+ editDirectory="/org.eclipse.egf.model.edit/generated" editorDirectory="/org.eclipse.egf.model.editor/generated"
+ modelPluginID="org.eclipse.egf.model" templateDirectory="/org.eclipse.egf.model/templates"
+ dynamicTemplates="true" modelName="Fcore" modelPluginClass="org.eclipse.egf.model.EGFModelPlugin"
+ editPluginClass="org.eclipse.egf.model.edit.EGFModelEditPlugin" editorPluginClass="org.eclipse.egf.model.editor.EGFModelEditorPlugin"
+ nonNLSMarkers="true" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl.Container"
+ codeFormatting="true" testsDirectory="/org.eclipse.egf.model.tests/generated"
+ booleanFlagsField="eFlags" importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0"
+ copyrightFields="false" optimizedHasChildren="true" tableProviders="true" colorProviders="true"
+ fontProviders="true" packedEnums="true" usedGenPackages="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore Types.genmodel#//types">
+ <foreignModel>Fcore.ecore</foreignModel>
+ <templatePluginVariables>org.eclipse.egf.model</templatePluginVariables>
+ <genPackages prefix="Fcore" basePackage="org.eclipse.egf.model" resource="XMI" disposableProviderFactory="true"
+ generateExampleClass="false" dataTypeConverters="true" multipleEditorPages="false"
+ extensibleProviderFactory="true" contentTypeIdentifier="" fileExtensions="fcore"
+ ecorePackage="Fcore.ecore#/">
+ <genEnums typeSafeEnumCompatible="false" ecoreEnum="Fcore.ecore#//ContractMode">
+ <genEnumLiterals ecoreEnumLiteral="Fcore.ecore#//ContractMode/In"/>
+ <genEnumLiterals ecoreEnumLiteral="Fcore.ecore#//ContractMode/Out"/>
+ <genEnumLiterals ecoreEnumLiteral="Fcore.ecore#//ContractMode/In_Out"/>
+ </genEnums>
+ <genClasses image="false" ecoreClass="Fcore.ecore#//ModelElement">
+ <genFeatures property="Readonly" notify="false" createChild="false" propertyCategory="Identifier"
+ ecoreFeature="ecore:EAttribute Fcore.ecore#//ModelElement/iD"/>
+ <genFeatures createChild="false" propertyCategory="Documentation" ecoreFeature="ecore:EAttribute Fcore.ecore#//ModelElement/description"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="Fcore.ecore#//NamedModelElement">
+ <genFeatures createChild="false" propertyCategory="Identity" ecoreFeature="ecore:EAttribute Fcore.ecore#//NamedModelElement/name"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="Fcore.ecore#//Activity">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Fcore.ecore#//Activity/contractContainer"/>
+ <genOperations ecoreOperation="Fcore.ecore#//Activity/getContracts"/>
+ <genOperations ecoreOperation="Fcore.ecore#//Activity/getContracts.1">
+ <genParameters ecoreParameter="Fcore.ecore#//Activity/getContracts.1/type"/>
+ </genOperations>
+ <genOperations ecoreOperation="Fcore.ecore#//Activity/getContracts.2">
+ <genParameters ecoreParameter="Fcore.ecore#//Activity/getContracts.2/mode"/>
+ </genOperations>
+ <genOperations ecoreOperation="Fcore.ecore#//Activity/getContracts.3">
+ <genParameters ecoreParameter="Fcore.ecore#//Activity/getContracts.3/type"/>
+ <genParameters ecoreParameter="Fcore.ecore#//Activity/getContracts.3/mode"/>
+ </genOperations>
+ </genClasses>
+ <genClasses ecoreClass="Fcore.ecore#//Contract">
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference Fcore.ecore#//Contract/contractContainer"/>
+ <genFeatures createChild="false" propertyCategory="Behaviour" ecoreFeature="ecore:EAttribute Fcore.ecore#//Contract/mandatory"/>
+ <genFeatures createChild="false" propertyCategory="Behaviour" ecoreFeature="ecore:EAttribute Fcore.ecore#//Contract/mode"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Fcore.ecore#//Contract/type"/>
+ <genOperations ecoreOperation="Fcore.ecore#//Contract/getActivity"/>
+ <genOperations ecoreOperation="Fcore.ecore#//Contract/getContracts"/>
+ <genOperations ecoreOperation="Fcore.ecore#//Contract/getContracts.1">
+ <genParameters ecoreParameter="Fcore.ecore#//Contract/getContracts.1/type"/>
+ </genOperations>
+ <genOperations ecoreOperation="Fcore.ecore#//Contract/getContracts.2">
+ <genParameters ecoreParameter="Fcore.ecore#//Contract/getContracts.2/mode"/>
+ </genOperations>
+ <genOperations ecoreOperation="Fcore.ecore#//Contract/getContracts.3">
+ <genParameters ecoreParameter="Fcore.ecore#//Contract/getContracts.3/type"/>
+ <genParameters ecoreParameter="Fcore.ecore#//Contract/getContracts.3/mode"/>
+ </genOperations>
+ </genClasses>
+ <genClasses ecoreClass="Fcore.ecore#//FactoryComponent">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Fcore.ecore#//FactoryComponent/viewpointContainer"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Fcore.ecore#//FactoryComponent/orchestration"/>
+ <genOperations ecoreOperation="Fcore.ecore#//FactoryComponent/getInvocationContracts"/>
+ <genOperations ecoreOperation="Fcore.ecore#//FactoryComponent/getInvocationContracts.1">
+ <genParameters ecoreParameter="Fcore.ecore#//FactoryComponent/getInvocationContracts.1/type"/>
+ </genOperations>
+ <genOperations ecoreOperation="Fcore.ecore#//FactoryComponent/getInvocationContracts.2">
+ <genParameters ecoreParameter="Fcore.ecore#//FactoryComponent/getInvocationContracts.2/mode"/>
+ </genOperations>
+ <genOperations ecoreOperation="Fcore.ecore#//FactoryComponent/getInvocationContracts.3">
+ <genParameters ecoreParameter="Fcore.ecore#//FactoryComponent/getInvocationContracts.3/type"/>
+ <genParameters ecoreParameter="Fcore.ecore#//FactoryComponent/getInvocationContracts.3/mode"/>
+ </genOperations>
+ </genClasses>
+ <genClasses ecoreClass="Fcore.ecore#//ContractContainer">
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference Fcore.ecore#//ContractContainer/activity"/>
+ <genFeatures property="None" children="true" createChild="true" propertyCategory=""
+ ecoreFeature="ecore:EReference Fcore.ecore#//ContractContainer/contracts"/>
+ <genOperations ecoreOperation="Fcore.ecore#//ContractContainer/getContracts">
+ <genParameters ecoreParameter="Fcore.ecore#//ContractContainer/getContracts/type"/>
+ </genOperations>
+ <genOperations ecoreOperation="Fcore.ecore#//ContractContainer/getContracts.1">
+ <genParameters ecoreParameter="Fcore.ecore#//ContractContainer/getContracts.1/mode"/>
+ </genOperations>
+ <genOperations ecoreOperation="Fcore.ecore#//ContractContainer/getContracts.2">
+ <genParameters ecoreParameter="Fcore.ecore#//ContractContainer/getContracts.2/type"/>
+ <genParameters ecoreParameter="Fcore.ecore#//ContractContainer/getContracts.2/mode"/>
+ </genOperations>
+ </genClasses>
+ <genClasses ecoreClass="Fcore.ecore#//FactoryComponentContract">
+ <genFeatures createChild="false" propertyCategory="Invocation Contracts" propertySortChoices="true"
+ ecoreFeature="ecore:EReference Fcore.ecore#//FactoryComponentContract/invocationContracts"/>
+ </genClasses>
+ <genClasses ecoreClass="Fcore.ecore#//ViewpointContainer">
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference Fcore.ecore#//ViewpointContainer/factoryComponent"/>
+ <genFeatures property="None" children="true" createChild="true" propertyCategory=""
+ ecoreFeature="ecore:EReference Fcore.ecore#//ViewpointContainer/viewpoints"/>
+ <genOperations ecoreOperation="Fcore.ecore#//ViewpointContainer/getViewpoint">
+ <genParameters ecoreParameter="Fcore.ecore#//ViewpointContainer/getViewpoint/clazz"/>
+ </genOperations>
+ </genClasses>
+ <genClasses image="false" ecoreClass="Fcore.ecore#//Viewpoint">
+ <genFeatures property="None" notify="false" createChild="false" propertyCategory=""
+ ecoreFeature="ecore:EReference Fcore.ecore#//Viewpoint/viewpointContainer"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="Fcore.ecore#//Orchestration">
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference Fcore.ecore#//Orchestration/factoryComponent"/>
+ <genFeatures property="None" children="true" createChild="true" propertyCategory=""
+ ecoreFeature="ecore:EReference Fcore.ecore#//Orchestration/orchestrationParameterContainer"/>
+ <genOperations ecoreOperation="Fcore.ecore#//Orchestration/getInvocations">
+ <genTypeParameters ecoreTypeParameter="Fcore.ecore#//Orchestration/getInvocations/T"/>
+ </genOperations>
+ <genOperations ecoreOperation="Fcore.ecore#//Orchestration/getOrchestrationParameters"/>
+ <genOperations ecoreOperation="Fcore.ecore#//Orchestration/getOrchestrationParameters.1">
+ <genParameters ecoreParameter="Fcore.ecore#//Orchestration/getOrchestrationParameters.1/type"/>
+ </genOperations>
+ <genOperations ecoreOperation="Fcore.ecore#//Orchestration/getInvocationContracts"/>
+ <genOperations ecoreOperation="Fcore.ecore#//Orchestration/getInvocationContracts.1">
+ <genParameters ecoreParameter="Fcore.ecore#//Orchestration/getInvocationContracts.1/type"/>
+ </genOperations>
+ <genOperations ecoreOperation="Fcore.ecore#//Orchestration/getInvocationContracts.2">
+ <genParameters ecoreParameter="Fcore.ecore#//Orchestration/getInvocationContracts.2/mode"/>
+ </genOperations>
+ <genOperations ecoreOperation="Fcore.ecore#//Orchestration/getInvocationContracts.3">
+ <genParameters ecoreParameter="Fcore.ecore#//Orchestration/getInvocationContracts.3/type"/>
+ <genParameters ecoreParameter="Fcore.ecore#//Orchestration/getInvocationContracts.3/mode"/>
+ </genOperations>
+ </genClasses>
+ <genClasses ecoreClass="Fcore.ecore#//OrchestrationParameterContainer">
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference Fcore.ecore#//OrchestrationParameterContainer/orchestration"/>
+ <genFeatures property="None" children="true" createChild="true" propertyCategory=""
+ ecoreFeature="ecore:EReference Fcore.ecore#//OrchestrationParameterContainer/orchestrationParameters"/>
+ <genOperations ecoreOperation="Fcore.ecore#//OrchestrationParameterContainer/getFactoryComponent"/>
+ <genOperations ecoreOperation="Fcore.ecore#//OrchestrationParameterContainer/getOrchestrationParameters">
+ <genParameters ecoreParameter="Fcore.ecore#//OrchestrationParameterContainer/getOrchestrationParameters/type"/>
+ </genOperations>
+ </genClasses>
+ <genClasses ecoreClass="Fcore.ecore#//OrchestrationParameter">
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference Fcore.ecore#//OrchestrationParameter/orchestrationParameterContainer"/>
+ <genFeatures createChild="false" propertyCategory="Invocation Contracts" propertySortChoices="true"
+ ecoreFeature="ecore:EReference Fcore.ecore#//OrchestrationParameter/invocationContracts"/>
+ <genFeatures property="None" children="true" createChild="true" propertyCategory=""
+ ecoreFeature="ecore:EReference Fcore.ecore#//OrchestrationParameter/type"/>
+ <genOperations ecoreOperation="Fcore.ecore#//OrchestrationParameter/getFactoryComponent"/>
+ <genOperations ecoreOperation="Fcore.ecore#//OrchestrationParameter/getOrchestration"/>
+ </genClasses>
+ <genClasses ecoreClass="Fcore.ecore#//Invocation">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Fcore.ecore#//Invocation/invocationContractContainer"/>
+ <genFeatures createChild="false" propertyCategory="Activity" propertySortChoices="true"
+ ecoreFeature="ecore:EReference Fcore.ecore#//Invocation/invokedActivity"/>
+ <genOperations ecoreOperation="Fcore.ecore#//Invocation/getFactoryComponent"/>
+ <genOperations ecoreOperation="Fcore.ecore#//Invocation/getInvocationContracts"/>
+ <genOperations ecoreOperation="Fcore.ecore#//Invocation/getInvocationContracts.1">
+ <genParameters ecoreParameter="Fcore.ecore#//Invocation/getInvocationContracts.1/type"/>
+ </genOperations>
+ <genOperations ecoreOperation="Fcore.ecore#//Invocation/getInvocationContracts.2">
+ <genParameters ecoreParameter="Fcore.ecore#//Invocation/getInvocationContracts.2/mode"/>
+ </genOperations>
+ <genOperations ecoreOperation="Fcore.ecore#//Invocation/getInvocationContracts.3">
+ <genParameters ecoreParameter="Fcore.ecore#//Invocation/getInvocationContracts.3/type"/>
+ <genParameters ecoreParameter="Fcore.ecore#//Invocation/getInvocationContracts.3/mode"/>
+ </genOperations>
+ <genOperations ecoreOperation="Fcore.ecore#//Invocation/getInvokedContracts"/>
+ <genOperations ecoreOperation="Fcore.ecore#//Invocation/getInvokedContracts.1">
+ <genParameters ecoreParameter="Fcore.ecore#//Invocation/getInvokedContracts.1/type"/>
+ </genOperations>
+ <genOperations ecoreOperation="Fcore.ecore#//Invocation/getInvokedContracts.2">
+ <genParameters ecoreParameter="Fcore.ecore#//Invocation/getInvokedContracts.2/mode"/>
+ </genOperations>
+ <genOperations ecoreOperation="Fcore.ecore#//Invocation/getInvokedContracts.3">
+ <genParameters ecoreParameter="Fcore.ecore#//Invocation/getInvokedContracts.3/type"/>
+ <genParameters ecoreParameter="Fcore.ecore#//Invocation/getInvokedContracts.3/mode"/>
+ </genOperations>
+ </genClasses>
+ <genClasses ecoreClass="Fcore.ecore#//InvocationContractContainer">
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference Fcore.ecore#//InvocationContractContainer/invocation"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Fcore.ecore#//InvocationContractContainer/invocationContracts"/>
+ <genOperations ecoreOperation="Fcore.ecore#//InvocationContractContainer/getFactoryComponent"/>
+ </genClasses>
+ <genClasses ecoreClass="Fcore.ecore#//InvocationContract">
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference Fcore.ecore#//InvocationContract/invocationContractContainer"/>
+ <genFeatures createChild="false" propertyCategory="Factory Component" propertySortChoices="true"
+ ecoreFeature="ecore:EReference Fcore.ecore#//InvocationContract/factoryComponentContract"/>
+ <genFeatures createChild="false" propertyCategory="Orchestration" propertySortChoices="true"
+ ecoreFeature="ecore:EReference Fcore.ecore#//InvocationContract/orchestrationParameter"/>
+ <genFeatures createChild="false" propertyCategory="Connector" propertySortChoices="true"
+ ecoreFeature="ecore:EReference Fcore.ecore#//InvocationContract/sourceInvocationContract"/>
+ <genFeatures createChild="false" propertyCategory="Connector" propertySortChoices="true"
+ ecoreFeature="ecore:EReference Fcore.ecore#//InvocationContract/targetInvocationContract"/>
+ <genFeatures createChild="false" propertyCategory="Behaviour" propertySortChoices="true"
+ ecoreFeature="ecore:EReference Fcore.ecore#//InvocationContract/invokedContract"/>
+ <genFeatures property="None" children="true" createChild="true" propertyCategory=""
+ ecoreFeature="ecore:EReference Fcore.ecore#//InvocationContract/type"/>
+ <genOperations ecoreOperation="Fcore.ecore#//InvocationContract/getFactoryComponent"/>
+ <genOperations ecoreOperation="Fcore.ecore#//InvocationContract/getInvocation"/>
+ <genOperations ecoreOperation="Fcore.ecore#//InvocationContract/getInvokedMode"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/org.eclipse.egf.model/model/Mapping.ecore b/org.eclipse.egf.model/model/Mapping.ecore
new file mode 100644
index 0000000..8aacf26
--- /dev/null
+++ b/org.eclipse.egf.model/model/Mapping.ecore
@@ -0,0 +1,17 @@
+<?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="mapping"
+ nsURI="http://www.eclipse.org/egf/1.0.0/mapping" nsPrefix="mapping">
+ <eClassifiers xsi:type="ecore:EClass" name="MappingViewpoint" eSuperTypes="Fcore.ecore#//Viewpoint">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="mappings" upperBound="-1"
+ eType="#//MappingDomain" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Mapping" abstract="true" eSuperTypes="Fcore.ecore#//NamedModelElement"/>
+ <eClassifiers xsi:type="ecore:EClass" name="MappingDomain" eSuperTypes="#//Mapping">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="source" lowerBound="1"
+ eType="ecore:EClass Domain.ecore#//Domain" resolveProxies="false"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="target" lowerBound="1"
+ eType="ecore:EClass Domain.ecore#//Domain" resolveProxies="false"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/org.eclipse.egf.model/model/Mapping.genmodel b/org.eclipse.egf.model/model/Mapping.genmodel
new file mode 100644
index 0000000..f94146d
--- /dev/null
+++ b/org.eclipse.egf.model/model/Mapping.genmodel
@@ -0,0 +1,31 @@
+<?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.egf.model/generated"
+ editDirectory="/org.eclipse.egf.model.edit/generated" editorDirectory="/org.eclipse.egf.model.editor/generated"
+ modelPluginID="org.eclipse.egf.model" templateDirectory="/org.eclipse.egf.model/templates"
+ dynamicTemplates="true" modelName="Mapping" modelPluginClass="org.eclipse.egf.model.EGFModelPlugin"
+ editPluginClass="org.eclipse.egf.model.edit.EGFModelEditPlugin" editorPluginClass="org.eclipse.egf.model.editor.EGFModelEditorPlugin"
+ nonNLSMarkers="true" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl.Container"
+ codeFormatting="true" testsDirectory="/org.eclipse.egf.model.tests/generated"
+ booleanFlagsField="eFlags" importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0"
+ copyrightFields="false" optimizedHasChildren="true" tableProviders="true" colorProviders="true"
+ fontProviders="true" packedEnums="true" usedGenPackages="Domain.genmodel#//domain platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore Fcore.genmodel#//fcore Types.genmodel#//types">
+ <foreignModel>Mapping.ecore</foreignModel>
+ <templatePluginVariables>org.eclipse.egf.model</templatePluginVariables>
+ <genPackages prefix="Mapping" basePackage="org.eclipse.egf.model" resource="XMI"
+ disposableProviderFactory="true" generateExampleClass="false" dataTypeConverters="true"
+ multipleEditorPages="false" childCreationExtenders="true" contentTypeIdentifier=""
+ ecorePackage="Mapping.ecore#/">
+ <genClasses ecoreClass="Mapping.ecore#//MappingViewpoint">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Mapping.ecore#//MappingViewpoint/mappings"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="Mapping.ecore#//Mapping"/>
+ <genClasses ecoreClass="Mapping.ecore#//MappingDomain">
+ <genFeatures createChild="false" propertyCategory="Connector" propertySortChoices="true"
+ ecoreFeature="ecore:EReference Mapping.ecore#//MappingDomain/source"/>
+ <genFeatures createChild="false" propertyCategory="Connector" propertySortChoices="true"
+ ecoreFeature="ecore:EReference Mapping.ecore#//MappingDomain/target"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/org.eclipse.egf.model/model/Pattern.ecd b/org.eclipse.egf.model/model/Pattern.ecd
new file mode 100644
index 0000000..19951c2
--- /dev/null
+++ b/org.eclipse.egf.model/model/Pattern.ecd
@@ -0,0 +1,356 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<editmodel:ClassDiagramEditModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editmodel="editmodel.xmi" xmlns:options="options.xmi" name="Pattern" size="1488,791" id="platform:/resource/org.eclipse.egf.fc/model/Pattern.ecore#/" metadata="emf-1.0" initialized="true" scrolledY="-125" tag="100" key="32303037303533312D313030206F72672E65636C697073652E6567662E6D6F64656C">
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.0/@sourceConnections.1 //@children.13/@sourceConnections.1" name="Pattern" location="575,140" size="258,82" id="platform:/resource/org.eclipse.egf.fc/model/Pattern.ecore#//Pattern" runTimeClassModel=" getMethod(name: EString): PatternMethod">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="90,18">
+ <children xsi:type="editmodel:MethodEditModel" name="getMethod" id="platform:/resource/org.eclipse.egf.model/model/Pattern.ecore#//Pattern/getMethod">
+ <model href="Pattern.ecore#//Pattern/getMethod"/>
+ </children>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.9/@sourceConnections.0" autoLocated="true" source="//@children.0" target="//@children.5" targetEnd="//@children.0/@sourceConnections.0/@children.1" sourceEnd="//@children.0/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="129,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="81,30" anchorKind="FixedAtEdge"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" autoLocated="true" source="//@children.0" target="//@children.0" targetEnd="//@children.0/@sourceConnections.1/@children.0" sourceEnd="//@children.0/@sourceConnections.1/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" name="superPattern" location="6,0" id="platform:/resource/org.eclipse.egf.fc/model1/Pattern.ecore#//Pattern/superPattern" anchorKind="FixedAtEdge" multiplicityLabel="//@children.0/@sourceConnections.1/@children.0/@children.0" roleLabel="//@children.0/@sourceConnections.1/@children.0/@children.1" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name="0..1" location="552,119" size="22,14" anchorKind="LastPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="superPattern" location="588,119" size="74,14" anchorKind="LastPart"/>
+ <model href="Pattern.ecore#//Pattern/superPattern"/>
+ </children>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,7" anchorKind="FixedAtEdge" attachSource="true"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" autoLocated="true" source="//@children.0" target="//@children.1" targetEnd="//@children.0/@sourceConnections.2/@children.0" sourceEnd="//@children.0/@sourceConnections.2/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" name="headerMethod" location="98,0" id="platform:/resource/org.eclipse.egf.model/model/Pattern.ecore#//Pattern/headerMethod" multiplicityLabel="//@children.0/@sourceConnections.2/@children.0/@children.0" roleLabel="//@children.0/@sourceConnections.2/@children.0/@children.1" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name="1" location="663,322" size="7,14" anchorKind="LastPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="headerMethod" location="684,322" size="81,14" anchorKind="LastPart"/>
+ <model href="Pattern.ecore#//Pattern/headerMethod"/>
+ </children>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="87,82" attachSource="true"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" autoLocated="true" source="//@children.0" target="//@children.10" targetEnd="//@children.0/@sourceConnections.3/@children.0" sourceEnd="//@children.0/@sourceConnections.3/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" name="parameters" location="90,59" id="platform:/resource/org.eclipse.egf.model/model/Pattern.ecore#//Pattern/parameters" multiplicityLabel="//@children.0/@sourceConnections.3/@children.0/@children.0" roleLabel="//@children.0/@sourceConnections.3/@children.0/@children.1" aggregationKind="Composition" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name="*" location="707,-21" size="6,14" anchorKind="LastPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="parameters" location="727,-21" size="67,14" anchorKind="LastPart"/>
+ <model href="Pattern.ecore#//Pattern/parameters"/>
+ </children>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="145,0" attachSource="true"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" source="//@children.0" target="//@children.1" targetEnd="//@children.0/@sourceConnections.4/@children.0" sourceEnd="//@children.0/@sourceConnections.4/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" name="footerMethod" location="186,0" id="platform:/resource/org.eclipse.egf.model/model/Pattern.ecore#//Pattern/footerMethod" multiplicityLabel="//@children.0/@sourceConnections.4/@children.0/@children.0" roleLabel="//@children.0/@sourceConnections.4/@children.0/@children.1" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name="1" location="751,322" size="7,14" anchorKind="LastPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="footerMethod" location="772,350" size="75,14" anchorKind="LastPart"/>
+ <model href="Pattern.ecore#//Pattern/footerMethod"/>
+ </children>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="201,82" attachSource="true"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" source="//@children.0" target="//@children.7" targetEnd="//@children.0/@sourceConnections.5/@children.1" sourceEnd="//@children.0/@sourceConnections.5/@children.0" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" name="pattern" location="258,60" id="platform:/resource/org.eclipse.egf.model/model/Pattern.ecore#//Call/pattern" attachSource="true" multiplicityLabel="//@children.0/@sourceConnections.5/@children.0/@children.0" roleLabel="//@children.0/@sourceConnections.5/@children.0/@children.1" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name="1" location="840,207" size="7,14" anchorKind="FirstPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="pattern" location="805,149" size="41,14" automaticRelocationAllowed="false" locationOnWireFromSource="-136.0" distanceFromWire="43.99999999999996" anchorKind="FirstPart"/>
+ <model href="Pattern.ecore#//Call/pattern"/>
+ </children>
+ <children xsi:type="editmodel:AssociationEndEditModel" name="orchestration" location="31,0" id="platform:/resource/org.eclipse.egf.model/model/Pattern.ecore#//Pattern/orchestration" multiplicityLabel="//@children.0/@sourceConnections.5/@children.1/@children.0" roleLabel="//@children.0/@sourceConnections.5/@children.1/@children.1" aggregationKind="Composition" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name="*" location="1076,249" size="6,14" anchorKind="LastPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="orchestration" location="1096,249" size="76,14" anchorKind="LastPart"/>
+ <model href="Pattern.ecore#//Pattern/orchestration"/>
+ </children>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" source="//@children.0" target="//@children.1" targetEnd="//@children.0/@sourceConnections.6/@children.0" sourceEnd="//@children.0/@sourceConnections.6/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" name="methods" location="27,0" id="platform:/resource/org.eclipse.egf.model/model/Pattern.ecore#//Pattern/methods" multiplicityLabel="//@children.0/@sourceConnections.6/@children.0/@children.0" roleLabel="//@children.0/@sourceConnections.6/@children.0/@children.1" aggregationKind="Composition" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name="*" location="593,322" size="6,14" anchorKind="LastPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="methods" location="613,322" size="50,14" anchorKind="LastPart"/>
+ <model href="Pattern.ecore#//Pattern/methods"/>
+ </children>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="16,82" attachSource="true"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" autoLocated="true" source="//@children.0" target="//@children.12" targetEnd="//@children.0/@sourceConnections.7/@children.1" sourceEnd="//@children.0/@sourceConnections.7/@children.0" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="258,38" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" name="variables" location="0,28" id="platform:/resource/org.eclipse.egf.model/model/Pattern.ecore#//Pattern/variables" multiplicityLabel="//@children.0/@sourceConnections.7/@children.1/@children.1" roleLabel="//@children.0/@sourceConnections.7/@children.1/@children.0" aggregationKind="Composition" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name="variables" location="1231,157" size="52,14" anchorKind="LastPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="*" location="1277,185" size="6,14" anchorKind="LastPart"/>
+ <model href="Pattern.ecore#//Pattern/variables"/>
+ </children>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" source="//@children.0" target="//@children.1" targetEnd="//@children.0/@sourceConnections.8/@children.0" sourceEnd="//@children.0/@sourceConnections.8/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" name="initMethod" location="143,0" id="platform:/resource/org.eclipse.egf.model/model/Pattern.ecore#//Pattern/initMethod" multiplicityLabel="//@children.0/@sourceConnections.8/@children.0/@children.0" roleLabel="//@children.0/@sourceConnections.8/@children.0/@children.1" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name="1" location="708,322" size="7,14" anchorKind="LastPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="initMethod" location="729,322" size="58,14" anchorKind="LastPart"/>
+ <model href="Pattern.ecore#//Pattern/initMethod"/>
+ </children>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="132,82" attachSource="true"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" source="//@children.0" target="//@children.6" targetEnd="//@children.0/@sourceConnections.9/@children.1" sourceEnd="//@children.0/@sourceConnections.9/@children.0" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="46,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" name="nature" location="111,30" id="platform:/resource/org.eclipse.egf.fc/model/Pattern.ecore#//Pattern/nature" multiplicityLabel="//@children.0/@sourceConnections.9/@children.1/@children.1" roleLabel="//@children.0/@sourceConnections.9/@children.1/@children.0" aggregationKind="Composition" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name="nature" location="628,82" size="37,14" anchorKind="LastPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="1" location="607,82" size="7,14" anchorKind="LastPart"/>
+ <model href="Pattern.ecore#//Pattern/nature"/>
+ </children>
+ </sourceConnections>
+ <model href="Pattern.ecore#//Pattern"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.0/@sourceConnections.2 //@children.0/@sourceConnections.6 //@children.0/@sourceConnections.4 //@children.8/@sourceConnections.1 //@children.0/@sourceConnections.8" name="PatternMethod" location="564,343" size="186,58" id="platform:/resource/org.eclipse.egf.fc/model/Pattern.ecore#//PatternMethod" runTimeClassModel="patternFilePath">
+ <children xsi:type="editmodel:CompartmentEditModel" size="163,18">
+ <children xsi:type="editmodel:AttributeEditModel" name="patternFilePath" id="platform:/resource/org.eclipse.egf.model/model/Pattern.ecore#//PatternMethod/patternFilePath">
+ <model href="Pattern.ecore#//PatternMethod/patternFilePath"/>
+ </children>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <model href="Pattern.ecore#//PatternMethod"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="20,435" size="414,42" fontInfo="Sans-8-0" note="allMethods contient toutes les methodes, sans notion d'ordre
Et ça permet d'avoir une eopposite sur tous les obj"/>
+ <children xsi:type="editmodel:NotepadEditModel" location="20,480" size="465,42" fontInfo="Sans-8-0" note="Dépendances entre pattern: ça se calcule en regardant le corps du pattern
"/>
+ <children xsi:type="editmodel:NotepadEditModel" location="20,486" size="805,122" fontInfo="Sans-8-0" note="Runner possède la logique pour assembler et executer un pattern:
ajouter ce qui va bien pour le support des parametres /conditions, du patternReporter et plus si affinités

Donc une sous classe par techno, et chaque techno doit fournir sa nature, 
ie une sous classe qui portera les info spécifiques requises par la techno

"/>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.0/@sourceConnections.0 //@children.9/@sourceConnections.1" name="PatternElement" location="765,0" size="163,30" id="platform:/resource/org.eclipse.egf.fc/model1/Pattern.ecore#//PatternElement" runTimeClassModel="">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <model href="Pattern.ecore#//PatternElement"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.0/@sourceConnections.9" name="PatternNature" location="510,45" size="153,30" id="platform:/resource/org.eclipse.egf.fc/model/Pattern.ecore#//PatternNature" runTimeClassModel="">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <model href="Pattern.ecore#//PatternNature"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.8/@sourceConnections.0 //@children.0/@sourceConnections.5" name="Call" location="1058,270" size="70,30" id="platform:/resource/org.eclipse.egf.model/model/Pattern.ecore#//Call" runTimeClassModel="">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <model href="Pattern.ecore#//Call"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="MethodCall" location="912,357" size="129,30" id="platform:/resource/org.eclipse.egf.model/model/Pattern.ecore#//MethodCall" runTimeClassModel="">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.13/@sourceConnections.0" autoLocated="true" source="//@children.8" target="//@children.7" targetEnd="//@children.8/@sourceConnections.0/@children.1" sourceEnd="//@children.8/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="64,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="35,30" anchorKind="FixedAtEdge"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" autoLocated="true" source="//@children.8" target="//@children.1" targetEnd="//@children.8/@sourceConnections.1/@children.0" sourceEnd="//@children.8/@sourceConnections.1/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" name="called" location="186,29" id="platform:/resource/org.eclipse.egf.model/model/Pattern.ecore#//MethodCall/called" multiplicityLabel="//@children.8/@sourceConnections.1/@children.0/@children.0" roleLabel="//@children.8/@sourceConnections.1/@children.0/@children.1" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name="1" location="772,379" size="7,14" anchorKind="LastPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="called" location="772,351" size="33,14" anchorKind="LastPart"/>
+ <model href="Pattern.ecore#//MethodCall/called"/>
+ </children>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,15" attachSource="true"/>
+ </sourceConnections>
+ <model href="Pattern.ecore#//MethodCall"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="PatternLibrary" location="960,135" size="155,30" id="platform:/resource/org.eclipse.egf.model/model/Pattern.ecore#//PatternLibrary" runTimeClassModel="">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" source="//@children.9" target="//@children.0/@sourceConnections.0" targetEnd="//@children.9/@sourceConnections.0/@children.1" sourceEnd="//@children.9/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="77,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="158,30"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" source="//@children.9" target="//@children.5" targetEnd="//@children.9/@sourceConnections.1/@children.1" sourceEnd="//@children.9/@sourceConnections.1/@children.0" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" name="container" location="96,0" id="platform:/resource/org.eclipse.egf.model/model/Pattern.ecore#//PatternElement/container" attachSource="true" multiplicityLabel="//@children.9/@sourceConnections.1/@children.0/@children.0" roleLabel="//@children.9/@sourceConnections.1/@children.0/@children.1" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name="0..1" location="1027,114" size="22,14" anchorKind="FirstPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="container" location="1063,114" size="53,14" anchorKind="FirstPart"/>
+ <model href="Pattern.ecore#//PatternElement/container"/>
+ </children>
+ <children xsi:type="editmodel:AssociationEndEditModel" name="elements" location="163,17" id="platform:/resource/org.eclipse.egf.model/model/Pattern.ecore#//PatternLibrary/elements" multiplicityLabel="//@children.9/@sourceConnections.1/@children.1/@children.0" roleLabel="//@children.9/@sourceConnections.1/@children.1/@children.1" aggregationKind="Composition" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name="*" location="935,24" size="6,14" anchorKind="LastPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="elements" location="935,-4" size="53,14" anchorKind="LastPart"/>
+ <model href="Pattern.ecore#//PatternLibrary/elements"/>
+ </children>
+ </sourceConnections>
+ <model href="Pattern.ecore#//PatternLibrary"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.0/@sourceConnections.3 //@children.23/@sourceConnections.0" name="PatternParameter" location="630,-86" size="182,58" id="platform:/resource/org.eclipse.egf.model/model/Pattern.ecore#//PatternParameter" runTimeClassModel="type">
+ <children xsi:type="editmodel:CompartmentEditModel" size="126,18">
+ <children xsi:type="editmodel:AttributeEditModel" name="type" id="platform:/resource/org.eclipse.egf.model/model/Pattern.ecore#//PatternParameter/type">
+ <model href="Pattern.ecore#//PatternParameter/type"/>
+ </children>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" autoLocated="true" source="//@children.10" target="//@children.11" targetEnd="//@children.10/@sourceConnections.0/@children.0" sourceEnd="//@children.10/@sourceConnections.0/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" name="type" location="0,29" roleLabel="//@children.10/@sourceConnections.0/@children.0/@children.0">
+ <children xsi:type="editmodel:LabelEditModel" name="type" location="881,-78" size="24,14" anchorKind="LastPart"/>
+ <model href="Pattern.ecore#//PatternParameter/type"/>
+ </children>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="182,29" attachSource="true"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" source="//@children.10" target="//@children.16" targetEnd="//@children.10/@sourceConnections.1/@children.1" sourceEnd="//@children.10/@sourceConnections.1/@children.0" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" name="parameter" location="0,30" id="platform:/resource/org.eclipse.egf.model/model/Pattern.ecore#//Query/parameter" attachSource="true" multiplicityLabel="//@children.10/@sourceConnections.1/@children.0/@children.1" roleLabel="//@children.10/@sourceConnections.1/@children.0/@children.0" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name="parameter" location="563,-77" size="60,14" anchorKind="FirstPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="1" location="616,-49" size="7,14" anchorKind="FirstPart"/>
+ <model href="Pattern.ecore#//Query/parameter"/>
+ </children>
+ <children xsi:type="editmodel:AssociationEndEditModel" name="query" location="142,0" id="platform:/resource/org.eclipse.egf.model/model/Pattern.ecore#//PatternParameter/query" multiplicityLabel="//@children.10/@sourceConnections.1/@children.1/@children.1" roleLabel="//@children.10/@sourceConnections.1/@children.1/@children.0" aggregationKind="Composition" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name="query" location="277,52" size="32,14" anchorKind="LastPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="0..1" location="323,52" size="22,14" anchorKind="LastPart"/>
+ <model href="Pattern.ecore#//PatternParameter/query"/>
+ </children>
+ </sourceConnections>
+ <model href="Pattern.ecore#//PatternParameter"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.10/@sourceConnections.0" name="EModelElement" location="912,-86" size="219,68" id="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EModelElement">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="116,18">
+ <children xsi:type="editmodel:MethodEditModel" name="getEAnnotation" id="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EModelElement/getEAnnotation">
+ <model href="../../../plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EModelElement/getEAnnotation"/>
+ </children>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <model href="../../../plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EModelElement"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.0/@sourceConnections.7 //@children.15/@sourceConnections.1 //@children.24/@sourceConnections.0" name="PatternVariable" location="1290,150" size="163,58" id="platform:/resource/org.eclipse.egf.model/model/Pattern.ecore#//PatternVariable" runTimeClassModel="type">
+ <children xsi:type="editmodel:CompartmentEditModel" size="126,18">
+ <children xsi:type="editmodel:AttributeEditModel" name="type" id="platform:/resource/org.eclipse.egf.model/model/Pattern.ecore#//PatternVariable/type">
+ <model href="Pattern.ecore#//PatternVariable/type"/>
+ </children>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <model href="Pattern.ecore#//PatternVariable"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.14/@sourceConnections.0" name="AbstractPatternCall" location="1080,357" size="195,30" id="platform:/resource/org.eclipse.egf.model/model/Pattern.ecore#//AbstractPatternCall" runTimeClassModel="">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" source="//@children.13" target="//@children.8/@sourceConnections.0" targetEnd="//@children.13/@sourceConnections.0/@children.1" sourceEnd="//@children.13/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="97,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="53,30"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" source="//@children.13" target="//@children.0" targetEnd="//@children.13/@sourceConnections.1/@children.0" sourceEnd="//@children.13/@sourceConnections.1/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" name="called" location="258,38" id="platform:/resource/org.eclipse.egf.model/model/Pattern.ecore#//AbstractPatternCall/called" multiplicityLabel="//@children.13/@sourceConnections.1/@children.0/@children.0" roleLabel="//@children.13/@sourceConnections.1/@children.0/@children.1" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name="1" location="840,185" size="7,14" anchorKind="LastPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="called" location="840,157" size="33,14" anchorKind="LastPart"/>
+ <model href="Pattern.ecore#//AbstractPatternCall/called"/>
+ </children>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="128,0" attachSource="true"/>
+ </sourceConnections>
+ <model href="Pattern.ecore#//AbstractPatternCall"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="PatternCall" location="1003,465" size="128,30" id="platform:/resource/org.eclipse.egf.model/model/Pattern.ecore#//PatternCall" runTimeClassModel="">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.15/@sourceConnections.0" autoLocated="true" source="//@children.14" target="//@children.13" targetEnd="//@children.14/@sourceConnections.0/@children.1" sourceEnd="//@children.14/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="64,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="97,30" anchorKind="FixedAtEdge"/>
+ </sourceConnections>
+ <model href="Pattern.ecore#//PatternCall"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="PatternInjectedCall" location="1209,510" size="191,30" id="platform:/resource/org.eclipse.egf.model/model/Pattern.ecore#//PatternInjectedCall" runTimeClassModel="">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" source="//@children.15" target="//@children.14/@sourceConnections.0" targetEnd="//@children.15/@sourceConnections.0/@children.1" sourceEnd="//@children.15/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="95,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="121,30"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" autoLocated="true" source="//@children.15" target="//@children.12" targetEnd="//@children.15/@sourceConnections.1/@children.0" sourceEnd="//@children.15/@sourceConnections.1/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" name="context" location="54,58" id="platform:/resource/org.eclipse.egf.model/model/Pattern.ecore#//PatternInjectedCall/context" multiplicityLabel="//@children.15/@sourceConnections.1/@children.0/@children.0" roleLabel="//@children.15/@sourceConnections.1/@children.0/@children.1" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name="1" location="1330,215" size="7,14" anchorKind="LastPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="context" location="1351,215" size="41,14" anchorKind="LastPart"/>
+ <model href="Pattern.ecore#//PatternInjectedCall/context"/>
+ </children>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="135,0" attachSource="true"/>
+ </sourceConnections>
+ <model href="Pattern.ecore#//PatternInjectedCall"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.17/@sourceConnections.0 //@children.10/@sourceConnections.1" name="Query" location="174,73" size="190,86" id="platform:/resource/org.eclipse.egf.model/model/Pattern.ecore#//QueryManager" runTimeClassModel="extensionId, getQueryContext(): EMap">
+ <children xsi:type="editmodel:CompartmentEditModel" size="167,18">
+ <children xsi:type="editmodel:AttributeEditModel" name="extensionId" id="platform:/resource/org.eclipse.egf.model/model/Pattern.ecore#//Query/delegateClass">
+ <model href="Pattern.ecore#//Query/extensionId"/>
+ </children>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="126,18">
+ <children xsi:type="editmodel:MethodEditModel" name="getQueryContext" id="platform:/resource/org.eclipse.egf.model/model/Pattern.ecore#//Query/getQueryContext">
+ <model href="Pattern.ecore#//Query/getQueryContext"/>
+ </children>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <model href="Pattern.ecore#//Query"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.20/@sourceConnections.0" name="BasicQuery" location="20,221" size="131,30" id="platform:/resource/org.eclipse.egf.model/model/Pattern.ecore#//BasicQuery" runTimeClassModel="">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.18/@sourceConnections.0 //@children.19/@sourceConnections.0" autoLocated="true" source="//@children.17" target="//@children.16" targetEnd="//@children.17/@sourceConnections.0/@children.1" sourceEnd="//@children.17/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="65,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="91,85" anchorKind="FixedAtEdge"/>
+ </sourceConnections>
+ <model href="Pattern.ecore#//BasicQuery"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.21/@sourceConnections.0" name="StringQuery" location="180,221" size="137,30" id="platform:/resource/org.eclipse.egf.model/model/Pattern.ecore#//AdvancedQuery" runTimeClassModel="">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" source="//@children.18" target="//@children.17/@sourceConnections.0" targetEnd="//@children.18/@sourceConnections.0/@children.1" sourceEnd="//@children.18/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="68,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="81,68"/>
+ </sourceConnections>
+ <model href="Pattern.ecore#//StringQuery"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="CustomQuery" location="375,221" size="150,30" id="platform:/resource/org.eclipse.egf.model/model/Pattern.ecore#//CustomQuery" runTimeClassModel="">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" source="//@children.19" target="//@children.17/@sourceConnections.0" targetEnd="//@children.19/@sourceConnections.0/@children.1" sourceEnd="//@children.19/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="75,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="153,68"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.19" target="//@children.22" targetEnd="//@children.19/@sourceConnections.1/@children.1" sourceEnd="//@children.19/@sourceConnections.1/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="74,30" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="134,0"/>
+ </sourceConnections>
+ <model href="Pattern.ecore#//CustomQuery"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="-15,299" size="201,38" fontInfo="Sans-8-0" note="retourne tous les obj d'un type
cf SolFa">
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.20" target="//@children.17" targetEnd="//@children.20/@sourceConnections.0/@children.1" sourceEnd="//@children.20/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="100,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="65,30"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="90,346" size="218,80" fontInfo="Sans-8-0" note="l'idée est d'avoir une query 
en String saisie par l'utilisateur.
Il est possible d'avoir plusieurs 
stratégies pour effectuer la query
via la class de delegation">
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.21" target="//@children.18" targetEnd="//@children.21/@sourceConnections.0/@children.1" sourceEnd="//@children.21/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="153,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="63,30"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" targetConnections="//@children.19/@sourceConnections.1" location="315,322" size="257,66" fontInfo="Sans-8-0" note="custom class, 
tout est possible !

une map pour stocker des paramètres ?"/>
+ <children xsi:type="editmodel:NotepadEditModel" location="180,-120" size="334,52" fontInfo="Sans-8-0" note="type can be:
- a java class name
- an EObject avec une valeur du type: nsURI#//EClass">
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.23" target="//@children.10" targetEnd="//@children.23/@sourceConnections.0/@children.1" sourceEnd="//@children.23/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="334,43" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,9"/>
+ </sourceConnections>
+ </children>
+ <children xsi:type="editmodel:NotepadEditModel" location="1260,117" size="177,24" fontInfo="Sans-8-0" note="'type' is a java class name">
+ <sourceConnections xsi:type="editmodel:IndicationEditModel" autoLocated="true" source="//@children.24" target="//@children.12" targetEnd="//@children.24/@sourceConnections.0/@children.1" sourceEnd="//@children.24/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="103,24" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="73,0"/>
+ </sourceConnections>
+ </children>
+ <model href="Pattern.ecore#/"/>
+ <diagramOptions xsi:type="options:ClassDiagramOptions" properties="wireOptions=0;Product=eEmf"/>
+ <boardSetting snapToGeometry="true" gridEnabled="true" gridSpacing="15,15" gridOrigin="0,0" rulerUnit="pixel" gridVisibility="false">
+ <leftRuler/>
+ <topRuler/>
+ </boardSetting>
+ <classDiagramPreferences xsi:type="editmodel:EMFClassDiagramPreference" showPopupBars="true" showConnectionHandles="true" attributeSorter="Natural" methodSorter="Natural" showClassStereotype="true" showPackageStereotype="true"/>
+</editmodel:ClassDiagramEditModel>
diff --git a/org.eclipse.egf.model/model/Pattern.ecore b/org.eclipse.egf.model/model/Pattern.ecore
new file mode 100644
index 0000000..f9eff5b
--- /dev/null
+++ b/org.eclipse.egf.model/model/Pattern.ecore
@@ -0,0 +1,174 @@
+<?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="pattern"
+ nsURI="http://www.eclipse.org/egf/1.0.0/pattern" nsPrefix="pattern">
+ <eClassifiers xsi:type="ecore:EClass" name="Pattern" eSuperTypes="#//PatternElement">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+ <details key="constraints" value="HeaderMethod FooterMethod"/>
+ </eAnnotations>
+ <eOperations name="getMethod" eType="#//PatternMethod">
+ <eParameters name="name" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ </eOperations>
+ <eOperations name="getAllParameters" upperBound="-1" eType="#//PatternParameter"/>
+ <eOperations name="getAllVariables" upperBound="-1" eType="#//PatternVariable"/>
+ <eOperations name="getAllMethods" upperBound="-1" eType="#//PatternMethod"/>
+ <eOperations name="getParameter" eType="#//PatternParameter">
+ <eParameters name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eOperations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="headerMethod" lowerBound="1"
+ eType="#//PatternMethod" resolveProxies="false"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="methods" upperBound="-1"
+ eType="#//PatternMethod" containment="true" resolveProxies="false" eOpposite="#//PatternMethod/pattern"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="footerMethod" lowerBound="1"
+ eType="#//PatternMethod" resolveProxies="false"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="superPattern" eType="#//Pattern"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="orchestration" upperBound="-1"
+ eType="#//Call" containment="true" eOpposite="#//Call/pattern"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="parameters" upperBound="-1"
+ eType="#//PatternParameter" containment="true" resolveProxies="false"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="nature" lowerBound="1"
+ eType="#//PatternNature" containment="true" resolveProxies="false"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="variables" upperBound="-1"
+ eType="#//PatternVariable" containment="true" resolveProxies="false"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="initMethod" lowerBound="1"
+ eType="#//PatternMethod" resolveProxies="false"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="PatternMethod" eSuperTypes="Fcore.ecore#//NamedModelElement">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+ <details key="constraints" value="MandatoryName"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="pattern" lowerBound="1"
+ eType="#//Pattern" resolveProxies="false" eOpposite="#//Pattern/methods"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="patternFilePath" lowerBound="1"
+ eType="ecore:EDataType Types.ecore#//URI"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="PatternParameter" eSuperTypes="Fcore.ecore#//NamedModelElement">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+ <details key="constraints" value="MandatoryName"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="query" eType="#//Query"
+ containment="true" resolveProxies="false" eOpposite="#//Query/parameter"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="PatternLibrary" eSuperTypes="#//PatternElement">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="elements" upperBound="-1"
+ eType="#//PatternElement" containment="true" resolveProxies="false" eOpposite="#//PatternElement/container"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="filters" upperBound="-1"
+ eType="#//String2PatternList" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="PatternElement" abstract="true" eSuperTypes="Fcore.ecore#//NamedModelElement">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+ <details key="constraints" value="MandatoryName"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="container" eType="#//PatternLibrary"
+ resolveProxies="false" eOpposite="#//PatternLibrary/elements"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="PatternViewpoint" eSuperTypes="Fcore.ecore#//Viewpoint">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="libraries" upperBound="-1"
+ eType="#//PatternLibrary" containment="true" resolveProxies="false"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="PatternNature" abstract="true" eSuperTypes="Fcore.ecore#//NamedModelElement">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+ <details key="constraints" value="MandatoryName"/>
+ </eAnnotations>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EDataType" name="PatternContext" instanceClassName="org.eclipse.egf.model.pattern.PatternContext"/>
+ <eClassifiers xsi:type="ecore:EDataType" name="PatternException" instanceClassName="org.eclipse.egf.model.pattern.PatternException"/>
+ <eClassifiers xsi:type="ecore:EClass" name="PatternCall" eSuperTypes="#//AbstractPatternCall">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="parameterMatching" upperBound="-1"
+ eType="#//Paramerter2ParameterMap" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="SuperCall" eSuperTypes="#//Call"/>
+ <eClassifiers xsi:type="ecore:EClass" name="Paramerter2ParameterMap" instanceClassName="java.util.Map$Entry">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="value" eType="#//PatternParameter"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="key" eType="#//PatternParameter"
+ resolveProxies="false"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Call" abstract="true" eSuperTypes="Fcore.ecore#//ModelElement">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="pattern" lowerBound="1"
+ eType="#//Pattern" eOpposite="#//Pattern/orchestration"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="MethodCall" eSuperTypes="#//Call">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="called" lowerBound="1"
+ eType="#//PatternMethod"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="PatternVariable" eSuperTypes="Fcore.ecore#//NamedModelElement">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+ <details key="constraints" value="MandatoryName"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="AbstractPatternCall" abstract="true"
+ eSuperTypes="#//Call">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="called" lowerBound="1"
+ eType="#//Pattern"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="PatternInjectedCall" eSuperTypes="#//AbstractPatternCall">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="context" lowerBound="1"
+ eType="#//PatternVariable" resolveProxies="false"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Query" abstract="true" eSuperTypes="Fcore.ecore#//ModelElement">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="parameter" lowerBound="1"
+ eType="#//PatternParameter" resolveProxies="false" eOpposite="#//PatternParameter/query"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="extensionId" lowerBound="1"
+ eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="queryContext" upperBound="-1"
+ eType="#//String2String" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="BasicQuery" eSuperTypes="#//Query"/>
+ <eClassifiers xsi:type="ecore:EClass" name="StringQuery" eSuperTypes="#//Query"/>
+ <eClassifiers xsi:type="ecore:EClass" name="CustomQuery" eSuperTypes="#//Query"/>
+ <eClassifiers xsi:type="ecore:EClass" name="String2PatternList" instanceClassName="java.util.Map$Entry">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="key" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="value" upperBound="-1"
+ eType="#//PatternElement"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="String2String" instanceClassName="java.util.Map$Entry">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="key" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="TypePatternExecutionReporter" eSuperTypes="Types.ecore#//TypeAbstractClass">
+ <eOperations name="getType" lowerBound="1">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="body" value="return org.eclipse.egf.model.pattern.PatternExecutionReporter.class;"/>
+ </eAnnotations>
+ <eGenericType eClassifier="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EJavaClass">
+ <eTypeArguments/>
+ </eGenericType>
+ </eOperations>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="BackCall" eSuperTypes="#//Call"/>
+ <eClassifiers xsi:type="ecore:EClass" name="TypePatternCallBackHandler" eSuperTypes="Types.ecore#//TypeAbstractClass">
+ <eOperations name="getType" lowerBound="1">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="body" value="return org.eclipse.egf.model.pattern.CallBackHandler.class;"/>
+ </eAnnotations>
+ <eGenericType eClassifier="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EJavaClass">
+ <eTypeArguments/>
+ </eGenericType>
+ </eOperations>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="TypePatternDomainVisitor" eSuperTypes="Types.ecore#//TypeAbstractClass">
+ <eOperations name="getType" lowerBound="1">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="body" value="return org.eclipse.egf.model.pattern.DomainVisitor.class;"/>
+ </eAnnotations>
+ <eGenericType eClassifier="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EJavaClass">
+ <eTypeArguments/>
+ </eGenericType>
+ </eOperations>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="TypePatternList" eSuperTypes="Types.ecore#//Type">
+ <eOperations name="getType" lowerBound="1">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="body" value="return org.eclipse.egf.model.pattern.TypePatternList.class;"/>
+ </eAnnotations>
+ <eGenericType eClassifier="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EJavaClass">
+ <eTypeArguments/>
+ </eGenericType>
+ </eOperations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="elements" upperBound="-1"
+ eType="#//PatternElement"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/org.eclipse.egf.model/model/Pattern.genmodel b/org.eclipse.egf.model/model/Pattern.genmodel
new file mode 100644
index 0000000..8dca15f
--- /dev/null
+++ b/org.eclipse.egf.model/model/Pattern.genmodel
@@ -0,0 +1,109 @@
+<?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.egf.model/generated"
+ editDirectory="/org.eclipse.egf.model.edit/generated" editorDirectory="/org.eclipse.egf.model.editor/generated"
+ modelPluginID="org.eclipse.egf.model" templateDirectory="/org.eclipse.egf.model/templates"
+ dynamicTemplates="true" modelName="Pattern" modelPluginClass="org.eclipse.egf.model.EGFModelPlugin"
+ editPluginClass="org.eclipse.egf.model.edit.EGFModelEditPlugin" editorPluginClass="org.eclipse.egf.model.editor.EGFModelEditorPlugin"
+ nonNLSMarkers="true" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl.Container"
+ codeFormatting="true" testsDirectory="/org.eclipse.egf.model.tests/generated"
+ booleanFlagsField="eFlags" importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0"
+ copyrightFields="false" optimizedHasChildren="true" tableProviders="true" colorProviders="true"
+ fontProviders="true" packedEnums="true" usedGenPackages="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore Fcore.genmodel#//fcore Types.genmodel#//types">
+ <foreignModel>Pattern.ecore</foreignModel>
+ <templatePluginVariables>org.eclipse.egf.model</templatePluginVariables>
+ <genPackages prefix="Pattern" basePackage="org.eclipse.egf.model" resource="XMI"
+ disposableProviderFactory="true" generateExampleClass="false" dataTypeConverters="true"
+ multipleEditorPages="false" childCreationExtenders="true" contentTypeIdentifier=""
+ ecorePackage="Pattern.ecore#/">
+ <genDataTypes ecoreDataType="Pattern.ecore#//PatternContext"/>
+ <genDataTypes ecoreDataType="Pattern.ecore#//PatternException"/>
+ <genClasses ecoreClass="Pattern.ecore#//Pattern">
+ <genFeatures createChild="false" propertyCategory="" propertySortChoices="true"
+ ecoreFeature="ecore:EReference Pattern.ecore#//Pattern/headerMethod"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Pattern.ecore#//Pattern/methods"/>
+ <genFeatures createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference Pattern.ecore#//Pattern/footerMethod"/>
+ <genFeatures createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference Pattern.ecore#//Pattern/superPattern"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EReference Pattern.ecore#//Pattern/orchestration"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Pattern.ecore#//Pattern/parameters"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Pattern.ecore#//Pattern/nature"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Pattern.ecore#//Pattern/variables"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference Pattern.ecore#//Pattern/initMethod"/>
+ <genOperations ecoreOperation="Pattern.ecore#//Pattern/getMethod">
+ <genParameters ecoreParameter="Pattern.ecore#//Pattern/getMethod/name"/>
+ </genOperations>
+ <genOperations ecoreOperation="Pattern.ecore#//Pattern/getAllParameters"/>
+ <genOperations ecoreOperation="Pattern.ecore#//Pattern/getAllVariables"/>
+ <genOperations ecoreOperation="Pattern.ecore#//Pattern/getAllMethods"/>
+ </genClasses>
+ <genClasses ecoreClass="Pattern.ecore#//PatternMethod">
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference Pattern.ecore#//PatternMethod/pattern"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Pattern.ecore#//PatternMethod/patternFilePath"/>
+ </genClasses>
+ <genClasses ecoreClass="Pattern.ecore#//PatternParameter">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EAttribute Pattern.ecore#//PatternParameter/type"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Pattern.ecore#//PatternParameter/query"/>
+ </genClasses>
+ <genClasses ecoreClass="Pattern.ecore#//PatternLibrary">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Pattern.ecore#//PatternLibrary/elements"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Pattern.ecore#//PatternLibrary/filters"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="Pattern.ecore#//PatternElement">
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference Pattern.ecore#//PatternElement/container"/>
+ </genClasses>
+ <genClasses ecoreClass="Pattern.ecore#//PatternViewpoint">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Pattern.ecore#//PatternViewpoint/libraries"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="Pattern.ecore#//PatternNature"/>
+ <genClasses ecoreClass="Pattern.ecore#//PatternCall">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference Pattern.ecore#//PatternCall/parameterMatching"/>
+ </genClasses>
+ <genClasses ecoreClass="Pattern.ecore#//SuperPatternCall"/>
+ <genClasses ecoreClass="Pattern.ecore#//Paramerter2ParameterMap">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference Pattern.ecore#//Paramerter2ParameterMap/value"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference Pattern.ecore#//Paramerter2ParameterMap/key"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="Pattern.ecore#//Call">
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference Pattern.ecore#//Call/pattern"/>
+ </genClasses>
+ <genClasses ecoreClass="Pattern.ecore#//MethodCall">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference Pattern.ecore#//MethodCall/called"/>
+ </genClasses>
+ <genClasses ecoreClass="Pattern.ecore#//PatternVariable">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Pattern.ecore#//PatternVariable/type"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="Pattern.ecore#//AbstractPatternCall">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference Pattern.ecore#//AbstractPatternCall/called"/>
+ </genClasses>
+ <genClasses ecoreClass="Pattern.ecore#//PatternInjectedCall">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference Pattern.ecore#//PatternInjectedCall/context"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="Pattern.ecore#//Query">
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference Pattern.ecore#//Query/parameter"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Pattern.ecore#//Query/extensionId"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Pattern.ecore#//Query/queryContext"/>
+ </genClasses>
+ <genClasses ecoreClass="Pattern.ecore#//BasicQuery"/>
+ <genClasses ecoreClass="Pattern.ecore#//StringQuery"/>
+ <genClasses ecoreClass="Pattern.ecore#//CustomQuery"/>
+ <genClasses ecoreClass="Pattern.ecore#//String2PatternList">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Pattern.ecore#//String2PatternList/key"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference Pattern.ecore#//String2PatternList/value"/>
+ </genClasses>
+ <genClasses ecoreClass="Pattern.ecore#//String2String">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Pattern.ecore#//String2String/key"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Pattern.ecore#//String2String/value"/>
+ </genClasses>
+ <genClasses ecoreClass="Pattern.ecore#//TypePatternExecutionReporter">
+ <genOperations ecoreOperation="Pattern.ecore#//TypePatternExecutionReporter/getType"/>
+ </genClasses>
+ <genClasses ecoreClass="Pattern.ecore#//BackCall"/>
+ <genClasses ecoreClass="Pattern.ecore#//TypePatternCallBackHandler">
+ <genOperations ecoreOperation="Pattern.ecore#//TypePatternCallBackHandler/getType"/>
+ </genClasses>
+ <genClasses ecoreClass="Pattern.ecore#//TypePatternDomainVisitor">
+ <genOperations ecoreOperation="Pattern.ecore#//TypePatternDomainVisitor/getType"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/org.eclipse.egf.model/model/Types.ecd b/org.eclipse.egf.model/model/Types.ecd
new file mode 100644
index 0000000..6dda457
--- /dev/null
+++ b/org.eclipse.egf.model/model/Types.ecd
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<editmodel:ClassDiagramEditModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editmodel="editmodel.xmi" xmlns:options="options.xmi" name="Types" size="1112,529" id="platform:/resource/org.eclipse.egf.model/model/Types.ecore#/" metadata="emf-1.0" initialized="true" scrolledY="2" tag="100" key="32303037303533312D313030206F72672E65636C697073652E6567662E6D6F64656C">
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.2/@sourceConnections.0" name="PrimitiveObjectType" location="313,344" size="198,30" id="platform:/resource/org.eclipse.egf.model/model/Types.ecore#//PrimitiveObjectType">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.6/@sourceConnections.0" autoLocated="true" source="//@children.0" target="//@children.4" targetEnd="//@children.0/@sourceConnections.0/@children.1" sourceEnd="//@children.0/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="99,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="79,86" anchorKind="FixedAtEdge"/>
+ </sourceConnections>
+ <model href="Types.ecore#//PrimitiveObjectType"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.4/@sourceConnections.0" name="TypeElement" location="415,50" size="258,108" id="platform:/resource/org.eclipse.egf.model/model/Types.ecore#//TypeElement">
+ <children xsi:type="editmodel:CompartmentEditModel" size="131,54">
+ <children xsi:type="editmodel:AttributeEditModel" name="description" id="platform:/resource/org.eclipse.egf.model/model/Types.ecore#//TypeElement/description">
+ <model href="Types.ecore#//TypeElement/description"/>
+ </children>
+ <children xsi:type="editmodel:AttributeEditModel" name="iD" id="platform:/resource/org.eclipse.egf.model/model/Types.ecore#//TypeElement/iD">
+ <model href="Types.ecore#//TypeElement/iD"/>
+ </children>
+ <children xsi:type="editmodel:AttributeEditModel" name="name" id="platform:/resource/org.eclipse.egf.model/model/Types.ecore#//TypeElement/name">
+ <model href="Types.ecore#//TypeElement/name"/>
+ </children>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <model href="Types.ecore#//TypeElement"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="BooleanType" location="50,424" size="142,30" id="platform:/resource/org.eclipse.egf.model/model/Types.ecore#//BooleanType">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.7/@sourceConnections.0" autoLocated="true" source="//@children.2" target="//@children.0" targetEnd="//@children.2/@sourceConnections.0/@children.1" sourceEnd="//@children.2/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="71,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="99,30" anchorKind="FixedAtEdge"/>
+ </sourceConnections>
+ <model href="Types.ecore#//BooleanType"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="PatternExecutionReporterType" location="378,424" size="284,30" id="platform:/resource/org.eclipse.egf.model/model/Types.ecore#//PatternExecutionReporterType">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.5/@sourceConnections.0" autoLocated="true" source="//@children.3" target="//@children.6" targetEnd="//@children.3/@sourceConnections.0/@children.1" sourceEnd="//@children.3/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="142,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="60,30" anchorKind="FixedAtEdge"/>
+ </sourceConnections>
+ <model href="Types.ecore#//PatternExecutionReporterType"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.0/@sourceConnections.0" name="Type" location="464,208" size="159,86" id="platform:/resource/org.eclipse.egf.model/model/Types.ecore#//Type">
+ <children xsi:type="editmodel:CompartmentEditModel" size="136,18">
+ <children xsi:type="editmodel:AttributeEditModel" name="typeId" id="platform:/resource/org.eclipse.egf.model/model/Types.ecore#//Type/typeId">
+ <model href="Types.ecore#//Type/typeId"/>
+ </children>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="102,18">
+ <children xsi:type="editmodel:MethodEditModel" name="newInstance" id="platform:/resource/org.eclipse.egf.model/model/Types.ecore#//Type/newInstance">
+ <model href="Types.ecore#//Type/newInstance"/>
+ </children>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" source="//@children.4" target="//@children.1" targetEnd="//@children.4/@sourceConnections.0/@children.1" sourceEnd="//@children.4/@sourceConnections.0/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="79,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="128,108"/>
+ </sourceConnections>
+ <model href="Types.ecore#//Type"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="GeneratorAdapterFactoryType" location="692,424" size="281,30" id="platform:/resource/org.eclipse.egf.model/model/Types.ecore#//GeneratorAdapterFactoryType">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" source="//@children.5" target="//@children.3/@sourceConnections.0" targetEnd="//@children.5/@sourceConnections.0/@children.1" sourceEnd="//@children.5/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="140,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <model href="Types.ecore#//GeneratorAdapterFactoryType"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.3/@sourceConnections.0" name="ClassType" location="615,344" size="121,30" id="platform:/resource/org.eclipse.egf.model/model/Types.ecore#//ClassType">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" source="//@children.6" target="//@children.0/@sourceConnections.0" targetEnd="//@children.6/@sourceConnections.0/@children.1" sourceEnd="//@children.6/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="60,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <model href="Types.ecore#//ClassType"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" name="StringType" location="222,424" size="126,30" id="platform:/resource/org.eclipse.egf.model/model/Types.ecore#//StringType">
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="0,0"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" source="//@children.7" target="//@children.2/@sourceConnections.0" targetEnd="//@children.7/@sourceConnections.0/@children.1" sourceEnd="//@children.7/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="63,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel"/>
+ </sourceConnections>
+ <model href="Types.ecore#//StringType"/>
+ <classifierPreferences xsi:type="editmodel:EMFClassDiagramClassifierPreference" showStereotype="true" attributeSorter="Natural" methodSorter="Natural"/>
+ </children>
+ <model href="Types.ecore#/"/>
+ <diagramOptions xsi:type="options:ClassDiagramOptions" properties="wireOptions=1;Product=eEmf"/>
+ <boardSetting snapToGeometry="true" gridEnabled="true" gridSpacing="15,15" gridOrigin="0,0" rulerUnit="pixel" gridVisibility="false">
+ <leftRuler/>
+ <topRuler/>
+ </boardSetting>
+ <classDiagramPreferences xsi:type="editmodel:EMFClassDiagramPreference" showPopupBars="true" showConnectionHandles="true" attributeSorter="Natural" methodSorter="Natural" showClassStereotype="true" showPackageStereotype="true"/>
+</editmodel:ClassDiagramEditModel>
diff --git a/org.eclipse.egf.model/model/Types.ecore b/org.eclipse.egf.model/model/Types.ecore
new file mode 100644
index 0000000..4ba534e
--- /dev/null
+++ b/org.eclipse.egf.model/model/Types.ecore
@@ -0,0 +1,139 @@
+<?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="types"
+ nsURI="http://www.eclipse.org/egf/1.0.0/types" nsPrefix="types">
+ <eClassifiers xsi:type="ecore:EClass" name="TypeElement" abstract="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="iD" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"
+ changeable="false" volatile="true" transient="true" unsettable="true" derived="true"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Type" abstract="true" eSuperTypes="#//TypeElement">
+ <eOperations name="getType" lowerBound="1">
+ <eGenericType eClassifier="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EJavaClass">
+ <eTypeArguments eTypeParameter="#//Type/getType/T"/>
+ </eGenericType>
+ <eTypeParameters name="T">
+ <eBounds eClassifier="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EJavaObject"/>
+ </eTypeParameters>
+ </eOperations>
+ <eOperations name="getValue" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EJavaObject"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="TypeObject" abstract="true" eSuperTypes="#//Type">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+ <details key="constraints" value="ValidValue"/>
+ </eAnnotations>
+ <eOperations name="getType" lowerBound="1">
+ <eGenericType eClassifier="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EJavaClass">
+ <eTypeArguments eTypeParameter="#//TypeObject/getType/T"/>
+ </eGenericType>
+ <eTypeParameters name="T">
+ <eBounds eClassifier="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EJavaObject"/>
+ </eTypeParameters>
+ </eOperations>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="TypeAbstractClass" abstract="true" eSuperTypes="#//Type">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+ <details key="constraints" value="LoadableType ValidValue"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="TypeCollection" eSuperTypes="#//TypeAbstractClass">
+ <eOperations name="getType" lowerBound="1">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="body" value="return java.util.Collection.class;"/>
+ </eAnnotations>
+ <eGenericType eClassifier="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EJavaClass">
+ <eTypeArguments/>
+ </eGenericType>
+ </eOperations>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="TypeList" eSuperTypes="#//TypeAbstractClass">
+ <eOperations name="getType" lowerBound="1">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="body" value="return java.util.List.class;"/>
+ </eAnnotations>
+ <eGenericType eClassifier="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EJavaClass">
+ <eTypeArguments/>
+ </eGenericType>
+ </eOperations>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="TypeSet" eSuperTypes="#//TypeAbstractClass">
+ <eOperations name="getType" lowerBound="1">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="body" value="return java.util.Set.class;"/>
+ </eAnnotations>
+ <eGenericType eClassifier="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EJavaClass">
+ <eTypeArguments/>
+ </eGenericType>
+ </eOperations>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="TypeGeneratorAdapterFactory" eSuperTypes="#//TypeAbstractClass">
+ <eOperations name="getType" lowerBound="1">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="body" value="return org.eclipse.emf.codegen.ecore.generator.GeneratorAdapterFactory.class;"/>
+ </eAnnotations>
+ <eGenericType eClassifier="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EJavaClass">
+ <eTypeArguments/>
+ </eGenericType>
+ </eOperations>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="TypeMap" eSuperTypes="#//TypeAbstractClass">
+ <eOperations name="getType" lowerBound="1">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="body" value="return java.util.Map.class;"/>
+ </eAnnotations>
+ <eGenericType eClassifier="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EJavaClass">
+ <eTypeArguments/>
+ </eGenericType>
+ </eOperations>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="TypeBigDecimal" eSuperTypes="#//TypeObject">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EBigDecimal"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="TypeBigInteger" eSuperTypes="#//TypeObject">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EBigInteger"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="TypeBoolean" eSuperTypes="#//TypeObject">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EBooleanObject"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="TypeByte" eSuperTypes="#//TypeObject">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EByteObject"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="TypeCharacter" eSuperTypes="#//TypeObject">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//ECharacterObject"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="TypeDate" eSuperTypes="#//TypeObject">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EDate"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="TypeDouble" eSuperTypes="#//TypeObject">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EDoubleObject"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="TypeFloat" eSuperTypes="#//TypeObject">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EFloatObject"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="TypeInteger" eSuperTypes="#//TypeObject">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EIntegerObject"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="TypeLong" eSuperTypes="#//TypeObject">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//ELongObject"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="TypeShort" eSuperTypes="#//TypeObject">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EShortObject"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="TypeString" eSuperTypes="#//TypeObject">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EDataType" name="EGeneratorAdapterFactory" instanceClassName="org.eclipse.emf.codegen.ecore.generator.GeneratorAdapterFactory"
+ serializable="false"/>
+ <eClassifiers xsi:type="ecore:EDataType" name="Set" instanceClassName="java.util.Set">
+ <eTypeParameters name="E"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EDataType" name="List" instanceClassName="java.util.List">
+ <eTypeParameters name="E"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EDataType" name="Collection" instanceClassName="java.util.Collection">
+ <eTypeParameters name="E"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EDataType" name="URI" instanceClassName="org.eclipse.emf.common.util.URI"/>
+</ecore:EPackage>
diff --git a/org.eclipse.egf.model/model/Types.genmodel b/org.eclipse.egf.model/model/Types.genmodel
new file mode 100644
index 0000000..137f927
--- /dev/null
+++ b/org.eclipse.egf.model/model/Types.genmodel
@@ -0,0 +1,101 @@
+<?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.egf.model/generated"
+ editDirectory="/org.eclipse.egf.model.edit/generated" editorDirectory="/org.eclipse.egf.model.editor/generated"
+ modelPluginID="org.eclipse.egf.model" templateDirectory="/org.eclipse.egf.model/templates"
+ dynamicTemplates="true" modelName="Types" modelPluginClass="org.eclipse.egf.model.EGFModelPlugin"
+ editPluginClass="org.eclipse.egf.model.edit.EGFModelEditPlugin" editorPluginClass="org.eclipse.egf.model.editor.EGFModelEditorPlugin"
+ nonNLSMarkers="true" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl.Container"
+ codeFormatting="true" testsDirectory="/org.eclipse.egf.model.tests/generated"
+ booleanFlagsField="eFlags" importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0"
+ copyrightFields="false" optimizedHasChildren="true" tableProviders="true" colorProviders="true"
+ fontProviders="true" packedEnums="true" usedGenPackages="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore">
+ <foreignModel>Types.ecore</foreignModel>
+ <templatePluginVariables>org.eclipse.egf.model</templatePluginVariables>
+ <genPackages prefix="Types" basePackage="org.eclipse.egf.model" resource="XMI" disposableProviderFactory="true"
+ generateExampleClass="false" dataTypeConverters="true" multipleEditorPages="false"
+ extensibleProviderFactory="true" contentTypeIdentifier="" ecorePackage="Types.ecore#/">
+ <genDataTypes ecoreDataType="Types.ecore#//EGeneratorAdapterFactory"/>
+ <genDataTypes ecoreDataType="Types.ecore#//Set">
+ <genTypeParameters ecoreTypeParameter="Types.ecore#//Set/E"/>
+ </genDataTypes>
+ <genDataTypes ecoreDataType="Types.ecore#//List">
+ <genTypeParameters ecoreTypeParameter="Types.ecore#//List/E"/>
+ </genDataTypes>
+ <genDataTypes ecoreDataType="Types.ecore#//Collection">
+ <genTypeParameters ecoreTypeParameter="Types.ecore#//Collection/E"/>
+ </genDataTypes>
+ <genDataTypes ecoreDataType="Types.ecore#//URI"/>
+ <genClasses image="false" ecoreClass="Types.ecore#//TypeElement">
+ <genFeatures property="Readonly" notify="false" createChild="false" propertyCategory="Identifier"
+ ecoreFeature="ecore:EAttribute Types.ecore#//TypeElement/iD"/>
+ <genFeatures createChild="false" propertyCategory="Documentation" ecoreFeature="ecore:EAttribute Types.ecore#//TypeElement/description"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="Types.ecore#//Type">
+ <genOperations ecoreOperation="Types.ecore#//Type/getType">
+ <genTypeParameters ecoreTypeParameter="Types.ecore#//Type/getType/T"/>
+ </genOperations>
+ <genOperations ecoreOperation="Types.ecore#//Type/getValue"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="Types.ecore#//TypeObject">
+ <genOperations ecoreOperation="Types.ecore#//TypeObject/getType">
+ <genTypeParameters ecoreTypeParameter="Types.ecore#//TypeObject/getType/T"/>
+ </genOperations>
+ </genClasses>
+ <genClasses image="false" ecoreClass="Types.ecore#//TypeAbstractClass">
+ <genFeatures createChild="false" propertyCategory="Data" ecoreFeature="ecore:EAttribute Types.ecore#//TypeAbstractClass/value"/>
+ </genClasses>
+ <genClasses ecoreClass="Types.ecore#//TypeCollection" labelFeature="#//types/TypeElement/iD">
+ <genOperations ecoreOperation="Types.ecore#//TypeCollection/getType"/>
+ </genClasses>
+ <genClasses ecoreClass="Types.ecore#//TypeList" labelFeature="#//types/TypeElement/iD">
+ <genOperations ecoreOperation="Types.ecore#//TypeList/getType"/>
+ </genClasses>
+ <genClasses ecoreClass="Types.ecore#//TypeSet" labelFeature="#//types/TypeElement/iD">
+ <genOperations ecoreOperation="Types.ecore#//TypeSet/getType"/>
+ </genClasses>
+ <genClasses ecoreClass="Types.ecore#//TypeGeneratorAdapterFactory" labelFeature="#//types/TypeElement/iD">
+ <genOperations ecoreOperation="Types.ecore#//TypeGeneratorAdapterFactory/getType"/>
+ </genClasses>
+ <genClasses ecoreClass="Types.ecore#//TypeMap" labelFeature="#//types/TypeElement/iD">
+ <genOperations ecoreOperation="Types.ecore#//TypeMap/getType"/>
+ </genClasses>
+ <genClasses ecoreClass="Types.ecore#//TypeBigDecimal" labelFeature="#//types/TypeElement/iD">
+ <genFeatures createChild="false" propertyCategory="Data" ecoreFeature="ecore:EAttribute Types.ecore#//TypeBigDecimal/value"/>
+ </genClasses>
+ <genClasses ecoreClass="Types.ecore#//TypeBigInteger" labelFeature="#//types/TypeElement/iD">
+ <genFeatures createChild="false" propertyCategory="Data" ecoreFeature="ecore:EAttribute Types.ecore#//TypeBigInteger/value"/>
+ </genClasses>
+ <genClasses ecoreClass="Types.ecore#//TypeBoolean" labelFeature="#//types/TypeElement/iD">
+ <genFeatures createChild="false" propertyCategory="Data" ecoreFeature="ecore:EAttribute Types.ecore#//TypeBoolean/value"/>
+ </genClasses>
+ <genClasses ecoreClass="Types.ecore#//TypeByte" labelFeature="#//types/TypeElement/iD">
+ <genFeatures createChild="false" propertyCategory="Data" ecoreFeature="ecore:EAttribute Types.ecore#//TypeByte/value"/>
+ </genClasses>
+ <genClasses ecoreClass="Types.ecore#//TypeCharacter" labelFeature="#//types/TypeElement/iD">
+ <genFeatures createChild="false" propertyCategory="Data" ecoreFeature="ecore:EAttribute Types.ecore#//TypeCharacter/value"/>
+ </genClasses>
+ <genClasses ecoreClass="Types.ecore#//TypeDate" labelFeature="#//types/TypeElement/iD">
+ <genFeatures createChild="false" propertyCategory="Data" ecoreFeature="ecore:EAttribute Types.ecore#//TypeDate/value"/>
+ </genClasses>
+ <genClasses ecoreClass="Types.ecore#//TypeDouble" labelFeature="#//types/TypeElement/iD">
+ <genFeatures createChild="false" propertyCategory="Data" ecoreFeature="ecore:EAttribute Types.ecore#//TypeDouble/value"/>
+ </genClasses>
+ <genClasses ecoreClass="Types.ecore#//TypeFloat" labelFeature="#//types/TypeElement/iD">
+ <genFeatures createChild="false" propertyCategory="Data" ecoreFeature="ecore:EAttribute Types.ecore#//TypeFloat/value"/>
+ </genClasses>
+ <genClasses ecoreClass="Types.ecore#//TypeInteger" labelFeature="#//types/TypeElement/iD">
+ <genFeatures createChild="false" propertyCategory="Data" ecoreFeature="ecore:EAttribute Types.ecore#//TypeInteger/value"/>
+ </genClasses>
+ <genClasses ecoreClass="Types.ecore#//TypeLong" labelFeature="#//types/TypeElement/iD">
+ <genFeatures createChild="false" propertyCategory="Data" ecoreFeature="ecore:EAttribute Types.ecore#//TypeLong/value"/>
+ </genClasses>
+ <genClasses ecoreClass="Types.ecore#//TypeShort" labelFeature="#//types/TypeElement/iD">
+ <genFeatures createChild="false" propertyCategory="Data" ecoreFeature="ecore:EAttribute Types.ecore#//TypeShort/value"/>
+ </genClasses>
+ <genClasses ecoreClass="Types.ecore#//TypeString" labelFeature="#//types/TypeElement/iD">
+ <genFeatures createChild="false" propertyCategory="Data" ecoreFeature="ecore:EAttribute Types.ecore#//TypeString/value"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/org.eclipse.egf.model/plugin.properties b/org.eclipse.egf.model/plugin.properties
new file mode 100644
index 0000000..c9e9474
--- /dev/null
+++ b/org.eclipse.egf.model/plugin.properties
@@ -0,0 +1,15 @@
+##
+# 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 Core Models (Incubation)
+providerName = Eclipse Modeling Project
+
+_UI_EGFConstraint_diagnostic = Constraint ''{0}'' is violated on ''{1}''. {2}.
diff --git a/org.eclipse.egf.model/plugin.xml b/org.eclipse.egf.model/plugin.xml
new file mode 100644
index 0000000..9a38276
--- /dev/null
+++ b/org.eclipse.egf.model/plugin.xml
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+
+<!--
+ 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>
+
+ <!-- ================================================================================= -->
+ <!-- Types Model -->
+ <!-- ================================================================================= -->
+
+ <extension
+ point="org.eclipse.emf.ecore.generated_package"
+ >
+ <package
+ uri="http://www.eclipse.org/egf/1.0.0/types"
+ class="org.eclipse.egf.model.types.TypesPackage"
+ genModel="model/Types.genmodel"
+ />
+ </extension>
+
+ <extension
+ point="org.eclipse.emf.ecore.extension_parser"
+ >
+ <parser
+ type="types"
+ class="org.eclipse.egf.model.types.util.TypesResourceFactoryImpl"
+ />
+ </extension>
+
+ <!-- ================================================================================= -->
+ <!-- Fcore Model -->
+ <!-- ================================================================================= -->
+
+ <extension
+ point="org.eclipse.emf.ecore.generated_package"
+ >
+ <package
+ uri="http://www.eclipse.org/egf/1.0.0/fcore"
+ class="org.eclipse.egf.model.fcore.FcorePackage"
+ genModel="model/Fcore.genmodel"
+ />
+ </extension>
+
+ <extension
+ point="org.eclipse.emf.ecore.extension_parser"
+ >
+ <parser
+ type="fcore"
+ class="org.eclipse.egf.model.fcore.util.FcoreResourceFactoryImpl"
+ />
+ </extension>
+
+ <!-- ================================================================================= -->
+ <!-- Domain Model -->
+ <!-- ================================================================================= -->
+
+ <extension
+ point="org.eclipse.emf.ecore.generated_package"
+ >
+ <package
+ uri="http://www.eclipse.org/egf/1.0.0/domain"
+ class="org.eclipse.egf.model.domain.DomainPackage"
+ genModel="model/Domain.genmodel"
+ />
+ </extension>
+
+ <extension
+ point="org.eclipse.emf.ecore.extension_parser"
+ >
+ <parser
+ type="domain"
+ class="org.eclipse.egf.model.domain.util.DomainResourceFactoryImpl"
+ />
+ </extension>
+
+ <!-- ================================================================================= -->
+ <!-- Mapping Model -->
+ <!-- ================================================================================= -->
+
+ <extension
+ point="org.eclipse.emf.ecore.generated_package"
+ >
+ <package
+ uri="http://www.eclipse.org/egf/1.0.0/mapping"
+ class="org.eclipse.egf.model.mapping.MappingPackage"
+ genModel="model/Mapping.genmodel"
+ />
+ </extension>
+
+ <extension
+ point="org.eclipse.emf.ecore.extension_parser"
+ >
+ <parser
+ type="mapping"
+ class="org.eclipse.egf.model.mapping.util.MappingResourceFactoryImpl"
+ />
+ </extension>
+
+ <!-- ================================================================================= -->
+ <!-- Pattern Model -->
+ <!-- ================================================================================= -->
+
+ <extension
+ point="org.eclipse.emf.ecore.generated_package"
+ >
+ <package
+ uri="http://www.eclipse.org/egf/1.0.0/pattern"
+ class="org.eclipse.egf.model.pattern.PatternPackage"
+ genModel="model/Pattern.genmodel"
+ />
+ </extension>
+
+ <extension
+ point="org.eclipse.emf.ecore.extension_parser"
+ >
+ <parser
+ type="pattern"
+ class="org.eclipse.egf.model.pattern.util.PatternResourceFactoryImpl"
+ />
+ </extension>
+
+</plugin>
diff --git a/org.eclipse.egf.model/src/org/eclipse/egf/model/domain/adapter/TypeDomainEPackageAdapter.java b/org.eclipse.egf.model/src/org/eclipse/egf/model/domain/adapter/TypeDomainEPackageAdapter.java
new file mode 100644
index 0000000..597e564
--- /dev/null
+++ b/org.eclipse.egf.model/src/org/eclipse/egf/model/domain/adapter/TypeDomainEPackageAdapter.java
@@ -0,0 +1,76 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.model.domain.adapter;
+
+import org.eclipse.egf.model.domain.DomainEPackage;
+import org.eclipse.egf.model.domain.DomainPackage;
+import org.eclipse.egf.model.domain.TypeDomainEPackage;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class TypeDomainEPackageAdapter extends AdapterImpl {
+
+ private TypeDomainEPackage _typeDomainEPackage;
+
+ private EStructuralFeature _domainEPackageFeature = DomainPackage.Literals.DOMAIN_EPACKAGE__EPACKAGE;
+
+ private EStructuralFeature _typeDomainEPackageFeature = DomainPackage.Literals.TYPE_DOMAIN_EPACKAGE__VALUE;
+
+ private EStructuralFeature _domainFeature = DomainPackage.Literals.TYPE_DOMAIN_EPACKAGE__DOMAIN;
+
+ private AdapterImpl _domainEPackageAdapter = new AdapterImpl() {
+ @Override
+ public void notifyChanged(Notification msg) {
+ if (msg.getEventType() == Notification.SET && msg.getFeature().equals(_domainEPackageFeature)) {
+ _typeDomainEPackage.eNotify(new ENotificationImpl((InternalEObject) _typeDomainEPackage, -1, _typeDomainEPackageFeature, null, null) {
+ @Override
+ public boolean isTouch() {
+ return true;
+ }
+ });
+ }
+ }
+ };
+
+ public TypeDomainEPackageAdapter(TypeDomainEPackage typeDomainEPackage) {
+ super();
+ _typeDomainEPackage = typeDomainEPackage;
+ _typeDomainEPackage.eAdapters().add(this);
+ }
+
+ @Override
+ public void notifyChanged(Notification notification) {
+ if (notification.getFeature() == null || notification.getFeature().equals(_domainFeature)) {
+ switch (notification.getEventType()) {
+ case Notification.SET:
+ DomainEPackage newValue = (DomainEPackage) notification.getNewValue();
+ DomainEPackage oldValue = (DomainEPackage) notification.getOldValue();
+ if (oldValue != null) {
+ oldValue.eAdapters().remove(_domainEPackageAdapter);
+ }
+ if (newValue != null && newValue.eAdapters().contains(_domainEPackageAdapter) == false) {
+ newValue.eAdapters().add(_domainEPackageAdapter);
+ }
+ break;
+ default:
+ return; // No notification
+ }
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.model/src/org/eclipse/egf/model/domain/adapter/TypeDomainURIAdapter.java b/org.eclipse.egf.model/src/org/eclipse/egf/model/domain/adapter/TypeDomainURIAdapter.java
new file mode 100644
index 0000000..e212fe0
--- /dev/null
+++ b/org.eclipse.egf.model/src/org/eclipse/egf/model/domain/adapter/TypeDomainURIAdapter.java
@@ -0,0 +1,76 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.model.domain.adapter;
+
+import org.eclipse.egf.model.domain.DomainPackage;
+import org.eclipse.egf.model.domain.DomainURI;
+import org.eclipse.egf.model.domain.TypeDomainURI;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class TypeDomainURIAdapter extends AdapterImpl {
+
+ private TypeDomainURI _typeDomainURI;
+
+ private EStructuralFeature _domainURIFeature = DomainPackage.Literals.DOMAIN_URI__URI;
+
+ private EStructuralFeature _typeDomainURIFeature = DomainPackage.Literals.TYPE_DOMAIN_URI__VALUE;
+
+ private EStructuralFeature _domainFeature = DomainPackage.Literals.TYPE_DOMAIN_URI__DOMAIN;
+
+ private AdapterImpl _domainURIAdapter = new AdapterImpl() {
+ @Override
+ public void notifyChanged(Notification msg) {
+ if (msg.getEventType() == Notification.SET && msg.getFeature().equals(_domainURIFeature)) {
+ _typeDomainURI.eNotify(new ENotificationImpl((InternalEObject) _typeDomainURI, -1, _typeDomainURIFeature, null, null) {
+ @Override
+ public boolean isTouch() {
+ return true;
+ }
+ });
+ }
+ }
+ };
+
+ public TypeDomainURIAdapter(TypeDomainURI typeDomainURI) {
+ super();
+ _typeDomainURI = typeDomainURI;
+ _typeDomainURI.eAdapters().add(this);
+ }
+
+ @Override
+ public void notifyChanged(Notification notification) {
+ if (notification.getFeature() == null || notification.getFeature().equals(_domainFeature)) {
+ switch (notification.getEventType()) {
+ case Notification.SET:
+ DomainURI newValue = (DomainURI) notification.getNewValue();
+ DomainURI oldValue = (DomainURI) notification.getOldValue();
+ if (oldValue != null) {
+ oldValue.eAdapters().remove(_domainURIAdapter);
+ }
+ if (newValue != null && newValue.eAdapters().contains(_domainURIAdapter) == false) {
+ newValue.eAdapters().add(_domainURIAdapter);
+ }
+ break;
+ default:
+ return; // No notification
+ }
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.model/src/org/eclipse/egf/model/fcore/adapter/InvocationContractAdapter.java b/org.eclipse.egf.model/src/org/eclipse/egf/model/fcore/adapter/InvocationContractAdapter.java
new file mode 100644
index 0000000..2ff1853
--- /dev/null
+++ b/org.eclipse.egf.model/src/org/eclipse/egf/model/fcore/adapter/InvocationContractAdapter.java
@@ -0,0 +1,151 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.model.fcore.adapter;
+
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.core.fcore.IPlatformFcore;
+import org.eclipse.egf.model.fcore.Contract;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.common.notify.impl.NotificationImpl;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.impl.ResourceImpl;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class InvocationContractAdapter extends AdapterImpl {
+
+ private InvocationContract _invocationContract;
+
+ private Contract _contract;
+
+ private EStructuralFeature _nameFeature = FcorePackage.Literals.NAMED_MODEL_ELEMENT__NAME;
+
+ private EStructuralFeature _contractModeFeature = FcorePackage.Literals.CONTRACT__MODE;
+
+ private EStructuralFeature _invocationContractInvokedContractFeature = FcorePackage.Literals.INVOCATION_CONTRACT__INVOKED_CONTRACT;
+
+ private AdapterImpl _contractAdapter = new AdapterImpl() {
+ @Override
+ public void notifyChanged(Notification msg) {
+ if (msg.getEventType() == Notification.SET && msg.getFeature().equals(_contractModeFeature)) {
+ _invocationContract.eNotify(new ENotificationImpl((InternalEObject) _invocationContract, -1, _invocationContractInvokedContractFeature, null, null) {
+ @Override
+ public boolean isTouch() {
+ return true;
+ }
+ });
+ } else if (msg.getEventType() == Notification.SET && msg.getFeature().equals(_nameFeature)) {
+ _invocationContract.eNotify(new ENotificationImpl((InternalEObject) _invocationContract, -1, _invocationContractInvokedContractFeature, null, null) {
+ @Override
+ public boolean isTouch() {
+ return true;
+ }
+ });
+ }
+ // else if (msg.getEventType() == Notification.REMOVING_ADAPTER) {
+ // if (_contract != null) {
+ // // Unload this proxy
+ // ((InternalEObject) _contract).eSetProxyURI(EcoreUtil.getURI(_contract));
+ // }
+ // }
+ }
+ };
+
+ private AdapterImpl _contractResourceAdapter = new AdapterImpl() {
+ @Override
+ public void notifyChanged(final Notification notification) {
+ // URI update while moving a resource
+ if (notification.getEventType() == Notification.SET) {
+ switch (notification.getFeatureID(Resource.class)) {
+ case Resource.RESOURCE__URI: {
+ if (_invocationContract.eResource() != null) {
+ final ResourceImpl resource = (ResourceImpl) _invocationContract.eResource();
+ IPlatformFcore fcore = EGFCorePlugin.getPlatformFcore(resource);
+ // target fcore can't be modified, give a chance to read only workspace resource to do something
+ if (fcore != null && fcore.getPlatformBundle().isTarget() == false) {
+ resource.setModified(true);
+ if (resource.eNotificationRequired()) {
+ Notification innerNotification = new NotificationImpl(Notification.SET, notification.getOldValue(), notification.getOldValue()) {
+ @Override
+ public Object getFeature() {
+ return notification.getNotifier();
+ }
+
+ @Override
+ public Object getNotifier() {
+ return resource;
+ }
+
+ @Override
+ public int getFeatureID(Class<?> expectedClass) {
+ return Resource.RESOURCE__URI;
+ }
+ };
+ resource.eNotify(innerNotification);
+ }
+ }
+ }
+ break;
+ }
+ }
+ }
+ }
+ };
+
+ public InvocationContractAdapter(InvocationContract invocationContract) {
+ super();
+ _invocationContract = invocationContract;
+ _invocationContract.eAdapters().add(this);
+ }
+
+ @Override
+ public void notifyChanged(Notification notification) {
+ if (notification.getFeature() == null || notification.getFeature().equals(_invocationContractInvokedContractFeature)) {
+ switch (notification.getEventType()) {
+ case Notification.RESOLVE:
+ Contract newValue = (Contract) notification.getNewValue();
+ Contract oldValue = (Contract) notification.getOldValue();
+ if (oldValue != null) {
+ if (oldValue.eResource() != null) {
+ oldValue.eResource().eAdapters().remove(_contractResourceAdapter);
+ }
+ oldValue.eAdapters().remove(_contractAdapter);
+ }
+ if (newValue != null) {
+ if (newValue.eResource() != null && newValue.eResource().eAdapters().contains(_contractResourceAdapter) == false) {
+ newValue.eResource().eAdapters().add(_contractResourceAdapter);
+ }
+ if (newValue.eAdapters().contains(_contractAdapter) == false) {
+ newValue.eAdapters().add(_contractAdapter);
+ }
+ }
+ _contract = newValue;
+ break;
+ case Notification.REMOVING_ADAPTER:
+ if (_contract != null) {
+ _contract.eAdapters().remove(_contractAdapter);
+ }
+ break;
+ default:
+ return; // No notification
+ }
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.model/src/org/eclipse/egf/model/helper/ActivityCycleFinder.java b/org.eclipse.egf.model/src/org/eclipse/egf/model/helper/ActivityCycleFinder.java
new file mode 100644
index 0000000..356703a
--- /dev/null
+++ b/org.eclipse.egf.model/src/org/eclipse/egf/model/helper/ActivityCycleFinder.java
@@ -0,0 +1,95 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.model.helper;
+
+import java.util.Stack;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.egf.model.fcore.ModelElement;
+import org.eclipse.egf.model.fcore.Orchestration;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class ActivityCycleFinder {
+
+ private Stack<Activity> _activities = new Stack<Activity>();
+
+ private Activity _activity;
+
+ public ActivityCycleFinder(Activity activity) {
+ Assert.isNotNull(activity);
+ _activity = activity;
+ }
+
+ public ModelElement getFirstRepetition() {
+ _activities.clear();
+ return getFirstRepetition(_activity);
+ }
+
+ protected ModelElement getFirstRepetition(Activity activity) {
+ if (activity == null) {
+ return null;
+ }
+ if (activity instanceof FactoryComponent) {
+ _activities.push(activity);
+ ModelElement element = getFirstRepetition(((FactoryComponent) activity).getOrchestration());
+ // Everything is fine
+ if (element == null) {
+ _activities.pop();
+ }
+ return element;
+ }
+ return null;
+ }
+
+ protected ModelElement getFirstRepetition(Orchestration orchestration) {
+ if (orchestration == null) {
+ return null;
+ }
+ for (Invocation invocation : orchestration.getInvocations()) {
+ ModelElement element = getFirstRepetition(invocation);
+ // Activity detected, break immediately
+ if (element != null) {
+ return element;
+ }
+ }
+ // Everything is fine
+ return null;
+ }
+
+ protected ModelElement getFirstRepetition(Invocation invocation) {
+ if (invocation == null || invocation.getInvokedActivity() == null) {
+ return null;
+ }
+ // Cycle detection
+ if (activityLookup(invocation.getInvokedActivity())) {
+ return invocation;
+ }
+ // Invoked Activity analysis
+ return getFirstRepetition(invocation.getInvokedActivity());
+ }
+
+ private boolean activityLookup(Activity activity) {
+ if (activity == null) {
+ return false;
+ }
+ if (_activities.search(activity) != -1) {
+ return true;
+ }
+ return false;
+ }
+
+}
diff --git a/org.eclipse.egf.model/src/org/eclipse/egf/model/helper/ValidationHelper.java b/org.eclipse.egf.model/src/org/eclipse/egf/model/helper/ValidationHelper.java
new file mode 100644
index 0000000..8a6cb8e
--- /dev/null
+++ b/org.eclipse.egf.model/src/org/eclipse/egf/model/helper/ValidationHelper.java
@@ -0,0 +1,113 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.model.helper;
+
+import java.util.Map;
+
+import org.eclipse.egf.common.helper.ClassHelper;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.core.fcore.IPlatformFcore;
+import org.eclipse.egf.core.helper.BundleSessionHelper;
+import org.eclipse.egf.core.preferences.IEGFModelConstants;
+import org.eclipse.egf.core.session.ProjectBundleSession;
+import org.eclipse.egf.model.EGFModelPlugin;
+import org.eclipse.emf.ecore.EObject;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class ValidationHelper {
+
+ private ValidationHelper() {
+ // Prevent Instantiation
+ }
+
+ public static boolean isLoadableClass(EObject eObject, String value, Map<Object, Object> context) {
+ if (context != null && context.get(IEGFModelConstants.VALIDATE_TYPES) == Boolean.FALSE) {
+ return true;
+ }
+ if (eObject.eResource() == null || value == null || value.trim().length() == 0) {
+ return true;
+ }
+ IPlatformFcore platformFcore = EGFCorePlugin.getPlatformFcore(eObject.eResource());
+ if (platformFcore == null) {
+ return true;
+ }
+ // Retrieve Session if any
+ if (context.get(ProjectBundleSession.PROJECT_BUNDLE_SESSION) == null) {
+ return true;
+ }
+ ProjectBundleSession session = (ProjectBundleSession) context.get(ProjectBundleSession.PROJECT_BUNDLE_SESSION);
+ try {
+ Bundle bundle = BundleSessionHelper.getBundle(session, platformFcore);
+ if (bundle == null) {
+ return true;
+ }
+ // Load Class
+ Class<?> clazz = null;
+ try {
+ clazz = bundle.loadClass(value.trim());
+ } catch (Throwable t) {
+ // Nothing to do
+ }
+ if (clazz == null) {
+ return false;
+ }
+ } catch (Throwable t) {
+ EGFModelPlugin.getPlugin().logError(t);
+ }
+ return true;
+ }
+
+ public static boolean isValidClass(EObject eObject, Class<?> type, String value, Map<Object, Object> context) {
+ if (context != null && context.get(IEGFModelConstants.VALIDATE_TYPES) == Boolean.FALSE) {
+ return true;
+ }
+ if (eObject.eResource() == null || type == null || value == null || value.trim().length() == 0) {
+ return true;
+ }
+ IPlatformFcore platformFcore = EGFCorePlugin.getPlatformFcore(eObject.eResource());
+ if (platformFcore == null) {
+ return true;
+ }
+ // Retrieve Session if any
+ if (context.get(ProjectBundleSession.PROJECT_BUNDLE_SESSION) == null) {
+ return true;
+ }
+ ProjectBundleSession session = (ProjectBundleSession) context.get(ProjectBundleSession.PROJECT_BUNDLE_SESSION);
+ try {
+ Bundle bundle = BundleSessionHelper.getBundle(session, platformFcore);
+ if (bundle == null) {
+ return true;
+ }
+ // Load Class
+ Class<?> clazz = null;
+ try {
+ clazz = bundle.loadClass(value.trim());
+ } catch (Throwable t) {
+ // Nothing to do
+ }
+ if (clazz == null) {
+ return true;
+ }
+ // Valid Value
+ if (ClassHelper.asSubClass(clazz, type) == false) {
+ return false;
+ }
+ } catch (Throwable t) {
+ EGFModelPlugin.getPlugin().logError(t);
+ }
+ return true;
+ }
+
+}
diff --git a/org.eclipse.egf.model/src/org/eclipse/egf/model/pattern/BundleAccessor.java b/org.eclipse.egf.model/src/org/eclipse/egf/model/pattern/BundleAccessor.java
new file mode 100644
index 0000000..d498871
--- /dev/null
+++ b/org.eclipse.egf.model/src/org/eclipse/egf/model/pattern/BundleAccessor.java
@@ -0,0 +1,22 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.model.pattern;
+
+import org.osgi.framework.Bundle;
+
+public interface BundleAccessor {
+ public abstract Bundle getBundle(String id) throws PatternException;
+}
\ No newline at end of file
diff --git a/org.eclipse.egf.model/src/org/eclipse/egf/model/pattern/CallBackHandler.java b/org.eclipse.egf.model/src/org/eclipse/egf/model/pattern/CallBackHandler.java
new file mode 100644
index 0000000..20bd5fb
--- /dev/null
+++ b/org.eclipse.egf.model/src/org/eclipse/egf/model/pattern/CallBackHandler.java
@@ -0,0 +1,26 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.model.pattern;
+
+import java.util.Map;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public interface CallBackHandler {
+ void handleCall(PatternContext ctx, Map<String, Object> parameters) throws PatternException;
+}
diff --git a/org.eclipse.egf.model/src/org/eclipse/egf/model/pattern/DomainVisitor.java b/org.eclipse.egf.model/src/org/eclipse/egf/model/pattern/DomainVisitor.java
new file mode 100644
index 0000000..9f5fab6
--- /dev/null
+++ b/org.eclipse.egf.model/src/org/eclipse/egf/model/pattern/DomainVisitor.java
@@ -0,0 +1,33 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.model.pattern;
+
+import java.util.List;
+import java.util.Set;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public interface DomainVisitor {
+ List<?> getChildren(Object model);
+
+ void setPatterns(Set<Pattern> patterns) throws PatternException;
+
+ void visit(PatternContext context, Object model) throws PatternException;
+
+ void dispose();
+}
diff --git a/org.eclipse.egf.model/src/org/eclipse/egf/model/pattern/PatternContext.java b/org.eclipse.egf.model/src/org/eclipse/egf/model/pattern/PatternContext.java
new file mode 100644
index 0000000..84ad374
--- /dev/null
+++ b/org.eclipse.egf.model/src/org/eclipse/egf/model/pattern/PatternContext.java
@@ -0,0 +1,52 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.model.pattern;
+
+/**
+ * TODO Ici on ne devrait avoir qu'une pauvre map avec name-valeur. Son
+ * initialisation étant à la charge de l'orchestrateur. TODO il faudrait ajouetr
+ * un peu de control pour savoir les noms en lecture et ceux en écriture.
+ *
+ *
+ * @author Thomas Guiu
+ *
+ */
+public interface PatternContext {
+
+ /**
+ * Public Keys to manage the patter execution reporter.
+ */
+ final String PATTERN_REPORTER = "pattern.execution.reporter"; //$NON-NLS-1$
+ final String PATTERN_ID = "pattern.id"; //$NON-NLS-1$
+ final String CALL_BACK_HANDLER = "pattern.call.back.handler"; //$NON-NLS-1$
+ final String MODEL_DRIVEN_DOMAIN_VISITOR = "pattern.modeldriven.visitor"; //$NON-NLS-1$
+ final String PATTERN_IDS_PARAMETER = "pattern.ids"; //$NON-NLS-1$
+ final String DOMAIN_OBJECTS = "domain"; //$NON-NLS-1$
+
+ /**
+ * keys to manage the context injected to a pattern.
+ */
+ final String INJECTED_CONTEXT = "internal.injected.context"; //$NON-NLS-1$
+
+ /**
+ * key to manage the object collection to perform queries on.
+ */
+
+ void setValue(String name, Object value);
+
+ Object getValue(String name);
+
+}
diff --git a/org.eclipse.egf.model/src/org/eclipse/egf/model/pattern/PatternException.java b/org.eclipse.egf.model/src/org/eclipse/egf/model/pattern/PatternException.java
new file mode 100644
index 0000000..b9d6787
--- /dev/null
+++ b/org.eclipse.egf.model/src/org/eclipse/egf/model/pattern/PatternException.java
@@ -0,0 +1,51 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.model.pattern;
+
+/**
+ * @author Guiu
+ *
+ */
+public class PatternException extends Exception {
+
+ private static final long serialVersionUID = 8116611457631229391L;
+
+ /**
+ * @param message
+ * @param cause
+ */
+ public PatternException(String message, Throwable cause) {
+ super(message, cause);
+
+ }
+
+ /**
+ * @param message
+ */
+ public PatternException(String message) {
+ super(message);
+
+ }
+
+ /**
+ * @param cause
+ */
+ public PatternException(Throwable cause) {
+ super(cause);
+
+ }
+
+}
diff --git a/org.eclipse.egf.model/src/org/eclipse/egf/model/pattern/PatternExecutionReporter.java b/org.eclipse.egf.model/src/org/eclipse/egf/model/pattern/PatternExecutionReporter.java
new file mode 100644
index 0000000..b86a854
--- /dev/null
+++ b/org.eclipse.egf.model/src/org/eclipse/egf/model/pattern/PatternExecutionReporter.java
@@ -0,0 +1,30 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.model.pattern;
+
+import java.util.Map;
+
+
+/**
+ * @author Guiu
+ *
+ */
+public interface PatternExecutionReporter {
+ void executionFinished(String output, PatternContext context);
+
+ void loopFinished(String output, PatternContext context, Map<String, Object> parameterValues);
+
+}
diff --git a/org.eclipse.egf.model/src/org/eclipse/egf/model/uri/ModelSchemeAware.java b/org.eclipse.egf.model/src/org/eclipse/egf/model/uri/ModelSchemeAware.java
new file mode 100644
index 0000000..7aebc47
--- /dev/null
+++ b/org.eclipse.egf.model/src/org/eclipse/egf/model/uri/ModelSchemeAware.java
@@ -0,0 +1,49 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ *
+ */
+package org.eclipse.egf.model.uri;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.xmi.impl.URIHandlerImpl;
+
+public class ModelSchemeAware extends URIHandlerImpl {
+
+ private URI _basePluginURI;
+
+ @Override
+ public URI deresolve(URI uri) {
+ if (uri.isPlatformResource()) {
+ URI deresolve = uri.deresolve(baseURI);
+ if (deresolve.isCurrentDocumentReference()) {
+ return deresolve;
+ }
+ return URI.createPlatformPluginURI(uri.toPlatformString(true), true).appendFragment(uri.fragment());
+ } else if (uri.isPlatformPlugin()) {
+ URI deresolve = uri.deresolve(_basePluginURI);
+ if (deresolve.isCurrentDocumentReference()) {
+ return deresolve;
+ }
+ return uri;
+ }
+ return uri.isPlatform() == false || (uri.segmentCount() > 0 && baseURI.segmentCount() > 0 && uri.segment(0).equals(baseURI.segment(0))) ? super.deresolve(uri) : uri;
+ }
+
+ @Override
+ public void setBaseURI(URI uri) {
+ super.setBaseURI(uri);
+ _basePluginURI = URI.createPlatformPluginURI(baseURI.toPlatformString(true), true);
+ }
+
+}
diff --git a/org.eclipse.egf.model/templates/Header.javajetinc b/org.eclipse.egf.model/templates/Header.javajetinc
new file mode 100644
index 0000000..2813b8c
--- /dev/null
+++ b/org.eclipse.egf.model/templates/Header.javajetinc
@@ -0,0 +1,17 @@
+/**
+<%{GenBase copyrightHolder = argument instanceof GenBase ? (GenBase)argument : argument instanceof Object[] && ((Object[])argument)[0] instanceof GenBase ? (GenBase)((Object[])argument)[0] : null;%>
+<%if (copyrightHolder != null && copyrightHolder.hasCopyright()) {%>
+ * <%=copyrightHolder.getCopyright(copyrightHolder.getGenModel().getIndentation(stringBuffer))%>
+<%} else {%>
+ *
+ * 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
+ *
+<%}}%>
+ */
diff --git a/org.eclipse.egf.model/templates/Header.propertiesjetinc b/org.eclipse.egf.model/templates/Header.propertiesjetinc
new file mode 100644
index 0000000..290bbfa
--- /dev/null
+++ b/org.eclipse.egf.model/templates/Header.propertiesjetinc
@@ -0,0 +1,15 @@
+<%{GenBase copyrightHolder = argument instanceof GenBase ? (GenBase)argument : argument instanceof Object[] && ((Object[])argument)[0] instanceof GenBase ? (GenBase)((Object[])argument)[0] : null;%>
+<%if (copyrightHolder != null && copyrightHolder.hasCopyright()) {%>
+# <%=copyrightHolder.getCopyright(copyrightHolder.getGenModel().getIndentation(stringBuffer))%>
+<%} else {%>
+##
+# 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
+##
+<%}}%>
diff --git a/org.eclipse.egf.model/templates/Header.xmljetinc b/org.eclipse.egf.model/templates/Header.xmljetinc
new file mode 100644
index 0000000..4234336
--- /dev/null
+++ b/org.eclipse.egf.model/templates/Header.xmljetinc
@@ -0,0 +1,18 @@
+<!--
+
+<%{GenBase copyrightHolder = argument instanceof GenBase ? (GenBase)argument : argument instanceof Object[] && ((Object[])argument)[0] instanceof GenBase ? (GenBase)((Object[])argument)[0] : null;%>
+<%if (copyrightHolder != null && copyrightHolder.hasCopyright()) {%>
+ <%=copyrightHolder.getCopyright(copyrightHolder.getGenModel().getIndentation(stringBuffer))%>
+<%} else {%>
+ 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
+<%}}%>
+
+ <%="$"%>Id<%="$"%>
+-->
diff --git a/org.eclipse.egf.model/templates/edit/ItemProvider/getText.override.javajetinc b/org.eclipse.egf.model/templates/edit/ItemProvider/getText.override.javajetinc
new file mode 100644
index 0000000..a6ec8c9
--- /dev/null
+++ b/org.eclipse.egf.model/templates/edit/ItemProvider/getText.override.javajetinc
@@ -0,0 +1,43 @@
+<%if (genClass.isMapEntry()) {%>
+ <%=genClass.getImportedInterfaceName()%><%if (genModel.useGenerics()) {%><?, ?><%}%> <%=genClass.getSafeUncapName()%> = (<%=genClass.getImportedInterfaceName()%><%if (genModel.useGenerics()) {%><?, ?><%}%>)object;
+ <%if (!genClass.getMapEntryKeyFeature().isPropertyMultiLine() && !genClass.getMapEntryValueFeature().isPropertyMultiLine()) {%>
+ return "" + <%=genClass.getSafeUncapName()%>.getKey() + " -> " + <%=genClass.getSafeUncapName()%>.getValue();<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
+ <%} else {%>
+ <%if (genClass.getMapEntryKeyFeature().isPropertyMultiLine()) {%>
+ String key = crop("" + <%=genClass.getSafeUncapName()%>.getKey());<%=genModel.getNonNLS()%>
+ <%} else {%>
+ String key = "" + <%=genClass.getSafeUncapName()%>.getKey();<%=genModel.getNonNLS()%>
+ <%}%>
+ <%if (genClass.getMapEntryValueFeature().isPropertyMultiLine()) {%>
+ String value = crop("" + <%=genClass.getSafeUncapName()%>.getValue());<%=genModel.getNonNLS()%>
+ <%} else {%>
+ String value = "" + <%=genClass.getSafeUncapName()%>.getValue();<%=genModel.getNonNLS()%>
+ <%}%>
+ return key + " -> " + value;<%=genModel.getNonNLS()%>
+ <%}%>
+<%} else if (genClass.getLabelFeature() != null) { GenFeature labelFeature = genClass.getLabelFeature();%>
+ <%if (labelFeature.isPrimitiveType() && !labelFeature.getGenClass().isDynamic() && !labelFeature.isSuppressedGetVisibility()) {%>
+ <%=genClass.getImportedInterfaceName()%><%=genClass.getInterfaceWildTypeArguments()%> <%=genClass.getSafeUncapName()%> = (<%=genClass.getImportedInterfaceName()%><%=genClass.getInterfaceWildTypeArguments()%>)object;
+ return <%=genClass.getSafeUncapName()%>.<%=genClass.getLabelFeature().getGetAccessor()%>() + " [" + getString("_UI_<%=genClass.getName()%>_type") + "]";<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%><%=genModel.getNonNLS(3)%>
+ <%} else {%>
+ <%if (labelFeature.isStringType() && !labelFeature.getGenClass().isDynamic() && !labelFeature.isSuppressedGetVisibility()) {%>
+ <%if (labelFeature.isPropertyMultiLine()) {%>
+ String label = crop(((<%=genClass.getImportedInterfaceName()%><%=genClass.getInterfaceWildTypeArguments()%>)object).<%=labelFeature.getGetAccessor()%>());
+ <%} else {%>
+ String label = ((<%=genClass.getImportedInterfaceName()%><%=genClass.getInterfaceWildTypeArguments()%>)object).<%=labelFeature.getGetAccessor()%>();
+ <%}%>
+ <%} else {%>
+ <%if (labelFeature.isSuppressedGetVisibility() || labelFeature.getGenClass().isDynamic()) {%>
+ <%=genModel.getImportedName("java.lang.Object")%> labelValue = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.EObject")%>)object).eGet(<%=labelFeature.getQualifiedFeatureAccessor()%>);
+ <%} else {%>
+ <%=labelFeature.getRawImportedType()%> labelValue = ((<%=genClass.getImportedInterfaceName()%><%=genClass.getInterfaceWildTypeArguments()%>)object).<%=labelFeature.getGetAccessor()%>();
+ <%}%>
+ String label = labelValue == null ? null : labelValue.toString();
+ <%}%>
+ return label == null || label.length() == 0 ?
+ "[" + getString("_UI_<%=genClass.getName()%>_type") + "]" :<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%><%=genModel.getNonNLS(3)%>
+ label + " [" + getString("_UI_<%=genClass.getName()%>_type") + "]";<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%><%=genModel.getNonNLS(3)%>
+ <%}%>
+<%} else {%>
+ return "[" + getString("_UI_<%=genClass.getName()%>_type") + "]";<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%><%=genModel.getNonNLS(3)%>
+<%}%>
\ No newline at end of file
diff --git a/org.eclipse.egf.model/templates/edit/Plugin.javajet b/org.eclipse.egf.model/templates/edit/Plugin.javajet
new file mode 100644
index 0000000..db1387d
--- /dev/null
+++ b/org.eclipse.egf.model/templates/edit/Plugin.javajet
@@ -0,0 +1,131 @@
+<%@ jet package="org.eclipse.emf.codegen.ecore.templates.edit" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="Plugin" version="$Id: Plugin.javajet,v 1.9 2008/12/13 15:53:17 emerks Exp $" %>
+<%
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2002-2004 IBM Corporation and others.
+ * 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:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ */
+%>
+<%GenModel genModel = (GenModel)argument; /* Trick to import java.util.* without warnings */Iterator.class.getName();%>
+<%@ include file="../Header.javajetinc"%>
+package <%=genModel.getEditPluginPackageName()%>;
+
+<%genModel.addImport("org.eclipse.emf.common.EMFPlugin");%>
+<%genModel.addImport("org.eclipse.emf.common.util.ResourceLocator");%>
+<%genModel.markImportLocation(stringBuffer);%>
+
+/**
+ * This is the central singleton for the <%=genModel.getModelName()%> edit plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class <%=genModel.getEditPluginClassName()%> extends EMFPlugin
+{
+<%if (genModel.hasCopyrightField()) {%>
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final <%=genModel.getImportedName("java.lang.String")%> copyright = <%=genModel.getCopyrightFieldLiteral()%>;<%=genModel.getNonNLS()%>
+
+<%}%>
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final <%=genModel.getEditPluginClassName()%> INSTANCE = new <%=genModel.getEditPluginClassName()%>();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public <%=genModel.getEditPluginClassName()%>()
+ {
+ super
+ (new ResourceLocator []
+ {
+<%for (String pluginClassName : genModel.getEditResourceDelegateImportedPluginClassNames()) {%>
+ <%=pluginClassName%>.INSTANCE,
+<%}%>
+ });
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+<%if (genModel.useClassOverrideAnnotation()) {%>
+ @Override
+<%}%>
+ public ResourceLocator getPluginResourceLocator()
+ {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin()
+ {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends <%=genModel.getImportedName("org.eclipse.egf.common.activator.EGFEclipsePlugin")%>
+ {
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+<%if (genModel.needsRuntimeCompatibility()) {%>
+ * @param descriptor the description of the plugin.
+<%}%>
+ * @generated
+ */
+ public Implementation(<%if (genModel.needsRuntimeCompatibility()) {%><%=genModel.getImportedName("org.eclipse.core.runtime.IPluginDescriptor")%> descriptor<%}%>)
+ {
+ super(<%if (genModel.needsRuntimeCompatibility()) {%>descriptor<%}%>);
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
+<%genModel.emitSortedImports();%>
diff --git a/org.eclipse.egf.model/templates/edit/manifest.mfjet b/org.eclipse.egf.model/templates/edit/manifest.mfjet
new file mode 100644
index 0000000..0fde407
--- /dev/null
+++ b/org.eclipse.egf.model/templates/edit/manifest.mfjet
@@ -0,0 +1,44 @@
+<%@ jet package="org.eclipse.emf.codegen.ecore.templates.edit" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="ManifestMF" version="$Id: manifest.mfjet,v 1.7 2008/04/18 04:01:30 davidms Exp $" %>
+<%
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2005 IBM Corporation and others.
+ * 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:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ */
+%>
+<%GenModel genModel = (GenModel)argument;%>
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: <%=genModel.getEditPluginID()%>;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: <%if (genModel.isRuntimeJar()) {%><%=genModel.getEditPluginID()%>.jar<%}else{%>.<%}%>
+Bundle-Activator: <%=genModel.getQualifiedEditPluginClassName()%>$Implementation
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+<%if (genModel.getComplianceLevel() == GenJDKLevel.JDK50_LITERAL) {%>
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+<%} else if (genModel.getComplianceLevel() == GenJDKLevel.JDK60_LITERAL) {%>
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+<%}%>
+<%Iterator<String> packagesIterator = genModel.getEditQualifiedPackageNames().iterator(); if (packagesIterator.hasNext()) { String pack = packagesIterator.next();%>
+Export-Package: <%=pack%><%while(packagesIterator.hasNext()) { pack = packagesIterator.next();%>,
+ <%=pack%><%}%>
+<%}%>
+<%Iterator<String> requiredPluginIterator = genModel.getEditRequiredPlugins().iterator(); if (requiredPluginIterator.hasNext()) { String pluginID = requiredPluginIterator.next();%>
+Require-Bundle: <%=pluginID%><%if (!pluginID.startsWith("org.eclipse.core.runtime")){%>;visibility:=reexport<%} while(requiredPluginIterator.hasNext()) { pluginID = requiredPluginIterator.next();%>,
+ <%=pluginID%><%if (!pluginID.startsWith("org.eclipse.core.runtime")){%>;visibility:=reexport<%}}%>
+<%}%>
+<%if (genModel.getRuntimeVersion() == GenRuntimeVersion.EMF22 || genModel.getRuntimeVersion() == GenRuntimeVersion.EMF23) {%>
+Eclipse-LazyStart: true
+<%}%>
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.egf.model/templates/edit/plugin.xmljet b/org.eclipse.egf.model/templates/edit/plugin.xmljet
new file mode 100644
index 0000000..dcedf73
--- /dev/null
+++ b/org.eclipse.egf.model/templates/edit/plugin.xmljet
@@ -0,0 +1,125 @@
+<%@ jet package="org.eclipse.emf.codegen.ecore.templates.edit" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="PluginXML" version="$Id: plugin.xmljet,v 1.20 2008/08/09 14:16:12 emerks Exp $" %>
+<%
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2002-2005 IBM Corporation and others.
+ * 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:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ */
+%>
+<%GenModel genModel = (GenModel)argument;%>
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+
+<%@ include file="../Header.xmljetinc"%>
+
+<%if (genModel.isBundleManifest()) {%>
+<plugin>
+<%} else {%>
+<plugin
+ name="%pluginName"
+ id="<%=genModel.getEditPluginID()%>"
+ version="1.0.0"
+ provider-name="%providerName"
+ class="<%=genModel.getQualifiedEditPluginClassName()%>$Implementation">
+
+ <requires>
+ <%for (String pluginID : genModel.getEditRequiredPlugins()) {%>
+ <import plugin="<%=pluginID%>"<%if (!pluginID.startsWith("org.eclipse.core.runtime")) {%> export="true"<%}%>/>
+ <%}%>
+ </requires>
+
+ <runtime>
+ <%if (genModel.isRuntimeJar()) {%>
+ <library name="<%=genModel.getEditPluginID()%>.jar">
+ <%} else {%>
+ <library name=".">
+ <%}%>
+ <export name="*"/>
+ </library>
+ </runtime>
+<%}%>
+<%for (GenPackage genPackage : genModel.getAllGenPackagesWithClassifiers()) {%>
+ <%if (!genPackage.getGenClasses().isEmpty()) {%>
+
+ <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+ <factory
+ uri="<%=genPackage.getNSURI()%>"
+ class="<%=genPackage.getQualifiedItemProviderAdapterFactoryClassName()%>"
+ supportedTypes=
+ <%for (ListIterator<?> j = genPackage.getProviderSupportedTypes().listIterator(); j.hasNext(); ) {%>
+ <%=j.hasPrevious() ? " " : "\""%><%=j.next()%><%if (!j.hasNext()) {%>"/><%}%>
+ <%}%>
+ </extension>
+ <%if (genPackage.isChildCreationExtenders()) { Map<GenPackage, Map<GenClass, List<GenClass.ChildCreationData>>> extendedChildCreationData = genPackage.getExtendedChildCreationData();%>
+ <%if (!extendedChildCreationData.isEmpty()) {%>
+
+ <extension point="org.eclipse.emf.edit.childCreationExtenders">
+ <%for (Map.Entry<GenPackage, Map<GenClass, List<GenClass.ChildCreationData>>> entry : extendedChildCreationData.entrySet()) {%>
+ <extender
+ uri="<%=entry.getKey().getNSURI()%>"
+ class="<%=genPackage.getQualifiedItemProviderAdapterFactoryClassName()%>$<%=genPackage.getChildCreationExtenderName(entry.getKey())%>"/>
+ <%}%>
+ </extension>
+ <%}%>
+ <%}%>
+ <%}%>
+<%}%>
+<%if (genModel.sameModelEditProject()) {%>
+ <%for (GenPackage genPackage : genModel.getAllGenPackagesWithClassifiers()) {%>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri="<%=genPackage.getNSURI()%>"
+ <%if (genModel.hasLocalGenModel()) {%>
+ class="<%=genPackage.getQualifiedPackageInterfaceName()%>"
+ genModel="<%=genModel.getRelativeGenModelLocation()%>"/>
+ <%} else {%>
+ class="<%=genPackage.getQualifiedPackageInterfaceName()%>"/>
+ <%}%>
+ </extension>
+ <%if (genPackage.isContentType()) {%>
+
+ <extension point="org.eclipse.emf.ecore.content_parser">
+ <parser
+ contentTypeIdentifier="<%=genPackage.getContentTypeIdentifier()%>"
+ class="<%=genPackage.getQualifiedEffectiveResourceFactoryClassName()%>"/>
+ </extension>
+
+ <extension point="org.eclipse.core.contenttype.contentTypes">
+ <content-type
+ base-type="<%=genPackage.isXMIResource() ? "org.eclipse.emf.ecore.xmi" : "org.eclipse.core.runtime.xml"%>"
+ file-extensions="<%=genPackage.getFileExtensions()%>"
+ id="<%=genPackage.getContentTypeIdentifier()%>"
+ name="%_UI_<%=genPackage.getPrefix()%>_content_type"
+ priority="normal">
+ <describer class="org.eclipse.emf.ecore.xmi.impl.RootXMLContentHandlerImpl$Describer">
+ <%if (genPackage.hasTargetNamespace()) {%>
+ <parameter name="namespace" value="<%=genPackage.getNSURI()%>"/>
+ <%}%>
+ <%if (genPackage.isXMIResource()) {%>
+ <parameter name="kind" value="xmi"/>
+ <%}%>
+ </describer>
+ </content-type>
+ </extension>
+ <%} else if (genPackage.getResource() != GenResourceKind.NONE_LITERAL) {%>
+
+ <extension point="org.eclipse.emf.ecore.extension_parser">
+ <parser
+ type="<%=genPackage.getFileExtension()%>"
+ class="<%=genPackage.getQualifiedResourceFactoryClassName()%>"/>
+ </extension>
+ <%}%>
+ <%}%>
+<%}%>
+
+</plugin>
diff --git a/org.eclipse.egf.model/templates/editor/Plugin.javajet b/org.eclipse.egf.model/templates/editor/Plugin.javajet
new file mode 100644
index 0000000..f08f567
--- /dev/null
+++ b/org.eclipse.egf.model/templates/editor/Plugin.javajet
@@ -0,0 +1,131 @@
+<%@ jet package="org.eclipse.emf.codegen.ecore.templates.editor" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="Plugin" version="$Id: Plugin.javajet,v 1.10 2008/12/13 15:53:17 emerks Exp $" %>
+<%
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2002-2004 IBM Corporation and others.
+ * 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:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ */
+%>
+<%GenModel genModel = (GenModel)argument; /* Trick to import java.util.* without warnings */Iterator.class.getName();%>
+<%@ include file="../Header.javajetinc"%>
+package <%=genModel.getEditorPluginPackageName()%>;
+
+<%genModel.addImport("org.eclipse.emf.common.EMFPlugin");%>
+<%genModel.addImport("org.eclipse.emf.common.util.ResourceLocator");%>
+<%genModel.markImportLocation(stringBuffer);%>
+
+/**
+ * This is the central singleton for the <%=genModel.getModelName()%> editor plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class <%=genModel.getEditorPluginClassName()%> extends EMFPlugin
+{
+<%if (genModel.hasCopyrightField()) {%>
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final <%=genModel.getImportedName("java.lang.String")%> copyright = <%=genModel.getCopyrightFieldLiteral()%>;<%=genModel.getNonNLS()%>
+
+<%}%>
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final <%=genModel.getEditorPluginClassName()%> INSTANCE = new <%=genModel.getEditorPluginClassName()%>();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public <%=genModel.getEditorPluginClassName()%>()
+ {
+ super
+ (new ResourceLocator []
+ {
+<%for (String pluginClassName : genModel.getEditResourceDelegateImportedPluginClassNames()) {%>
+ <%=pluginClassName%>.INSTANCE,
+<%}%>
+ });
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+<%if (genModel.useClassOverrideAnnotation()) {%>
+ @Override
+<%}%>
+ public ResourceLocator getPluginResourceLocator()
+ {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin()
+ {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends <%=genModel.getImportedName("org.eclipse.egf.common.ui.activator.EGFEclipseUIPlugin")%>
+ {
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+<%if (genModel.needsRuntimeCompatibility()) {%>
+ * @param descriptor the description of the plugin.
+<%}%>
+ * @generated
+ */
+ public Implementation(<%if (genModel.needsRuntimeCompatibility()) {%><%=genModel.getImportedName("org.eclipse.core.runtime.IPluginDescriptor")%> descriptor<%}%>)
+ {
+ super(<%if (genModel.needsRuntimeCompatibility()) {%>descriptor<%}%>);
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
+<%genModel.emitSortedImports();%>
diff --git a/org.eclipse.egf.model/templates/editor/manifest.mfjet b/org.eclipse.egf.model/templates/editor/manifest.mfjet
new file mode 100644
index 0000000..c156346
--- /dev/null
+++ b/org.eclipse.egf.model/templates/editor/manifest.mfjet
@@ -0,0 +1,44 @@
+<%@ jet package="org.eclipse.emf.codegen.ecore.templates.editor" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="ManifestMF" version="$Id: manifest.mfjet,v 1.7 2008/04/18 04:01:30 davidms Exp $" %>
+<%
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2005 IBM Corporation and others.
+ * 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:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ */
+%>
+<%GenModel genModel = (GenModel)argument;%>
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: <%=genModel.getEditorPluginID()%>;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: <%if (genModel.isRuntimeJar()) {%><%=genModel.getEditorPluginID()%>.jar<%}else{%>.<%}%>
+Bundle-Activator: <%=genModel.getQualifiedEditorPluginClassName()%>$Implementation
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+<%if (genModel.getComplianceLevel() == GenJDKLevel.JDK50_LITERAL) {%>
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+<%} else if (genModel.getComplianceLevel() == GenJDKLevel.JDK60_LITERAL) {%>
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+<%}%>
+<%Iterator<String> packagesIterator = genModel.getEditorQualifiedPackageNames().iterator(); if (packagesIterator.hasNext()) { String pack = packagesIterator.next();%>
+Export-Package: <%=pack%><%while(packagesIterator.hasNext()) { pack = packagesIterator.next();%>,
+ <%=pack%><%}%>
+<%}%>
+<%Iterator<String> requiredPluginIterator = genModel.getEditorRequiredPlugins().iterator(); if (requiredPluginIterator.hasNext()) { String pluginID = requiredPluginIterator.next();%>
+Require-Bundle: <%=pluginID%><%if (!pluginID.startsWith("org.eclipse.core.runtime")){%>;visibility:=reexport<%} while(requiredPluginIterator.hasNext()) { pluginID = requiredPluginIterator.next();%>,
+ <%=pluginID%><%if (!pluginID.startsWith("org.eclipse.core.runtime")){%>;visibility:=reexport<%}}%>
+<%}%>
+<%if (genModel.getRuntimeVersion() == GenRuntimeVersion.EMF22 || genModel.getRuntimeVersion() == GenRuntimeVersion.EMF23) {%>
+Eclipse-LazyStart: true
+<%}%>
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.egf.model/templates/editor/plugin.xmljet b/org.eclipse.egf.model/templates/editor/plugin.xmljet
new file mode 100644
index 0000000..07369bc
--- /dev/null
+++ b/org.eclipse.egf.model/templates/editor/plugin.xmljet
@@ -0,0 +1,247 @@
+<%@ jet package="org.eclipse.emf.codegen.ecore.templates.editor" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="PluginXML" version="$Id: plugin.xmljet,v 1.27 2008/08/09 14:16:12 emerks Exp $" %>
+<%
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2002-2005 IBM Corporation and others.
+ * 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:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ */
+%>
+<%GenModel genModel = (GenModel)argument;%>
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+
+<%@ include file="../Header.xmljetinc"%>
+
+<%if (genModel.isBundleManifest()) {%>
+<plugin>
+<%} else {%>
+<plugin
+ name="%pluginName"
+ id="<%=genModel.getEditorPluginID()%>"
+ version="1.0.0"
+ provider-name="%providerName"
+ class="<%=genModel.getQualifiedEditorPluginClassName()%>$Implementation">
+
+ <requires>
+ <%for (String pluginID : genModel.getEditorRequiredPlugins()) { %>
+ <import plugin="<%=pluginID%>"<%if (!pluginID.startsWith("org.eclipse.core.runtime")) {%> export="true"<%}%>/>
+ <%}%>
+ </requires>
+
+ <runtime>
+ <%if (genModel.isRuntimeJar()) {%>
+ <library name="<%=genModel.getEditorPluginID()%>.jar">
+ <%} else {%>
+ <library name=".">
+ <%}%>
+ <export name="*"/>
+ </library>
+ </runtime>
+<%}%>
+<%if (genModel.sameEditEditorProject()) {%>
+ <%for (GenPackage genPackage : genModel.getAllGenPackagesWithClassifiers()) {%>
+ <%if (!genPackage.getGenClasses().isEmpty()) {%>
+
+ <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+ <factory
+ uri="<%=genPackage.getNSURI()%>"
+ class="<%=genPackage.getQualifiedItemProviderAdapterFactoryClassName()%>"
+ supportedTypes=
+ <%for (ListIterator<?> j = genPackage.getProviderSupportedTypes().listIterator(); j.hasNext(); ) {%>
+ <%=j.hasPrevious() ? " " : "\""%><%=j.next()%><%if (!j.hasNext()) {%>"/><%}%>
+ <%}%>
+ </extension>
+ <%if (genPackage.isChildCreationExtenders()) { Map<GenPackage, Map<GenClass, List<GenClass.ChildCreationData>>> extendedChildCreationData = genPackage.getExtendedChildCreationData();%>
+ <%if (!extendedChildCreationData.isEmpty()) {%>
+
+ <extension point="org.eclipse.emf.edit.childCreationExtenders">
+ <%for (Map.Entry<GenPackage, Map<GenClass, List<GenClass.ChildCreationData>>> entry : extendedChildCreationData.entrySet()) {%>
+ <extender
+ uri="<%=entry.getKey().getNSURI()%>"
+ class="<%=genPackage.getQualifiedItemProviderAdapterFactoryClassName()%>$<%=genPackage.getChildCreationExtenderName(entry.getKey())%>"/>
+ <%}%>
+ </extension>
+ <%}%>
+ <%}%>
+ <%}%>
+ <%}%>
+<%}%>
+<%if (genModel.sameModelEditorProject()) {%>
+ <%for (GenPackage genPackage : genModel.getAllGenPackagesWithClassifiers()) {%>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri="<%=genPackage.getNSURI()%>"
+ <%if (genModel.hasLocalGenModel()) {%>
+ class="<%=genPackage.getQualifiedPackageInterfaceName()%>"
+ genModel="<%=genModel.getRelativeGenModelLocation()%>"/>
+ <%} else {%>
+ class="<%=genPackage.getQualifiedPackageInterfaceName()%>"/>
+ <%}%>
+ </extension>
+ <%if (genPackage.isContentType()) {%>
+
+ <extension point="org.eclipse.emf.ecore.content_parser">
+ <parser
+ contentTypeIdentifier="<%=genPackage.getContentTypeIdentifier()%>"
+ class="<%=genPackage.getQualifiedEffectiveResourceFactoryClassName()%>"/>
+ </extension>
+
+ <extension point="org.eclipse.core.contenttype.contentTypes">
+ <content-type
+ base-type="<%=genPackage.isXMIResource() ? "org.eclipse.emf.ecore.xmi" : "org.eclipse.core.runtime.xml"%>"
+ file-extensions="<%=genPackage.getFileExtensions()%>"
+ id="<%=genPackage.getContentTypeIdentifier()%>"
+ name="%_UI_<%=genPackage.getPrefix()%>_content_type"
+ priority="normal">
+ <describer class="org.eclipse.emf.ecore.xmi.impl.RootXMLContentHandlerImpl$Describer">
+ <%if (genPackage.hasTargetNamespace()) {%>
+ <parameter name="namespace" value="<%=genPackage.getNSURI()%>"/>
+ <%}%>
+ <%if (genPackage.isXMIResource()) {%>
+ <parameter name="kind" value="xmi"/>
+ <%}%>
+ </describer>
+ </content-type>
+ </extension>
+ <%} else if (genPackage.getResource() != GenResourceKind.NONE_LITERAL) {%>
+
+ <extension point="org.eclipse.emf.ecore.extension_parser">
+ <parser
+ type="<%=genPackage.getFileExtension()%>"
+ class="<%=genPackage.getQualifiedResourceFactoryClassName()%>"/>
+ </extension>
+ <%}%>
+ <%}%>
+<%}%>
+<%if (genModel.isRichClientPlatform()) {%>
+
+ <extension
+ point="org.eclipse.core.runtime.applications"
+ id="<%=genModel.getEditorAdvisorClassName()%>Application">
+ <application>
+ <run class="<%=genModel.getQualifiedEditorAdvisorClassName()%>$Application"/>
+ </application>
+ </extension>
+
+ <extension point="org.eclipse.ui.perspectives">
+ <perspective
+ name="%_UI_Perspective_label"
+ class="<%=genModel.getQualifiedEditorAdvisorClassName()%>$Perspective"
+ id="<%=genModel.getQualifiedEditorAdvisorClassName()%>Perspective">
+ </perspective>
+ </extension>
+
+ <extension point="org.eclipse.ui.commands">
+ <command
+ name="%_UI_Menu_OpenURI_label"
+ description="%_UI_Menu_OpenURI_description"
+ categoryId="org.eclipse.ui.category.file"
+ id="<%=genModel.getQualifiedEditorAdvisorClassName()%>OpenURICommand"/>
+ <command
+ name="%_UI_Menu_Open_label"
+ description="%_UI_Menu_Open_description"
+ categoryId="org.eclipse.ui.category.file"
+ id="<%=genModel.getQualifiedEditorAdvisorClassName()%>OpenCommand"/>
+ </extension>
+
+ <extension point="org.eclipse.ui.bindings">
+ <key
+ commandId="<%=genModel.getQualifiedEditorAdvisorClassName()%>OpenURICommand"
+ sequence="M1+U"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
+ <key
+ commandId="<%=genModel.getQualifiedEditorAdvisorClassName()%>OpenCommand"
+ sequence="M1+O"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
+ </extension>
+
+ <extension point="org.eclipse.ui.actionSets">
+ <actionSet
+ label="%_UI_<%=genModel.getEditorAdvisorClassName()%>_ActionSet_label"
+ visible="true"
+ id="<%=genModel.getEditorAdvisorClassName()%>ActionSet">
+ <action
+ label="%_UI_Menu_About_label"
+ class="<%=genModel.getQualifiedEditorAdvisorClassName()%>$AboutAction"
+ menubarPath="help/additions"
+ id="<%=genModel.getQualifiedEditorAdvisorClassName()%>AboutAction"/>
+ <action
+ label="%_UI_Menu_OpenURI_label"
+ definitionId="<%=genModel.getQualifiedEditorAdvisorClassName()%>OpenURICommand"
+ class="<%=genModel.getQualifiedEditorAdvisorClassName()%>$OpenURIAction"
+ menubarPath="file/additions"
+ id="<%=genModel.getQualifiedEditorAdvisorClassName()%>OpenURIAction"/>
+ <action
+ label="%_UI_Menu_Open_label"
+ definitionId="<%=genModel.getQualifiedEditorAdvisorClassName()%>OpenCommand"
+ class="<%=genModel.getQualifiedEditorAdvisorClassName()%>$OpenAction"
+ menubarPath="file/additions"
+ id="<%=genModel.getQualifiedEditorAdvisorClassName()%>OpenAction"/>
+ </actionSet>
+ </extension>
+<%}%>
+<%for (GenPackage genPackage : genModel.getAllGenPackagesWithClassifiers()) {%>
+ <%if (genPackage.hasConcreteClasses()){%>
+ <%if (genPackage.isGenerateModelWizard()) {%>
+ <%if (genModel.isRichClientPlatform()) {%>
+
+ <extension point="org.eclipse.ui.actionSets">
+ <actionSet
+ label="%_UI_<%=genPackage.getModelWizardClassName()%>_ActionSet_label"
+ visible="true"
+ id="<%=genPackage.getQualifiedActionBarContributorClassName()%>ActionSet">
+ <action
+ label="%_UI_<%=genPackage.getModelWizardClassName()%>_label"
+ class="<%=genPackage.getQualifiedActionBarContributorClassName()%>$NewAction"
+ menubarPath="file/new/additions"
+ id="<%=genPackage.getQualifiedActionBarContributorClassName()%>NewAction"/>
+ </actionSet>
+ </extension>
+ <%} else {%>
+
+ <extension point="org.eclipse.ui.newWizards">
+ <category
+ id="org.eclipse.emf.ecore.Wizard.category.ID"
+ name="%_UI_Wizard_category"/>
+ <wizard
+ id="<%=genPackage.getQualifiedModelWizardClassName()%>ID"
+ name="%_UI_<%=genPackage.getModelWizardClassName()%>_label"
+ class="<%=genPackage.getQualifiedModelWizardClassName()%>"
+ category="org.eclipse.emf.ecore.Wizard.category.ID"
+ icon="icons/full/obj16/<%=genPackage.getPrefix()%>ModelFile.gif">
+ <description>%_UI_<%=genPackage.getModelWizardClassName()%>_description</description>
+ <selection class="org.eclipse.core.resources.IResource"/>
+ </wizard>
+ </extension>
+ <%}%>
+ <%}%>
+
+ <extension point="org.eclipse.ui.editors">
+ <editor
+ id="<%=genPackage.getQualifiedEditorClassName()%>ID"
+ name="%_UI_<%=genPackage.getEditorClassName()%>_label"
+ icon="icons/full/obj16/<%=genPackage.getPrefix()%>ModelFile.gif"
+ <%if (!genPackage.isContentType()) {%>
+ extensions="<%=genPackage.getFileExtension()%>"
+ <%}%>
+ class="<%=genPackage.getQualifiedEditorClassName()%>"
+ contributorClass="<%=genPackage.getQualifiedActionBarContributorClassName()%>">
+ <%if (genPackage.isContentType()) {%>
+ <contentTypeBinding contentTypeId="<%=genPackage.getQualifiedContentTypeIdentifier()%>"/>
+ <%}%>
+ </editor>
+ </extension>
+ <%}%>
+<%}%>
+
+</plugin>
diff --git a/org.eclipse.egf.model/templates/model/Plugin.javajet b/org.eclipse.egf.model/templates/model/Plugin.javajet
new file mode 100644
index 0000000..9820166
--- /dev/null
+++ b/org.eclipse.egf.model/templates/model/Plugin.javajet
@@ -0,0 +1,125 @@
+<%@ jet package="org.eclipse.emf.codegen.ecore.templates.model" imports="org.eclipse.emf.codegen.ecore.genmodel.*" class="Plugin" version="$Id: Plugin.javajet,v 1.8 2007/04/26 20:54:03 emerks Exp $" %>
+<%
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2002-2004 IBM Corporation and others.
+ * 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:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ */
+%>
+<%GenModel genModel = (GenModel)argument;%>
+<%@ include file="../Header.javajetinc"%>
+package <%=genModel.getModelPluginPackageName()%>;
+
+<%genModel.addImport("org.eclipse.emf.common.EMFPlugin");%>
+<%genModel.addImport("org.eclipse.emf.common.util.ResourceLocator");%>
+<%genModel.markImportLocation(stringBuffer);%>
+
+/**
+ * This is the central singleton for the <%=genModel.getModelName()%> model plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class <%=genModel.getModelPluginClassName()%> extends EMFPlugin
+{
+<%if (genModel.hasCopyrightField()) {%>
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final <%=genModel.getImportedName("java.lang.String")%> copyright = <%=genModel.getCopyrightFieldLiteral()%>;<%=genModel.getNonNLS()%>
+
+<%}%>
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final <%=genModel.getModelPluginClassName()%> INSTANCE = new <%=genModel.getModelPluginClassName()%>();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public <%=genModel.getModelPluginClassName()%>()
+ {
+ super(new ResourceLocator [] {});
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+<%if (genModel.useClassOverrideAnnotation()) {%>
+ @Override
+<%}%>
+ public ResourceLocator getPluginResourceLocator()
+ {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin()
+ {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends <%=genModel.getImportedName("org.eclipse.egf.common.activator.EGFEclipsePlugin")%>
+ {
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+<%if (genModel.needsRuntimeCompatibility()) {%>
+ * @param descriptor the description of the plugin.
+<%}%>
+ * @generated
+ */
+ public Implementation(<%if (genModel.needsRuntimeCompatibility()) {%><%=genModel.getImportedName("org.eclipse.core.runtime.IPluginDescriptor")%> descriptor<%}%>)
+ {
+ super(<%if (genModel.needsRuntimeCompatibility()) {%>descriptor<%}%>);
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
+<%genModel.emitSortedImports();%>
diff --git a/org.eclipse.egf.model/templates/model/ResourceClass.javajet b/org.eclipse.egf.model/templates/model/ResourceClass.javajet
new file mode 100644
index 0000000..41cee5a
--- /dev/null
+++ b/org.eclipse.egf.model/templates/model/ResourceClass.javajet
@@ -0,0 +1,586 @@
+<%@ jet package="org.eclipse.emf.codegen.ecore.templates.model" imports="org.eclipse.emf.codegen.ecore.genmodel.* org.eclipse.emf.codegen.ecore.genmodel.impl.* java.util.* org.eclipse.emf.ecore.EStructuralFeature org.eclipse.emf.ecore.util.*" class="ResourceClass" version="$Id: ResourceClass.javajet,v 1.16 2008/12/22 14:25:18 emerks Exp $" %>
+<%
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2002-2006 IBM Corporation and others.
+ * 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:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ */
+%>
+<%GenPackage genPackage = (GenPackage)argument; GenModel genModel=genPackage.getGenModel(); ExtendedMetaData extendedMetaData= genModel.getExtendedMetaData();%>
+<%@ include file="../Header.javajetinc"%>
+package <%=genPackage.getUtilitiesPackageName()%>;
+
+<%genModel.getImportedName("org.eclipse.emf.common.util.URI");%>
+<%genModel.getImportedName("org.eclipse.emf.ecore.EClass");%>
+<%genModel.getImportedName("org.eclipse.emf.ecore.EClassifier");%>
+<%genModel.getImportedName("org.eclipse.emf.ecore.EStructuralFeature");%>
+<%genModel.getImportedName("org.eclipse.emf.ecore.xmi.XMLResource");%>
+<%genModel.getImportedName("org.eclipse.egf.model.uri.ModelSchemeAware");%>
+<%genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject");%>
+<%genModel.markImportLocation(stringBuffer);%>
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource </b> associated with the package.
+ * <!-- end-user-doc -->
+ * @see <%=genPackage.getQualifiedResourceFactoryClassName()%>
+ * @generated
+ */
+public class <%=genPackage.getResourceClassName()%> extends <%=genPackage.getImportedResourceBaseClassName()%>
+{
+<%if (genModel.hasCopyrightField()) {%>
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final <%=genModel.getImportedName("java.lang.String")%> copyright = <%=genModel.getCopyrightFieldLiteral()%>;<%=genModel.getNonNLS()%>
+
+<%}%>
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private <%=genModel.getImportedName("java.util.List")%><Object> lookupTable = new <%=genModel.getImportedName("java.util.ArrayList")%><Object>();
+
+<%if (genPackage.getResource() == GenResourceKind.XMI_LITERAL) {%>
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ private XMLParserPool parserPool = new XMLParserPoolImpl();
+
+<%}%>
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private <%=genModel.getImportedName("java.util.Map")%><Object, Object> nameToFeatureMap = new <%=genModel.getImportedName("java.util.HashMap")%><Object, Object>();
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param uri the URI of the new resource.
+ * @generated
+ */
+ public <%=genPackage.getResourceClassName()%>(URI uri)
+ {
+ super(uri);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+<%if (genModel.useClassOverrideAnnotation()) {%>
+ @Override
+<%}%>
+ protected boolean useIDAttributes()
+ {
+ return false;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+<%if (genModel.useClassOverrideAnnotation()) {%>
+ @Override
+<%}%>
+ protected boolean useUUIDs() {
+ return true;
+ }
+
+<%if (genPackage.isDataTypeConverters() && (genPackage.hasDocumentRoot() || org.eclipse.emf.ecore.xml.type.XMLTypePackage.eNS_URI.equals(genPackage.getNSURI()))) { boolean isXMLTypePackage = org.eclipse.emf.ecore.xml.type.XMLTypePackage.eNS_URI.equals(genPackage.getNSURI());%>
+<%final String _Map = genModel.useGenerics() ? "Map<?, ?>" : "Map";%>
+<%final String _MapStringBoolean = genModel.useGenerics() ? "Map<String, Boolean>" : "Map";%>
+<%final String _MapStringWildcard = genModel.useGenerics() ? "Map<String, ?>" : "Map";%>
+<%if (!isXMLTypePackage) {%>
+<%genModel.getImportedName("org.eclipse.emf.ecore.xmi.XMLResource");%>
+<%genModel.getImportedName("org.eclipse.emf.ecore.xmi.XMLParserPool");%>
+<%genModel.getImportedName("org.eclipse.emf.ecore.xmi.impl.XMLParserPoolImpl");%>
+<%genModel.getImportedName("java.io.InputStream");%>
+<%genModel.getImportedName("java.io.IOException");%>
+<%genModel.getImportedName("org.eclipse.emf.ecore.EObject");%>
+<%genModel.getImportedName("java.util.Collections");%>
+<%genModel.getImportedName("java.util.HashMap");%>
+<%genModel.getImportedName("java.util.Map");%>
+<%genModel.getImportedName("org.xml.sax.InputSource");%>
+<%genModel.getImportedName("javax.xml.parsers.SAXParser");%>
+<%}%>
+<%genModel.getImportedName("org.xml.sax.Attributes");%>
+<%genModel.getImportedName("org.xml.sax.SAXException");%>
+<%String _StackFrame = genModel.getImportedName("org.eclipse.emf.ecore.xml.type.util.XMLTypeResourceImpl")+".StackFrame";%>
+<%String _DataFrame = genModel.getImportedName("org.eclipse.emf.ecore.xml.type.util.XMLTypeResourceImpl")+".DataFrame";%>
+<%if (!isXMLTypePackage) {%>
+ /**
+ * A load option that turns of the use of the generate data converters.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String OPTION_USE_DATA_CONVERTER = "USE_DATA_CONVERTER";
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ <%if (genModel.useClassOverrideAnnotation()) {%>
+ @Override
+ <%}%>
+ public void doLoad(InputStream inputStream, <%=_Map%> options) throws IOException
+ {
+ if (options != null && Boolean.TRUE.equals(options.get(OPTION_USE_DATA_CONVERTER)))
+ {
+ getContents().add
+ (load
+ (new InputSource(inputStream),
+ (<%=_MapStringBoolean%>)options.get(XMLResource.OPTION_PARSER_FEATURES),
+ (<%=_MapStringWildcard%>)options.get(XMLResource.OPTION_PARSER_PROPERTIES),
+ Boolean.TRUE.equals(options.get(XMLResource.OPTION_USE_LEXICAL_HANDLER))).eContainer());
+ }
+ else
+ {
+ super.doLoad(inputStream, options);
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ <%if (genModel.useClassOverrideAnnotation()) {%>
+ @Override
+ <%}%>
+ public void doLoad(InputSource inputSource, <%=_Map%> options) throws IOException
+ {
+ if (options != null && Boolean.TRUE.equals(options.get(OPTION_USE_DATA_CONVERTER)))
+ {
+ getContents().add
+ (load
+ (inputSource,
+ (<%=_MapStringBoolean%>)options.get(XMLResource.OPTION_PARSER_FEATURES),
+ (<%=_MapStringWildcard%>)options.get(XMLResource.OPTION_PARSER_PROPERTIES),
+ Boolean.TRUE.equals(options.get(XMLResource.OPTION_USE_LEXICAL_HANDLER))).eContainer());
+ }
+ else
+ {
+ super.doLoad(inputSource, options);
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static final XMLParserPool parserPool = new XMLParserPoolImpl();
+
+ /**
+ * Loads an instance from the input.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param inputSource the input from which to load.
+ * @param features a map of the parser features and their values.
+ * @param properties a map of a parser properties and their values.
+ * @param useLexicalHandler whether a lexical handler should be used during loading.
+ * @return the root object; for the case of a document root, the child of that document root is return.
+ * @throws ParserConfigurationException
+ * @throws SAXException
+ * @generated
+ */
+ public static EObject load(InputSource inputSource, <%=_MapStringBoolean%> features, <%=_MapStringWildcard%> properties, boolean useLexicalHandler) throws IOException
+ {
+ <%=_MapStringBoolean%> requiredFeatures = new <%=_MapStringBoolean.replaceAll("Map","HashMap")%>();
+ requiredFeatures.put("http://xml.org/sax/features/namespaces", Boolean.TRUE);
+ if (features != null)
+ {
+ requiredFeatures.putAll(features);
+ }
+
+ if (properties == null)
+ {
+ properties = Collections.<%if (genModel.useGenerics()) {%>emptyMap()<%} else {%>EMPTY_MAP<%}%>;
+ }
+
+ SAXParser saxParser = null;
+ try
+ {
+ saxParser = parserPool.get(requiredFeatures, properties, useLexicalHandler);
+ final FrameFactory.DocumentRootStackFrame documentRoot = FrameFactory.INSTANCE.pushDocumentRoot(null, null);
+ XMLTypeResourceImpl.Handler handler = new XMLTypeResourceImpl.Handler(documentRoot);
+ saxParser.parse(inputSource, handler);
+<%if (genModel.isSuppressEMFTypes()) {%>
+ return (EObject)((EObject)FrameFactory.INSTANCE.popDocumentRoot(documentRoot)).eContents().get(0);
+<%} else {%>
+ return FrameFactory.INSTANCE.popDocumentRoot(documentRoot).eContents().get(0);
+<%}%>
+ }
+ catch (Exception exception)
+ {
+ throw new IOWrappedException(exception);
+ }
+ finally
+ {
+ parserPool.release(saxParser, requiredFeatures, properties, useLexicalHandler);
+ }
+ }
+
+<%}%>
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public final static class FrameFactory
+ {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final FrameFactory INSTANCE = new FrameFactory();
+
+<%for (GenClass genClass : genPackage.getGenClasses()) {%>
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected <%=genClass.getName()%>StackFrame <%=genClass.getSafeUncapName()%>;
+
+<%}%>
+<%for (GenDataType genDataType : genPackage.getAllGenDataTypes()) {%>
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected <%=_DataFrame%> <%=genDataType.getSafeUncapName()%>;
+
+<%}%>
+<%for (GenClass genClass : genPackage.getGenClasses()) {%>
+<%List<EStructuralFeature> attributes = extendedMetaData.getAllAttributes(genClass.getEcoreClass());%>
+<%List<EStructuralFeature> elements = extendedMetaData.getAllElements(genClass.getEcoreClass());%>
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public <%=genClass.getName()%>StackFrame push<%=genClass.getName()%>(<%=_StackFrame%> previous, Attributes attributes)
+ {
+ <%=genClass.getName()%>StackFrame result<%=genClass.getName()%> = <%=genClass.getSafeUncapName()%> == null ? new <%=genClass.getName()%>StackFrame() : <%=genClass.getSafeUncapName()%>;
+ <%=genClass.getSafeUncapName()%> = null;
+ result<%=genClass.getName()%>.pushOnto(previous);
+ result<%=genClass.getName()%>.handleAttributes(attributes);
+ return result<%=genClass.getName()%>;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public <%=genClass.getImportedInterfaceName()%> pop<%=genClass.getName()%>(<%=genClass.getName()%>StackFrame <%=genClass.getSafeUncapName()%>)
+ {
+ <%=genClass.getImportedInterfaceName()%> result<%=genClass.getName()%>Value = <%=genClass.getSafeUncapName()%>.pop<%=genClass.getName()%>();
+ this.<%=genClass.getSafeUncapName()%> = <%=genClass.getSafeUncapName()%>;
+ return result<%=genClass.getName()%>Value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class <%=genClass.getName()%>StackFrame extends <%=_StackFrame%>
+ {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected <%=genClass.getImportedInterfaceName()%> the<%=genClass.getName()%>;
+
+<%for (GenFeature genFeature : genClass.getAllGenFeatures()) {%>
+<%String name = extendedMetaData.getName(genFeature.getEcoreFeature());%>
+<%if ((elements.contains(genFeature.getEcoreFeature()) || attributes.contains(genFeature.getEcoreFeature())) && name.indexOf(":") == -1) {%>
+<%if (genFeature.isReferenceType()) {%>
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected <%=genFeature.getTypeGenClass().getGenPackage().getImportedResourceClassName()%>.FrameFactory.<%=genFeature.getTypeGenClass().getName()%>StackFrame <%=genFeature.getSafeName()%>;
+
+<%} else {%>
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected <%=_DataFrame%> <%=genFeature.getSafeName()%>;
+
+<%}%>
+<%}%>
+<%}%>
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ <%if (genModel.useClassOverrideAnnotation()) {%>
+ @Override
+ <%}%>
+ public void handleAttributes(Attributes attributes)
+ {
+<%int count = 0; for (GenFeature genFeature : genClass.getAllGenFeatures()) {%>
+<%String name = extendedMetaData.getName(genFeature.getEcoreFeature());%>
+<%if (attributes.contains(genFeature.getEcoreFeature()) && !genFeature.isDerived() && name.indexOf(":") == -1) {%>
+<%String namespace = Literals.toStringLiteral(extendedMetaData.getNamespace(genFeature.getEcoreFeature()), genModel); if ("null".equals(namespace)) namespace = "\"\"";%>
+<%if (!genFeature.isReferenceType()) { GenClassifier genClassifier = genFeature.getTypeGenClassifier();%>
+<%if (count++ == 0) {%>
+ String theValue = attributes.getValue(<%=namespace%>, "<%=name%>");
+<%} else {%>
+ theValue = attributes.getValue(<%=namespace%>, "<%=name%>");
+<%}%>
+ if (theValue != null)
+ {
+<%if (genClassifier.getGenPackage().isDataTypeConverters()) {%>
+ the<%=genClass.getName()%>.set<%=genFeature.getAccessorName()%>(<%=genClassifier.getGenPackage().getQualifiedFactoryInstanceAccessor()%>.create<%=genClassifier.getName()%>(theValue));
+<%} else {%>
+ the<%=genClass.getName()%>.set<%=genFeature.getAccessorName()%>((<%=genFeature.getImportedType(null)%>)<%=genClassifier.getGenPackage().getQualifiedEFactoryInstanceAccessor()%>.createFromString(<%=genClassifier.getQualifiedClassifierAccessor()%>, theValue));
+<%}%>
+ }
+<%}%>
+<%}%>
+<%}%>
+<%if (count == 0) {%>
+ // There are attributes to handle.
+<%}%>
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ <%if (genModel.useClassOverrideAnnotation()) {%>
+ @Override
+ <%}%>
+ public <%=_StackFrame%> startElement(String namespace, String localName, String qName, Attributes attributes) throws SAXException
+ {
+<%count = 0; for (GenFeature genFeature : genClass.getAllGenFeatures()) {%>
+<%String name = extendedMetaData.getName(genFeature.getEcoreFeature());%>
+<%if (elements.contains(genFeature.getEcoreFeature()) && name.indexOf(":") == -1) {%>
+<%String namespace = Literals.toStringLiteral(extendedMetaData.getNamespace(genFeature.getEcoreFeature()), genModel); if ("null".equals(namespace)) namespace = "\"\"";%>
+ <%if (count++ != 0) {%>else <%}%>if ("<%=name%>".equals(localName) && <%=namespace%>.equals(namespace))
+ {
+ return <%=genFeature.getSafeName()%> = <%=genFeature.getTypeGenClassifier().getGenPackage().getImportedResourceClassName()%>.FrameFactory.INSTANCE.push<%=genFeature.getTypeGenClassifier().getName()%>(this, attributes);
+ }
+<%}%>
+<%}%>
+<%if (count == 0) {%>
+ return super.startElement(namespace, localName, qName, attributes);
+<%} else {%>
+ else
+ {
+ return super.startElement(namespace, localName, qName, attributes);
+ }
+<%}%>
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ <%if (genModel.useClassOverrideAnnotation()) {%>
+ @Override
+ <%}%>
+ public void endElement(<%=_StackFrame%> child) throws SAXException
+ {
+<%count = 0; for (GenFeature genFeature : genClass.getAllGenFeatures()) {%>
+<%String name = extendedMetaData.getName(genFeature.getEcoreFeature());%>
+<%if (elements.contains(genFeature.getEcoreFeature()) && name.indexOf(":") == -1) {%>
+ <%if (count++ != 0) {%>else <%}%>if (child == <%=genFeature.getSafeName()%>)
+ {
+<%if (genFeature.isListType()) {%>
+ the<%=genClass.getName()%>.<%=genFeature.getGetAccessor()%>().add(<%=genFeature.getTypeGenClassifier().getGenPackage().getImportedResourceClassName()%>.FrameFactory.INSTANCE.pop<%=genFeature.getTypeGenClassifier().getName()%>(<%=genFeature.getSafeName()%>));
+<%} else {%>
+ the<%=genClass.getName()%>.set<%=genFeature.getAccessorName()%>(<%=genFeature.getTypeGenClassifier().getGenPackage().getImportedResourceClassName()%>.FrameFactory.INSTANCE.pop<%=genFeature.getTypeGenClassifier().getName()%>(<%=genFeature.getSafeName()%>));
+<%}%>
+ <%=genFeature.getSafeName()%> = null;
+ }
+<%}%>
+<%}%>
+<%if (count == 0) {%>
+ super.endElement(child);
+<%} else {%>
+ else
+ {
+ super.endElement(child);
+ }
+<%}%>
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ <%if (genModel.useClassOverrideAnnotation()) {%>
+ @Override
+ <%}%>
+ public void create()
+ {
+ the<%=genClass.getName()%> = <%=genPackage.getQualifiedFactoryInstanceAccessor()%>.create<%=genClass.getName()%>();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected <%=genClass.getImportedInterfaceName()%> pop<%=genClass.getName()%>()
+ {
+ pop();
+ <%=genClass.getImportedInterfaceName()%> result<%=genClass.getName()%>Value = the<%=genClass.getName()%>;
+ the<%=genClass.getName()%> = null;
+ return result<%=genClass.getName()%>Value;
+ }
+
+ }
+
+<%}%>
+<%for (GenDataType genDataType : genPackage.getAllGenDataTypes()) {%>
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public <%=_DataFrame%> push<%=genDataType.getName()%>(<%=_StackFrame%> previous, Attributes attributes)
+ {
+ <%=_DataFrame%> result<%=genDataType.getName()%> = <%=genDataType.getSafeUncapName()%> == null ? new <%=_DataFrame%>() : <%=genDataType.getSafeUncapName()%>;
+ <%=genDataType.getSafeUncapName()%> = null;
+ result<%=genDataType.getName()%>.pushOnto(previous);
+ result<%=genDataType.getName()%>.handleAttributes(attributes);
+ return result<%=genDataType.getName()%>;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public <%=genDataType.getImportedParameterizedInstanceClassName()%> pop<%=genDataType.getName()%>(<%=_DataFrame%> <%=genDataType.getSafeUncapName()%>)
+ {
+<%if (genDataType.getGenPackage().isDataTypeConverters()) {%>
+ <%=genDataType.getImportedParameterizedInstanceClassName()%> result<%=genDataType.getName()%>Value = <%=genDataType.getGenPackage().getQualifiedFactoryInstanceAccessor()%>.create<%=genDataType.getName()%>(<%=genDataType.getSafeUncapName()%>.popValue());
+<%} else if (genDataType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {%>
+ <%=genDataType.getImportedInstanceClassName()%> result<%=genDataType.getName()%>Value = ((<%=genDataType.getObjectInstanceClassName()%>)<%=genDataType.getGenPackage().getQualifiedEFactoryInstanceAccessor()%>.createFromString(<%=genDataType.getQualifiedClassifierAccessor()%>, <%=genDataType.getSafeUncapName()%>.popValue())).<%=genDataType.getPrimitiveValueFunction()%>();
+<%} else {%>
+ <%=genDataType.getImportedInstanceClassName()%> result<%=genDataType.getName()%>Value = (<%=genDataType.getObjectInstanceClassName()%>)<%=genDataType.getGenPackage().getQualifiedEFactoryInstanceAccessor()%>.createFromString(<%=genDataType.getQualifiedClassifierAccessor()%>, <%=genDataType.getSafeUncapName()%>.popValue());
+<%}%>
+ this.<%=genDataType.getSafeUncapName()%> = <%=genDataType.getSafeUncapName()%>;
+ return result<%=genDataType.getName()%>Value;
+ }
+
+<%}%>
+ }
+
+<%}%>
+
+ /**
+ * Called when the object is unloaded.
+ * This implementation
+ * {@link InternalEObject#eSetProxyURI sets} the object to be a proxy
+ * and clears the {@link #eAdapters adapters}.
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=292866
+ * Fix available in HEAD: 2.6.0.I200911020144
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void unloaded(InternalEObject internalEObject) {
+ // Ensure that an unresolved containment proxy's URI isn't reset.
+ //
+ if (!internalEObject.eIsProxy()) {
+ internalEObject.eSetProxyURI(uri.appendFragment(getURIFragment(internalEObject)));
+ }
+ internalEObject.eAdapters().clear();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected void init() {
+ super.init();
+ setTrackingModification(true);
+ setEncoding("UTF-8");<%=genModel.getNonNLS()%>
+<%if (genPackage.getResource() == GenResourceKind.XMI_LITERAL) {%>
+ setXMIVersion("2.1");<%=genModel.getNonNLS()%>
+<%}%>
+ // Save Options
+ getDefaultSaveOptions().put(XMLResource.OPTION_DISABLE_NOTIFY, Boolean.TRUE);
+ getDefaultSaveOptions().put(XMLResource.OPTION_CONFIGURATION_CACHE, Boolean.TRUE);
+ getDefaultSaveOptions().put(XMLResource.OPTION_USE_CACHED_LOOKUP_TABLE, lookupTable);
+ getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ getDefaultSaveOptions().put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
+ getDefaultSaveOptions().put(XMLResource.OPTION_SAVE_TYPE_INFORMATION, new XMLTypeInfo() {
+ public boolean shouldSaveType(EClass objectType, EClassifier featureType, EStructuralFeature feature) {
+ return objectType != featureType && objectType != XMLTypePackage.Literals.ANY_TYPE;
+ }
+ public boolean shouldSaveType(EClass objectType, EClass featureType, EStructuralFeature feature) {
+ return objectType != featureType && objectType != XMLTypePackage.Literals.ANY_TYPE;
+ }
+ });
+ getDefaultSaveOptions().put(XMLResource.OPTION_LINE_WIDTH, new Integer(80));
+ // Avoid relative paths from workspace resources to plugin resources.
+ getDefaultSaveOptions().put(XMLResource.OPTION_URI_HANDLER, new ModelSchemeAware());
+ getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ getDefaultSaveOptions().put(XMIResource.OPTION_USE_XMI_TYPE, Boolean.TRUE);
+ // Load Options
+ getDefaultLoadOptions().put(XMLResource.OPTION_DISABLE_NOTIFY, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_DEFER_ATTACHMENT, Boolean.FALSE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_DEFER_IDREF_RESOLUTION, Boolean.FALSE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_DEPRECATED_METHODS, Boolean.TRUE);
+<%if (genPackage.getResource() == GenResourceKind.XMI_LITERAL) {%>
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_PARSER_POOL, parserPool);
+<%}%>
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_XML_NAME_TO_FEATURE_MAP, nameToFeatureMap);
+ getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE);
+ getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ }
+} //<%=genPackage.getResourceClassName()%>
+<%genModel.emitSortedImports();%>
diff --git a/org.eclipse.egf.model/templates/model/ValidatorClass.javajet b/org.eclipse.egf.model/templates/model/ValidatorClass.javajet
new file mode 100644
index 0000000..242aacc
--- /dev/null
+++ b/org.eclipse.egf.model/templates/model/ValidatorClass.javajet
@@ -0,0 +1,737 @@
+<%@ jet package="org.eclipse.emf.codegen.ecore.templates.model" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.* org.eclipse.emf.codegen.util.CodeGenUtil" class="ValidatorClass" version="$Id: ValidatorClass.javajet,v 1.33 2009/01/07 01:58:23 emerks Exp $" %>
+<%
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2002-2006 IBM Corporation and others.
+ * 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:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ */
+%>
+<%GenPackage genPackage = (GenPackage)argument; GenModel genModel=genPackage.getGenModel();%>
+<%final String singleWildcard = genModel.getComplianceLevel().getValue() >= GenJDKLevel.JDK50 ? "<?>" : "";%>
+<%@ include file="../Header.javajetinc"%>
+package <%=genPackage.getUtilitiesPackageName()%>;
+
+<%genModel.addImport("java.util.Map");%>
+<%final String _Map = genModel.useGenerics() ? "Map<" + genModel.getImportedName("java.lang.Object") + ", " + genModel.getImportedName("java.lang.Object") + ">" : "Map";%>
+<%final String objectArgument = genModel.useGenerics() ? "<" + genModel.getImportedName("java.lang.Object") + ">" : "";%>
+<%genModel.addImport("org.eclipse.emf.common.util.DiagnosticChain");%>
+<%genModel.addImport("org.eclipse.emf.ecore.EPackage");%>
+<%if (!genPackage.hasJavaLangConflict() && !genPackage.getUtilitiesPackageName().equals(genPackage.getInterfacePackageName())) genModel.addImport(genPackage.getInterfacePackageName() + ".*");%>
+<%genModel.markImportLocation(stringBuffer);%>
+<%genModel.addPseudoImport("org.eclipse.emf.ecore.EValidator.Descriptor");%>
+<%genModel.addPseudoImport("org.eclipse.emf.ecore.EValidator.Registry");%>
+<%genModel.addPseudoImport("org.eclipse.emf.ecore.EValidator.SubstitutionLabelProvider");%>
+<%genModel.addPseudoImport("org.eclipse.emf.ecore.EValidator.PatternMatcher");%>
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Validator</b> for the model.
+ * <!-- end-user-doc -->
+ * @see <%=genPackage.getQualifiedPackageInterfaceName()%>
+ * @generated
+ */
+public class <%=genPackage.getValidatorClassName()%> extends <%=genModel.getImportedName("org.eclipse.emf.ecore.util.EObjectValidator")%>
+{
+<%if (genModel.hasCopyrightField()) {%>
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final <%=genModel.getImportedName("java.lang.String")%> copyright = <%=genModel.getCopyrightFieldLiteral()%>;<%=genModel.getNonNLS()%>
+
+<%}%>
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final <%=genPackage.getValidatorClassName()%> INSTANCE = new <%=genPackage.getValidatorClassName()%>();
+
+ /**
+ * A constant for the {@link org.eclipse.emf.common.util.Diagnostic#getSource() source} of diagnostic {@link org.eclipse.emf.common.util.Diagnostic#getCode() codes} from this package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.common.util.Diagnostic#getSource()
+ * @see org.eclipse.emf.common.util.Diagnostic#getCode()
+ * @generated
+ */
+ public static final String DIAGNOSTIC_SOURCE = "<%=genPackage.getInterfacePackageName()%>";<%=genModel.getNonNLS()%>
+
+<%int count = 0; for (GenClass genClass : genPackage.getGenClasses()) {%>
+<%for (GenOperation genOperation : genClass.getInvariantOperations()) {%>
+ /**
+ * The {@link org.eclipse.emf.common.util.Diagnostic#getCode() code} for constraint '<%=genOperation.getFormattedName()%>' of '<%=genClass.getFormattedName()%>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final int <%=genClass.getOperationID(genOperation)%> = <%=++count%>;
+
+<%}}%>
+ /**
+ * A constant with a fixed name that can be used as the base value for additional hand written constants.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static final int GENERATED_DIAGNOSTIC_CODE_COUNT = <%=count%>;
+
+ /**
+ * A constant with a fixed name that can be used as the base value for additional hand written constants in a derived class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static final int DIAGNOSTIC_CODE_COUNT = GENERATED_DIAGNOSTIC_CODE_COUNT;
+
+ /**
+ * Model Validation Service interface for batch validation of EMF elements.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final <%=genModel.getImportedName("org.eclipse.emf.validation.service.IBatchValidator")%> batchValidator;
+
+<%for (GenPackage baseGenPackage : genPackage.getAllValidatorBaseGenPackages()) {%>
+ /**
+ * The cached base package validator.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected <%=baseGenPackage.getImportedValidatorClassName()%> <%=genPackage.getValidatorPackageUniqueSafeName(baseGenPackage)%>Validator;
+
+<%}%>
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public <%=genPackage.getValidatorClassName()%>()
+ {
+ super();
+<%for (GenPackage baseGenPackage : genPackage.getAllValidatorBaseGenPackages()) {%>
+ <%=genPackage.getValidatorPackageUniqueSafeName(baseGenPackage)%>Validator = <%=baseGenPackage.getImportedValidatorClassName()%>.INSTANCE;
+<%}%>
+ batchValidator = (<%=genModel.getImportedName("org.eclipse.emf.validation.service.IBatchValidator")%>) <%=genModel.getImportedName("org.eclipse.emf.validation.service.ModelValidationService")%>.getInstance().newValidator(<%=genModel.getImportedName("org.eclipse.emf.validation.model.EvaluationMode")%>.BATCH);
+ batchValidator.setTraversalStrategy(new <%=genModel.getImportedName("org.eclipse.emf.validation.service.ITraversalStrategy.Recursive")%>());
+ batchValidator.setIncludeLiveConstraints(true);
+ batchValidator.setReportSuccesses(false);
+ }
+
+ /**
+ * Returns the package of this validator switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ <%if (genModel.useClassOverrideAnnotation()) {%>
+ @Override
+ <%}%>
+ protected EPackage getEPackage()
+ {
+ return <%=genPackage.getImportedPackageInterfaceName()%>.eINSTANCE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+<%if (genModel.useClassOverrideAnnotation()) {%>
+ @Override
+<%}%>
+ public boolean validate(<%=genModel.getImportedName("org.eclipse.emf.ecore.EClass")%> eClass, <%=genModel.getImportedName("org.eclipse.emf.ecore.EObject")%> eObject, <%=genModel.getImportedName("org.eclipse.emf.common.util.DiagnosticChain")%> diagnostics, <%=genModel.getImportedName("java.util.Map")%><Object, Object> context)
+ {
+ <%=genModel.getImportedName("org.eclipse.core.runtime.IStatus")%> status = <%=genModel.getImportedName("org.eclipse.core.runtime.Status")%>.OK_STATUS;
+ // do whatever the basic EcoreValidator does
+ super.validate(eClass, eObject, diagnostics, context);
+ // no point in validating if we can't report results
+ if (diagnostics != null)
+ {
+ // if EMF Mode Validation Service already covered the sub-tree,
+ // which it does for efficient computation and error reporting,
+ // then don't repeat (the Diagnostician does the recursion
+ // externally). If there is no context map, then we can't
+ // help it
+ if (hasProcessed(eObject, context) == false)
+ {
+ status = batchValidator.validate(eObject, new <%=genModel.getImportedName("org.eclipse.core.runtime.NullProgressMonitor")%>());
+ processed(eObject, context, status);
+ appendDiagnostics(status, diagnostics);
+ }
+ }
+ return status.isOK();
+ }
+
+ /**
+ * Calls <code>validateXXX</code> for the corresponding classifier of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ <%if (genModel.useClassOverrideAnnotation()) {%>
+ @Override
+ <%}%>
+ <%for (GenClassifier genClassifier : genPackage.getGenClassifiers()) {%>
+ <%if (genClassifier.isUncheckedCast()) {%>
+ @SuppressWarnings("unchecked")
+ <%break; }%>
+ <%}%>
+ protected boolean validate(int classifierID, Object value, DiagnosticChain diagnostics, <%=_Map%> context)
+ {
+ switch (classifierID)
+ {
+<%for (GenClassifier genClassifier : genPackage.getGenClassifiers()) {%>
+ case <%=genPackage.getImportedPackageInterfaceName()%>.<%=genPackage.getClassifierID(genClassifier)%>:
+ <%if (genClassifier instanceof GenDataType) { GenDataType genDataType = (GenDataType)genClassifier;%>
+ <%if (genDataType.isPrimitiveType()) {%>
+ <%if (genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {%>
+ return validate<%=genDataType.getName()%>(((<%=genDataType.getObjectInstanceClassName()%>)value).<%=genDataType.getPrimitiveValueFunction()%>(), diagnostics, context);
+ <%} else {%>
+ return validate<%=genDataType.getName()%>((<%=genDataType.getObjectInstanceClassName()%>)value, diagnostics, context);
+ <%}%>
+ <%} else if (genDataType.isObjectType()) {%>
+ return validate<%=genDataType.getName()%>(value, diagnostics, context);
+ <%} else {%>
+ return validate<%=genDataType.getName()%>((<%=genDataType.getObjectType().getImportedWildcardInstanceClassName()%>)value, diagnostics, context);
+ <%}%>
+ <%} else { GenClass genClass = (GenClass)genClassifier;%>
+ return validate<%=genClass.getName()%>((<%=genClass.getImportedWildcardInstanceClassName()%>)value, diagnostics, context);
+ <%}%>
+<%}%>
+ default:
+ return true;
+ }
+ }
+
+<%for (GenClassifier genClassifier : genPackage.getGenClassifiers()) {String result = "result".equals(genClassifier.getSafeUncapName()) ? "theResult" : "result"; String diagnostics = "diagnostics".equals(genClassifier.getSafeUncapName()) ? "theDiagnostics" : "diagnostics"; String item = "item".equals(genClassifier.getSafeUncapName()) ? "theItem" : "item"; String context = "context".equals(genClassifier.getSafeUncapName()) ? "theContext" : "context";%>
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validate<%=genClassifier.getName()%>(<%=genClassifier.getImportedWildcardInstanceClassName()%> <%=genClassifier.getSafeUncapName()%>, DiagnosticChain <%=diagnostics%>, <%=_Map%> <%=context%>)
+ {
+<%if (genClassifier.getAllGenConstraints().isEmpty()) {%>
+ return true;
+<%} else if (genClassifier.hasOnlyDefaultConstraints()) {%>
+ return validate_EveryDefaultConstraint(<%if (!((GenClass)genClassifier).isEObjectExtension()){%>(<%=genModel.getImportedName("org.eclipse.emf.ecore.EObject")%>)<%}%><%=genClassifier.getSafeUncapName()%>, <%=diagnostics%>, <%=context%>);
+<%} else { boolean first = true;%>
+<%for (String constraint : genClassifier.getAllGenConstraints()) {GenClassifier constraintImplementor = genClassifier.getConstraintImplementor(constraint);
+ String delegate = constraintImplementor == null || constraintImplementor.getGenPackage() == genPackage ? "" : genPackage.getValidatorPackageUniqueSafeName(constraintImplementor.getGenPackage()) + "Validator.";
+ String cast = constraintImplementor == null && genClassifier instanceof GenClass && !((GenClass)genClassifier).isEObjectExtension() ? "(" + genModel.getImportedName("org.eclipse.emf.ecore.EObject") + ")" : "";
+ String accessor = constraintImplementor != null && genClassifier instanceof GenDataType && !((GenDataType)genClassifier).isPrimitiveType() && ((GenDataType)constraintImplementor).isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50 ? "." + ((GenDataType)constraintImplementor).getPrimitiveValueFunction() + "()" : "";%>
+<%if (first) { first = false;%>
+ boolean <%=result%> = <%=delegate%>validate<%=constraintImplementor == null ? "" : constraintImplementor.getName()%>_<%=constraint%>(<%=cast%><%=genClassifier.getSafeUncapName()%><%=accessor%>, <%=diagnostics%>, <%=context%>);
+<%} else {%>
+ if (<%=result%> || <%=diagnostics%> != null) result &= <%=delegate%>validate<%=constraintImplementor == null ? "" : constraintImplementor.getName()%>_<%=constraint%>(<%=cast%><%=genClassifier.getSafeUncapName()%><%=accessor%>, <%=diagnostics%>, <%=context%>);
+<%}%>
+<%}%>
+ return <%=result%>;
+<%}%>
+ }
+
+<%for (String constraint : genClassifier.getGenConstraints())
+{GenClassifier constraintDelegate = genClassifier.getConstraintDelegate(constraint);
+ String constant = genClassifier.getClassifierID() + "__" + CodeGenUtil.format(constraint, '_', null, false, false).toUpperCase(genClassifier.getGenModel().getLocale());
+ String delegate = constraintDelegate == null || constraintDelegate.getGenPackage() == genPackage ? "" : genPackage.getValidatorPackageUniqueSafeName(constraintDelegate.getGenPackage()) + "Validator.";
+ String cast = constraintDelegate == null && genClassifier instanceof GenClass && !((GenClass)genClassifier).isEObjectExtension() ? "(" + genModel.getImportedName("org.eclipse.emf.ecore.EObject") + ")" : "";
+ String accessor = constraintDelegate != null && genClassifier instanceof GenDataType && !((GenDataType)genClassifier).isPrimitiveType() && ((GenDataType)constraintDelegate).isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50 ? "." + ((GenDataType)constraintDelegate).getPrimitiveValueFunction() + "()" : "";%>
+<%if (genClassifier instanceof GenDataType) { GenDataType genDataType = (GenDataType)genClassifier;%>
+<%if (constraint.equals("Min") && genDataType.getMinLiteral() != null) {%>
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @see #validate<%=genDataType.getName()%>_<%=constraint%>
+ */
+ public static final <%=genDataType.getImportedInstanceClassName()%> <%=constant%>__VALUE = <%=genDataType.getStaticValue(genDataType.getMinLiteral())%>;
+
+<%} else if (constraint.equals("Max") && genDataType.getMaxLiteral() != null) {%>
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @see #validate<%=genDataType.getName()%>_<%=constraint%>
+ */
+ public static final <%=genDataType.getImportedInstanceClassName()%> <%=constant%>__VALUE = <%=genDataType.getStaticValue(genDataType.getMaxLiteral())%>;
+
+<%} else if (constraint.equals("TotalDigits") && genDataType.getTotalDigits() != -1 && !"java.math.BigDecimal".equals(genDataType.getQualifiedInstanceClassName())) { String value = "1"; for (int digitCount = genDataType.getTotalDigits(); digitCount > 0; --digitCount) value += "0"; %>
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @see #validate<%=genDataType.getName()%>_<%=constraint%>
+ */
+ public static final <%=genDataType.getImportedInstanceClassName()%> <%=constant%>__UPPER_BOUND = <%=genDataType.getStaticValue(value)%>;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @see #validate<%=genDataType.getName()%>_<%=constraint%>
+ */
+ public static final <%=genDataType.getImportedInstanceClassName()%> <%=constant%>__LOWER_BOUND = <%=genDataType.getStaticValue("-" + value)%>;
+
+<%} else if (constraint.equals("Pattern") && !genDataType.getPatterns().isEmpty()) {%>
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @see #validate<%=genDataType.getName()%>_<%=constraint%>
+ */
+ public static final PatternMatcher [][] <%=constant%>__VALUES =
+ new PatternMatcher [][]
+ {
+<%for (Iterator<List<String>> k = genDataType.getPatterns().iterator(); k.hasNext(); ) { List<String> patternList = k.next();%>
+ new PatternMatcher []
+ {
+<%for (Iterator<String> p = patternList.iterator(); p.hasNext(); ) { String pattern = p.next();%>
+ <%=genModel.getImportedName("org.eclipse.emf.ecore.xml.type.util.XMLTypeUtil")%>.createPatternMatcher(<%=pattern%>)<%=p.hasNext() ? "," : ""%>
+<%}%>
+ }<%=k.hasNext() ? "," : ""%>
+<%}%>
+ };
+
+<%} else if (constraint.equals("Enumeration") && !genDataType.getEnumerationLiterals().isEmpty()) {%>
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @see #validate<%=genDataType.getName()%>_<%=constraint%>
+ */
+ <%if (genDataType.isUncheckedCast()) {%>
+ @SuppressWarnings("unchecked")
+ <%}%>
+ public static final <%=genModel.getImportedName("java.util.Collection")%><%=objectArgument%> <%=constant%>__VALUES =
+ wrapEnumerationValues
+ (new Object[]
+ {
+<%for (Iterator<String> k = genDataType.getEnumerationLiterals().iterator(); k.hasNext(); ) { String literal = k.next();%>
+ <%if (genDataType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {%>new <%=genDataType.getObjectInstanceClassName()%>(<%}%><%=genDataType.getStaticValue(literal, false)%><%if (genDataType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {%>)<%}%><%=k.hasNext() ? "," : ""%>
+<%}%>
+ });
+
+<%}%>
+<%}%>
+ /**
+ * Validates the <%=constraint%> constraint of '<em><%=genClassifier.getFormattedName()%></em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean validate<%=genClassifier.getName()%>_<%=constraint%>(<%=genClassifier.getImportedWildcardInstanceClassName()%> <%=genClassifier.getSafeUncapName()%>, DiagnosticChain <%=diagnostics%>, <%=_Map%> <%=context%>)
+ {
+<%if (genClassifier instanceof GenDataType) { GenDataType genDataType = (GenDataType)genClassifier;%>
+<%if (constraint.equals("ItemType") && genDataType.getItemType() != null) { GenDataType itemType = genDataType.getItemType(); String itemDelegate = itemType.getGenPackage() == genPackage ? "" : genPackage.getValidatorPackageUniqueSafeName(itemType.getGenPackage()) + "Validator.";%>
+ boolean <%=result%> = true;
+ for (<%=genModel.getImportedName("java.util.Iterator")%><%=singleWildcard%> i = <%=genClassifier.getSafeUncapName()%>.iterator(); i.hasNext() && (result || diagnostics != null); )
+ {
+ Object item = i.next();
+ <%if (itemType.getGenPackage().hasConstraints()) {%>
+ if (<%=itemType.getQualifiedClassifierAccessor()%>.isInstance(item))
+ {
+ result &= <%=itemDelegate%>validate<%=itemType.getName()%>(<%if (itemType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {%>(<%}%><%if (!itemType.isObjectType()) {%>(<%=itemType.getObjectInstanceClassName()%>)<%}%><%=item%><%if (itemType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {%>).<%=itemType.getPrimitiveValueFunction()%>()<%}%>, <%=diagnostics%>, <%=context%>);
+ }
+ else
+ <%} else {%>
+ if (!<%=itemType.getQualifiedClassifierAccessor()%>.isInstance(item))
+ <%}%>
+ {
+ result = false;
+ reportDataValueTypeViolation(<%=itemType.getQualifiedClassifierAccessor()%>, item, <%=diagnostics%>, <%=context%>);
+ }
+ }
+ return result;
+<%} else if (constraint.equals("MemberTypes") && !genDataType.getMemberTypes().isEmpty()) {%>
+ if (diagnostics != null)
+ {
+ <%=genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic")%> tempDiagnostics = new BasicDiagnostic();
+<%for (ListIterator<GenDataType> k = genDataType.getMemberTypes().listIterator(); k.hasNext(); ) { GenDataType memberType = k.next(); String memberDelegate = memberType.getGenPackage() == genPackage ? "" : genPackage.getValidatorPackageUniqueSafeName(memberType.getGenPackage()) + "Validator.";%>
+ <%if (genDataType.isPrimitiveType()) {%>
+ if (<%=memberDelegate%>validate<%=memberType.getName()%>(<%=genClassifier.getSafeUncapName()%>, tempDiagnostics, <%=context%>)) return true;
+ <%} else {%>
+ if (<%=memberType.getQualifiedClassifierAccessor()%>.isInstance(<%=genClassifier.getSafeUncapName()%>))
+ {
+ <%if (memberType.getGenPackage().hasConstraints()) {%>if (<%=memberDelegate%>validate<%=memberType.getName()%>(<%if (memberType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {%>(<%}%><%if (!memberType.isObjectType() && !memberType.getQualifiedInstanceClassName().equals(genDataType.getQualifiedInstanceClassName())) {%>(<%=memberType.getImportedWildcardObjectInstanceClassName()%>)<%}%><%=genClassifier.getSafeUncapName()%><%if (memberType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {%>).<%=memberType.getPrimitiveValueFunction()%>()<%}%>, tempDiagnostics, <%=context%>)) <%}%>return true;
+ }
+ <%}%>
+<%}%>
+<%if (genModel.useGenerics()) {%>
+ for (<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%> diagnostic : tempDiagnostics.getChildren())
+ {
+ diagnostics.add(diagnostic);
+ }
+<%} else {%>
+ <%=genModel.getImportedName("java.util.List")%> children = tempDiagnostics.getChildren();
+ for (int i = 0; i < children.size(); i++)
+ {
+ diagnostics.add((<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>)children.get(i));
+ }
+<%}%>
+ }
+ else
+ {
+<%for (ListIterator<GenDataType> k = genDataType.getMemberTypes().listIterator(); k.hasNext(); ) { GenDataType memberType = k.next(); String memberDelegate = memberType.getGenPackage() == genPackage ? "" : genPackage.getValidatorPackageUniqueSafeName(memberType.getGenPackage()) + "Validator.";%>
+ <%if (genDataType.isPrimitiveType()) {%>
+ if (<%=memberDelegate%>validate<%=memberType.getName()%>(<%=genClassifier.getSafeUncapName()%>, null, <%=context%>)) return true;
+ <%} else {%>
+ if (<%=memberType.getQualifiedClassifierAccessor()%>.isInstance(<%=genClassifier.getSafeUncapName()%>))
+ {
+ <%if (memberType.getGenPackage().hasConstraints()) {%>if (<%=memberDelegate%>validate<%=memberType.getName()%>(<%if (memberType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {%>(<%}%><%if (!memberType.isObjectType() && !memberType.getQualifiedInstanceClassName().equals(genDataType.getQualifiedInstanceClassName())) {%>(<%=memberType.getImportedWildcardObjectInstanceClassName()%>)<%}%><%=genClassifier.getSafeUncapName()%><%if (memberType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {%>).<%=memberType.getPrimitiveValueFunction()%>()<%}%>, null, <%=context%>)) <%}%>return true;
+ }
+ <%}%>
+<%}%>
+ }
+ return false;
+<%} else if (constraint.equals("Pattern") && !genDataType.getPatterns().isEmpty()) {%>
+ return validatePattern(<%=genDataType.getQualifiedClassifierAccessor()%>, <%if (genDataType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {%>new <%=genDataType.getObjectInstanceClassName()%>(<%}%><%=genDataType.getSafeUncapName()%><%if (genDataType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {%>)<%}%>, <%=constant%>__VALUES, <%=diagnostics%>, <%=context%>);
+<%} else if (constraint.equals("Enumeration") && !genDataType.getEnumerationLiterals().isEmpty()) { String variable = genDataType.getSafeUncapName();%>
+<%if (genDataType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) { variable = variable + "Object";%>
+ <%=genDataType.getObjectInstanceClassName()%> <%=variable%> = new <%=genDataType.getObjectInstanceClassName()%>(<%=genDataType.getSafeUncapName()%>);
+<%}%>
+ boolean <%=result%> = <%=constant%>__VALUES.contains(<%=variable%>);
+ if (!<%=result%> && <%=diagnostics%> != null)
+ reportEnumerationViolation(<%=genDataType.getQualifiedClassifierAccessor()%>, <%=variable%>, <%=constant%>__VALUES, <%=diagnostics%>, <%=context%>);
+ return <%=result%>;
+<%} else if (constraint.equals("Min") && genDataType.getMinLiteral() != null) {%>
+<%if (genDataType.isPrimitiveType()) {%>
+ boolean <%=result%> = <%=genDataType.getSafeUncapName()%> <%=genDataType.isMinInclusive() ? ">=" : ">"%> <%=constant%>__VALUE;
+ if (!<%=result%> && <%=diagnostics%> != null)
+<%if (genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {%>
+ reportMinViolation(<%=genDataType.getQualifiedClassifierAccessor()%>, new <%=genDataType.getObjectInstanceClassName()%>(<%=genDataType.getSafeUncapName()%>), new <%=genDataType.getObjectInstanceClassName()%>(<%=constant%>__VALUE), <%=genDataType.isMinInclusive() ? "true" : "false"%>, <%=diagnostics%>, <%=context%>);
+<%} else {%>
+ reportMinViolation(<%=genDataType.getQualifiedClassifierAccessor()%>, <%=genDataType.getSafeUncapName()%>, <%=constant%>__VALUE, <%=genDataType.isMinInclusive() ? "true" : "false"%>, <%=diagnostics%>, <%=context%>);
+<%}%>
+ return <%=result%>;
+<%} else { String comparison = "comparison".equals(genClassifier.getSafeUncapName()) ? "theComparison" : "comparison";%>
+<%if (genDataType.isXMLCalendar()) {%>
+ int <%=comparison%> = <%=genModel.getImportedName("org.eclipse.emf.ecore.xml.type.util.XMLTypeUtil")%>.compareCalendar(<%=genDataType.getSafeUncapName()%>, <%=constant%>__VALUE);
+ boolean <%=result%> = <%if (genDataType.isMinInclusive()) {%><%=comparison%> == 0 || <%}%><%=comparison%> == 1;
+<%} else if (genDataType.isXMLDuration()) {%>
+ int <%=comparison%> = <%=genModel.getImportedName("org.eclipse.emf.ecore.xml.type.util.XMLTypeUtil")%>.compareDuration(<%=genDataType.getSafeUncapName()%>, <%=constant%>__VALUE);
+ boolean <%=result%> = <%if (genDataType.isMinInclusive()) {%><%=comparison%> == 0 || <%}%><%=comparison%> == 1;
+<%} else {%>
+ boolean <%=result%> = <%=genDataType.getSafeUncapName()%>.compareTo(<%=constant%>__VALUE) <%=genDataType.isMinInclusive() ? ">=" : ">"%> 0;
+<%}%>
+ if (!<%=result%> && <%=diagnostics%> != null)
+ reportMinViolation(<%=genDataType.getQualifiedClassifierAccessor()%>, <%=genDataType.getSafeUncapName()%>, <%=constant%>__VALUE, <%=genDataType.isMinInclusive() ? "true" : "false"%>, <%=diagnostics%>, <%=context%>);
+ return <%=result%>;
+<%}%>
+<%} else if (constraint.equals("Max") && genDataType.getMaxLiteral() != null) {%>
+<%if (genDataType.isPrimitiveType()) {%>
+ boolean <%=result%> = <%=genDataType.getSafeUncapName()%> <%=genDataType.isMaxInclusive() ? "<=" : "<"%> <%=constant%>__VALUE;
+ if (!<%=result%> && <%=diagnostics%> != null)
+<%if (genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {%>
+ reportMaxViolation(<%=genDataType.getQualifiedClassifierAccessor()%>, new <%=genDataType.getObjectInstanceClassName()%>(<%=genDataType.getSafeUncapName()%>), new <%=genDataType.getObjectInstanceClassName()%>(<%=constant%>__VALUE), <%=genDataType.isMaxInclusive() ? "true" : "false"%>, <%=diagnostics%>, <%=context%>);
+<%} else {%>
+ reportMaxViolation(<%=genDataType.getQualifiedClassifierAccessor()%>, <%=genDataType.getSafeUncapName()%>, <%=constant%>__VALUE, <%=genDataType.isMaxInclusive() ? "true" : "false"%>, <%=diagnostics%>, <%=context%>);
+<%}%>
+ return <%=result%>;
+<%} else { String comparison = "comparison".equals(genClassifier.getSafeUncapName()) ? "theComparison" : "comparison";%>
+<%if (genDataType.isXMLCalendar()) {%>
+ int <%=comparison%> = <%=genModel.getImportedName("org.eclipse.emf.ecore.xml.type.util.XMLTypeUtil")%>.compareCalendar(<%=genDataType.getSafeUncapName()%>, <%=constant%>__VALUE);
+ boolean <%=result%> = <%if (genDataType.isMaxInclusive()) {%><%=comparison%> == 0 || <%}%><%=comparison%> == -1;
+<%} else if (genDataType.isXMLDuration()) {%>
+ int <%=comparison%> = <%=genModel.getImportedName("org.eclipse.emf.ecore.xml.type.util.XMLTypeUtil")%>.compareDuration(<%=genDataType.getSafeUncapName()%>, <%=constant%>__VALUE);
+ boolean <%=result%> = <%if (genDataType.isMaxInclusive()) {%><%=comparison%> == 0 || <%}%><%=comparison%> == -1;
+<%} else {%>
+ boolean <%=result%> = <%=genDataType.getSafeUncapName()%>.compareTo(<%=constant%>__VALUE) <%=genDataType.isMaxInclusive() ? "<=" : "<"%> 0;
+<%}%>
+ if (!<%=result%> && <%=diagnostics%> != null)
+ reportMaxViolation(<%=genDataType.getQualifiedClassifierAccessor()%>, <%=genDataType.getSafeUncapName()%>, <%=constant%>__VALUE, <%=genDataType.isMaxInclusive() ? "true" : "false"%>, <%=diagnostics%>, <%=context%>);
+ return <%=result%>;
+<%}%>
+<%} else if (constraint.equals("MinLength") && genDataType.getMinLength() != -1) {%>
+ int length = <%=genDataType.getSafeUncapName()%>.<%=genDataType.getLengthAccessorFunction()%>;
+ boolean <%=result%> = length >= <%=genDataType.getMinLength()%>;
+ if (!<%=result%> && <%=diagnostics%> != null)
+ reportMinLengthViolation(<%=genDataType.getQualifiedClassifierAccessor()%>, <%=genDataType.getSafeUncapName()%>, length, <%=genDataType.getMinLength()%>, <%=diagnostics%>, <%=context%>);
+ return <%=result%>;
+<%} else if (constraint.equals("MaxLength") && genDataType.getMaxLength() != -1) {%>
+ int length = <%=genDataType.getSafeUncapName()%>.<%=genDataType.getLengthAccessorFunction()%>;
+ boolean <%=result%> = length <= <%=genDataType.getMaxLength()%>;
+ if (!<%=result%> && <%=diagnostics%> != null)
+ reportMaxLengthViolation(<%=genDataType.getQualifiedClassifierAccessor()%>, <%=genDataType.getSafeUncapName()%>, length, <%=genDataType.getMaxLength()%>, <%=diagnostics%>, <%=context%>);
+ return <%=result%>;
+<%} else if (constraint.equals("TotalDigits") && genDataType.getTotalDigits() != -1) {%>
+<%if (genDataType.isPrimitiveType()) {%>
+ boolean <%=result%> = <%=genDataType.getSafeUncapName()%> > <%=constant%>__LOWER_BOUND && <%=genDataType.getSafeUncapName()%> < <%=constant%>__UPPER_BOUND;
+ if (!<%=result%> && <%=diagnostics%> != null)
+<%if (genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {%>
+ reportTotalDigitsViolation(<%=genDataType.getQualifiedClassifierAccessor()%>, new <%=genDataType.getObjectInstanceClassName()%>(<%=genDataType.getSafeUncapName()%>), <%=genDataType.getTotalDigits()%>, <%=diagnostics%>, <%=context%>);
+<%} else {%>
+ reportTotalDigitsViolation(<%=genDataType.getQualifiedClassifierAccessor()%>, <%=genDataType.getSafeUncapName()%>, <%=genDataType.getTotalDigits()%>, <%=diagnostics%>, <%=context%>);
+<%}%>
+<%} else if ("java.math.BigDecimal".equals(genDataType.getQualifiedInstanceClassName())) {%>
+ boolean <%=result%> = <%=genDataType.getSafeUncapName()%>.unscaledValue().abs().toString().length() <= <%=genDataType.getTotalDigits()%>;
+ if (!<%=result%> && <%=diagnostics%> != null)
+ reportTotalDigitsViolation(<%=genDataType.getQualifiedClassifierAccessor()%>, <%=genDataType.getSafeUncapName()%>, <%=genDataType.getTotalDigits()%>, <%=diagnostics%>, <%=context%>);
+<%} else {%>
+ boolean <%=result%> = <%=genDataType.getSafeUncapName()%>.compareTo(<%=constant%>__LOWER_BOUND) > 0 && <%=genDataType.getSafeUncapName()%>.compareTo(<%=constant%>__UPPER_BOUND) < 0;
+ if (!<%=result%> && <%=diagnostics%> != null)
+ reportTotalDigitsViolation(<%=genDataType.getQualifiedClassifierAccessor()%>, <%=genDataType.getSafeUncapName()%>, <%=genDataType.getTotalDigits()%>, <%=diagnostics%>, <%=context%>);
+<%}%>
+ return <%=result%>;
+<%} else if (constraint.equals("FractionDigits") && genDataType.getFractionDigits() != -1 && "java.math.BigDecimal".equals(genDataType.getQualifiedInstanceClassName())) {%>
+ boolean <%=result%> = <%=genDataType.getSafeUncapName()%>.scale() <= <%=genDataType.getFractionDigits()%>;
+ if (!<%=result%> && <%=diagnostics%> != null)
+ reportFractionDigitsViolation(<%=genDataType.getQualifiedClassifierAccessor()%>, <%=genDataType.getSafeUncapName()%>, <%=genDataType.getFractionDigits()%>, <%=diagnostics%>, <%=context%>);
+ return <%=result%>;
+<%} else if (constraintDelegate != null) {%>
+ // TODO override the constraint, if desired
+ // -> uncomment the scaffolding
+ // -> specify the condition that violates the constraint
+ // -> verify the diagnostic details, including severity, code, and message
+ // Ensure that you remove @generated or mark it @generated NOT
+ if (false)
+ {
+ if (<%=diagnostics%> != null)
+ {
+ <%=diagnostics%>.add
+<%if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {%>
+ (createDiagnostic
+ (<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
+ DIAGNOSTIC_SOURCE,
+ 0,
+ "_UI_GenericConstraint_diagnostic",<%=genModel.getNonNLS()%>
+ new Object[] { "<%=constraint%>", getValueLabel(<%=genDataType.getQualifiedClassifierAccessor()%>, <%=genClassifier.getSafeUncapName()%>, <%=context%>) },<%=genModel.getNonNLS()%>
+ new Object[] { <%=genClassifier.getSafeUncapName()%> },
+ context));
+<%} else {%>
+ (new <%=genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic")%>
+ (<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
+ DIAGNOSTIC_SOURCE,
+ 0,
+ <%=genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin")%>.INSTANCE.getString("_UI_GenericConstraint_diagnostic", new Object[] { "<%=constraint%>", getValueLabel(<%=genDataType.getQualifiedClassifierAccessor()%>, <%=genClassifier.getSafeUncapName()%>, <%=context%>) }),<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
+ new Object[] { <%=genClassifier.getSafeUncapName()%> }));
+<%}%>
+ }
+ return false;
+ }
+ return <%=delegate%>validate<%=constraintDelegate.getName()%>_<%=constraint%>(<%=genClassifier.getSafeUncapName()%><%=accessor%>, <%=diagnostics%>, <%=context%>);
+<%} else {%>
+ // TODO implement the constraint
+ // -> specify the condition that violates the constraint
+ // -> verify the diagnostic details, including severity, code, and message
+ // Ensure that you remove @generated or mark it @generated NOT
+ if (false)
+ {
+ if (<%=diagnostics%> != null)
+ {
+ <%=diagnostics%>.add
+<%if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {%>
+ (createDiagnostic
+ (<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
+ DIAGNOSTIC_SOURCE,
+ 0,
+ "_UI_GenericConstraint_diagnostic",<%=genModel.getNonNLS()%>
+ new Object[] { "<%=constraint%>", getValueLabel(<%=genDataType.getQualifiedClassifierAccessor()%>, <%=genClassifier.getSafeUncapName()%>, <%=context%>) },<%=genModel.getNonNLS()%>
+ new Object[] { <%=genClassifier.getSafeUncapName()%> },
+ context));
+<%} else {%>
+ (new <%=genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic")%>
+ (<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
+ DIAGNOSTIC_SOURCE,
+ 0,
+ <%=genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin")%>.INSTANCE.getString("_UI_GenericConstraint_diagnostic", new Object[] { "<%=constraint%>", getValueLabel(<%=genDataType.getQualifiedClassifierAccessor()%>, <%=genClassifier.getSafeUncapName()%>, <%=context%>) }),<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
+ new Object[] { <%=genClassifier.getSafeUncapName()%> }));
+<%}%>
+ }
+ return false;
+ }
+ return true;
+<%}%>
+<%} else if (constraintDelegate != null) {%>
+ // TODO override the constraint, if desired
+ // -> uncomment the scaffolding
+ // -> specify the condition that violates the constraint
+ // -> verify the diagnostic details, including severity, code, and message
+ // Ensure that you remove @generated or mark it @generated NOT
+ if (false)
+ {
+ if (<%=diagnostics%> != null)
+ {
+ <%=diagnostics%>.add
+<%if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {%>
+ (createDiagnostic
+ (<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
+ DIAGNOSTIC_SOURCE,
+ 0,
+ "_UI_GenericConstraint_diagnostic",<%=genModel.getNonNLS()%>
+ new Object[] { "<%=constraint%>", getObjectLabel(<%=genClassifier.getSafeUncapName()%>, <%=context%>) },<%=genModel.getNonNLS()%>
+ new Object[] { <%=genClassifier.getSafeUncapName()%> },
+ context));
+<%} else {%>
+ (new <%=genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic")%>
+ (<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
+ DIAGNOSTIC_SOURCE,
+ 0,
+ <%=genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin")%>.INSTANCE.getString("_UI_GenericConstraint_diagnostic", new Object[] { "<%=constraint%>", getObjectLabel(<%=genClassifier.getSafeUncapName()%>, <%=context%>) }),<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
+ new Object[] { <%=genClassifier.getSafeUncapName()%> }));
+<%}%>
+ }
+ return false;
+ }
+ return <%=delegate%>validate<%=constraintDelegate.getName()%>_<%=constraint%>(<%=cast%><%=genClassifier.getSafeUncapName()%>, <%=diagnostics%>, <%=context%>);
+<%} else { GenOperation genOperation = ((GenClass)genClassifier).getInvariantOperation(constraint); if (genOperation != null) {%>
+ return <%=genClassifier.getSafeUncapName()%>.<%=constraint%>(<%=diagnostics%>, <%=context%>);
+<%} else {%>
+ // TODO implement the constraint
+ // -> specify the condition that violates the constraint
+ // -> verify the diagnostic details, including severity, code, and message
+ // Ensure that you remove @generated or mark it @generated NOT
+ if (false)
+ {
+ if (<%=diagnostics%> != null)
+ {
+ <%=diagnostics%>.add
+<%if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {%>
+ (createDiagnostic
+ (<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
+ DIAGNOSTIC_SOURCE,
+ 0,
+ "_UI_GenericConstraint_diagnostic",<%=genModel.getNonNLS()%>
+ new Object[] { "<%=constraint%>", getObjectLabel(<%=genClassifier.getSafeUncapName()%>, <%=context%>) },<%=genModel.getNonNLS()%>
+ new Object[] { <%=genClassifier.getSafeUncapName()%> },
+ context));
+<%} else {%>
+ (new <%=genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic")%>
+ (<%=genModel.getImportedName("org.eclipse.emf.common.util.Diagnostic")%>.ERROR,
+ DIAGNOSTIC_SOURCE,
+ 0,
+ <%=genModel.getImportedName("org.eclipse.emf.ecore.plugin.EcorePlugin")%>.INSTANCE.getString("_UI_GenericConstraint_diagnostic", new Object[] { "<%=constraint%>", getObjectLabel(<%=genClassifier.getSafeUncapName()%>, <%=context%>) }),<%=genModel.getNonNLS()%><%=genModel.getNonNLS(2)%>
+ new Object[] { <%=genClassifier.getSafeUncapName()%> }));
+<%}%>
+ }
+ return false;
+ }
+ return true;
+<%}}%>
+ }
+
+<%}%>
+<%}%>
+<%if (genModel.getRuntimeVersion().getValue() >= GenRuntimeVersion.EMF24_VALUE) {%>
+ /**
+ * Returns the resource locator that will be used to fetch messages for this validator's diagnostics.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ <%if (genModel.useClassOverrideAnnotation()) {%>
+ @Override
+ <%}%>
+ public <%=genModel.getImportedName("org.eclipse.emf.common.util.ResourceLocator")%> getResourceLocator()
+ {
+ <%if (genModel.hasModelPluginClass()) {%>
+ return <%=genModel.getImportedName(genModel.getQualifiedModelPluginClassName())%>.INSTANCE;
+ <%} else {%>
+ // TODO
+ // Specialize this to return a resource locator for messages specific to this validator.
+ // Ensure that you remove @generated or mark it @generated NOT
+ return super.getResourceLocator();
+ <%}%>
+ }
+
+<%}%>
+
+ /**
+ * If we have a context map, record this object's <code>status</code> in it
+ * so that we will know later that we have processed it and its sub-tree.
+ *
+ * @param eObject an element that we have validated
+ * @param context the context (may be <code>null</code>)
+ * @param status the element's validation status
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private void processed(<%=genModel.getImportedName("org.eclipse.emf.ecore.EObject")%> eObject, <%=genModel.getImportedName("java.util.Map")%><Object, Object> context, <%=genModel.getImportedName("org.eclipse.core.runtime.IStatus")%> status)
+ {
+ if (context != null)
+ {
+ context.put(eObject, status);
+ }
+ }
+
+ /**
+ * Determines whether we have processed this <code>eObject</code> before,
+ * by automatic recursion of the EMF Model Validation Service. This is
+ * only possible if we do, indeed, have a context.
+ *
+ * @param eObject an element to be validated (we hope not)
+ * @param context the context (may be <code>null</code>)
+ * @return <code>true</code> if the context is not <code>null</code> and
+ * the <code>eObject</code> or one of its containers has already been
+ * validated; <code>false</code>, otherwise
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean hasProcessed(<%=genModel.getImportedName("org.eclipse.emf.ecore.EObject")%> eObject, <%=genModel.getImportedName("java.util.Map")%><Object, Object> context)
+ {
+ boolean result = false;
+ if (context != null)
+ {
+ // this is O(NlogN) but there's no helping it
+ while (eObject != null)
+ {
+ if (context.containsKey(eObject))
+ {
+ result = true;
+ eObject = null;
+ }
+ else
+ {
+ eObject = eObject.eContainer();
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Converts a status result from the EMF validation service to diagnostics.
+ *
+ * @param status the EMF validation service's status result
+ * @param diagnostics a diagnostic chain to accumulate results on
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private void appendDiagnostics(<%=genModel.getImportedName("org.eclipse.core.runtime.IStatus")%> status, <%=genModel.getImportedName("org.eclipse.emf.common.util.DiagnosticChain")%> diagnostics)
+ {
+ if (status.isMultiStatus())
+ {
+ <%=genModel.getImportedName("org.eclipse.core.runtime.IStatus")%>[] children = status.getChildren();
+ for (int i = 0; i < children.length; i++)
+ {
+ appendDiagnostics(children[i], diagnostics);
+ }
+ }
+ else if (status instanceof <%=genModel.getImportedName("org.eclipse.emf.validation.model.IConstraintStatus")%>)
+ {
+ diagnostics.add(new <%=genModel.getImportedName("org.eclipse.emf.common.util.BasicDiagnostic")%>(
+ status.getSeverity(),
+ status.getPlugin(),
+ status.getCode(),
+ status.getMessage(),
+ ((<%=genModel.getImportedName("org.eclipse.emf.validation.model.IConstraintStatus")%>) status).getResultLocus().toArray()));
+ }
+ }
+} //<%=genPackage.getValidatorClassName()%>
+<%genModel.emitSortedImports();%>
diff --git a/org.eclipse.egf.model/templates/model/manifest.mfjet b/org.eclipse.egf.model/templates/model/manifest.mfjet
new file mode 100644
index 0000000..82140a1
--- /dev/null
+++ b/org.eclipse.egf.model/templates/model/manifest.mfjet
@@ -0,0 +1,46 @@
+<%@ jet package="org.eclipse.emf.codegen.ecore.templates.model" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="ManifestMF" version="$Id: manifest.mfjet,v 1.7 2008/04/18 04:01:30 davidms Exp $" %>
+<%
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2005-2007 IBM Corporation and others.
+ * 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:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ */
+%>
+<%GenModel genModel = (GenModel)argument;%>
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: <%=genModel.getModelPluginID()%>;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: <%if (genModel.isRuntimeJar()) {%><%=genModel.getModelPluginID()%>.jar<%}else{%>.<%}%>
+<%if (genModel.hasModelPluginClass()) {%>
+Bundle-Activator: <%=genModel.getQualifiedModelPluginClassName()%>$Implementation
+<%}%>
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+<%if (genModel.getComplianceLevel() == GenJDKLevel.JDK50_LITERAL) {%>
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+<%} else if (genModel.getComplianceLevel() == GenJDKLevel.JDK60_LITERAL) {%>
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+<%}%>
+<%Iterator<String> packagesIterator = genModel.getModelQualifiedPackageNames().iterator(); if (packagesIterator.hasNext()) { String pack = packagesIterator.next();%>
+Export-Package: <%=pack%><%while(packagesIterator.hasNext()) { pack = packagesIterator.next();%>,
+ <%=pack%><%}%>
+<%}%>
+<%Iterator<String> requiredPluginIterator = genModel.getModelRequiredPlugins().iterator(); if (requiredPluginIterator.hasNext()) { String pluginID = requiredPluginIterator.next();%>
+Require-Bundle: <%=pluginID%><%if (!pluginID.startsWith("org.eclipse.core.runtime")){%>;visibility:=reexport<%} while(requiredPluginIterator.hasNext()) { pluginID = requiredPluginIterator.next();%>,
+ <%=pluginID%><%if (!pluginID.startsWith("org.eclipse.core.runtime")){%>;visibility:=reexport<%}}%>
+<%}%>
+<%if (genModel.getRuntimeVersion() == GenRuntimeVersion.EMF22 || genModel.getRuntimeVersion() == GenRuntimeVersion.EMF23) {%>
+Eclipse-LazyStart: true
+<%}%>
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.egf.model/templates/model/plugin.xmljet b/org.eclipse.egf.model/templates/model/plugin.xmljet
new file mode 100644
index 0000000..30dd648
--- /dev/null
+++ b/org.eclipse.egf.model/templates/model/plugin.xmljet
@@ -0,0 +1,101 @@
+<%@ jet package="org.eclipse.emf.codegen.ecore.templates.model" imports="java.util.* org.eclipse.emf.codegen.ecore.genmodel.*" class="PluginXML" version="$Id: plugin.xmljet,v 1.17 2008/12/13 15:53:17 emerks Exp $" %>
+<%
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2002-2005 IBM Corporation and others.
+ * 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:
+ * IBM - Initial API and implementation
+ *
+ * </copyright>
+ */
+%>
+<%GenModel genModel = (GenModel)argument; /* Trick to import java.util.* without warnings */Iterator.class.getName();%>
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+
+<%@ include file="../Header.xmljetinc"%>
+
+<%if (genModel.isBundleManifest()) {%>
+<plugin>
+<%} else {%>
+<plugin
+ name="%pluginName"
+ id="<%=genModel.getModelPluginID()%>"
+ version="1.0.0"
+ <%if (genModel.hasModelPluginClass()) { %>
+ provider-name="%providerName"
+ class="<%=genModel.getQualifiedModelPluginClassName()%>$Implementation">
+ <%} else {%>
+ provider-name="%providerName">
+ <%}%>
+
+ <requires>
+ <%for (String pluginID : genModel.getModelRequiredPlugins()) {%>
+ <import plugin="<%=pluginID%>"<%if (!pluginID.startsWith("org.eclipse.core.runtime")) {%> export="true"<%}%>/>
+ <%}%>
+ </requires>
+
+ <runtime>
+ <%if (genModel.isRuntimeJar()) {%>
+ <library name="<%=genModel.getModelPluginID()%>.jar">
+ <%} else {%>
+ <library name=".">
+ <%}%>
+ <export name="*"/>
+ </library>
+ </runtime>
+<%}%>
+<%for (GenPackage genPackage : genModel.getAllGenPackagesWithClassifiers()) {%>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri="<%=genPackage.getNSURI()%>"
+ <%if (genModel.hasLocalGenModel()) {%>
+ class="<%=genPackage.getQualifiedPackageInterfaceName()%>"
+ genModel="<%=genModel.getRelativeGenModelLocation()%>"/>
+ <%} else {%>
+ class="<%=genPackage.getQualifiedPackageInterfaceName()%>"/>
+ <%}%>
+ </extension>
+ <%if (genPackage.isContentType()) {%>
+
+ <extension point="org.eclipse.emf.ecore.content_parser">
+ <parser
+ contentTypeIdentifier="<%=genPackage.getContentTypeIdentifier()%>"
+ class="<%=genPackage.getQualifiedEffectiveResourceFactoryClassName()%>"/>
+ </extension>
+
+ <extension point="org.eclipse.core.contenttype.contentTypes">
+ <content-type
+ base-type="<%=genPackage.isXMIResource() ? "org.eclipse.emf.ecore.xmi" : "org.eclipse.core.runtime.xml"%>"
+ file-extensions="<%=genPackage.getFileExtensions()%>"
+ id="<%=genPackage.getContentTypeIdentifier()%>"
+ name="%_UI_<%=genPackage.getPrefix()%>_content_type"
+ priority="normal">
+ <describer class="org.eclipse.emf.ecore.xmi.impl.RootXMLContentHandlerImpl$Describer">
+ <%if (genPackage.hasTargetNamespace()) {%>
+ <parameter name="namespace" value="<%=genPackage.getNSURI()%>"/>
+ <%}%>
+ <%if (genPackage.isXMIResource()) {%>
+ <parameter name="kind" value="xmi"/>
+ <%}%>
+ </describer>
+ </content-type>
+ </extension>
+ <%} else if (genPackage.getResource() != GenResourceKind.NONE_LITERAL) {%>
+
+ <extension point="org.eclipse.emf.ecore.extension_parser">
+ <parser
+ type="<%=genPackage.getFileExtension()%>"
+ class="<%=genPackage.getQualifiedResourceFactoryClassName()%>"/>
+ </extension>
+ <%}%>
+<%}%>
+
+</plugin>
diff --git a/org.eclipse.egf.pattern.ftask/.classpath b/org.eclipse.egf.pattern.ftask/.classpath
new file mode 100644
index 0000000..2d1a430
--- /dev/null
+++ b/org.eclipse.egf.pattern.ftask/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.egf.pattern.ftask/.project b/org.eclipse.egf.pattern.ftask/.project
new file mode 100644
index 0000000..a31e55d
--- /dev/null
+++ b/org.eclipse.egf.pattern.ftask/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.pattern.ftask</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.pattern.ftask/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egf.pattern.ftask/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..8245169
--- /dev/null
+++ b/org.eclipse.egf.pattern.ftask/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:53:46 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.egf.pattern.ftask/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egf.pattern.ftask/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..43169d9
--- /dev/null
+++ b/org.eclipse.egf.pattern.ftask/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Fri Dec 04 17:37:53 CET 2009
+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/org.eclipse.egf.pattern.ftask/Default_pattern_strategy_task.fcore b/org.eclipse.egf.pattern.ftask/Default_pattern_strategy_task.fcore
new file mode 100644
index 0000000..b173fc6
--- /dev/null
+++ b/org.eclipse.egf.pattern.ftask/Default_pattern_strategy_task.fcore
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ftask:Task xmi:version="2.1"
+ xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:domain="http://www.eclipse.org/egf/1.0.0/domain" xmlns:pattern="http://www.eclipse.org/egf/1.0.0/pattern"
+ xmlns:ftask="http://www.eclipse.org/egf/1.0.0/ftask" xmlns:types="http://www.eclipse.org/egf/1.0.0/types" xmi:id="_8FZ3of6eeEd64XYPo3s6sPg"
+ name="Default pattern strategy task" kind="java" implementation="org.eclipse.egf.pattern.ftask.tasks.DefaultStrategyTask">
+ <contractContainer xmi:id="_9xfmAP6eEd64XeYPo3s6sPg">
+ <contracts xmi:id="_-GBrkP6eEd64XeYPo3s6sPg" name="pattern.ids" mandatory="true">
+ <type xmi:type="pattern:TypePatternList" xmi:id="__ATigP6eeEd64XYPo3s6sPg"/>
+ </contracts>
+ <contracts xmi:id="_DgB2IP6fEd64XYPo3s6esPg" name="domain" mandatory="true">
+ <type xmi:type="domain:TypeDomainURI" xmi:id="_D_W2cP6feEd64XYPo3s6sPg"/>
+ </contracts>
+ <contracts xmi:id="_L6JSwAHAEd-4fJMEpleCjxw" name="pattern.execution.reporter">
+ <type xmi:type="pattern:TypePatternExecutionReporter" xmi:id="_NlkSewAHAEd-4fJMEplCjxw"/>
+ </contracts>
+ </contractContainer>
+</ftask:Task>
diff --git a/org.eclipse.egf.pattern.ftask/Filtered_pattern_strategy_task.fcore b/org.eclipse.egf.pattern.ftask/Filtered_pattern_strategy_task.fcore
new file mode 100644
index 0000000..3fb626e
--- /dev/null
+++ b/org.eclipse.egf.pattern.ftask/Filtered_pattern_strategy_task.fcore
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ftask:Task xmi:version="2.1"
+ xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:domain="http://www.eclipse.org/egf/1.0.0/domain" xmlns:pattern="http://www.eclipse.org/egf/1.0.0/pattern"
+ xmlns:ftask="http://www.eclipse.org/egf/1.0.0/ftask" xmlns:types="http://www.eclipse.org/egf/1.0.0/types" xmi:id="_8FZ3zof6eEd64XYPo3s6sPg"
+ name="Filtered pattern strategy task" kind="java" implementation="org.eclipse.egf.pattern.ftask.tasks.DefaultStrategyTask">
+ <contractContainer xmi:id="_9xfmAP6eEd64XYPzo3s6sPg">
+ <contracts xmi:id="_-GBrkP6eEd64XYzPo3s6sPg" name="pattern.ids" mandatory="true">
+ <type xmi:type="pattern:TypePatternList" xmi:id="__ATigP6eEd6z4XYPo3s6sPg"/>
+ </contracts>
+ <contracts xmi:id="_DgB2IP6fEd64XYPoz3s6sPg" name="domain" mandatory="true">
+ <type xmi:type="domain:TypeDomainURI" xmi:id="_D_W2cP6fEzd64XYPo3s6sPg"/>
+ </contracts>
+ <contracts xmi:id="_L6JSwAHAEd-4fJMzEplCjxw" name="pattern.execution.reporter">
+ <type xmi:type="pattern:TypePatternExecutionReporter" xmi:id="_NlkzSwAHAEd-4fJMEplCjxw"/>
+ </contracts>
+ </contractContainer>
+</ftask:Task>
diff --git a/org.eclipse.egf.pattern.ftask/META-INF/MANIFEST.MF b/org.eclipse.egf.pattern.ftask/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..fc3dbf0
--- /dev/null
+++ b/org.eclipse.egf.pattern.ftask/META-INF/MANIFEST.MF
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-ClassPath: .
+Bundle-SymbolicName: org.eclipse.egf.pattern.ftask;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-Activator: org.eclipse.egf.pattern.ftask.Activator
+Bundle-Localization: plugin
+Require-Bundle:
+ org.eclipse.core.runtime,
+ org.eclipse.egf.pattern,
+ org.eclipse.egf.core.producer,
+ org.eclipse.egf.model.ftask
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Vendor: %providerName
+Export-Package:
+ org.eclipse.egf.pattern.ftask,
+ org.eclipse.egf.pattern.ftask.tasks
diff --git a/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore b/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore
new file mode 100644
index 0000000..a79999a
--- /dev/null
+++ b/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ftask:Task xmi:version="2.1"
+ xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:domain="http://www.eclipse.org/egf/1.0.0/domain"
+ xmlns:ftask="http://www.eclipse.org/egf/1.0.0/ftask" xmlns:pattern="http://www.eclipse.org/egf/1.0.0/pattern" xmi:id="_8FZ3aof6eEd64XYPo3s6sPg"
+ name="Model driven pattern strategy task" kind="java" implementation="org.eclipse.egf.pattern.ftask.tasks.ModelDrivenStrategyTask">
+ <contractContainer xmi:id="_9xfmAP6eEd64XYPo3as6sPg">
+ <contracts xmi:id="_DgB2IP6fEd64XaYPo3s6sPg" name="domain" mandatory="true">
+ <type xmi:type="domain:TypeDomainURI" xmi:id="_D_W2cPa6fEd64XYPo3s6sPg"/>
+ </contracts>
+ <contracts xmi:id="_L6JSwAHAEd-4faJMEplCjxw" name="pattern.execution.reporter">
+ <type xmi:type="pattern:TypePatternExecutionReporter" xmi:id="_NlkSwaAHAEd-4fJMEplCjxw"/>
+ </contracts>
+ <contracts xmi:id="_JXimcAXOEd-ra8cys1-yIrg" name="pattern.call.back.handler">
+ <type xmi:type="pattern:TypePatternCallBackHandler" xmi:id="_QvrcMQXsPEd-3-vQYulrkBQ"
+ value="org.eclipse.egf.pattern.strategy.modeldriven.ModelDrivenCallBackHandler"/>
+ </contracts>
+ <contracts xmi:id="_zJXimcAXOEd-ra8cys1-yIrg" name="pattern.modeldriven.visitor">
+ <type xmi:type="pattern:TypePatternDomainVisitor" xmi:id="_zQvrcMQXsPEd-3-vQYulrkBQ"
+ value="org.eclipse.egf.pattern.strategy.modeldriven.EmfModelVisitor"/>
+ </contracts>
+ <contracts xmi:id="_nz1HkSCaEd-Sse0r9LJWbA" name="pattern.ids" mandatory="true">
+ <type xmi:type="pattern:TypePatternList" xmi:id="_pNtroCCaEd-Sse0r9LJWbA"/>
+ </contracts>
+ </contractContainer>
+</ftask:Task>
diff --git a/org.eclipse.egf.pattern.ftask/Pattern_task.fcore b/org.eclipse.egf.pattern.ftask/Pattern_task.fcore
new file mode 100644
index 0000000..ec46e96
--- /dev/null
+++ b/org.eclipse.egf.pattern.ftask/Pattern_task.fcore
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ftask:Task xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:domain="http://www.eclipse.org/egf/1.0.0/domain"
+ xmlns:ftask="http://www.eclipse.org/egf/1.0.0/ftask" xmlns:pattern="http://www.eclipse.org/egf/1.0.0/pattern"
+ xmlns:types="http://www.eclipse.org/egf/1.0.0/types" xmi:id="_XVvo0Be4Ed-DaY2uHNBaQg"
+ name="Pattern Task"
+ kind="java" implementation="org.eclipse.egf.pattern.ftask.tasks.PatternTask" >
+ <contractContainer xmi:id="_a47bsBe4Ed-DaY2uHNBaQg">
+ <contracts xmi:id="_tsP7UBe5Ed-O0P2188kAmA" name="pattern.id" mandatory="true">
+ <type xmi:type="pattern:TypePatternList" xmi:id="_u5WAkBe5Ed-O0P2188kAmA"/>
+ </contracts>
+ <contracts xmi:id="_4ngvABe5Ed-O0P2188kAmA" name="domain">
+ <type xmi:type="domain:TypeDomainURI" xmi:id="_7GM_ABe5Ed-O0P2188kAmA"/>
+ </contracts>
+ <contracts xmi:id="_7-xlwBe5Ed-O0P2188kAmA" name="pattern.execution.reporter">
+ <type xmi:type="pattern:TypePatternExecutionReporter" xmi:id="_-UgHABe5Ed-O0P2188kAmA"/>
+ </contracts>
+ <contracts xmi:id="_-wgGgBe5Ed-O0P2188kAmA" name="pattern.call.back.handler">
+ <type xmi:type="pattern:TypePatternCallBackHandler" xmi:id="_BEgwgBe6Ed-O0P2188kAmA"/>
+ </contracts>
+ </contractContainer>
+</ftask:Task>
diff --git a/org.eclipse.egf.pattern.ftask/about.html b/org.eclipse.egf.pattern.ftask/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/org.eclipse.egf.pattern.ftask/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/org.eclipse.egf.pattern.ftask/build.properties b/org.eclipse.egf.pattern.ftask/build.properties
new file mode 100644
index 0000000..0c91740
--- /dev/null
+++ b/org.eclipse.egf.pattern.ftask/build.properties
@@ -0,0 +1,22 @@
+##
+# 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
+##
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ Default_pattern_strategy_task.fcore,\
+ Filtered_pattern_strategy_task.fcore,\
+ Model_driven_pattern_strategy_task.fcore,\
+ Pattern_task.fcore,\
+ plugin.properties,\
+ plugin.xml
+src.includes = about.html
diff --git a/org.eclipse.egf.pattern.ftask/plugin.properties b/org.eclipse.egf.pattern.ftask/plugin.properties
new file mode 100644
index 0000000..ca9b05f
--- /dev/null
+++ b/org.eclipse.egf.pattern.ftask/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 Pattern for Production Orchestration (Incubation)
+providerName = Eclipse Modeling Project
diff --git a/org.eclipse.egf.pattern.ftask/plugin.xml b/org.eclipse.egf.pattern.ftask/plugin.xml
new file mode 100644
index 0000000..35d30bc
--- /dev/null
+++ b/org.eclipse.egf.pattern.ftask/plugin.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+
+ <extension
+ point="org.eclipse.egf.core.fcore">
+ <fcore
+ id="Model_driven_pattern_strategy_task.fcore">
+ </fcore>
+ <fcore
+ id="Filtered_pattern_strategy_task.fcore">
+ </fcore>
+ <fcore
+ id="Default_pattern_strategy_task.fcore">
+ </fcore>
+ <fcore
+ id="Pattern_task.fcore">
+ </fcore>
+ </extension>
+
+</plugin>
diff --git a/org.eclipse.egf.pattern.ftask/src/org/eclipse/egf/pattern/ftask/Activator.java b/org.eclipse.egf.pattern.ftask/src/org/eclipse/egf/pattern/ftask/Activator.java
new file mode 100644
index 0000000..78d3870
--- /dev/null
+++ b/org.eclipse.egf.pattern.ftask/src/org/eclipse/egf/pattern/ftask/Activator.java
@@ -0,0 +1,56 @@
+package org.eclipse.egf.pattern.ftask;
+
+import org.eclipse.egf.common.activator.EGFAbstractPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends EGFAbstractPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.egf.pattern.fprod";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
+ * )
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
+ * )
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ftask/src/org/eclipse/egf/pattern/ftask/Messages.java b/org.eclipse.egf.pattern.ftask/src/org/eclipse/egf/pattern/ftask/Messages.java
new file mode 100644
index 0000000..86813bc
--- /dev/null
+++ b/org.eclipse.egf.pattern.ftask/src/org/eclipse/egf/pattern/ftask/Messages.java
@@ -0,0 +1,37 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ftask;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class Messages extends NLS {
+
+ public static String translation_job_label;
+
+ public static String taskInvocation_error1;
+ public static String taskInvocation_error2;
+ public static String taskInvocation_error3;
+
+ private static final String BUNDLE_NAME = "org.eclipse.egf.pattern.ftask.PatternFtaskMessages";//$NON-NLS-1$
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ftask/src/org/eclipse/egf/pattern/ftask/PatternFtaskMessages.properties b/org.eclipse.egf.pattern.ftask/src/org/eclipse/egf/pattern/ftask/PatternFtaskMessages.properties
new file mode 100644
index 0000000..1192ed5
--- /dev/null
+++ b/org.eclipse.egf.pattern.ftask/src/org/eclipse/egf/pattern/ftask/PatternFtaskMessages.properties
@@ -0,0 +1,3 @@
+taskInvocation_error1 = The parameter is null.
+taskInvocation_error2 = The pattern list is null.
+taskInvocation_error3 = The pattern list is empty.
\ No newline at end of file
diff --git a/org.eclipse.egf.pattern.ftask/src/org/eclipse/egf/pattern/ftask/tasks/AbstractPatternTask.java b/org.eclipse.egf.pattern.ftask/src/org/eclipse/egf/pattern/ftask/tasks/AbstractPatternTask.java
new file mode 100644
index 0000000..cca3a4a
--- /dev/null
+++ b/org.eclipse.egf.pattern.ftask/src/org/eclipse/egf/pattern/ftask/tasks/AbstractPatternTask.java
@@ -0,0 +1,95 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+package org.eclipse.egf.pattern.ftask.tasks;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.core.helper.ResourceHelper;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+import org.eclipse.egf.ftask.producer.invocation.ITaskProduction;
+import org.eclipse.egf.model.fcore.Contract;
+import org.eclipse.egf.model.pattern.BundleAccessor;
+import org.eclipse.egf.model.pattern.PatternContext;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.pattern.engine.PatternHelper;
+import org.eclipse.egf.pattern.execution.ExecutionContext;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Thomas Guiu
+ */
+public abstract class AbstractPatternTask implements ITaskProduction {
+
+ protected final PatternHelper helper = PatternHelper.createCollector();
+
+ private Resource domainResource;
+
+ public void preExecute(final ITaskProductionContext context, final IProgressMonitor monitor_p) throws InvocationException {
+ }
+
+ public void doExecute(final ITaskProductionContext context, final IProgressMonitor monitor_p) throws InvocationException {
+ }
+
+ public void postExecute(final ITaskProductionContext context, final IProgressMonitor monitor_p) throws InvocationException {
+ // There is no guaranty that this method get called
+ helper.clear();
+ }
+
+ protected void writeContext(final ITaskProductionContext context, PatternContext ctx) throws InvocationException {
+ for (Contract contract : context.getOutputValueKeys()) {
+ context.setOutputValue(contract.getName(), ctx.getValue(contract.getName()));
+ }
+ if (domainResource != null) {
+ domainResource.unload();
+ domainResource = null;
+ }
+ }
+
+ protected void readContext(final ITaskProductionContext context, PatternContext ctx) throws InvocationException {
+ for (Object object : context.getInputValueKeys()) {
+ Contract contract = (Contract) object;
+ String name = contract.getName();
+ if (PatternContext.DOMAIN_OBJECTS.equals(name)) {
+ URI uri = (URI) context.getInputValue(name, contract.getType().getType());
+ if (uri == null)
+ continue ; //Weird behavior: unfilled contracts are available ...
+ ResourceSetImpl set = new ResourceSetImpl();
+ domainResource = ResourceHelper.loadResource(set, uri);
+ ctx.setValue(PatternContext.DOMAIN_OBJECTS, domainResource.getContents());
+ } else
+ ctx.setValue(name, context.getInputValue(name, contract.getType().getType()));
+ }
+ }
+
+ protected PatternContext createPatternContext(final ITaskProductionContext prodCtx) {
+ return new ExecutionContext(new BundleAccessor() {
+ public Bundle getBundle(String id) throws PatternException {
+
+ try {
+ return prodCtx.getBundle(id);
+ } catch (InvocationException e) {
+ // TODO on devrait pouvoir mieux gérer les exceptions,
+ // là on empile .. ce serait mieux de transmettre
+ // l'exception originale
+ throw new PatternException(e);
+ }
+ }
+ });
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ftask/src/org/eclipse/egf/pattern/ftask/tasks/AbstractStrategyTask.java b/org.eclipse.egf.pattern.ftask/src/org/eclipse/egf/pattern/ftask/tasks/AbstractStrategyTask.java
new file mode 100644
index 0000000..6a4fc18
--- /dev/null
+++ b/org.eclipse.egf.pattern.ftask/src/org/eclipse/egf/pattern/ftask/tasks/AbstractStrategyTask.java
@@ -0,0 +1,86 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+package org.eclipse.egf.pattern.ftask.tasks;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+import org.eclipse.egf.model.pattern.PatternContext;
+import org.eclipse.egf.model.pattern.PatternElement;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.model.pattern.PatternExecutionReporter;
+import org.eclipse.egf.model.pattern.TypePatternList;
+import org.eclipse.egf.pattern.execution.ConsoleReporter;
+import org.eclipse.egf.pattern.extension.ExtensionHelper.MissingExtensionException;
+import org.eclipse.egf.pattern.ftask.Messages;
+import org.eclipse.egf.pattern.strategy.Strategy;
+
+/**
+ * @author Thomas Guiu
+ */
+public abstract class AbstractStrategyTask extends AbstractPatternTask {
+ private final Strategy strategy;
+ protected Object parameter;
+ protected final List<PatternElement> patterns = new ArrayList<PatternElement>();
+
+ protected AbstractStrategyTask(Strategy strategy) {
+ this.strategy = strategy;
+ }
+
+ protected void readContext(final ITaskProductionContext context, PatternContext ctx) throws InvocationException {
+ super.readContext(context, ctx);
+ PatternExecutionReporter reporter = (PatternExecutionReporter) ctx.getValue(PatternContext.PATTERN_REPORTER);
+ if (reporter == null)
+ reporter = new ConsoleReporter();
+ ctx.setValue(PatternContext.PATTERN_REPORTER, reporter);
+ }
+
+ @Override
+ public void preExecute(final ITaskProductionContext context, final IProgressMonitor monitor) throws InvocationException {
+ TypePatternList patternList = context.getInputValue(PatternContext.PATTERN_IDS_PARAMETER, TypePatternList.class);
+ if (patternList != null)
+ patterns.addAll(patternList.getElements());
+ }
+
+ @Override
+ public final void doExecute(final ITaskProductionContext context, final IProgressMonitor monitor) throws InvocationException {
+ if (parameter == null)
+ throw new InvocationException(Messages.taskInvocation_error1);
+ if (patterns.isEmpty())
+ // Activator.getDefault().logWarning(Messages.taskInvocation_error3);
+ throw new InvocationException(Messages.taskInvocation_error3);
+
+ try {
+ PatternContext ctx = createPatternContext(context);
+ readContext(context, ctx);
+ strategy.setPatternElements(patterns);
+ strategy.execute(ctx, parameter);
+ writeContext(context, ctx);
+ } catch (MissingExtensionException e) {
+ throw new InvocationException(e);
+ } catch (PatternException e) {
+ throw new InvocationException(e);
+ }
+ }
+
+ @Override
+ public void postExecute(final ITaskProductionContext context, final IProgressMonitor monitor) throws InvocationException {
+ super.postExecute(context, monitor);
+ parameter = null;
+ }
+}
diff --git a/org.eclipse.egf.pattern.ftask/src/org/eclipse/egf/pattern/ftask/tasks/DefaultStrategyTask.java b/org.eclipse.egf.pattern.ftask/src/org/eclipse/egf/pattern/ftask/tasks/DefaultStrategyTask.java
new file mode 100644
index 0000000..403185b
--- /dev/null
+++ b/org.eclipse.egf.pattern.ftask/src/org/eclipse/egf/pattern/ftask/tasks/DefaultStrategyTask.java
@@ -0,0 +1,36 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+package org.eclipse.egf.pattern.ftask.tasks;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+import org.eclipse.egf.pattern.strategy.DefaultStrategy;
+
+/**
+ * @author Thomas Guiu
+ */
+public class DefaultStrategyTask extends AbstractStrategyTask {
+
+ public DefaultStrategyTask() {
+ super(new DefaultStrategy());
+ }
+
+ @Override
+ public void preExecute(final ITaskProductionContext context, final IProgressMonitor monitor) throws InvocationException {
+ super.preExecute(context, monitor);
+ parameter = this; // must be non null
+ }
+}
diff --git a/org.eclipse.egf.pattern.ftask/src/org/eclipse/egf/pattern/ftask/tasks/FilterStrategyTask.java b/org.eclipse.egf.pattern.ftask/src/org/eclipse/egf/pattern/ftask/tasks/FilterStrategyTask.java
new file mode 100644
index 0000000..3ba0f1e
--- /dev/null
+++ b/org.eclipse.egf.pattern.ftask/src/org/eclipse/egf/pattern/ftask/tasks/FilterStrategyTask.java
@@ -0,0 +1,38 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+package org.eclipse.egf.pattern.ftask.tasks;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+import org.eclipse.egf.pattern.strategy.FilterStrategy;
+
+/**
+ * @author Thomas Guiu
+ */
+public class FilterStrategyTask extends AbstractStrategyTask {
+
+ public static final String FILTER_NAME_PARAMETER = "filter.name"; //$NON-NLS-1$
+
+ public FilterStrategyTask() {
+ super(new FilterStrategy());
+ }
+
+ @Override
+ public void preExecute(final ITaskProductionContext context, final IProgressMonitor monitor) throws InvocationException {
+ super.preExecute(context, monitor);
+ parameter = context.getInputValue(FILTER_NAME_PARAMETER, String.class);
+ }
+}
diff --git a/org.eclipse.egf.pattern.ftask/src/org/eclipse/egf/pattern/ftask/tasks/ModelDrivenStrategyTask.java b/org.eclipse.egf.pattern.ftask/src/org/eclipse/egf/pattern/ftask/tasks/ModelDrivenStrategyTask.java
new file mode 100644
index 0000000..254dfea
--- /dev/null
+++ b/org.eclipse.egf.pattern.ftask/src/org/eclipse/egf/pattern/ftask/tasks/ModelDrivenStrategyTask.java
@@ -0,0 +1,51 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+package org.eclipse.egf.pattern.ftask.tasks;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+import org.eclipse.egf.model.pattern.PatternContext;
+import org.eclipse.egf.model.pattern.PatternExecutionReporter;
+import org.eclipse.egf.pattern.strategy.modeldriven.ModelDrivenStrategy;
+
+/**
+ * @author Thomas Guiu
+ */
+public class ModelDrivenStrategyTask extends AbstractStrategyTask {
+
+ private StrategyReporter reporter;
+
+ public ModelDrivenStrategyTask() {
+ super(new ModelDrivenStrategy());
+ }
+
+ protected void readContext(final ITaskProductionContext context, PatternContext ctx) throws InvocationException {
+ super.readContext(context, ctx);
+ PatternExecutionReporter reporter = (PatternExecutionReporter) ctx.getValue(PatternContext.PATTERN_REPORTER);
+ ctx.setValue(PatternContext.PATTERN_REPORTER, this.reporter = new StrategyReporter(reporter));
+ }
+
+ protected void writeContext(final ITaskProductionContext context, PatternContext ctx) throws InvocationException {
+ super.writeContext(context, ctx);
+ reporter.executionFinished(ctx);
+ }
+
+ public void preExecute(final ITaskProductionContext context, final IProgressMonitor monitor) throws InvocationException {
+ super.preExecute(context, monitor);
+ parameter = this; // must be non null
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ftask/src/org/eclipse/egf/pattern/ftask/tasks/PatternTask.java b/org.eclipse.egf.pattern.ftask/src/org/eclipse/egf/pattern/ftask/tasks/PatternTask.java
new file mode 100644
index 0000000..92656f8
--- /dev/null
+++ b/org.eclipse.egf.pattern.ftask/src/org/eclipse/egf/pattern/ftask/tasks/PatternTask.java
@@ -0,0 +1,74 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+package org.eclipse.egf.pattern.ftask.tasks;
+
+import java.util.LinkedHashSet;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternContext;
+import org.eclipse.egf.model.pattern.PatternElement;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.model.pattern.TypePatternList;
+import org.eclipse.egf.pattern.collector.PatternCollector;
+import org.eclipse.egf.pattern.extension.ExtensionHelper;
+import org.eclipse.egf.pattern.extension.PatternExtension;
+import org.eclipse.egf.pattern.extension.ExtensionHelper.MissingExtensionException;
+
+/**
+ * @author Thomas Guiu
+ */
+public class PatternTask extends AbstractPatternTask {
+
+ private final LinkedHashSet<Pattern> patterns = new LinkedHashSet<Pattern>();
+
+ @Override
+ public void preExecute(final ITaskProductionContext context, final IProgressMonitor monitor) throws InvocationException {
+ TypePatternList patternList = context.getInputValue(PatternContext.PATTERN_ID, TypePatternList.class);
+ PatternCollector.INSTANCE.collect(patternList.getElements().toArray(new PatternElement[patternList.getElements().size()]), patterns);
+ }
+
+ @Override
+ public void doExecute(final ITaskProductionContext context, final IProgressMonitor monitor) throws InvocationException {
+ try {
+ PatternContext ctx = createPatternContext(context);
+ readContext(context, ctx);
+
+ for (Pattern pattern : patterns) {
+ PatternExtension extension = ExtensionHelper.getExtension(pattern.getNature());
+ String reason = extension.canExecute(pattern);
+
+ if (reason == null)
+ extension.createEngine(pattern).execute(ctx);
+ else
+ throw new InvocationException(reason);
+ }
+ writeContext(context, ctx);
+
+ } catch (MissingExtensionException e) {
+ throw new InvocationException(e);
+ } catch (PatternException e) {
+ throw new InvocationException(e);
+ }
+ }
+
+ @Override
+ public void postExecute(final ITaskProductionContext context, final IProgressMonitor monitor) throws InvocationException {
+ super.postExecute(context, monitor);
+ patterns.clear();
+ }
+}
diff --git a/org.eclipse.egf.pattern.ftask/src/org/eclipse/egf/pattern/ftask/tasks/StrategyReporter.java b/org.eclipse.egf.pattern.ftask/src/org/eclipse/egf/pattern/ftask/tasks/StrategyReporter.java
new file mode 100644
index 0000000..acb20d9
--- /dev/null
+++ b/org.eclipse.egf.pattern.ftask/src/org/eclipse/egf/pattern/ftask/tasks/StrategyReporter.java
@@ -0,0 +1,51 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ftask.tasks;
+
+import java.util.Map;
+
+import org.eclipse.egf.model.pattern.PatternContext;
+import org.eclipse.egf.model.pattern.PatternExecutionReporter;
+import org.eclipse.egf.pattern.execution.InternalPatternContext;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+class StrategyReporter implements PatternExecutionReporter {
+
+ private final PatternExecutionReporter delegate;
+ private final StringBuilder buffer = new StringBuilder(1000);
+
+ public StrategyReporter(PatternExecutionReporter delegate) {
+ super();
+ this.delegate = delegate;
+ }
+
+ public void executionFinished(PatternContext context) {
+ delegate.executionFinished(((InternalPatternContext) context).getExecutionBuffer().toString(), context);
+ }
+
+ public void executionFinished(String output, PatternContext context) {
+ throw new IllegalStateException();
+ }
+
+ public void loopFinished(String output, PatternContext context, Map<String, Object> parameterValues) {
+ delegate.loopFinished(output, context, parameterValues);
+ buffer.append(output);
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.java/.classpath b/org.eclipse.egf.pattern.java/.classpath
new file mode 100644
index 0000000..64c5e31
--- /dev/null
+++ b/org.eclipse.egf.pattern.java/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.egf.pattern.java/.project b/org.eclipse.egf.pattern.java/.project
new file mode 100644
index 0000000..a893696
--- /dev/null
+++ b/org.eclipse.egf.pattern.java/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.pattern.java</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.pattern.java/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egf.pattern.java/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..00fe8b7
--- /dev/null
+++ b/org.eclipse.egf.pattern.java/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:53:57 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.egf.pattern.java/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egf.pattern.java/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..efcd964
--- /dev/null
+++ b/org.eclipse.egf.pattern.java/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Tue Jun 30 16:47:32 CEST 2009
+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/org.eclipse.egf.pattern.java/META-INF/MANIFEST.MF b/org.eclipse.egf.pattern.java/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..10911e1
--- /dev/null
+++ b/org.eclipse.egf.pattern.java/META-INF/MANIFEST.MF
@@ -0,0 +1,20 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-Vendor: %providerName
+Bundle-ClassPath: .
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.egf.pattern.java; singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-Activator: org.eclipse.egf.pattern.java.Activator
+Require-Bundle:
+ org.eclipse.core.runtime,
+ org.eclipse.egf.pattern;visibility:=reexport,
+ org.eclipse.egf.model.javapattern,
+ org.eclipse.egf.model.javapattern.edit,
+ org.eclipse.text
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package:
+ org.eclipse.egf.pattern.java,
+ org.eclipse.egf.pattern.java.extension
diff --git a/org.eclipse.egf.pattern.java/about.html b/org.eclipse.egf.pattern.java/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/org.eclipse.egf.pattern.java/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/org.eclipse.egf.pattern.java/build.properties b/org.eclipse.egf.pattern.java/build.properties
new file mode 100644
index 0000000..7453a74
--- /dev/null
+++ b/org.eclipse.egf.pattern.java/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+source.. = src/
+output.. = bin/
+bin.includes = .,\
+ META-INF/,\
+ templates/,\
+ about.html,\
+ plugin.xml,\
+ plugin.properties
+src.includes = about.html
diff --git a/org.eclipse.egf.pattern.java/plugin.properties b/org.eclipse.egf.pattern.java/plugin.properties
new file mode 100644
index 0000000..7d651a8
--- /dev/null
+++ b/org.eclipse.egf.pattern.java/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 Java Pattern (Incubation)
+providerName=Eclipse Modeling Project
diff --git a/org.eclipse.egf.pattern.java/plugin.xml b/org.eclipse.egf.pattern.java/plugin.xml
new file mode 100644
index 0000000..2e68423
--- /dev/null
+++ b/org.eclipse.egf.pattern.java/plugin.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.egf.pattern.extension">
+ <flavor
+ class="org.eclipse.egf.pattern.java.extension.JavaPatternExtension">
+ </flavor>
+ </extension>
+
+</plugin>
diff --git a/org.eclipse.egf.pattern.java/src/org/eclipse/egf/pattern/java/Activator.java b/org.eclipse.egf.pattern.java/src/org/eclipse/egf/pattern/java/Activator.java
new file mode 100644
index 0000000..17f5ef0
--- /dev/null
+++ b/org.eclipse.egf.pattern.java/src/org/eclipse/egf/pattern/java/Activator.java
@@ -0,0 +1,50 @@
+package org.eclipse.egf.pattern.java;
+
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends Plugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.egf.pattern.java";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.java/src/org/eclipse/egf/pattern/java/JavaPatternMessages.properties b/org.eclipse.egf.pattern.java/src/org/eclipse/egf/pattern/java/JavaPatternMessages.properties
new file mode 100644
index 0000000..3f5e768
--- /dev/null
+++ b/org.eclipse.egf.pattern.java/src/org/eclipse/egf/pattern/java/JavaPatternMessages.properties
@@ -0,0 +1,8 @@
+assembly_error1 = There is no class to call.
+assembly_error2 = Cannot insert parameter names aliases.
+assembly_error3 = Pattern class is null
+assembly_error4 = Cannot get platformFactoryComponent related to pattern ''{0}'' (Id ''{0}'').
+assembly_error5 = Cannot get project related to pattern ''{0}'' (Id ''{0}'').
+assembly_error6 = Cannot compute class name for pattern ''{0}''
+assembly_error8 = Empty class name or package name for pattern ''{0}''
+assembly_error9 = Cannot get Pattern object
diff --git a/org.eclipse.egf.pattern.java/src/org/eclipse/egf/pattern/java/JavaPreferences.java b/org.eclipse.egf.pattern.java/src/org/eclipse/egf/pattern/java/JavaPreferences.java
new file mode 100644
index 0000000..29f1b2c
--- /dev/null
+++ b/org.eclipse.egf.pattern.java/src/org/eclipse/egf/pattern/java/JavaPreferences.java
@@ -0,0 +1,39 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.java;
+
+/**
+ * @author Guiu
+ *
+ */
+public class JavaPreferences {
+
+ public static String getTemplateFileExtension() {
+ return "java_template";
+ }
+
+ /*
+ *
+ *
+ * //TODO get the encoding value from global preferences public static
+ * String getEncoding() { return "UTF8"; }
+ */
+ private JavaPreferences() {
+ super();
+
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.java/src/org/eclipse/egf/pattern/java/Messages.java b/org.eclipse.egf.pattern.java/src/org/eclipse/egf/pattern/java/Messages.java
new file mode 100644
index 0000000..7d0ac27
--- /dev/null
+++ b/org.eclipse.egf.pattern.java/src/org/eclipse/egf/pattern/java/Messages.java
@@ -0,0 +1,23 @@
+package org.eclipse.egf.pattern.java;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+
+ // assembly
+ public static String assembly_error1;
+ public static String assembly_error2;
+ public static String assembly_error3;
+ public static String assembly_error4;
+ public static String assembly_error5;
+ public static String assembly_error6;
+
+ public static String assembly_error8;
+ public static String assembly_error9;
+
+ private static final String BUNDLE_NAME = "org.eclipse.egf.pattern.java.JavaPatternMessages";//$NON-NLS-1$
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.java/src/org/eclipse/egf/pattern/java/engine/JavaAssemblyContentProvider.java b/org.eclipse.egf.pattern.java/src/org/eclipse/egf/pattern/java/engine/JavaAssemblyContentProvider.java
new file mode 100644
index 0000000..26906d0
--- /dev/null
+++ b/org.eclipse.egf.pattern.java/src/org/eclipse/egf/pattern/java/engine/JavaAssemblyContentProvider.java
@@ -0,0 +1,66 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.java.engine;
+
+import org.eclipse.egf.common.constant.EGFCommonConstants;
+import org.eclipse.egf.model.pattern.MethodCall;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.model.pattern.PatternInjectedCall;
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.pattern.common.java.AbstractJavaAssemblyContentProvider;
+import org.eclipse.egf.pattern.engine.PatternHelper;
+import org.eclipse.egf.pattern.java.Messages;
+import org.eclipse.egf.pattern.utils.JavaMethodGenerationHelper;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class JavaAssemblyContentProvider extends AbstractJavaAssemblyContentProvider {
+
+ public JavaAssemblyContentProvider(Pattern pattern) {
+ super(pattern, new JavaMethodGenerationHelper("out"));
+ }
+
+ @Override
+ protected void call(MethodCall object) throws PatternException {
+ javaMethodHelper.addCallStatement(object.getCalled());
+ content.append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+
+ @Override
+ protected void call(PatternInjectedCall call) throws PatternException {
+ Pattern pattern = call.getCalled();
+ String className = JavaNatureHelper.getClassName(pattern);
+ if (className == null)
+ throw new PatternException(Messages.assembly_error1);
+
+ super.call(call);
+ }
+
+ @Override
+ protected void addMethodBodies() throws PatternException {
+ for (PatternMethod method : PatternHelper.getUserMethods(pattern)) {
+ javaMethodHelper.addSignature(method);
+ content.append(EGFCommonConstants.LINE_SEPARATOR);
+ content.append("{").append(EGFCommonConstants.LINE_SEPARATOR);
+ content.append(getMethodContent(method)).append(EGFCommonConstants.LINE_SEPARATOR);
+ content.append("}").append(EGFCommonConstants.LINE_SEPARATOR).append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.java/src/org/eclipse/egf/pattern/java/engine/JavaAssemblyHelper.java b/org.eclipse.egf.pattern.java/src/org/eclipse/egf/pattern/java/engine/JavaAssemblyHelper.java
new file mode 100644
index 0000000..2ec0fce
--- /dev/null
+++ b/org.eclipse.egf.pattern.java/src/org/eclipse/egf/pattern/java/engine/JavaAssemblyHelper.java
@@ -0,0 +1,153 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.java.engine;
+
+import org.eclipse.egf.common.constant.EGFCommonConstants;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.model.pattern.PatternParameter;
+import org.eclipse.egf.model.pattern.PatternVariable;
+import org.eclipse.egf.model.pattern.Query;
+import org.eclipse.egf.pattern.engine.AssemblyHelper;
+import org.eclipse.egf.pattern.engine.PatternHelper;
+import org.eclipse.egf.pattern.utils.ParameterTypeHelper;
+
+/**
+ * @author Thomas Guiu
+ */
+public class JavaAssemblyHelper extends AssemblyHelper {
+
+ public static final String GENERATE_METHOD = "generate";
+
+ public static final String CONSTRUCTOR_MARKER = "//Here is the constructor";
+
+ public JavaAssemblyHelper(Pattern pattern, JavaAssemblyContentProvider contentProvider) {
+ super(pattern, contentProvider);
+ }
+
+ @Override
+ protected void addVariableInitialization() throws PatternException {
+ int indexOf = content.indexOf(CONSTRUCTOR_MARKER);
+ if (indexOf == -1)
+ throw new IllegalStateException();
+ content.insert(indexOf + CONSTRUCTOR_MARKER.length() + 1, contentHelper.getMethodContent(pattern.getInitMethod()));
+ }
+
+ @Override
+ protected void beginOrchestration() throws PatternException {
+ content.append("public void generate (Object argument) throws Exception {").append(EGFCommonConstants.LINE_SEPARATOR);
+ content.append("InternalPatternContext ctx = (InternalPatternContext)argument;").append(EGFCommonConstants.LINE_SEPARATOR);
+ content.append("IQuery.ParameterDescription paramDesc = null;").append(EGFCommonConstants.LINE_SEPARATOR);
+ content.append("Map<String, String> queryCtx = null;").append(EGFCommonConstants.LINE_SEPARATOR);
+ super.beginOrchestration();
+
+ if (!pattern.getAllParameters().isEmpty()) {
+
+ for (PatternParameter parameter : pattern.getAllParameters()) {
+ appendQueryCode(content, parameter);
+ }
+
+ content.append(EGFCommonConstants.LINE_SEPARATOR).append(EGFCommonConstants.LINE_SEPARATOR);
+
+ // create a loop per parameter
+ for (PatternParameter parameter : pattern.getAllParameters()) {
+ String local = PatternHelper.localizeName(parameter);
+ content.append("for (Object ").append(local).append(" : ").append(getParameterListName(parameter)).append(" ) {").append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+ content.append(EGFCommonConstants.LINE_SEPARATOR);
+ for (org.eclipse.egf.model.pattern.PatternParameter parameter : pattern.getAllParameters()) {
+ String local = PatternHelper.localizeName(parameter);
+ String type = ParameterTypeHelper.INSTANCE.getTypeLiteral(parameter.getType());
+ content.append("this.").append(parameter.getName()).append(" = (").append(type).append(")").append(local).append(";").append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+
+ content.append(EGFCommonConstants.LINE_SEPARATOR);
+
+ content.append(AssemblyHelper.ORCHESTRATION_METHOD).append("((PatternContext)argument);").append(EGFCommonConstants.LINE_SEPARATOR);
+
+ // 2 - Add post block at current index
+ for (int i = 0; i < pattern.getAllParameters().size(); i++)
+ content.append("}").append(EGFCommonConstants.LINE_SEPARATOR);
+ } else
+ content.append(AssemblyHelper.ORCHESTRATION_METHOD).append("((PatternContext)argument);").append(EGFCommonConstants.LINE_SEPARATOR);
+
+ content.append("if (ctx.useReporter()){").append(EGFCommonConstants.LINE_SEPARATOR);
+ content.append(" ctx.getReporter().executionFinished(ctx.getExecutionBuffer().toString(), ctx);").append(EGFCommonConstants.LINE_SEPARATOR);
+ content.append(" ctx.clearBuffer();}").append(EGFCommonConstants.LINE_SEPARATOR);
+ // end of method generate (Object argument)
+ content.append("}").append(EGFCommonConstants.LINE_SEPARATOR).append(EGFCommonConstants.LINE_SEPARATOR);
+
+ // add new method body
+ content.append("public String ").append(AssemblyHelper.ORCHESTRATION_METHOD).append("(PatternContext ctx) throws Exception {").append(EGFCommonConstants.LINE_SEPARATOR);
+ content.append("InternalPatternContext ictx = (InternalPatternContext)ctx;").append(EGFCommonConstants.LINE_SEPARATOR);
+ content.append("int index = 0, executionIndex = ictx.getExecutionBuffer().length();").append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+
+ /**
+ * TODO quick work to validate the whole process, needs a plugable way to
+ * add this stuff.
+ */
+ @Override
+ protected void endOrchestration() throws PatternException {
+
+ content.append(EGFCommonConstants.LINE_SEPARATOR).append("String loop = ictx.getBuffer().toString();").append(EGFCommonConstants.LINE_SEPARATOR);
+ if (!pattern.getAllParameters().isEmpty()) {
+ content.append("if (ictx.useReporter()){").append(EGFCommonConstants.LINE_SEPARATOR);
+ content.append(" ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));").append(EGFCommonConstants.LINE_SEPARATOR);
+ content.append("Map<String, Object> parameterValues = new HashMap<String, Object>();").append(EGFCommonConstants.LINE_SEPARATOR);
+ for (org.eclipse.egf.model.pattern.PatternParameter parameter : pattern.getAllParameters()) {
+ content.append("parameterValues.put(\"").append(parameter.getName()).append("\", this.").append(parameter.getName()).append(");").append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+ content.append(" ictx.getReporter().loopFinished(loop, ictx, parameterValues);").append(EGFCommonConstants.LINE_SEPARATOR);
+ content.append("ictx.clearBuffer();}").append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+ content.append("return loop;").append(EGFCommonConstants.LINE_SEPARATOR);
+ // end of method generate(PatternContext ctx, ...)
+ content.append("}").append(EGFCommonConstants.LINE_SEPARATOR).append(EGFCommonConstants.LINE_SEPARATOR);
+
+ // add field declarations (for variables)
+ for (PatternVariable var : pattern.getVariables()) {
+ content.append("protected ").append(ParameterTypeHelper.INSTANCE.getTypeLiteral(var.getType())).append(" ").append(var.getName()).append(" = null;").append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+
+ }
+
+ private String getParameterListName(PatternParameter parameter) {
+ return parameter.getName() + "List";
+ }
+
+ private void appendQueryCode(StringBuilder localContent, PatternParameter parameter) throws PatternException {
+ Query query = parameter.getQuery();
+ if (query == null) {
+ // there is no query, so this pattern can only be called by another
+ // (i.e. it's an entry point in execution)
+ localContent.append("List<Object> ").append(getParameterListName(parameter)).append(" = null;").append(EGFCommonConstants.LINE_SEPARATOR);
+ localContent.append("//this pattern can only be called by another (i.e. it's not an entry point in execution)").append(EGFCommonConstants.LINE_SEPARATOR);
+ return;
+ }
+ localContent.append("paramDesc = new IQuery.ParameterDescription(\"").append(parameter.getName()).append("\", \"").append(parameter.getType()).append("\");").append(EGFCommonConstants.LINE_SEPARATOR);
+ localContent.append("queryCtx = new HashMap<String, String>();").append(EGFCommonConstants.LINE_SEPARATOR);
+ if (query != null && query.getQueryContext() != null) {
+ for (String key : query.getQueryContext().keySet()) {
+ localContent.append("queryCtx.put(\"").append(key).append("\", \"").append(query.getQueryContext().get(key)).append("\");").append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+ }
+
+ localContent.append("List<Object> ").append(getParameterListName(parameter)).append(" = ");
+ localContent.append("QueryHelper.load(ctx, \"").append(query.getExtensionId()).append("\").execute(paramDesc, queryCtx, ctx);").append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.java/src/org/eclipse/egf/pattern/java/engine/JavaEngine.java b/org.eclipse.egf.pattern.java/src/org/eclipse/egf/pattern/java/engine/JavaEngine.java
new file mode 100644
index 0000000..6059f22
--- /dev/null
+++ b/org.eclipse.egf.pattern.java/src/org/eclipse/egf/pattern/java/engine/JavaEngine.java
@@ -0,0 +1,160 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.java.engine;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.egf.core.fcore.IPlatformFcore;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.model.pattern.PatternParameter;
+import org.eclipse.egf.pattern.common.java.AbstractJavaEngine;
+import org.eclipse.egf.pattern.engine.AssemblyHelper;
+import org.eclipse.egf.pattern.engine.PatternHelper;
+import org.eclipse.egf.pattern.java.Messages;
+import org.eclipse.egf.pattern.utils.FileHelper;
+import org.eclipse.egf.pattern.utils.JavaMethodGenerationHelper;
+import org.eclipse.egf.pattern.utils.ParameterTypeHelper;
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.ASTParser;
+import org.eclipse.jdt.core.dom.Assignment;
+import org.eclipse.jdt.core.dom.Block;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.FieldAccess;
+import org.eclipse.jdt.core.dom.FieldDeclaration;
+import org.eclipse.jdt.core.dom.MethodDeclaration;
+import org.eclipse.jdt.core.dom.Modifier;
+import org.eclipse.jdt.core.dom.SimpleType;
+import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
+import org.eclipse.jdt.core.dom.TypeDeclaration;
+import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.Document;
+import org.eclipse.text.edits.TextEdit;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class JavaEngine extends AbstractJavaEngine {
+
+ public JavaEngine(Pattern pattern) throws PatternException {
+ super(pattern);
+ }
+
+ public void translate() throws PatternException {
+ Pattern pattern = getPattern();
+ if (pattern == null)
+ throw new IllegalStateException();
+
+ // **************************************************************************
+ // 1 - put together all pt files
+ AssemblyHelper helper = new JavaAssemblyHelper(pattern, new JavaAssemblyContentProvider(pattern));
+ String templatecontent = helper.visit();
+
+ if (getPattern().getSuperPattern() != null || !getPattern().getAllParameters().isEmpty()) {
+ Document document = new Document(templatecontent);
+ ASTParser parser = ASTParser.newParser(AST.JLS3);
+ parser.setKind(ASTParser.K_COMPILATION_UNIT);
+ parser.setSource(document.get().toCharArray());
+ CompilationUnit cu = (CompilationUnit) parser.createAST(null);
+ cu.recordModifications();
+ if ((cu.getFlags() & ASTNode.MALFORMED) == 0) {
+ TypeDeclaration type = (TypeDeclaration) cu.types().get(0);
+ if (getPattern().getSuperPattern() != null) {
+ String parentClassName = JavaNatureHelper.getClassName(getPattern().getSuperPattern());
+ AST ast = type.getAST();
+ SimpleType newSimpleType = ast.newSimpleType(ast.newName(parentClassName));
+ type.setSuperclassType(newSimpleType);
+ }
+ for (PatternParameter param : getPattern().getParameters()) {
+ AST ast = type.getAST();
+ String typeValue = ParameterTypeHelper.INSTANCE.getTypeLiteral(param.getType());
+
+ // 1 - Add fields
+ VariableDeclarationFragment fragment = ast.newVariableDeclarationFragment();
+ fragment.setName(ast.newSimpleName(param.getName()));
+ FieldDeclaration field = ast.newFieldDeclaration(fragment);
+ field.modifiers().addAll(ast.newModifiers(Modifier.PRIVATE));
+ field.setType(ast.newSimpleType(ast.newName(typeValue)));
+
+ type.bodyDeclarations().add(field);
+
+ // 2 - add setter methods
+ MethodDeclaration setter = ast.newMethodDeclaration();
+ setter.modifiers().addAll(ast.newModifiers(Modifier.PUBLIC));
+ setter.setName(ast.newSimpleName(JavaMethodGenerationHelper.getSetterMethod(param)));
+
+ // 2.1 - method parameters
+ SingleVariableDeclaration variableDeclaration = ast.newSingleVariableDeclaration();
+ // variableDeclaration.modifiers()(Modifier.NONE);
+ variableDeclaration.setType(ast.newSimpleType(ast.newName(typeValue)));
+ variableDeclaration.setName(ast.newSimpleName(param.getName()));
+ setter.parameters().add(variableDeclaration);
+
+ // 2.2 - body declaration
+ Block body = ast.newBlock();
+
+ Assignment assignment = ast.newAssignment();
+ FieldAccess fieldAccess = ast.newFieldAccess();
+ fieldAccess.setName(ast.newSimpleName(param.getName()));
+ fieldAccess.setExpression(ast.newThisExpression());
+ assignment.setLeftHandSide(fieldAccess);
+ assignment.setOperator(Assignment.Operator.ASSIGN);
+ assignment.setRightHandSide(ast.newSimpleName(param.getName()));
+
+ body.statements().add(ast.newExpressionStatement(assignment));
+ setter.setBody(body);
+ type.bodyDeclarations().add(setter);
+ }
+ }
+ TextEdit rewrite = cu.rewrite(document, null);
+ try {
+ rewrite.apply(document);
+ } catch (BadLocationException e1) {
+ throw new PatternException(e1);
+ }
+ templatecontent = document.get();
+ }
+
+ // 2 - put the result in the right file
+ try {
+
+ IPlatformFcore platformFactoryComponent = PatternHelper.getPlatformFcore(pattern);
+ if (platformFactoryComponent == null)
+ throw new PatternException(Messages.bind(Messages.assembly_error4, pattern.getName(), pattern.getID()));
+ IProject project = platformFactoryComponent.getPlatformBundle().getProject();
+ if (project == null)
+ throw new PatternException(Messages.bind(Messages.assembly_error5, pattern.getName(), pattern.getID()));
+ String classname = JavaNatureHelper.getClassName(pattern);
+ IPath outputPath = computeFilePath(classname);
+ FileHelper.setContent(project.getFile(outputPath), templatecontent);
+ } catch (PatternException e) {
+ throw e;
+ } catch (Exception e) {
+ throw new PatternException(e);
+ }
+
+ }
+
+ @Override
+ protected String getPatternClassname() throws PatternException {
+
+ return JavaNatureHelper.getClassName(getPattern());
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.java/src/org/eclipse/egf/pattern/java/engine/JavaNatureHelper.java b/org.eclipse.egf.pattern.java/src/org/eclipse/egf/pattern/java/engine/JavaNatureHelper.java
new file mode 100644
index 0000000..94e6b6e
--- /dev/null
+++ b/org.eclipse.egf.pattern.java/src/org/eclipse/egf/pattern/java/engine/JavaNatureHelper.java
@@ -0,0 +1,59 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.java.engine;
+
+import java.util.regex.Matcher;
+
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.pattern.engine.PatternHelper;
+import org.eclipse.egf.pattern.java.Messages;
+import org.eclipse.egf.pattern.utils.FileHelper;
+
+/**
+ * @author Thomas Guiu
+ */
+
+public class JavaNatureHelper {
+ private static final java.util.regex.Pattern compile = java.util.regex.Pattern.compile("\\s*package\\s*([\\w\\.]*);.*class\\s*(\\w*).*", java.util.regex.Pattern.DOTALL | java.util.regex.Pattern.MULTILINE);
+
+ /**
+ * This method parses the template header to know the template class name.
+ *
+ * @return never returns null or empty string.
+ */
+ public static String getClassName(Pattern pattern) throws PatternException {
+ try {
+ String content = FileHelper.getContent(PatternHelper.getPlatformFcore(pattern), pattern.getHeaderMethod().getPatternFilePath());
+ Matcher matcher = compile.matcher(content);
+ if (matcher.matches()) {
+ String pack = matcher.group(1);
+ String cls = matcher.group(2);
+ if ("".equals(pack) || "".equals(cls))
+ throw new PatternException(Messages.bind(Messages.assembly_error8, pattern.getName()));
+ return pack + "." + cls;
+ }
+ } catch (PatternException e) {
+ throw e;
+ } catch (Exception e) {
+ throw new PatternException(e);
+ }
+ throw new PatternException(Messages.bind(Messages.assembly_error6, pattern.getName()));
+ }
+
+ private JavaNatureHelper() {
+ }
+}
diff --git a/org.eclipse.egf.pattern.java/src/org/eclipse/egf/pattern/java/extension/JavaPatternExtension.java b/org.eclipse.egf.pattern.java/src/org/eclipse/egf/pattern/java/extension/JavaPatternExtension.java
new file mode 100644
index 0000000..5e9ec90
--- /dev/null
+++ b/org.eclipse.egf.pattern.java/src/org/eclipse/egf/pattern/java/extension/JavaPatternExtension.java
@@ -0,0 +1,131 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.java.extension;
+
+import java.io.IOException;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.egf.model.javapattern.provider.JavaPatternItemProviderAdapterFactory;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.model.pattern.PatternLibrary;
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.model.pattern.PatternNature;
+import org.eclipse.egf.pattern.Messages;
+import org.eclipse.egf.pattern.engine.PatternEngine;
+import org.eclipse.egf.pattern.engine.PatternHelper;
+import org.eclipse.egf.pattern.extension.BasePatternInitializer;
+import org.eclipse.egf.pattern.extension.PatternExtension;
+import org.eclipse.egf.pattern.extension.PatternFactory;
+import org.eclipse.egf.pattern.extension.PatternInitializer;
+import org.eclipse.egf.pattern.extension.RefactoringManager;
+import org.eclipse.egf.pattern.java.engine.JavaEngine;
+import org.eclipse.egf.pattern.java.engine.JavaNatureHelper;
+import org.eclipse.egf.pattern.utils.FileHelper;
+import org.eclipse.emf.common.notify.AdapterFactory;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class JavaPatternExtension extends PatternExtension implements RefactoringManager {
+
+ private static final PatternNature NATURE = org.eclipse.egf.model.javapattern.JavaPatternFactory.eINSTANCE.createJavaNature();
+ private final PatternFactory factory = new JavaPatternFactory();
+
+ @Override
+ public PatternNature getNature() {
+ return NATURE;
+ }
+
+ @Override
+ public PatternEngine doCreateRunner(Pattern pattern) throws PatternException {
+ return new JavaEngine(pattern);
+ }
+
+ @Override
+ public PatternFactory getFactory() {
+ return factory;
+ }
+
+ @Override
+ public String canTranslate(Pattern pattern) {
+
+ String canTranslate = super.canTranslate(pattern);
+ if (canTranslate == null) {
+ try {
+ JavaNatureHelper.getClassName(pattern);
+ } catch (PatternException e) {
+ return e.getMessage();
+ }
+ }
+ return canTranslate;
+ }
+
+ @Override
+ protected PatternInitializer doCreateInitializer(IProject project, Pattern pattern) {
+
+ return new JavaPatternInitializer(project, pattern);
+ }
+
+ @Override
+ protected AdapterFactory getAdapterFactory() {
+
+ return new JavaPatternItemProviderAdapterFactory();
+ }
+
+ @Override
+ public RefactoringManager getRefactoringManager() {
+
+ return this;
+ }
+
+ public void renamePattern(Pattern pattern, String oldName, String newName) throws PatternException {
+ IProject project = PatternHelper.getProject(pattern);
+ BasePatternInitializer initializer = (BasePatternInitializer) doCreateInitializer(project, pattern);
+ PatternMethod method = pattern.getHeaderMethod();
+ IFile methodFile = initializer.getFile(method);
+ try {
+ String content = FileHelper.getFileContent(methodFile);
+ // Update the header if the class has the default name, do nothing
+ // the user has changed the class name
+ String regex = "public[\\s]*class[\\s]*" + PatternHelper.dropNonWordCharacter(oldName) + "[\\s]*\\{";
+ String replacement = "public class " + PatternHelper.dropNonWordCharacter(newName) + " {";
+ String newContent = content.replaceAll(regex, replacement);
+ if (newContent == null)
+ throw new PatternException(Messages.refactoring_error1);
+ regex = "public[\\s]*" + PatternHelper.dropNonWordCharacter(oldName) + "[\\s]*\\(\\)[\\s]*\\{";
+ replacement = "public " + PatternHelper.dropNonWordCharacter(newName) + "() {";
+ newContent = newContent.replaceAll(regex, replacement);
+ if (newContent == null)
+ throw new PatternException(Messages.refactoring_error1);
+ FileHelper.setContent(methodFile, newContent);
+ } catch (java.util.regex.PatternSyntaxException e) {
+ throw new PatternException(e);
+ } catch (CoreException e) {
+ throw new PatternException(e);
+ } catch (IOException e) {
+ throw new PatternException(e);
+ }
+ }
+
+ public void renameLibrary(PatternLibrary lib, String oldName, String newName) throws PatternException {
+ // TODO
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.java/src/org/eclipse/egf/pattern/java/extension/JavaPatternFactory.java b/org.eclipse.egf.pattern.java/src/org/eclipse/egf/pattern/java/extension/JavaPatternFactory.java
new file mode 100644
index 0000000..e32279d
--- /dev/null
+++ b/org.eclipse.egf.pattern.java/src/org/eclipse/egf/pattern/java/extension/JavaPatternFactory.java
@@ -0,0 +1,32 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.java.extension;
+
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.pattern.extension.PatternFactory;
+
+/**
+ * @author Guiu
+ *
+ */
+public class JavaPatternFactory extends PatternFactory {
+
+ @Override
+ protected void addNature(Pattern pattern) {
+ pattern.setNature(org.eclipse.egf.model.javapattern.JavaPatternFactory.eINSTANCE.createJavaNature());
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.java/src/org/eclipse/egf/pattern/java/extension/JavaPatternInitializer.java b/org.eclipse.egf.pattern.java/src/org/eclipse/egf/pattern/java/extension/JavaPatternInitializer.java
new file mode 100644
index 0000000..ee8e6b5
--- /dev/null
+++ b/org.eclipse.egf.pattern.java/src/org/eclipse/egf/pattern/java/extension/JavaPatternInitializer.java
@@ -0,0 +1,40 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.java.extension;
+
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.pattern.common.java.BaseJavaPatternInitializer;
+import org.eclipse.egf.pattern.java.Activator;
+import org.eclipse.egf.pattern.java.JavaPreferences;
+import org.eclipse.egf.pattern.templates.SimpleEngine;
+import org.eclipse.egf.pattern.templates.TemplateEngine;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class JavaPatternInitializer extends BaseJavaPatternInitializer {
+
+ public JavaPatternInitializer(IProject project, Pattern pattern, TemplateEngine engine) {
+ super(project, pattern, engine);
+ }
+
+ public JavaPatternInitializer(IProject project, Pattern pattern) {
+ super(project, pattern, new SimpleEngine(Activator.PLUGIN_ID, project, JavaPreferences.getTemplateFileExtension()));
+ }
+}
diff --git a/org.eclipse.egf.pattern.java/templates/default.java_template b/org.eclipse.egf.pattern.java/templates/default.java_template
new file mode 100644
index 0000000..c54a47c
--- /dev/null
+++ b/org.eclipse.egf.pattern.java/templates/default.java_template
@@ -0,0 +1 @@
+//default content
diff --git a/org.eclipse.egf.pattern.java/templates/footer.java_template b/org.eclipse.egf.pattern.java/templates/footer.java_template
new file mode 100644
index 0000000..ff30235
--- /dev/null
+++ b/org.eclipse.egf.pattern.java/templates/footer.java_template
@@ -0,0 +1 @@
+}
\ No newline at end of file
diff --git a/org.eclipse.egf.pattern.java/templates/header.java_template b/org.eclipse.egf.pattern.java/templates/header.java_template
new file mode 100644
index 0000000..0919071
--- /dev/null
+++ b/org.eclipse.egf.pattern.java/templates/header.java_template
@@ -0,0 +1,17 @@
+package PACKAGE;
+
+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.*;
+import org.eclipse.egf.common.helper.*;
+
+
+public class CLASS {
+
+ public CLASS() {
+ //Here is the constructor
+ }
+
+
diff --git a/org.eclipse.egf.pattern.java/templates/init.java_template b/org.eclipse.egf.pattern.java/templates/init.java_template
new file mode 100644
index 0000000..24650d7
--- /dev/null
+++ b/org.eclipse.egf.pattern.java/templates/init.java_template
@@ -0,0 +1 @@
+// add initialisation of the pattern variables (declaration has been already done).
diff --git a/org.eclipse.egf.pattern.jet/.classpath b/org.eclipse.egf.pattern.jet/.classpath
new file mode 100644
index 0000000..64c5e31
--- /dev/null
+++ b/org.eclipse.egf.pattern.jet/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.egf.pattern.jet/.project b/org.eclipse.egf.pattern.jet/.project
new file mode 100644
index 0000000..5202bbc
--- /dev/null
+++ b/org.eclipse.egf.pattern.jet/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.pattern.jet</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.pattern.jet/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egf.pattern.jet/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..881dd44
--- /dev/null
+++ b/org.eclipse.egf.pattern.jet/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:54:07 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.egf.pattern.jet/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egf.pattern.jet/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..8455ebf
--- /dev/null
+++ b/org.eclipse.egf.pattern.jet/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Tue Jun 30 16:47:40 CEST 2009
+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/org.eclipse.egf.pattern.jet/META-INF/MANIFEST.MF b/org.eclipse.egf.pattern.jet/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..9a3b5da
--- /dev/null
+++ b/org.eclipse.egf.pattern.jet/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-Vendor: %providerName
+Bundle-ClassPath: .
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.egf.pattern.jet;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-Activator: org.eclipse.egf.pattern.jet.Activator
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.egf.pattern;visibility:=reexport,
+ org.eclipse.emf.codegen,
+ org.eclipse.egf.model.jetpattern,
+ org.eclipse.egf.model.jetpattern.edit
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.egf.pattern.jet,
+ org.eclipse.egf.pattern.jet.extension
diff --git a/org.eclipse.egf.pattern.jet/about.html b/org.eclipse.egf.pattern.jet/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/org.eclipse.egf.pattern.jet/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/org.eclipse.egf.pattern.jet/build.properties b/org.eclipse.egf.pattern.jet/build.properties
new file mode 100644
index 0000000..78c079d
--- /dev/null
+++ b/org.eclipse.egf.pattern.jet/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+source.. = src/
+output.. = bin/
+bin.includes = .,\
+ templates/,\
+ META-INF/,\
+ about.html,\
+ plugin.xml,\
+ plugin.properties
+src.includes = about.html
diff --git a/org.eclipse.egf.pattern.jet/plugin.properties b/org.eclipse.egf.pattern.jet/plugin.properties
new file mode 100644
index 0000000..1327251
--- /dev/null
+++ b/org.eclipse.egf.pattern.jet/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 JET Pattern (Incubation)
+providerName=Eclipse Modeling Project
diff --git a/org.eclipse.egf.pattern.jet/plugin.xml b/org.eclipse.egf.pattern.jet/plugin.xml
new file mode 100644
index 0000000..5d1152a
--- /dev/null
+++ b/org.eclipse.egf.pattern.jet/plugin.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.egf.pattern.extension">
+ <flavor
+ class="org.eclipse.egf.pattern.jet.extension.JetPatternExtension">
+ </flavor>
+ </extension>
+
+</plugin>
diff --git a/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/Activator.java b/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/Activator.java
new file mode 100644
index 0000000..2673acf
--- /dev/null
+++ b/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/Activator.java
@@ -0,0 +1,66 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.jet;
+
+import org.eclipse.egf.common.activator.EGFAbstractPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ * @author Guiu
+ */
+public class Activator extends EGFAbstractPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.egf.pattern.jet";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/JetPatternMessages.properties b/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/JetPatternMessages.properties
new file mode 100644
index 0000000..1940786
--- /dev/null
+++ b/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/JetPatternMessages.properties
@@ -0,0 +1,8 @@
+assembly_error1 = There is no class to call.
+assembly_error2 = Cannot insert parameter names aliases.
+assembly_error3 = Pattern class is null
+assembly_error4 = Cannot get platformFactoryComponent related to pattern ''{0}'' (Id ''{0}'').
+assembly_error5 = Cannot get project related to pattern ''{0}'' (Id ''{0}'').
+assembly_error6 = Cannot compute class name for pattern ''{0}''
+assembly_error8 = Empty class name or package name for pattern ''{0}''
+assembly_error9 = Cannot get Pattern object
\ No newline at end of file
diff --git a/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/JetPreferences.java b/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/JetPreferences.java
new file mode 100644
index 0000000..df64f61
--- /dev/null
+++ b/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/JetPreferences.java
@@ -0,0 +1,38 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.jet;
+
+/**
+ * @author Guiu
+ *
+ */
+public class JetPreferences {
+
+ // TODO get the encoding value from global preferences
+ public static String getEncoding() {
+ return "UTF8";
+ }
+
+ public static String getTemplateFileExtension() {
+ return "jet_template";
+ }
+
+ private JetPreferences() {
+ super();
+
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/Messages.java b/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/Messages.java
new file mode 100644
index 0000000..e171f31
--- /dev/null
+++ b/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/Messages.java
@@ -0,0 +1,22 @@
+package org.eclipse.egf.pattern.jet;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+
+ // assembly
+ public static String assembly_error1;
+ public static String assembly_error2;
+ public static String assembly_error3;
+ public static String assembly_error4;
+ public static String assembly_error5;
+ public static String assembly_error6;
+ public static String assembly_error8;
+ public static String assembly_error9;
+
+ private static final String BUNDLE_NAME = "org.eclipse.egf.pattern.jet.JetPatternMessages";//$NON-NLS-1$
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/engine/JetAssemblyContentProvider.java b/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/engine/JetAssemblyContentProvider.java
new file mode 100644
index 0000000..983d80e
--- /dev/null
+++ b/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/engine/JetAssemblyContentProvider.java
@@ -0,0 +1,96 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.jet.engine;
+
+import org.eclipse.egf.common.constant.EGFCommonConstants;
+import org.eclipse.egf.model.pattern.BackCall;
+import org.eclipse.egf.model.pattern.MethodCall;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternCall;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.model.pattern.PatternInjectedCall;
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.model.pattern.SuperCall;
+import org.eclipse.egf.pattern.common.java.AbstractJavaAssemblyContentProvider;
+import org.eclipse.egf.pattern.engine.PatternHelper;
+import org.eclipse.egf.pattern.jet.Messages;
+import org.eclipse.egf.pattern.utils.JavaMethodGenerationHelper;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class JetAssemblyContentProvider extends AbstractJavaAssemblyContentProvider {
+
+ public JetAssemblyContentProvider(Pattern pattern) {
+ super(pattern, new JavaMethodGenerationHelper("stringBuffer"));
+
+ }
+
+ @Override
+ protected void call(PatternCall call) throws PatternException {
+ content.append("<%");
+ super.call(call);
+ content.append("%>").append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+
+ @Override
+ protected void call(BackCall object) throws PatternException {
+ content.append("<%");
+ super.call(object);
+ content.append("%>").append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+
+ @Override
+ protected void call(SuperCall call) throws PatternException {
+ content.append("<%");
+ super.call(call);
+ content.append("%>").append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+
+ @Override
+ protected void call(PatternInjectedCall call) throws PatternException {
+ Pattern pattern = call.getCalled();
+ String templateClassName = JetNatureHelper.getTemplateClassName(pattern);
+ if (templateClassName == null)
+ throw new PatternException(Messages.assembly_error1);
+
+ content.append("<%");
+ super.call(call);
+ content.append("%>").append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+
+ @Override
+ protected void call(MethodCall object) throws PatternException {
+ content.append("<%").append(EGFCommonConstants.LINE_SEPARATOR);
+ javaMethodHelper.addCallStatement(object.getCalled());
+ content.append("%>").append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+
+ @Override
+ protected void addMethodBodies() throws PatternException {
+ content.append("<%").append(JetAssemblyHelper.START_METHOD_DECLARATION_MARKER).append("%>").append(EGFCommonConstants.LINE_SEPARATOR);
+ for (PatternMethod method : PatternHelper.getUserMethods(pattern)) {
+ content.append("<%");
+ javaMethodHelper.addSignature(method);
+ content.append("{").append(EGFCommonConstants.LINE_SEPARATOR);
+ content.append("%>");
+ content.append(getMethodContent(method));
+ content.append("<%}%>").append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+ content.append("<%").append(JetAssemblyHelper.END_METHOD_DECLARATION_MARKER).append("%>").append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+}
diff --git a/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/engine/JetAssemblyHelper.java b/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/engine/JetAssemblyHelper.java
new file mode 100644
index 0000000..6b8c784
--- /dev/null
+++ b/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/engine/JetAssemblyHelper.java
@@ -0,0 +1,158 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.jet.engine;
+
+import org.eclipse.egf.common.constant.EGFCommonConstants;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.model.pattern.PatternParameter;
+import org.eclipse.egf.model.pattern.Query;
+import org.eclipse.egf.pattern.Messages;
+import org.eclipse.egf.pattern.engine.AssemblyHelper;
+import org.eclipse.egf.pattern.engine.PatternHelper;
+import org.eclipse.egf.pattern.utils.ParameterTypeHelper;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class JetAssemblyHelper extends AssemblyHelper {
+
+ public JetAssemblyHelper(Pattern pattern, JetAssemblyContentProvider contentProvider) {
+ super(pattern, contentProvider);
+ }
+
+ @Override
+ protected void beginOrchestration() throws PatternException {
+ content.append("<%");
+ content.append("InternalPatternContext ctx = (InternalPatternContext)argument;").append(EGFCommonConstants.LINE_SEPARATOR);
+ content.append("Map<String, String> queryCtx = null;").append(EGFCommonConstants.LINE_SEPARATOR);
+ content.append("IQuery.ParameterDescription paramDesc = null;").append(EGFCommonConstants.LINE_SEPARATOR);
+ content.append("%>");
+ super.beginOrchestration();
+ content.append("<%").append(START_LOOP_MARKER).append("%>");
+ }
+
+ @Override
+ protected void endOrchestration() throws PatternException {
+ content.append("<%").append(END_LOOP_MARKER).append("%>");
+
+ if (pattern.getAllParameters().isEmpty()) {
+ content.append("<%if (ctx.useReporter()){").append(EGFCommonConstants.LINE_SEPARATOR);
+ content.append(" ctx.getReporter().executionFinished(ctx.getExecutionBuffer().toString(), ctx);").append(EGFCommonConstants.LINE_SEPARATOR);
+ content.append(" ctx.clearBuffer();}%>").append(EGFCommonConstants.LINE_SEPARATOR);
+ return;
+ }
+ // 1 - Add pre block at insertionIndex
+ StringBuilder localContent = new StringBuilder(300);
+ localContent.append("<%").append(EGFCommonConstants.LINE_SEPARATOR);
+
+ for (PatternParameter parameter : pattern.getAllParameters()) {
+ appendQueryCode(localContent, parameter);
+ }
+
+ localContent.append(EGFCommonConstants.LINE_SEPARATOR).append(EGFCommonConstants.LINE_SEPARATOR);
+
+ // create a loop per parameter
+ for (PatternParameter parameter : pattern.getAllParameters()) {
+ String local = PatternHelper.localizeName(parameter);
+ localContent.append("for (Object ").append(local).append(" : ").append(getParameterListName(parameter)).append(" ) {").append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+ localContent.append(EGFCommonConstants.LINE_SEPARATOR);
+ for (org.eclipse.egf.model.pattern.PatternParameter parameter : pattern.getAllParameters()) {
+ String local = PatternHelper.localizeName(parameter);
+ String type = ParameterTypeHelper.INSTANCE.getTypeLiteral(parameter.getType());
+ localContent.append("this.").append(parameter.getName()).append(" = (").append(type).append(")").append(local).append(";").append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+
+ localContent.append(EGFCommonConstants.LINE_SEPARATOR).append("%>");
+
+ content.insert(orchestrationIndex, localContent);
+
+ // 2 - Add post block at current index
+ content.append("<%").append(EGFCommonConstants.LINE_SEPARATOR);
+
+ for (int i = 0; i < pattern.getAllParameters().size(); i++)
+ content.append("}").append(EGFCommonConstants.LINE_SEPARATOR);
+ content.append("if (ctx.useReporter()){").append(EGFCommonConstants.LINE_SEPARATOR);
+ content.append(" ctx.getReporter().executionFinished(ctx.getExecutionBuffer().toString(), ctx);").append(EGFCommonConstants.LINE_SEPARATOR);
+ content.append(" ctx.clearBuffer();").append(EGFCommonConstants.LINE_SEPARATOR);
+ content.append("}%>");
+
+ // 3- Add additional code for parameter names handling
+ int startIndex = content.indexOf(START_LOOP_MARKER);
+ if (startIndex == -1)
+ throw new PatternException(Messages.assembly_error2);
+
+ // localContent.setLength(0);
+ // localContent.append(EGFCommonConstants.LINE_SEPARATOR);
+ // localContent.append("Map<String, Object> parameterValues = new HashMap<String, Object>();").append(EGFCommonConstants.LINE_SEPARATOR);
+ // for (org.eclipse.egf.model.pattern.PatternParameter parameter :
+ // pattern.getAllParameters()) {
+ // String local = PatternHelper.localizeName(parameter);
+ // String type =
+ // ParameterTypeHelper.INSTANCE.getTypeLiteral(parameter.getType());
+ // localContent.append(type).append(" ").append(parameter.getName()).append(" = (").append(type).append(")").append(local).append(";").append(EGFCommonConstants.LINE_SEPARATOR);
+ // localContent.append("parameterValues.put(\"").append(parameter.getName()).append("\", ").append(local).append(");").append(EGFCommonConstants.LINE_SEPARATOR);
+ // }
+ // content.insert(startIndex + START_LOOP_MARKER.length(),
+ // localContent);
+ }
+
+ private String getParameterListName(PatternParameter parameter) {
+ return parameter.getName() + "List";
+ }
+
+ private void appendQueryCode(StringBuilder localContent, PatternParameter parameter) throws PatternException {
+ Query query = parameter.getQuery();
+ if (query == null) {
+ // there is no query, so this pattern can only be called by another
+ // (i.e. it's an entry point in execution)
+ localContent.append("List<Object> ").append(getParameterListName(parameter)).append(" = null;").append(EGFCommonConstants.LINE_SEPARATOR);
+ localContent.append("//this pattern can only be called by another (i.e. it's not an entry point in execution)").append(EGFCommonConstants.LINE_SEPARATOR);
+ return;
+ }
+ localContent.append("paramDesc = new IQuery.ParameterDescription(\"").append(parameter.getName()).append("\", \"").append(parameter.getType()).append("\");").append(EGFCommonConstants.LINE_SEPARATOR);
+ localContent.append("queryCtx = new HashMap<String, String>();").append(EGFCommonConstants.LINE_SEPARATOR);
+ if (query.getQueryContext() != null) {
+ for (String key : query.getQueryContext().keySet()) {
+ localContent.append("queryCtx.put(\"").append(key).append("\", \"").append(query.getQueryContext().get(key)).append("\");").append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+ }
+
+ localContent.append("List<Object> ").append(getParameterListName(parameter)).append(" = ");
+ localContent.append("QueryHelper.load(ctx, \"").append(query.getExtensionId()).append("\").execute(paramDesc, queryCtx, ctx);").append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+
+ @Override
+ protected void addVariableInitialization() throws PatternException {
+ content.append("<%").append(START_INIT_VARIABLE_MARKER).append("%>");
+ content.append(contentHelper.getMethodContent(pattern.getInitMethod()));
+ content.append("<%").append(END_INIT_VARIABLE_MARKER).append("%>");
+ }
+
+ public static final String START_METHOD_DECLARATION_MARKER = "//Start of methods";
+ public static final String END_METHOD_DECLARATION_MARKER = "//End of methods";
+
+ public static final String START_LOOP_MARKER = "//Start of work";
+ public static final String END_LOOP_MARKER = "//End of work";
+
+ public static final String START_INIT_VARIABLE_MARKER = "//Start of init";
+ public static final String END_INIT_VARIABLE_MARKER = "//End of init";
+
+ public static final String CONSTRUCTOR_MARKER = "//Here is the constructor";
+
+}
diff --git a/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/engine/JetEngine.java b/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/engine/JetEngine.java
new file mode 100644
index 0000000..4c9cab8
--- /dev/null
+++ b/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/engine/JetEngine.java
@@ -0,0 +1,184 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.jet.engine;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.egf.common.constant.EGFCommonConstants;
+import org.eclipse.egf.core.fcore.IPlatformFcore;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.model.pattern.PatternParameter;
+import org.eclipse.egf.model.pattern.PatternVariable;
+import org.eclipse.egf.pattern.common.java.AbstractJavaEngine;
+import org.eclipse.egf.pattern.engine.AssemblyHelper;
+import org.eclipse.egf.pattern.engine.PatternHelper;
+import org.eclipse.egf.pattern.jet.JetPreferences;
+import org.eclipse.egf.pattern.jet.Messages;
+import org.eclipse.egf.pattern.utils.FileHelper;
+import org.eclipse.egf.pattern.utils.JavaMethodGenerationHelper;
+import org.eclipse.egf.pattern.utils.ParameterTypeHelper;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class JetEngine extends AbstractJavaEngine {
+
+ public JetEngine(Pattern pattern) throws PatternException {
+ super(pattern);
+ }
+
+ public void translate() throws PatternException {
+ Pattern pattern = getPattern();
+
+ // **************************************************************************
+ // 1 - put together all pt files
+ AssemblyHelper helper = new JetAssemblyHelper(getPattern(), new JetAssemblyContentProvider(getPattern()));
+ String templatecontent = helper.visit();
+
+ // 2 - compile the result
+ String templateURI = "Pattern_" + pattern.getName() + " (" + pattern.getID() + ")";
+ try {
+ SkeletonJETCompiler compiler = new SkeletonJETCompiler(templateURI, new ByteArrayInputStream(templatecontent.getBytes()), JetPreferences.getEncoding());
+ compiler.parse();
+ if (pattern.getSuperPattern() != null) {
+ Pattern parentPattern = pattern.getSuperPattern();
+ ((SkeletonJETCompiler.CustomJETSkeleton) compiler.getSkeleton()).setParentClass(JetNatureHelper.getTemplateClassName(parentPattern));
+ }
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ compiler.generate(outStream);
+
+ String targetClassName = JetNatureHelper.getTemplateClassName(pattern);
+ IPath outputPath = computeFilePath(targetClassName);
+ IPlatformFcore platformFcore = PatternHelper.getPlatformFcore(getPattern());
+ if (platformFcore == null)
+ throw new PatternException(Messages.bind(Messages.assembly_error4, pattern.getName(), pattern.getID()));
+ IProject project = platformFcore.getPlatformBundle().getProject();
+ if (project == null)
+ throw new PatternException(Messages.bind(Messages.assembly_error5, pattern.getName(), pattern.getID()));
+ FileHelper.setContent(project.getFile(outputPath), getContent(new String(outStream.toByteArray())));
+
+ } catch (PatternException e) {
+ throw e;
+ } catch (Exception e) {
+ throw new PatternException(e);
+ }
+ }
+
+ private String getContent(String content) {
+
+ StringBuilder builder = new StringBuilder(content.length() + 500);
+ int startIndex = content.indexOf(JetAssemblyHelper.START_LOOP_MARKER);
+ int endIndex = content.indexOf(JetAssemblyHelper.END_LOOP_MARKER);
+ int insertionIndex = content.lastIndexOf('}');
+ if (startIndex == -1 || endIndex == -1 || insertionIndex == -1)
+ return content;
+ // add start of class code
+ builder.append(content.substring(0, startIndex));
+
+ Pattern pattern = getPattern();
+ // add new method call
+ builder.append(AssemblyHelper.ORCHESTRATION_METHOD).append("(ctx);");
+
+ // add end of class code
+ int startMethodIndex = content.indexOf(JetAssemblyHelper.START_METHOD_DECLARATION_MARKER, endIndex);
+ int endMethodIndex = content.indexOf(JetAssemblyHelper.END_METHOD_DECLARATION_MARKER, endIndex);
+
+ if (startMethodIndex != -1 && endMethodIndex != -1) {
+ builder.append(content.substring(endIndex + JetAssemblyHelper.END_LOOP_MARKER.length(), startMethodIndex));
+ builder.append(content.substring(endMethodIndex + JetAssemblyHelper.END_METHOD_DECLARATION_MARKER.length(), insertionIndex));
+ } else
+ builder.append(content.substring(endIndex + JetAssemblyHelper.END_LOOP_MARKER.length(), insertionIndex));
+
+ // add pattern reporter stuff
+ builder.append("public String ").append(AssemblyHelper.ORCHESTRATION_METHOD).append("(PatternContext ctx) throws Exception {").append(EGFCommonConstants.LINE_SEPARATOR);
+ builder.append("InternalPatternContext ictx = (InternalPatternContext)ctx;").append(EGFCommonConstants.LINE_SEPARATOR);
+ builder.append("int index = 0, executionIndex = ictx.getExecutionBuffer().length();").append(EGFCommonConstants.LINE_SEPARATOR);
+ // add orchestration statements
+ builder.append(content.substring(startIndex + JetAssemblyHelper.START_LOOP_MARKER.length(), endIndex));
+
+ builder.append(EGFCommonConstants.LINE_SEPARATOR);
+ builder.append("String loop = ictx.getBuffer().toString();").append(EGFCommonConstants.LINE_SEPARATOR);
+ if (!getPattern().getAllParameters().isEmpty()) {
+ builder.append("if (ictx.useReporter()){").append(EGFCommonConstants.LINE_SEPARATOR);
+ builder.append(" ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));").append(EGFCommonConstants.LINE_SEPARATOR);
+
+ builder.append(" Map<String, Object> parameterValues = new HashMap<String, Object>();").append(EGFCommonConstants.LINE_SEPARATOR);
+ for (org.eclipse.egf.model.pattern.PatternParameter parameter : pattern.getAllParameters()) {
+ String name = parameter.getName();
+ // String type =
+ // ParameterTypeHelper.INSTANCE.getTypeLiteral(parameter.getType());
+ // builder.append(type).append(" ").append(parameter.getName()).append(" = (").append(type).append(")").append(local).append(";").append(EGFCommonConstants.LINE_SEPARATOR);
+ builder.append(" parameterValues.put(\"").append(name).append("\", this.").append(name).append(");").append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+ builder.append(" ictx.getReporter().loopFinished(loop, ictx, parameterValues);").append(EGFCommonConstants.LINE_SEPARATOR);
+ builder.append(" ictx.clearBuffer();}").append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+ builder.append("return loop;").append(EGFCommonConstants.LINE_SEPARATOR);
+ builder.append("} ").append(EGFCommonConstants.LINE_SEPARATOR);
+ builder.append("").append(EGFCommonConstants.LINE_SEPARATOR);
+
+ // Handle variable initialization and fields
+ int startVariable = content.indexOf(JetAssemblyHelper.START_INIT_VARIABLE_MARKER);
+ int endVariable = content.indexOf(JetAssemblyHelper.END_INIT_VARIABLE_MARKER);
+ if (startVariable != -1 && endVariable != -1) {
+ int indexOf = builder.indexOf(JetAssemblyHelper.CONSTRUCTOR_MARKER);
+ if (indexOf != -1) {
+ CharSequence sequence = content.subSequence(startVariable + JetAssemblyHelper.START_INIT_VARIABLE_MARKER.length(), endVariable);
+ indexOf += JetAssemblyHelper.CONSTRUCTOR_MARKER.length();
+ builder.insert(indexOf, sequence);
+ // TODO filter sequence instead of using a workaround...
+ builder.insert(indexOf, "\nStringBuffer stringBuffer = new StringBuffer();\n");
+ startVariable = builder.indexOf(JetAssemblyHelper.START_INIT_VARIABLE_MARKER);
+ endVariable = builder.indexOf(JetAssemblyHelper.END_INIT_VARIABLE_MARKER);
+ if (startVariable != -1 && endVariable != -1) {
+ builder.delete(startVariable, endVariable + JetAssemblyHelper.END_INIT_VARIABLE_MARKER.length());
+ }
+ }
+ }
+
+ // handle variable declarations
+ for (PatternVariable var : pattern.getVariables()) {
+ builder.append("protected ").append(ParameterTypeHelper.INSTANCE.getTypeLiteral(var.getType())).append(" ").append(var.getName()).append(" = null;").append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+ for (PatternParameter var : pattern.getParameters()) {
+ String type = ParameterTypeHelper.INSTANCE.getTypeLiteral(var.getType());
+ builder.append("protected ").append(type).append(" ").append(var.getName()).append(" = null;").append(EGFCommonConstants.LINE_SEPARATOR);
+ builder.append("public void ").append(JavaMethodGenerationHelper.getSetterMethod(var)).append("(").append(type).append(" object) {").append(EGFCommonConstants.LINE_SEPARATOR);
+ builder.append("this.").append(var.getName()).append(" = object;").append(EGFCommonConstants.LINE_SEPARATOR);
+ builder.append("}").append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+
+ // handle methods declarations
+ if (startMethodIndex != -1 && endMethodIndex != -1) {
+ builder.append(content.substring(startMethodIndex + JetAssemblyHelper.START_METHOD_DECLARATION_MARKER.length(), endMethodIndex));
+ }
+
+ builder.append(content.substring(insertionIndex));
+ return builder.toString();
+ }
+
+ @Override
+ protected String getPatternClassname() throws PatternException {
+
+ return JetNatureHelper.getTemplateClassName(getPattern());
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/engine/JetNatureHelper.java b/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/engine/JetNatureHelper.java
new file mode 100644
index 0000000..6752f25
--- /dev/null
+++ b/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/engine/JetNatureHelper.java
@@ -0,0 +1,67 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.jet.engine;
+
+import java.util.regex.Matcher;
+
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.pattern.engine.PatternHelper;
+import org.eclipse.egf.pattern.jet.Messages;
+import org.eclipse.egf.pattern.utils.FileHelper;
+
+/**
+ * @author Thomas Guiu
+ */
+
+public class JetNatureHelper {
+
+ private static final java.util.regex.Pattern compile = java.util.regex.Pattern.compile(".*package\\s*=\\s*\"([\\w\\.]*)\".*class\\s*=\\s*\"(\\w*)\".*", java.util.regex.Pattern.DOTALL | java.util.regex.Pattern.MULTILINE);
+
+ /**
+ * This method parses the template header to know the template class name.
+ *
+ * @return never returns null or empty string.
+ */
+ public static String getTemplateClassName(Pattern pattern) throws PatternException {
+ try {
+ String content = FileHelper.getContent(PatternHelper.getPlatformFcore(pattern), pattern.getHeaderMethod().getPatternFilePath());
+ Matcher matcher = compile.matcher(content);
+ if (matcher.matches()) {
+
+ String pack = matcher.group(1);
+ String cls = matcher.group(2);
+ if ("".equals(pack) || "".equals(cls))
+ throw new PatternException(Messages.bind(Messages.assembly_error8, pattern.getName()));
+ return pack + "." + cls;
+ }
+ } catch (PatternException e) {
+ throw e;
+ } catch (Exception e) {
+ throw new PatternException(e);
+ }
+ throw new PatternException(Messages.bind(Messages.assembly_error6, pattern.getName()));
+ }
+
+ private JetNatureHelper() {
+ }
+
+ public static void main(String[] args) {
+ String tmp = "s-2.5";
+ String replaceAll = tmp.replaceAll("\\W", "");
+ System.out.println(replaceAll);
+ }
+}
diff --git a/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/engine/SkeletonJETCompiler.java b/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/engine/SkeletonJETCompiler.java
new file mode 100644
index 0000000..014d4cc
--- /dev/null
+++ b/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/engine/SkeletonJETCompiler.java
@@ -0,0 +1,103 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.jet.engine;
+
+import java.io.BufferedInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Map;
+
+import org.eclipse.emf.codegen.CodeGenPlugin;
+import org.eclipse.emf.codegen.jet.JETCompiler;
+import org.eclipse.emf.codegen.jet.JETException;
+import org.eclipse.emf.codegen.jet.JETMark;
+import org.eclipse.emf.codegen.jet.JETSkeleton;
+import org.eclipse.jdt.core.jdom.IDOMNode;
+import org.eclipse.jdt.core.jdom.IDOMType;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class SkeletonJETCompiler extends JETCompiler {
+ private static final String GENERATOR_SKELETON = "platform:/plugin/org.eclipse.egf.pattern.jet/templates/generator.skeleton";
+
+ public static class CustomJETSkeleton extends JETSkeleton {
+ public void setParentClass(String classname) {
+ for (IDOMNode node = compilationUnit.getFirstChild(); node != null; node = node.getNextNode()) {
+ if (node.getNodeType() == IDOMNode.TYPE) {
+ IDOMType type = (IDOMType) node;
+ type.setSuperclass(classname);
+ }
+ }
+
+ }
+ }
+
+ public SkeletonJETCompiler(String templateURI, InputStream inputStream, String encoding) throws JETException {
+ super(templateURI, inputStream, encoding);
+ }
+
+ /**
+ * Overriding the method to enhance the behavior (change the default
+ * skeleton)
+ */
+ public void handleDirective(String directive, JETMark start, JETMark stop, Map<String, String> attributes) throws JETException {
+ if (directive.equals("jet") && skeleton == null) {
+ skeleton = new CustomJETSkeleton();
+ String skeletonURI = attributes.get("skeleton");
+ if (skeletonURI == null)
+ skeletonURI = GENERATOR_SKELETON;
+ try {
+ BufferedInputStream bufferedInputStream = new BufferedInputStream(openStream(resolveLocation(templateURIPath, templateURI, skeletonURI)[1]));
+ byte[] input = new byte[bufferedInputStream.available()];
+ bufferedInputStream.read(input);
+ bufferedInputStream.close();
+ skeleton.setCompilationUnitContents(new String(input));
+ } catch (IOException exception) {
+ throw new JETException(exception);
+ }
+
+ for (Map.Entry<String, String> entry : attributes.entrySet()) {
+ // Ignore this now
+ //
+ if (entry.getKey().equals("skeleton")) {
+ // Ignore
+ } else if (entry.getKey().equals("package")) {
+ skeleton.setPackageName(entry.getValue());
+ } else if (entry.getKey().equals("imports")) {
+ skeleton.addImports(entry.getValue());
+ } else if (entry.getKey().equals("class")) {
+ skeleton.setClassName(entry.getValue());
+ } else if (entry.getKey().equals("nlString")) {
+ skeleton.setNLString(entry.getValue());
+ } else if (entry.getKey().equals("startTag")) {
+ parser.setStartTag(entry.getValue());
+ } else if (entry.getKey().equals("endTag")) {
+ parser.setEndTag(entry.getValue());
+ } else if (entry.getKey().equals("version")) {
+ // Ignore the version
+ } else {
+ throw new JETException(CodeGenPlugin.getPlugin().getString("jet.error.bad.attribute", new Object[] { entry.getKey(), start.format("jet.mark.file.line.column") }));
+ }
+ }
+
+ handleNewSkeleton();
+ } else
+ super.handleDirective(directive, start, stop, attributes);
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/extension/JetPatternExtension.java b/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/extension/JetPatternExtension.java
new file mode 100644
index 0000000..531aa84
--- /dev/null
+++ b/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/extension/JetPatternExtension.java
@@ -0,0 +1,128 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.jet.extension;
+
+import java.io.IOException;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.egf.model.jetpattern.provider.JetPatternItemProviderAdapterFactory;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.model.pattern.PatternLibrary;
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.model.pattern.PatternNature;
+import org.eclipse.egf.pattern.Messages;
+import org.eclipse.egf.pattern.engine.PatternEngine;
+import org.eclipse.egf.pattern.engine.PatternHelper;
+import org.eclipse.egf.pattern.extension.BasePatternInitializer;
+import org.eclipse.egf.pattern.extension.PatternExtension;
+import org.eclipse.egf.pattern.extension.PatternFactory;
+import org.eclipse.egf.pattern.extension.PatternInitializer;
+import org.eclipse.egf.pattern.extension.RefactoringManager;
+import org.eclipse.egf.pattern.jet.engine.JetEngine;
+import org.eclipse.egf.pattern.jet.engine.JetNatureHelper;
+import org.eclipse.egf.pattern.utils.FileHelper;
+import org.eclipse.emf.common.notify.AdapterFactory;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class JetPatternExtension extends PatternExtension implements RefactoringManager {
+
+ private static final PatternNature NATURE = org.eclipse.egf.model.jetpattern.JetPatternFactory.eINSTANCE.createJetNature();
+ private final PatternFactory factory = new JetPatternFactory();
+
+ @Override
+ public String canTranslate(Pattern pattern) {
+
+ String canTranslate = super.canTranslate(pattern);
+ if (canTranslate == null) {
+ try {
+ JetNatureHelper.getTemplateClassName(pattern);
+ } catch (PatternException e) {
+ return e.getMessage();
+ }
+
+ }
+ return canTranslate;
+ }
+
+ @Override
+ public PatternNature getNature() {
+ return NATURE;
+ }
+
+ @Override
+ public PatternEngine doCreateRunner(Pattern pattern) throws PatternException {
+ return new JetEngine(pattern);
+ }
+
+ @Override
+ public PatternFactory getFactory() {
+ return factory;
+ }
+
+ @Override
+ protected PatternInitializer doCreateInitializer(IProject project, Pattern pattern) {
+
+ return new JetPatternInitializer(project, pattern);
+ }
+
+ @Override
+ protected AdapterFactory getAdapterFactory() {
+
+ return new JetPatternItemProviderAdapterFactory();
+ }
+
+ // ************************** Refactoring stuff *************************
+ @Override
+ public RefactoringManager getRefactoringManager() {
+
+ return this;
+ }
+
+ public void renamePattern(Pattern pattern, String oldName, String newName) throws PatternException {
+ IProject project = PatternHelper.getProject(pattern);
+ BasePatternInitializer initializer = (BasePatternInitializer) doCreateInitializer(project, pattern);
+ PatternMethod method = pattern.getHeaderMethod();
+ IFile methodFile = initializer.getFile(method);
+ try {
+ String content = FileHelper.getFileContent(methodFile);
+
+ // Update the header if the class has the default name, do nothing
+ // the user has changed the class name
+ String regex = "[\\s]*class[\\s]*=*[\\s]*\"" + PatternHelper.dropNonWordCharacter(oldName) + "\"";
+ String replacement = " class=\"" + PatternHelper.dropNonWordCharacter(newName) + "\"";
+
+ String newContent = content.replaceAll(regex, replacement);
+ if (newContent == null)
+ throw new PatternException(Messages.refactoring_error1);
+ FileHelper.setContent(methodFile, newContent);
+ } catch (CoreException e) {
+ throw new PatternException(e);
+ } catch (IOException e) {
+ throw new PatternException(e);
+ }
+ }
+
+ public void renameLibrary(PatternLibrary lib, String oldName, String newName) throws PatternException {
+ // TODO
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/extension/JetPatternFactory.java b/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/extension/JetPatternFactory.java
new file mode 100644
index 0000000..2aec229
--- /dev/null
+++ b/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/extension/JetPatternFactory.java
@@ -0,0 +1,32 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.jet.extension;
+
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.pattern.extension.PatternFactory;
+
+/**
+ * @author Guiu
+ *
+ */
+public class JetPatternFactory extends PatternFactory {
+
+ @Override
+ protected void addNature(Pattern pattern) {
+ pattern.setNature(org.eclipse.egf.model.jetpattern.JetPatternFactory.eINSTANCE.createJetNature());
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/extension/JetPatternInitializer.java b/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/extension/JetPatternInitializer.java
new file mode 100644
index 0000000..ff6cafd
--- /dev/null
+++ b/org.eclipse.egf.pattern.jet/src/org/eclipse/egf/pattern/jet/extension/JetPatternInitializer.java
@@ -0,0 +1,46 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.jet.extension;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.pattern.common.java.BaseJavaPatternInitializer;
+import org.eclipse.egf.pattern.engine.PatternHelper;
+import org.eclipse.egf.pattern.extension.TemplateInitializer;
+import org.eclipse.egf.pattern.jet.Activator;
+import org.eclipse.egf.pattern.jet.JetPreferences;
+import org.eclipse.egf.pattern.templates.SimpleEngine;
+import org.eclipse.egf.pattern.templates.TemplateEngine;
+
+/**
+ * @author Guiu
+ *
+ */
+public class JetPatternInitializer extends BaseJavaPatternInitializer {
+
+
+ public JetPatternInitializer(IProject project, Pattern pattern) {
+ super(project, pattern, new SimpleEngine(Activator.PLUGIN_ID, project, JetPreferences.getTemplateFileExtension()));
+ }
+
+ public JetPatternInitializer(IProject project, Pattern pattern, TemplateEngine engine) {
+ super(project, pattern, engine);
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.jet/templates/default.jet_template b/org.eclipse.egf.pattern.jet/templates/default.jet_template
new file mode 100644
index 0000000..8d16cca
--- /dev/null
+++ b/org.eclipse.egf.pattern.jet/templates/default.jet_template
@@ -0,0 +1 @@
+//default content
\ No newline at end of file
diff --git a/org.eclipse.egf.pattern.jet/templates/footer.jet_template b/org.eclipse.egf.pattern.jet/templates/footer.jet_template
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/org.eclipse.egf.pattern.jet/templates/footer.jet_template
diff --git a/org.eclipse.egf.pattern.jet/templates/generator.skeleton b/org.eclipse.egf.pattern.jet/templates/generator.skeleton
new file mode 100644
index 0000000..6d2cbfc
--- /dev/null
+++ b/org.eclipse.egf.pattern.jet/templates/generator.skeleton
@@ -0,0 +1,13 @@
+public class CLASS
+{
+ public CLASS()
+ {
+ //Here is the constructor
+ }
+
+ public String generate(Object argument) throws Exception
+ {
+ return "";
+ }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.egf.pattern.jet/templates/header.jet_template b/org.eclipse.egf.pattern.jet/templates/header.jet_template
new file mode 100644
index 0000000..dbc5974
--- /dev/null
+++ b/org.eclipse.egf.pattern.jet/templates/header.jet_template
@@ -0,0 +1 @@
+<%@ jet package="PACKAGE" class="CLASS" 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/org.eclipse.egf.pattern.jet/templates/init.jet_template b/org.eclipse.egf.pattern.jet/templates/init.jet_template
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/org.eclipse.egf.pattern.jet/templates/init.jet_template
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/org.eclipse.egf.pattern.ui.java/.classpath b/org.eclipse.egf.pattern.ui.java/.classpath
new file mode 100644
index 0000000..2d1a430
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.java/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.egf.pattern.ui.java/.project b/org.eclipse.egf.pattern.ui.java/.project
new file mode 100644
index 0000000..ed9cd8f
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.java/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.pattern.ui.java</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.pattern.ui.java/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egf.pattern.ui.java/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..073e734
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.java/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:54:27 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.egf.pattern.ui.java/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egf.pattern.ui.java/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..e5b560b
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.java/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Fri Dec 18 13:01:20 CET 2009
+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/org.eclipse.egf.pattern.ui.java/META-INF/MANIFEST.MF b/org.eclipse.egf.pattern.ui.java/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..c0c2f63
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.java/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-Vendor: %providerName
+Bundle-ClassPath: .
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.egf.pattern.ui.java;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-Activator: org.eclipse.egf.pattern.ui.java.Activator
+Require-Bundle:
+ org.eclipse.jface.text,
+ org.eclipse.egf.common.ui,
+ org.eclipse.egf.pattern.ui,
+ org.eclipse.jdt.ui
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/org.eclipse.egf.pattern.ui.java/about.html b/org.eclipse.egf.pattern.ui.java/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.java/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/org.eclipse.egf.pattern.ui.java/build.properties b/org.eclipse.egf.pattern.ui.java/build.properties
new file mode 100644
index 0000000..185b3fc
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.java/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ icons/,\
+ .,\
+ about.html,\
+ plugin.xml,\
+ plugin.properties
+src.includes = about.html
diff --git a/org.eclipse.egf.pattern.ui.java/icons/parameter_obj.gif b/org.eclipse.egf.pattern.ui.java/icons/parameter_obj.gif
new file mode 100644
index 0000000..da1a166
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.java/icons/parameter_obj.gif
Binary files differ
diff --git a/org.eclipse.egf.pattern.ui.java/icons/sample.gif b/org.eclipse.egf.pattern.ui.java/icons/sample.gif
new file mode 100644
index 0000000..4dc98d2
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.java/icons/sample.gif
Binary files differ
diff --git a/org.eclipse.egf.pattern.ui.java/plugin.properties b/org.eclipse.egf.pattern.ui.java/plugin.properties
new file mode 100644
index 0000000..872c955
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.java/plugin.properties
@@ -0,0 +1,15 @@
+##
+# 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 UI Java Pattern (Incubation)
+providerName=Eclipse Modeling Project
+
+editor.name=Java Template Editor
\ No newline at end of file
diff --git a/org.eclipse.egf.pattern.ui.java/plugin.xml b/org.eclipse.egf.pattern.ui.java/plugin.xml
new file mode 100644
index 0000000..1cb5c36
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.java/plugin.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.egf.pattern.ui.templateEditor">
+ <editor
+ class="org.eclipse.egf.pattern.ui.java.template.JavaTemplateEditor"
+ id="org.eclipse.egf.pattern.ui.JavaTemplateEditor"
+ nature="JavaNature">
+ </editor>
+ </extension>
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ class="org.eclipse.egf.pattern.ui.java.template.JavaTemplateEditor"
+ default="false"
+ icon="icons/sample.gif"
+ id="org.eclipse.egf.pattern.ui.JavaTemplateEditor"
+ name="%editor.name">
+ </editor>
+ </extension>
+
+
+</plugin>
diff --git a/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/Activator.java b/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/Activator.java
new file mode 100644
index 0000000..64a9d18
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/Activator.java
@@ -0,0 +1,108 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+package org.eclipse.egf.pattern.ui.java;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.egf.common.ui.activator.EGFAbstractUIPlugin;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.osgi.framework.BundleContext;
+
+/**
+ * @author Yahong Song - Soyatec
+ *
+ */
+public class Activator extends EGFAbstractUIPlugin {
+
+ public static final String PLUGIN_ID = "org.eclipse.egf.pattern.ui.java";
+
+ // The shared instance
+ private static Activator _plugin;
+
+ /**
+ *
+ * Returns the currently active window for this workbench (if any). Returns
+ * <code>null</code> if there is no active workbench window. Returns
+ * <code>null</code> if called from a non-UI thread.
+ *
+ * @return the active workbench window, or <code>null</code> if there is
+ * no active workbench window or if called from a non-UI thread
+ */
+ public static IWorkbenchWindow getActiveWorkbenchWindow() {
+ return getDefault().getWorkbench().getActiveWorkbenchWindow();
+ }
+
+ /**
+ * Returns the currently active shell for this workbench (if any).
+ *
+ * @return the active workbench shell.
+ */
+ public static Shell getActiveWorkbenchShell() {
+ IWorkbenchWindow window = getActiveWorkbenchWindow();
+ if (window == null) {
+ IWorkbenchWindow[] windows = getDefault().getWorkbench().getWorkbenchWindows();
+ if (windows.length > 0) {
+ return windows[0].getShell();
+ }
+ } else {
+ return window.getShell();
+ }
+ return null;
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
+ * )
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ _plugin = this;
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
+ * )
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ super.stop(context);
+ _plugin = null;
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return _plugin;
+ }
+
+ /**
+ * Log an exception in Eclipse's logger with this plugin ID
+ * @param e
+ */
+ public static void log(Exception e) {
+ IStatus status = new Status(IStatus.ERROR, PLUGIN_ID, e.getMessage(), e);
+ getDefault().getLog().log(status);
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/ImageShop.java b/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/ImageShop.java
new file mode 100644
index 0000000..b446dc0
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/ImageShop.java
@@ -0,0 +1,46 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.java;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ */
+public class ImageShop {
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.egf.pattern.ui.java";
+
+ private static final String ICON_PATH = "/icons/";
+
+ public static final String IMG_PARAMETER_OBJ = ICON_PATH + "parameter_obj.gif";
+
+ private static final ImageRegistry REGISTRY = new ImageRegistry();
+
+ public static Image get(String imageFilePath) {
+ Image image = REGISTRY.get(imageFilePath);
+ if (image != null)
+ return image;
+ ImageDescriptor descriptor = AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, imageFilePath);
+ image = descriptor.createImage();
+ REGISTRY.put(imageFilePath, image);
+ return image;
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/JavaTextEditorMessages.java b/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/JavaTextEditorMessages.java
new file mode 100644
index 0000000..b4a4778
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/JavaTextEditorMessages.java
@@ -0,0 +1,35 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.java;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class JavaTextEditorMessages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.egf.pattern.ui.java.javaTextEditorMessages"; //$NON-NLS-1$
+ public static String JavaTextEditorContentAssistProcessor_No_Default_proposals;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, JavaTextEditorMessages.class);
+ }
+
+ private JavaTextEditorMessages() {
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/editor/EclipsePreferencesAdapter.java b/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/editor/EclipsePreferencesAdapter.java
new file mode 100644
index 0000000..b2929b5
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/editor/EclipsePreferencesAdapter.java
@@ -0,0 +1,318 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.java.editor;
+
+import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.IScopeContext;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.swt.widgets.Display;
+import org.osgi.service.prefs.BackingStoreException;
+
+/**
+ * @author Yahong Song - Soyatec
+ *
+ */
+class EclipsePreferencesAdapter implements IPreferenceStore {
+
+ /**
+ * Preference change listener. Listens for events preferences fires a
+ * {@link org.eclipse.jface.util.PropertyChangeEvent} on this adapter with
+ * arguments from the received event.
+ */
+ private class PreferenceChangeListener implements IEclipsePreferences.IPreferenceChangeListener {
+
+ /**
+ * {@inheritDoc}
+ */
+ public void preferenceChange(final IEclipsePreferences.PreferenceChangeEvent event) {
+ if (Display.getCurrent() == null) {
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ firePropertyChangeEvent(event.getKey(), event.getOldValue(), event.getNewValue());
+ }
+ });
+ } else {
+ firePropertyChangeEvent(event.getKey(), event.getOldValue(), event.getNewValue());
+ }
+ }
+ }
+
+ /** Listeners on on this adapter */
+ private ListenerList fListeners = new ListenerList(ListenerList.IDENTITY);
+
+ /** Listener on the node */
+ private IEclipsePreferences.IPreferenceChangeListener fListener = new PreferenceChangeListener();
+
+ /** wrapped node */
+ private final IScopeContext fContext;
+ private final String fQualifier;
+
+ /**
+ * Initialize with the node to wrap
+ *
+ * @param context
+ * The context to access
+ */
+ public EclipsePreferencesAdapter(IScopeContext context, String qualifier) {
+ fContext = context;
+ fQualifier = qualifier;
+ }
+
+ private IEclipsePreferences getNode() {
+ return fContext.getNode(fQualifier);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addPropertyChangeListener(IPropertyChangeListener listener) {
+ if (fListeners.size() == 0)
+ getNode().addPreferenceChangeListener(fListener);
+ fListeners.add(listener);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void removePropertyChangeListener(IPropertyChangeListener listener) {
+ fListeners.remove(listener);
+ if (fListeners.size() == 0) {
+ getNode().removePreferenceChangeListener(fListener);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean contains(String name) {
+ return getNode().get(name, null) != null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void firePropertyChangeEvent(String name, Object oldValue, Object newValue) {
+ PropertyChangeEvent event = new PropertyChangeEvent(this, name, oldValue, newValue);
+ Object[] listeners = fListeners.getListeners();
+ for (int i = 0; i < listeners.length; i++)
+ ((IPropertyChangeListener) listeners[i]).propertyChange(event);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean getBoolean(String name) {
+ return getNode().getBoolean(name, BOOLEAN_DEFAULT_DEFAULT);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean getDefaultBoolean(String name) {
+ return BOOLEAN_DEFAULT_DEFAULT;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public double getDefaultDouble(String name) {
+ return DOUBLE_DEFAULT_DEFAULT;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public float getDefaultFloat(String name) {
+ return FLOAT_DEFAULT_DEFAULT;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getDefaultInt(String name) {
+ return INT_DEFAULT_DEFAULT;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public long getDefaultLong(String name) {
+ return LONG_DEFAULT_DEFAULT;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getDefaultString(String name) {
+ return STRING_DEFAULT_DEFAULT;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public double getDouble(String name) {
+ return getNode().getDouble(name, DOUBLE_DEFAULT_DEFAULT);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public float getFloat(String name) {
+ return getNode().getFloat(name, FLOAT_DEFAULT_DEFAULT);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getInt(String name) {
+ return getNode().getInt(name, INT_DEFAULT_DEFAULT);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public long getLong(String name) {
+ return getNode().getLong(name, LONG_DEFAULT_DEFAULT);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getString(String name) {
+ return getNode().get(name, STRING_DEFAULT_DEFAULT);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isDefault(String name) {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean needsSaving() {
+ try {
+ return getNode().keys().length > 0;
+ } catch (BackingStoreException e) {
+ // ignore
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void putValue(String name, String value) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setDefault(String name, double value) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setDefault(String name, float value) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setDefault(String name, int value) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setDefault(String name, long value) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setDefault(String name, String defaultObject) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setDefault(String name, boolean value) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setToDefault(String name) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setValue(String name, double value) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setValue(String name, float value) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setValue(String name, int value) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setValue(String name, long value) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setValue(String name, String value) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void setValue(String name, boolean value) {
+ throw new UnsupportedOperationException();
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/editor/JavaAnnotationModel.java b/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/editor/JavaAnnotationModel.java
new file mode 100644
index 0000000..2b7312c
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/editor/JavaAnnotationModel.java
@@ -0,0 +1,73 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * PanPan Liu, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.java.editor;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.ui.texteditor.MarkerAnnotation;
+import org.eclipse.ui.texteditor.ResourceMarkerAnnotationModel;
+
+/**
+ * @author PanPan Liu - Soyatec
+ *
+ */
+public class JavaAnnotationModel extends ResourceMarkerAnnotationModel {
+ private boolean fireChanges;
+
+ public JavaAnnotationModel(IResource resource) {
+ super(resource);
+ fireChanges = true;
+ }
+
+ public synchronized boolean isFireChanges() {
+ return fireChanges;
+ }
+
+ public synchronized void setFireChanges(boolean b) {
+ fireChanges = b;
+ }
+
+ public synchronized void addAnnotation(Annotation annotation, Position position) {
+ try {
+ addAnnotation(annotation, position, fireChanges);
+ } catch (BadLocationException _ex) {
+ }
+ }
+
+ public synchronized void removeAllAnnotations() {
+ super.removeAllAnnotations(fireChanges);
+ }
+
+ public synchronized void removeAnnotation(Annotation annotation) {
+ super.removeAnnotation(annotation, fireChanges);
+ }
+
+ public MarkerAnnotation createMarkerAnnotation(IMarker marker) {
+ return super.createMarkerAnnotation(marker);
+ }
+
+ public Position createPositionFromMarker(IMarker marker) {
+ return super.createPositionFromMarker(marker);
+ }
+
+ public void fireAnnotationModelChanged() {
+ fireModelChanged();
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/editor/JavaDocumentProvider.java b/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/editor/JavaDocumentProvider.java
new file mode 100644
index 0000000..3543e88
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/editor/JavaDocumentProvider.java
@@ -0,0 +1,56 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.java.editor;
+
+import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider;
+import org.eclipse.jdt.internal.ui.javaeditor.JavaDocumentSetupParticipant;
+import org.eclipse.jdt.ui.text.IJavaPartitions;
+import org.eclipse.ui.editors.text.FileDocumentProvider;
+import org.eclipse.ui.editors.text.ForwardingDocumentProvider;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class JavaDocumentProvider extends CompilationUnitDocumentProvider {
+
+ private JavaTextEditor editor;
+
+ /**
+ * Constructor
+ *
+ * @param editor
+ */
+ public JavaDocumentProvider(JavaTextEditor editor) {
+ IDocumentProvider provider = new FileDocumentProvider();
+ provider = new ForwardingDocumentProvider(IJavaPartitions.JAVA_PARTITIONING, new JavaDocumentSetupParticipant(), provider);
+ setParentDocumentProvider(provider);
+ this.editor = editor;
+ }
+
+ @Override
+ public boolean isSynchronized(Object element) {
+ boolean isSynchronized = super.isSynchronized(element);
+ if (isSynchronized && editor.isDirty()) {
+ long modificationStamp = getModificationStamp(element);
+ long synchronizationStamp = getSynchronizationStamp(element);
+ return isSynchronized && (modificationStamp == synchronizationStamp);
+ }
+ return isSynchronized;
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/editor/JavaDocumentReader.java b/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/editor/JavaDocumentReader.java
new file mode 100644
index 0000000..254288e
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/editor/JavaDocumentReader.java
@@ -0,0 +1,82 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.java.editor;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class JavaDocumentReader {
+ public static final int EOF = -1;
+
+ private IDocument document;
+
+ private int offset;
+
+ /**
+ * Constructor for JavaDocumentReader.
+ *
+ * @param document
+ * IDocument
+ * @param documentOffset
+ * int
+ */
+ public JavaDocumentReader(IDocument document, int documentOffset) {
+ this.document = null;
+ offset = -1;
+ if (documentOffset > 0)
+ offset = documentOffset;
+ this.document = document;
+ }
+
+ /**
+ * Method readForward.
+ *
+ * @return char
+ */
+ public char readForward() {
+ try {
+ if (document.getChar(offset) == '\uFFFF') {
+ return '\uFFFF';
+ } else {
+ offset++;
+ return document.getChar(offset);
+ }
+ } catch (BadLocationException ex) {
+ return '\uFFFF';
+ }
+ }
+
+ /**
+ * Method readBackward.
+ *
+ * @return char
+ */
+ public char readBackward() {
+ if (offset <= 0)
+ return '\uFFFF';
+ try {
+ offset--;
+ return document.getChar(offset);
+ } catch (BadLocationException e) {
+ return '\uFFFF';
+ }
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/editor/JavaEditorProvider.java b/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/editor/JavaEditorProvider.java
new file mode 100644
index 0000000..37a9f4f
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/editor/JavaEditorProvider.java
@@ -0,0 +1,75 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * panpan.liu, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.java.editor;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.ui.IFileEditorInput;
+
+/**
+ * @author PanPan Liu
+ *
+ */
+public class JavaEditorProvider extends CompilationUnitDocumentProvider {
+
+ public JavaEditorProvider() {
+ super();
+ }
+
+ @Override
+ public IAnnotationModel getAnnotationModel(Object element) {
+ IFileEditorInput input = (IFileEditorInput) element;
+ IFile file = input.getFile();
+ return new JavaAnnotationModel(file);
+ }
+
+ /*
+ * @see
+ * org.eclipse.ui.texteditor.IDocumentProvider#connect(java.lang.Object)
+ *
+ * public void connect(Object element) throws CoreException {
+ * super.connect(element);
+ * FileInfo info= getFileInfo(element);
+ * if (info == null) {
+ * info= createFileInfo(element);
+ * }
+ * }
+ */
+
+ @Override
+ protected IAnnotationModel createAnnotationModel(IFile file) {
+ return new JavaAnnotationModel(file);
+ }
+
+ /*
+ * @Override
+ * protected FileInfo createFileInfo(Object element) throws CoreException {
+ * if (!(element instanceof IAdaptable))
+ * return null;
+ * IAdaptable adaptable= (IAdaptable) element;
+ * IFile file = (IFile)adaptable.getAdapter(IFile.class);
+ *
+ * FileInfo info = super.createFileInfo(element);
+ * if(file!=null){
+ * info.fModel= createAnnotationModel(file);
+ * }
+ * return info;
+ * }
+ */
+
+}
diff --git a/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/editor/JavaTextEditor.java b/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/editor/JavaTextEditor.java
new file mode 100644
index 0000000..1d14b18
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/editor/JavaTextEditor.java
@@ -0,0 +1,232 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.java.editor;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.ProjectScope;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.pattern.ui.editors.templateEditor.MethodEditorActivationListener;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.internal.ui.JavaPlugin;
+import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
+import org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer;
+import org.eclipse.jdt.internal.ui.text.PreferencesAdapter;
+import org.eclipse.jdt.ui.text.IJavaPartitions;
+import org.eclipse.jdt.ui.text.JavaSourceViewerConfiguration;
+import org.eclipse.jdt.ui.text.JavaTextTools;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.DocumentEvent;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IDocumentListener;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IPartService;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.editors.text.EditorsUI;
+import org.eclipse.ui.editors.text.TextEditor;
+import org.eclipse.ui.texteditor.ChainedPreferenceStore;
+
+/**
+ * @author Yahong Song - Soyatec
+ *
+ */
+public class JavaTextEditor extends TextEditor {
+
+ private RefreshUIJob job;
+
+ private Pattern pattern;
+
+ private ActivationListener fActivationListener;
+
+ public static boolean refreshJob = false;
+
+ @Override
+ public void setFocus() {
+ super.setFocus();
+ }
+
+ public JavaTextEditor(Pattern pattern) throws CoreException, IOException {
+ this.pattern = pattern;
+ JavaDocumentProvider provider = new JavaDocumentProvider(this);
+ setDocumentProvider(provider);
+ }
+
+ public void init(IEditorSite site, IEditorInput input) throws PartInitException {
+
+ super.init(site, input);
+ fActivationListener = new ActivationListener(site.getWorkbenchWindow().getPartService(), this);
+ }
+
+ public Pattern getPattern() {
+ return pattern;
+ }
+
+ protected void doSetInput(IEditorInput input) throws CoreException {
+ super.doSetInput(input);
+ IPreferenceStore store = createCombinedPreferenceStore(input);
+ setPreferenceStore(store);
+
+ ISourceViewer sourceViewer = getSourceViewer();
+ if (sourceViewer instanceof JavaSourceViewer) {
+ ((JavaSourceViewer) sourceViewer).setPreferenceStore(store);
+ }
+ JavaTextTools textTools = JavaPlugin.getDefault().getJavaTextTools();
+ JavaSourceViewerConfiguration configure = new JavaTextSourceViewerConfiguration(textTools.getColorManager(), store, this, IJavaPartitions.JAVA_PARTITIONING);
+ setSourceViewerConfiguration(configure);
+ }
+
+ public void doSave(IProgressMonitor progressMonitor) {
+ super.doSave(progressMonitor);
+ }
+
+ @Override
+ protected void updateStatusField(String category) {
+ super.updateStatusField(category);
+ }
+
+ @Override
+ public void createPartControl(Composite parent) {
+ super.createPartControl(parent);
+ ISourceViewer viewer = getViewer();
+ IDocument document = viewer.getDocument();
+ document.addDocumentListener(new IDocumentListener() {
+ public void documentChanged(DocumentEvent event) {
+ if (job == null) {
+ job = new RefreshUIJob("RefreshTemplateEditor");
+ }
+ job.start();
+ }
+
+ public void documentAboutToBeChanged(DocumentEvent event) {
+ }
+ });
+ // StyledText textWidget = getSourceViewer().getTextWidget();
+ // textWidget.addModifyListener(new JavaModifyListener());
+ }
+
+ class JavaModifyListener implements ModifyListener {
+ public void modifyText(ModifyEvent e) {
+ if (job == null) {
+ job = new RefreshUIJob("RefreshTemplateEditor");
+ }
+ job.start();
+ }
+ }
+
+ class RefreshUIJob extends Job {
+
+ private long timestamp = -1;
+
+ private boolean lazy = false;
+
+ public RefreshUIJob(String name) {
+ super(name);
+ }
+
+ private void start() {
+ if (!lazy) {
+ schedule(1000);
+ } else if (System.currentTimeMillis() - timestamp > 999 && !lazy) {
+ lazy = true;
+ }
+ timestamp = System.currentTimeMillis();
+ }
+
+ protected IStatus run(IProgressMonitor monitor) {
+ refreshJob = true;
+ JavaTextEditorHelper.refreshPublicTemplateEditor(JavaTextEditor.this);
+ if (lazy) {
+ schedule();
+ lazy = false;
+ }
+ return Status.OK_STATUS;
+ }
+ }
+
+ /**
+ * @param input
+ * @return
+ */
+ private IPreferenceStore createCombinedPreferenceStore(IEditorInput input) {
+ List<IPreferenceStore> stores = new ArrayList<IPreferenceStore>(3);
+
+ IJavaProject project = EditorUtility.getJavaProject(input);
+ if (project != null) {
+ stores.add(new EclipsePreferencesAdapter(new ProjectScope(project.getProject()), JavaCore.PLUGIN_ID));
+ }
+
+ stores.add(JavaPlugin.getDefault().getPreferenceStore());
+ stores.add(new PreferencesAdapter(JavaCore.getPlugin().getPluginPreferences()));
+ stores.add(EditorsUI.getPreferenceStore());
+ stores.add(PlatformUI.getPreferenceStore());
+
+ return new ChainedPreferenceStore((IPreferenceStore[]) stores.toArray(new IPreferenceStore[stores.size()]));
+ }
+
+ /**
+ * @return the source viewer used by this editor
+ */
+ public final ISourceViewer getViewer() {
+ return getSourceViewer();
+ }
+
+ /**
+ * Returns the editor's preference store. This method exist to make the
+ * preference store accessible to other classes.
+ *
+ * @return the editor's preference store
+ */
+ public IPreferenceStore getEditorPreferenceStore() {
+ return super.getPreferenceStore();
+ }
+
+ @Override
+ public void dispose() {
+ if (fActivationListener != null) {
+ fActivationListener.dispose();
+ fActivationListener = null;
+ }
+ super.dispose();
+ }
+
+ class ActivationListener extends MethodEditorActivationListener {
+
+ public ActivationListener(IPartService partService, TextEditor editor) {
+ super(partService, editor);
+
+ }
+
+ @Override
+ protected void handleActivation() {
+ safelySanityCheckState(getEditorInput());
+ }
+
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/editor/JavaTextEditorHelper.java b/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/editor/JavaTextEditorHelper.java
new file mode 100644
index 0000000..6234501
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/editor/JavaTextEditorHelper.java
@@ -0,0 +1,403 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.java.editor;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.io.StringBufferInputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Stack;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.model.pattern.PatternParameter;
+import org.eclipse.egf.model.pattern.PatternVariable;
+import org.eclipse.egf.pattern.extension.PatternFactory;
+import org.eclipse.egf.pattern.ui.java.Activator;
+import org.eclipse.egf.pattern.ui.java.template.JavaTemplateEditor;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jdt.internal.ui.JavaPlugin;
+import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
+import org.eclipse.jdt.internal.ui.text.java.IProblemRequestorExtension;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.IWorkbenchPartSite;
+import org.eclipse.ui.editors.text.TextEditor;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.internal.WorkbenchPage;
+import org.eclipse.ui.part.MultiPageEditorPart;
+import org.eclipse.ui.part.MultiPageEditorSite;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.ui.texteditor.ITextEditor;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class JavaTextEditorHelper {
+ /**
+ * Get the words which will be used in code completion.
+ */
+ public static String[] getAllWords(char c, JavaDocumentReader reader) {
+ ArrayList<String> all = new ArrayList<String>(20);
+ char currChar = c;
+ currChar = trimBlanksBackward(reader, currChar);
+ for (boolean done = false; !done;) {
+ Stack stack = new Stack();
+ for (; currChar != '\uFFFF' && !Character.isWhitespace(currChar); currChar = reader.readBackward())
+ stack.push(new Character(currChar));
+
+ String s;
+ for (s = new String(); !stack.empty(); s = (new StringBuilder(String.valueOf(s))).append(((Character) stack.pop()).toString()).toString())
+ ;
+ all.add(s);
+ currChar = trimBlanksBackward(reader, currChar);
+ if (currChar == '\uFFFF' || currChar == '@')
+ done = true;
+ }
+
+ return (String[]) all.toArray(new String[all.size()]);
+ }
+
+ public static char trimBlanksBackward(JavaDocumentReader reader, char currChar) {
+ for (; currChar != '\uFFFF' && Character.isWhitespace(currChar); currChar = reader.readBackward())
+ ;
+ return currChar;
+ }
+
+ /**
+ * While do code completion, refresh the template file's content via the
+ * content of method editor.
+ */
+ public static void refreshPublicTemplateEditor(Pattern pattern, IFile templateFile, JavaTextEditor editor) {
+ MultiPageEditorPart multiPageEditorPart = getMultiPageEditorPart(editor);
+ List<TextEditor> editors = ((JavaTemplateEditor) multiPageEditorPart).getEditorList();
+ if (templateFile.exists()) {
+ try {
+ templateFile.setContents(new ByteArrayInputStream(new byte[0]), true, false, null);
+ if (editors == null) {
+ return;
+ }
+ int size = editors.size();
+ if (size == 0) {
+ return;
+ }
+ JavaTextEditor footerEditor = null;
+ for (int i = 0; i < size; i++) {
+ JavaTextEditor currentEditor = (JavaTextEditor) editors.get(i);
+ String partName = currentEditor.getPartName();
+ if (partName.equals(PatternFactory.FOOTER_METHOD_NAME)) {
+ footerEditor = currentEditor;
+ continue;
+ }
+ visitMethod(currentEditor, templateFile, true);
+ }
+ visitMethod(footerEditor, templateFile, false);
+ } catch (Exception e) {
+ }
+ } else {
+ try {
+ templateFile.create(new ByteArrayInputStream(new byte[0]), true, null);
+ } catch (CoreException e) {
+ Activator.getDefault().log(e);
+ }
+ refreshPublicTemplateEditor(pattern, templateFile, editor);
+ }
+ }
+
+ private static void visitMethod(JavaTextEditor currentEditor, IFile templateFile, boolean seprator) throws CoreException {
+ if (currentEditor == null) {
+ return;
+ }
+ if (currentEditor != null) {
+ InputStream inputStreamOfEditor = getInputStreamOfEditor(currentEditor);
+ if (inputStreamOfEditor == null) {
+ return;
+ }
+ templateFile.appendContents(inputStreamOfEditor, false, false, null);
+ if (seprator) {
+ templateFile.appendContents(new StringBufferInputStream("\n"), true, false, null);
+ }
+ }
+ }
+
+ /**
+ * add by PanPan.Liu
+ * mapping errors from TemplateEditor to sub editors.
+ */
+ public static void mappingErrorFromTemplateEditor(JavaTextEditor editor) {
+ MultiPageEditorPart multiPageEditorPart = JavaTextEditorHelper.getMultiPageEditorPart(editor);
+ if (multiPageEditorPart == null)
+ return;
+ JavaTemplateEditor javaTemplateEditor = (JavaTemplateEditor) multiPageEditorPart;
+ IEditorPart templateEditorPart = javaTemplateEditor.getTemplateFileEditorPart();
+ Pattern pattern = editor.getPattern();
+ Map<String, TextEditor> editors = javaTemplateEditor.getEditorMap();
+ if (!(templateEditorPart instanceof JavaEditor)) {
+ return;
+ }
+ JavaEditor fEditor = (JavaEditor) templateEditorPart;
+
+ IDocumentProvider p = fEditor.getDocumentProvider();
+ if (p == null) {
+ IFile templateFile = javaTemplateEditor.getTemplateFile();
+ WorkbenchPage templateActivePage = javaTemplateEditor.getTemplateActivePage();
+ try {
+ if (templateActivePage == null || templateFile == null) {
+ return;
+ }
+ fEditor = (JavaEditor) IDE.openEditor(templateActivePage, templateFile, false);
+ templateActivePage.setEditorAreaVisible(false);
+ } catch (Exception e) {
+ Activator.getDefault().log(e);
+ }
+ p = fEditor.getDocumentProvider();
+ }
+ IEditorInput editorInput = fEditor.getEditorInput();
+ if (editorInput == null) {
+ return;
+ }
+ if (p == null) {
+ return;
+ }
+ IAnnotationModel javaAnnotationModel = p.getAnnotationModel(editorInput);
+ if (javaAnnotationModel == null) {
+ return;
+ }
+
+ Map<String, Position> mappings = getMappings(pattern, editors);
+ if (mappings == null || mappings.size() == 0) {
+ return;
+ }
+
+ EList<PatternParameter> allParameters = pattern.getAllParameters();
+ EList<PatternVariable> allVariables = pattern.getAllVariables();
+
+ javaAnnotationModel = clearDirtyAnnotationForPatternVariAndParam(javaAnnotationModel, allParameters);
+ javaAnnotationModel = clearDirtyAnnotationForPatternVariAndParam(javaAnnotationModel, allVariables);
+
+ for (String id : editors.keySet()) {
+ TextEditor textEditor = editors.get(id);
+ IDocumentProvider documentProvider = textEditor.getDocumentProvider();
+ if (documentProvider == null) {
+ continue;
+ }
+ IAnnotationModel annotationModel = documentProvider.getAnnotationModel(textEditor.getEditorInput());
+ Iterator iter = annotationModel.getAnnotationIterator();
+ while (iter.hasNext()) {
+ Annotation annotation = (Annotation) iter.next();
+ annotationModel.removeAnnotation(annotation);
+ }
+ Iterator annotationIterator = javaAnnotationModel.getAnnotationIterator();
+ Position position = mappings.get(id);
+ int startOffset = position.offset;
+ int endOffset = position.offset + position.length - 1;
+
+ if (annotationModel != null) {
+ while (annotationIterator.hasNext()) {
+ Annotation annotation = (Annotation) annotationIterator.next();
+ if (!annotation.getType().equals("org.eclipse.jdt.ui.error")) {
+ continue;
+ }
+ String text = annotation.getText();
+ if (text != null) {
+ if (text.startsWith("The declared package ") || text.startsWith("The public type ")) {
+ continue;
+ }
+ }
+ Position posi = javaAnnotationModel.getPosition(annotation);
+ if (posi == null) {
+ continue;
+ }
+ int offset = posi.offset;
+ if (startOffset == 0 && offset == -1) {
+ annotationModel.addAnnotation(annotation, posi);
+ }
+ if (offset >= startOffset && offset <= endOffset) {
+ posi.setOffset(offset - startOffset);
+ annotationModel.addAnnotation(annotation, posi);
+ }
+ }
+ }
+ }
+ }
+
+ private static IAnnotationModel clearDirtyAnnotationForPatternVariAndParam(IAnnotationModel javaAnnotationModel, EList list) {
+ if (list == null || list.size() == 0) {
+ return javaAnnotationModel;
+ }
+ List<Annotation> annotations = new ArrayList<Annotation>();
+ Iterator annotationIterator = javaAnnotationModel.getAnnotationIterator();
+ while (annotationIterator.hasNext()) {
+ Object next = annotationIterator.next();
+ if (next instanceof Annotation) {
+ Annotation annotation = (Annotation) next;
+ if (annotation == null) {
+ continue;
+ }
+ if (annotation.getText() == null) {
+ continue;
+ }
+ String filter = "";
+ for (Object obj : list) {
+ if (obj instanceof PatternParameter) {
+ filter = ((PatternParameter) obj).getName();
+ } else if (obj instanceof PatternVariable) {
+ filter = ((PatternVariable) obj).getName();
+ }
+ filter = filter + " ";
+ if (annotation.getText().startsWith(filter)) {
+ javaAnnotationModel.removeAnnotation(annotation);
+ }
+ }
+ }
+ }
+ return javaAnnotationModel;
+ }
+
+ /**
+ * add by PanPan.Liu
+ * do the refresh sync. job
+ */
+ public static void refreshPublicTemplateEditor(JavaTextEditor editor) {
+ MultiPageEditorPart multiPageEditorPart = JavaTextEditorHelper.getMultiPageEditorPart(editor);
+ if (multiPageEditorPart == null)
+ return;
+ IEditorPart templateEditorPart = ((JavaTemplateEditor) multiPageEditorPart).getTemplateFileEditorPart();
+
+ if(templateEditorPart == null){
+ return;
+ }
+
+ Pattern pattern = editor.getPattern();
+ IEditorInput editorInput = templateEditorPart.getEditorInput();
+ if (editorInput instanceof IFileEditorInput) {
+ IFile templateFile = ((IFileEditorInput) editorInput).getFile();
+ refreshPublicTemplateEditor(pattern, templateFile, editor);
+ }
+ }
+
+ /**
+ * Get the inputStream of the editor.
+ */
+ public static InputStream getInputStreamOfEditor(JavaTextEditor editor) {
+ ISourceViewer viewer = ((JavaTextEditor) editor).getViewer();
+ if (viewer == null) {
+ return null;
+ }
+ IDocument document = viewer.getDocument();
+ return new ByteArrayInputStream(document.get().getBytes());
+ }
+
+ /**
+ * Get the new offset which mapping from the template file to method file.
+ *
+ * @param editors
+ */
+ public static Map<String, Position> getMappings(Pattern pattern, Map<String, TextEditor> editors) {
+ EList<PatternMethod> methods = pattern.getMethods();
+ Map<String, Position> mappings = new HashMap<String, Position>();
+ int startOffset = 0;
+ for (PatternMethod method : methods) {
+ String id = method.getID();
+ TextEditor textEditor = editors.get(id);
+ if (textEditor == null) {
+ continue;
+ }
+ ISourceViewer viewer = ((JavaTextEditor) textEditor).getViewer();
+ if (viewer == null || viewer.getDocument() == null) {
+ return null;
+ }
+ int length = viewer.getDocument().getLength();
+ mappings.put(id, new Position(startOffset, length));
+ startOffset = startOffset + length + 1;
+ }
+ return mappings;
+ }
+
+ /**
+ * Get the offset which mapping to the template file.
+ */
+ public static int getMappingOffset(Pattern pattern, JavaTextEditor editor, int offset) {
+ MultiPageEditorPart multiPageEditorPart = getMultiPageEditorPart(editor);
+ if (multiPageEditorPart == null)
+ return offset;
+
+ Map<String, TextEditor> editors = ((JavaTemplateEditor) multiPageEditorPart).getEditorMap();
+ int mappingOffset = offset;
+
+ int activePage = multiPageEditorPart.getActivePage();
+ EList<PatternMethod> methods = pattern.getMethods();
+ for (int i = 0; i < activePage; i++) {
+ PatternMethod method = methods.get(i);
+ String id = method.getID();
+ JavaTextEditor currentEditor = (JavaTextEditor) editors.get(id);
+ if (currentEditor != null && !(editor).equals(currentEditor)) {
+ ISourceViewer viewer = currentEditor.getViewer();
+ int length = viewer.getDocument().getLength();
+ mappingOffset = mappingOffset + length + 1;
+ } else {
+ return mappingOffset;
+ }
+ }
+
+ return mappingOffset;
+ }
+
+ public static MultiPageEditorPart getMultiPageEditorPart(TextEditor editor) {
+ IWorkbenchPartSite site = editor.getSite();
+ if (site instanceof MultiPageEditorSite) {
+ return ((MultiPageEditorSite) site).getMultiPageEditor();
+ }
+ return null;
+ }
+
+ /**
+ * Get the active page index of MultiPageEditor.
+ */
+ public static int getActivePageIndex(ITextEditor editor) {
+ IWorkbenchPartSite site = ((JavaTextEditor) editor).getSite();
+ MultiPageEditorPart multiPageEditor = ((MultiPageEditorSite) site).getMultiPageEditor();
+ return multiPageEditor.getActivePage();
+ }
+
+ public static IAnnotationModel getAnnotationModel(JavaEditor fEditor) {
+ if(fEditor == null){
+ return null;
+ }
+ IDocumentProvider p = fEditor.getDocumentProvider();
+ if (p == null) {
+ p = JavaPlugin.getDefault().getCompilationUnitDocumentProvider();
+ }
+ IAnnotationModel m = p.getAnnotationModel(fEditor.getEditorInput());
+ if (m instanceof IProblemRequestorExtension)
+ return m;
+ return null;
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/editor/JavaTextReconcilingStrategy.java b/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/editor/JavaTextReconcilingStrategy.java
new file mode 100644
index 0000000..ba91ac4
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/editor/JavaTextReconcilingStrategy.java
@@ -0,0 +1,201 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * PanPan Liu, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.java.editor;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.pattern.ui.editors.PatternMethodEditorInput;
+import org.eclipse.egf.pattern.ui.java.template.JavaTemplateEditor;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jdt.internal.ui.JavaPlugin;
+import org.eclipse.jdt.internal.ui.text.JavaCompositeReconcilingStrategy;
+import org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy;
+import org.eclipse.jdt.internal.ui.text.spelling.JavaSpellingReconcileStrategy;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.reconciler.DirtyRegion;
+import org.eclipse.jface.text.reconciler.IReconcilingStrategy;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.ui.texteditor.ITextEditor;
+
+/**
+ * @author panpan.liu@soyatec.com
+ */
+public class JavaTextReconcilingStrategy extends JavaCompositeReconcilingStrategy {
+
+ private ITextEditor fEditor;
+ private JavaReconcilingStrategy fJavaStrategy;
+ private RefreshUIJob job;
+
+ /**
+ * Creates a new Java reconciling strategy.
+ *
+ * @param viewer
+ * the source viewer
+ * @param editor
+ * the editor of the strategy's reconciler
+ * @param documentPartitioning
+ * the document partitioning this strategy uses for configuration
+ */
+ public JavaTextReconcilingStrategy(ISourceViewer viewer, ITextEditor editor, String documentPartitioning) {
+ super(viewer, editor, documentPartitioning);
+ fEditor = editor;
+ fJavaStrategy = new JavaReconcilingStrategy(editor);
+ setReconcilingStrategies(new IReconcilingStrategy[] { fJavaStrategy, new JavaSpellingReconcileStrategy(viewer, editor) });
+ }
+
+ /**
+ * This is the single method that performs the annotation model problems
+ * evaluations and update
+ */
+ private void internalReconcile() {
+ IDocumentProvider p = fEditor.getDocumentProvider();
+ if (p == null) {
+ p = JavaPlugin.getDefault().getCompilationUnitDocumentProvider();
+ }
+ IEditorInput editorInput = fEditor.getEditorInput();
+ String name = editorInput.getName();
+ IAnnotationModel annotationModel = p.getAnnotationModel(fEditor.getEditorInput());
+ Iterator<Annotation> iter = annotationModel.getAnnotationIterator();
+ while (iter.hasNext()) {
+ Annotation annotation = iter.next();
+ // org.eclipse.jdt.ui.error
+ annotationModel.removeAnnotation(annotation);
+ }
+ Map<String, Map<Annotation, Position>> methodJavaAnnotations = JavaTemplateEditor.getMethodJavaAnnotations();
+ Map<Annotation, Position> methodAnnotations = new HashMap<Annotation, Position>();
+ if (methodJavaAnnotations != null && !methodJavaAnnotations.isEmpty()) {
+ methodAnnotations = methodJavaAnnotations.get(name);
+ }
+ if (annotationModel != null) {
+ for (Annotation annotation : methodAnnotations.keySet()) {
+ Position position = methodAnnotations.get(annotation);
+ annotationModel.addAnnotation(annotation, position);
+ }
+ }
+ }
+
+ /*
+ * @see
+ * org.eclipse.jface.text.reconciler.CompositeReconcilingStrategy#reconcile
+ * (org.eclipse.jface.text.reconciler.DirtyRegion,
+ * org.eclipse.jface.text.IRegion)
+ */
+ public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
+ JavaTextEditorHelper.mappingErrorFromTemplateEditor((JavaTextEditor) fEditor);
+ }
+
+ /*
+ * @see
+ * org.eclipse.jface.text.reconciler.CompositeReconcilingStrategy#reconcile
+ * (org.eclipse.jface.text.IRegion)
+ */
+ public void reconcile(IRegion partition) {
+ if (JavaTextEditor.refreshJob) {
+// JavaTextEditorHelper.mappingErrorFromTemplateEditor((JavaTextEditor) fEditor);
+ if (job == null) {
+ job = new RefreshUIJob("RefreshTemplateEditor");
+ }
+ job.start();
+ JavaTextEditor.refreshJob = false;
+ }
+ }
+
+ /**
+ * Tells this strategy whether to inform its listeners.
+ *
+ * @param notify
+ * <code>true</code> if listeners should be notified
+ */
+ public void notifyListeners(boolean notify) {
+ fJavaStrategy.notifyListeners(notify);
+ }
+
+ /*
+ * @seeorg.eclipse.jface.text.reconciler.CompositeReconcilingStrategy#
+ * initialReconcile()
+ */
+ public void initialReconcile() {
+ // internalReconcile();
+ initialMapping();
+ }
+
+ private void initialMapping() {
+ JavaTextEditor javaTextEditor = (JavaTextEditor) fEditor;
+ EList<PatternMethod> methods = javaTextEditor.getPattern().getMethods();
+ int size = methods.size();
+ PatternMethod patternMethod = methods.get(size - 1);
+ IEditorInput editorInput = javaTextEditor.getEditorInput();
+ if (editorInput instanceof PatternMethodEditorInput) {
+ PatternMethodEditorInput input = (PatternMethodEditorInput) editorInput;
+ PatternMethod inputPatternMethod = input.getPatternMethod();
+ if (patternMethod.equals(inputPatternMethod)) {
+ JavaTextEditorHelper.mappingErrorFromTemplateEditor((JavaTextEditor) fEditor);
+ }
+ }
+ }
+
+ private void reconciled() {
+ fJavaStrategy.reconciled();
+ }
+
+ @Override
+ public void aboutToBeReconciled() {
+ super.aboutToBeReconciled();
+ }
+
+ class RefreshUIJob extends Job {
+
+ private long timestamp = -1;
+
+ private boolean lazy = false;
+
+ public RefreshUIJob(String name) {
+ super(name);
+ }
+
+ private void start() {
+ if (!lazy) {
+ schedule(500);
+ } else if (System.currentTimeMillis() - timestamp > 499 && !lazy) {
+ lazy = true;
+ }
+ timestamp = System.currentTimeMillis();
+ }
+
+ protected IStatus run(IProgressMonitor monitor) {
+ JavaTextEditorHelper.mappingErrorFromTemplateEditor((JavaTextEditor) fEditor);
+ if (lazy) {
+ schedule();
+ lazy = false;
+ }
+ return Status.OK_STATUS;
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/editor/JavaTextSourceViewerConfiguration.java b/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/editor/JavaTextSourceViewerConfiguration.java
new file mode 100644
index 0000000..fd17f5e
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/editor/JavaTextSourceViewerConfiguration.java
@@ -0,0 +1,86 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.java.editor;
+
+import org.eclipse.egf.pattern.ui.java.editor.contentassist.JavaTextEditorContentAssistProcessor;
+import org.eclipse.jdt.internal.ui.text.JavaReconciler;
+import org.eclipse.jdt.ui.text.IColorManager;
+import org.eclipse.jdt.ui.text.JavaSourceViewerConfiguration;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.IAutoEditStrategy;
+import org.eclipse.jface.text.contentassist.ContentAssistant;
+import org.eclipse.jface.text.contentassist.IContentAssistant;
+import org.eclipse.jface.text.reconciler.IReconciler;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.ui.texteditor.ITextEditor;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class JavaTextSourceViewerConfiguration extends JavaSourceViewerConfiguration {
+
+ private JavaTextEditor editor;
+
+ public JavaTextSourceViewerConfiguration(IColorManager colorManager, IPreferenceStore preferenceStore, JavaTextEditor editor, String partitioning) {
+ super(colorManager, preferenceStore, editor, partitioning);
+ this.editor = editor;
+ }
+
+ /** The viewer's content assistant */
+ protected ContentAssistant fContentAssistant;
+
+ public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
+ /*
+ * Note: This method was made final so that StructuredContentAssist is
+ * always used and content assist extension point always works.
+ */
+ ContentAssistant fContentAssistant = new ContentAssistant();
+
+ fContentAssistant.setContentAssistProcessor(new JavaTextEditorContentAssistProcessor(editor), "__dftl_partition_content_type");
+ fContentAssistant.setAutoActivationDelay(500);
+ fContentAssistant.setProposalPopupOrientation(IContentAssistant.CONTEXT_INFO_BELOW);
+ fContentAssistant.setContextInformationPopupOrientation(IContentAssistant.CONTEXT_INFO_BELOW);
+ fContentAssistant.setInformationControlCreator(getInformationControlCreator(sourceViewer));
+ fContentAssistant.enableAutoInsert(false);
+ fContentAssistant.enableAutoActivation(true);
+ return fContentAssistant;
+ }
+
+ /*
+ * (non-Javadoc)
+ * add by PanPan Liu for error-management
+ *
+ * @see
+ * org.eclipse.jdt.ui.text.JavaSourceViewerConfiguration#getReconciler(org
+ * .eclipse.jface.text.source.ISourceViewer)
+ */
+ @Override
+ public IReconciler getReconciler(ISourceViewer sourceViewer) {
+ final ITextEditor editor = getEditor();
+ if (editor != null && editor.isEditable()) {
+ JavaTextReconcilingStrategy strategy = new JavaTextReconcilingStrategy(sourceViewer, editor, getConfiguredDocumentPartitioning(sourceViewer));
+ JavaReconciler reconciler = new JavaReconciler(editor, strategy, false);
+ reconciler.setIsAllowedToModifyDocument(false);
+ reconciler.setDelay(500);
+
+ return reconciler;
+ }
+ return null;
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/editor/contentassist/JavaTextEditorContentAssistProcessor.java b/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/editor/contentassist/JavaTextEditorContentAssistProcessor.java
new file mode 100644
index 0000000..b393b8e
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/editor/contentassist/JavaTextEditorContentAssistProcessor.java
@@ -0,0 +1,261 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.java.editor.contentassist;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.pattern.ui.editors.templateEditor.TemplateEditorUtility;
+import org.eclipse.egf.pattern.ui.editors.templateEditor.computer.PatternParameterProposalComputer;
+import org.eclipse.egf.pattern.ui.editors.templateEditor.computer.PatternVariableProposalComputer;
+import org.eclipse.egf.pattern.ui.java.editor.JavaTextEditor;
+import org.eclipse.egf.pattern.ui.java.editor.JavaTextEditorHelper;
+import org.eclipse.egf.pattern.ui.java.editor.contentassist.computer.JavaTypeProposalComputer;
+import org.eclipse.egf.pattern.ui.java.template.JavaTemplateEditor;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
+import org.eclipse.jdt.internal.ui.text.java.AbstractJavaCompletionProposal;
+import org.eclipse.jdt.internal.ui.text.java.LazyGenericTypeProposal;
+import org.eclipse.jdt.internal.ui.text.template.contentassist.TemplateProposal;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.contentassist.CompletionProposal;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.text.contentassist.IContextInformation;
+import org.eclipse.jface.text.contentassist.IContextInformationValidator;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.part.MultiPageEditorPart;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class JavaTextEditorContentAssistProcessor implements IContentAssistProcessor {
+
+ private JavaTextEditor editor;
+
+ private IEditorPart templateEditorPart;
+
+ private Pattern pattern;
+
+ private final static String JAVA_LANG_PAKAGE = "java.lang.";
+
+ private final static String JAVA_UTIL_PAKAGE = "java.util.";
+
+ private char[] fCompletionAutoActivationCharacters;
+
+ public JavaTextEditorContentAssistProcessor(JavaTextEditor editor) {
+ this.editor = editor;
+ fCompletionAutoActivationCharacters = editor.getEditorPreferenceStore().getString("content_assist_autoactivation_triggers_java").toCharArray();
+ }
+
+ public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
+ MultiPageEditorPart multiPageEditorPart = JavaTextEditorHelper.getMultiPageEditorPart(editor);
+ if (multiPageEditorPart == null)
+ return null;
+ templateEditorPart = ((JavaTemplateEditor) multiPageEditorPart).getTemplateFileEditorPart();
+ refreshPublicTemplateEditor();
+
+ pattern = editor.getPattern();
+
+ List<ICompletionProposal> proposals = new ArrayList<ICompletionProposal>();
+
+ // Get the pattern parameter proposals.
+ PatternParameterProposalComputer parameterProposalComputer = new PatternParameterProposalComputer(viewer, offset, pattern);
+ addProposal(proposals, parameterProposalComputer.computeProposal());
+
+ // Get the pattern variable proposals.
+ PatternVariableProposalComputer variableProposalComputer = new PatternVariableProposalComputer(viewer, offset, pattern);
+ addProposal(proposals, variableProposalComputer.computeProposal());
+
+ // Get the java type proposals.
+ int mappingOffset = JavaTextEditorHelper.getMappingOffset(pattern, editor, offset);
+ JavaTypeProposalComputer javaTypeProposalComputer = new JavaTypeProposalComputer(viewer, mappingOffset, templateEditorPart);
+ List<ICompletionProposal> computeProposals = javaTypeProposalComputer.computeProposal();
+ List<ICompletionProposal> javaTypeProposals = updateProposalOffset(computeProposals, offset, mappingOffset);
+ addProposal(proposals, javaTypeProposals);
+
+ ICompletionProposal[] result = null;
+
+ if (proposals.size() == 0) {
+ // result = new ICompletionProposal[1];
+ // JavaCompletionProposal propsal = new JavaCompletionProposal("", 0, 0, null, JavaTextEditorMessages.JavaTextEditorContentAssistProcessor_No_Default_proposals, 0); //$NON-NLS-1$
+ // result[0] = propsal;
+ } else {
+ result = new ICompletionProposal[proposals.size()];
+ for (int i = 0; i < proposals.size(); i++) {
+ result[i] = proposals.get(i);
+ }
+ }
+ return result;
+
+ }
+
+ /**
+ * Update the offset of the proposal to mapping current methodEditor.
+ *
+ * @param mappingOffset
+ * @param offset
+ */
+ private List<ICompletionProposal> updateProposalOffset(List<ICompletionProposal> computeProposals, int offset, int mappingOffset) {
+ if (computeProposals == null)
+ return null;
+ List<ICompletionProposal> newProposals = new ArrayList<ICompletionProposal>();
+ int activePageIndex = JavaTextEditorHelper.getActivePageIndex(editor);
+ for (ICompletionProposal computeProposal : computeProposals) {
+ if (computeProposal instanceof AbstractJavaCompletionProposal) {
+ AbstractJavaCompletionProposal currentPropsal = (AbstractJavaCompletionProposal) computeProposal;
+ int replacementOffset = currentPropsal.getReplacementOffset() - (mappingOffset - offset);
+ currentPropsal.setReplacementOffset(replacementOffset);
+ }
+ if (!(activePageIndex == 0) && computeProposal instanceof LazyGenericTypeProposal) {
+ CompletionProposal javaProposal = changeLazyGenericTypeToJavaProposal(computeProposals, (LazyGenericTypeProposal) computeProposal);
+ newProposals.add(javaProposal);
+ } else if (computeProposal instanceof TemplateProposal) {
+ CompletionProposal templateProposal = changTemplateToJavaProposal(computeProposals, (TemplateProposal) computeProposal, offset);
+ newProposals.add(templateProposal);
+ } else {
+ newProposals.add(computeProposal);
+ }
+ }
+
+ return newProposals;
+ }
+
+ private List<ICompletionProposal> reverseProposals(List<ICompletionProposal> computeProposals) {
+ List<ICompletionProposal> newComputeProposals = new ArrayList<ICompletionProposal>();
+ for (int i = computeProposals.size() - 1; i >= 0; i--) {
+ newComputeProposals.add(computeProposals.get(i));
+ }
+ return newComputeProposals;
+ }
+
+ /**
+ * Change the LazyGenericTypeProposal into CompletionProposal.
+ *
+ * @param computeProposals
+ * @param lazyGenericTypeProposal
+ * @return
+ */
+ private CompletionProposal changeLazyGenericTypeToJavaProposal(List<ICompletionProposal> computeProposals, LazyGenericTypeProposal lazyGenericTypeProposal) {
+ String replacementString = lazyGenericTypeProposal.getReplacementString();
+ int replacementOffset = lazyGenericTypeProposal.getReplacementOffset();
+ int replacementLength = lazyGenericTypeProposal.getReplacementLength();
+ Image image = lazyGenericTypeProposal.getImage();
+ String displayString = lazyGenericTypeProposal.getDisplayString();
+ String qualifiedTypeName = lazyGenericTypeProposal.getQualifiedTypeName();
+ if ((JAVA_LANG_PAKAGE + replacementString).equals(qualifiedTypeName) || (JAVA_UTIL_PAKAGE + replacementString).equals(qualifiedTypeName)) {
+ qualifiedTypeName = replacementString;
+ }
+ CompletionProposal proposal = new CompletionProposal(qualifiedTypeName, replacementOffset, replacementLength, qualifiedTypeName.length(), image, displayString, null, null);
+ return proposal;
+ }
+
+ /**
+ * Change the TemplateProposal into CompletionProposal.
+ *
+ * @param computeProposals
+ * @param templateProposal
+ * @param offset
+ * @return
+ */
+ private CompletionProposal changTemplateToJavaProposal(List<ICompletionProposal> computeProposals, TemplateProposal templateProposal, int offset) {
+ String replaceString = templateProposal.getAdditionalProposalInfo();
+ Image image = templateProposal.getImage();
+ String displayString = templateProposal.getDisplayString();
+ // IDocument doc = editor.getViewer().getDocument();
+ // JavaDocumentReader reader = new JavaDocumentReader(doc, offset);
+ // char c = reader.readBackward();
+ String allWords[] = TemplateEditorUtility.getAllWords(editor.getViewer(), offset);
+ List<ICompletionProposal> parameterProposals = new ArrayList<ICompletionProposal>();
+ if (allWords.length > 0) {
+ String replacedWord = allWords[0];
+ int replacementOffset = offset - replacedWord.length();
+ CompletionProposal proposal = new CompletionProposal(replaceString, replacementOffset, replacedWord.length(), replaceString.length(), image, displayString, null, null);
+ return proposal;
+ }
+ return null;
+ }
+
+ private void refreshPublicTemplateEditor() {
+ IEditorInput editorInput = templateEditorPart.getEditorInput();
+ if (editorInput instanceof IFileEditorInput) {
+ IFile templateFile = ((IFileEditorInput) editorInput).getFile();
+ JavaTextEditorHelper.refreshPublicTemplateEditor(pattern, templateFile, editor);
+ }
+ }
+
+ /**
+ * Add the find new proposals in to proposals.
+ */
+ private void addProposal(List proposals, List newProposals) {
+ if (newProposals != null && newProposals.size() != 0) {
+ proposals.addAll(newProposals);
+ }
+ }
+
+ /**
+ * Returns the compilation unit that content assist is invoked in,
+ * <code>null</code> if there
+ * is none.
+ *
+ * @return the compilation unit that content assist is invoked in, possibly
+ * <code>null</code>
+ */
+ public ICompilationUnit getCompilationUnit() {
+ IEditorPart fEditor = null;
+ if (fEditor == null)
+ return null;
+ ICompilationUnit fCU = null;
+ IJavaElement je = EditorUtility.getEditorInputJavaElement(fEditor, false);
+ if (je instanceof ICompilationUnit)
+ fCU = (ICompilationUnit) je;
+ return fCU;
+ }
+
+ public IContextInformation[] computeContextInformation(ITextViewer viewer, int offset) {
+
+ return null;
+ }
+
+ public char[] getCompletionProposalAutoActivationCharacters() {
+
+ return fCompletionAutoActivationCharacters;
+ }
+
+ public char[] getContextInformationAutoActivationCharacters() {
+
+ return null;
+ }
+
+ public IContextInformationValidator getContextInformationValidator() {
+
+ return null;
+ }
+
+ public String getErrorMessage() {
+
+ return null;
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/editor/contentassist/computer/JavaTypeProposalComputer.java b/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/editor/contentassist/computer/JavaTypeProposalComputer.java
new file mode 100644
index 0000000..57d0b05
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/editor/contentassist/computer/JavaTypeProposalComputer.java
@@ -0,0 +1,271 @@
+/**
+ * <copyright>
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.java.editor.contentassist.computer;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.egf.pattern.ui.editors.templateEditor.TemplateEditorUtility;
+import org.eclipse.egf.pattern.ui.editors.templateEditor.computer.AbstractProposalComputer;
+import org.eclipse.jdt.core.CompletionProposal;
+import org.eclipse.jdt.core.CompletionRequestor;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
+import org.eclipse.jdt.internal.ui.text.JavaHeuristicScanner;
+import org.eclipse.jdt.internal.ui.text.Symbols;
+import org.eclipse.jdt.internal.ui.text.java.FillArgumentNamesCompletionProposalCollector;
+import org.eclipse.jdt.internal.ui.text.java.JavaMethodCompletionProposal;
+import org.eclipse.jdt.internal.ui.text.java.ProposalSorterRegistry;
+import org.eclipse.jdt.internal.ui.text.java.TemplateCompletionProposalComputer;
+import org.eclipse.jdt.ui.PreferenceConstants;
+import org.eclipse.jdt.ui.text.java.CompletionProposalCollector;
+import org.eclipse.jdt.ui.text.java.ContentAssistInvocationContext;
+import org.eclipse.jdt.ui.text.java.JavaContentAssistInvocationContext;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.ui.IEditorPart;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class JavaTypeProposalComputer extends AbstractProposalComputer {
+ private IProgressMonitor fTimeoutProgressMonitor;
+ private int offset;
+ private IEditorPart templateEditorPart;
+ private static final long JAVA_CODE_ASSIST_TIMEOUT = Long.getLong("org.eclipse.jdt.ui.codeAssistTimeout", 5000).longValue(); // ms //$NON-NLS-1$
+
+ public JavaTypeProposalComputer(ITextViewer viewer, int offset, IEditorPart templateEditorPart) {
+ this.offset = offset;
+ this.templateEditorPart = templateEditorPart;
+ fTimeoutProgressMonitor = createTimeoutProgressMonitor(JAVA_CODE_ASSIST_TIMEOUT);
+ }
+
+ public List<ICompletionProposal> computeProposal() {
+ if (templateEditorPart == null || ((JavaEditor) templateEditorPart).getViewer() == null)
+ return null;
+
+ JavaContentAssistInvocationContext context = createContext(offset);
+ ICompilationUnit unit = context.getCompilationUnit();
+ if (unit == null)
+ return null;
+
+ List<ICompletionProposal> proposals = new ArrayList<ICompletionProposal>();
+
+ List<ICompletionProposal> javaTypeProposal = computeJavaTypeProposal(unit, context);
+ proposals.addAll(javaTypeProposal);
+ List<ICompletionProposal> templateProposal = computeTemplateProposal(context);
+ proposals.addAll(templateProposal);
+ // Sort proposals.
+ ProposalSorterRegistry.getDefault().getCurrentSorter().sortProposals(context, proposals);
+
+ return proposals;
+ }
+
+ private List<ICompletionProposal> computeJavaTypeProposal(ICompilationUnit unit, JavaContentAssistInvocationContext context) {
+ ITextViewer viewer = context.getViewer();
+
+ CompletionProposalCollector collector = createCollector(context);
+ collector.setInvocationContext(context);
+
+ // Allow completions for unresolved types - since 3.3
+ collector.setAllowsRequiredProposals(CompletionProposal.FIELD_REF, CompletionProposal.TYPE_REF, true);
+ collector.setAllowsRequiredProposals(CompletionProposal.FIELD_REF, CompletionProposal.TYPE_IMPORT, true);
+ collector.setAllowsRequiredProposals(CompletionProposal.FIELD_REF, CompletionProposal.FIELD_IMPORT, true);
+
+ collector.setAllowsRequiredProposals(CompletionProposal.METHOD_REF, CompletionProposal.TYPE_REF, true);
+ collector.setAllowsRequiredProposals(CompletionProposal.METHOD_REF, CompletionProposal.TYPE_IMPORT, true);
+ collector.setAllowsRequiredProposals(CompletionProposal.METHOD_REF, CompletionProposal.METHOD_IMPORT, true);
+
+ collector.setAllowsRequiredProposals(CompletionProposal.CONSTRUCTOR_INVOCATION, CompletionProposal.TYPE_REF, true);
+
+ collector.setAllowsRequiredProposals(CompletionProposal.ANONYMOUS_CLASS_CONSTRUCTOR_INVOCATION, CompletionProposal.TYPE_REF, true);
+ collector.setAllowsRequiredProposals(CompletionProposal.ANONYMOUS_CLASS_DECLARATION, CompletionProposal.TYPE_REF, true);
+
+ collector.setAllowsRequiredProposals(CompletionProposal.TYPE_REF, CompletionProposal.TYPE_REF, true);
+
+ setCollectorIgnored(collector);
+
+ // Set the favorite list to propose static members - since 3.3
+ collector.setFavoriteReferences(getFavoriteStaticMembers());
+
+ try {
+ Point selection = viewer.getSelectedRange();
+ if (selection.y > 0)
+ collector.setReplacementLength(selection.y);
+ unit.codeComplete(offset, collector, fTimeoutProgressMonitor);
+ } catch (OperationCanceledException x) {
+ } catch (JavaModelException x) {
+ }
+
+ ICompletionProposal[] javaProposals = TemplateEditorUtility.filterJavaMethodProposals(collector.getJavaCompletionProposals());
+ int contextInformationOffset = guessMethodContextInformationPosition(context, offset);
+ if (contextInformationOffset != offset) {
+ for (int i = 0; i < javaProposals.length; i++) {
+ if (javaProposals[i] instanceof JavaMethodCompletionProposal) {
+ JavaMethodCompletionProposal jmcp = (JavaMethodCompletionProposal) javaProposals[i];
+ jmcp.setContextInformationPosition(contextInformationOffset);
+ }
+ }
+ }
+ return Arrays.asList(javaProposals);
+ }
+
+ private List<ICompletionProposal> computeTemplateProposal(JavaContentAssistInvocationContext context) {
+ // Get the template proposals.
+ TemplateCompletionProposalComputer templateCompletionProposalComputer = new TemplateCompletionProposalComputer();
+ List computeCompletionProposals = templateCompletionProposalComputer.computeCompletionProposals(context, null);
+ return computeCompletionProposals;
+ }
+
+ private void setCollectorIgnored(CompletionProposalCollector collector) {
+ collector.setIgnored(CompletionProposal.ANNOTATION_ATTRIBUTE_REF, false);
+ collector.setIgnored(CompletionProposal.ANONYMOUS_CLASS_DECLARATION, false);
+ collector.setIgnored(CompletionProposal.ANONYMOUS_CLASS_CONSTRUCTOR_INVOCATION, false);
+ collector.setIgnored(CompletionProposal.FIELD_REF, false);
+ collector.setIgnored(CompletionProposal.FIELD_REF_WITH_CASTED_RECEIVER, false);
+ collector.setIgnored(CompletionProposal.KEYWORD, false);
+ collector.setIgnored(CompletionProposal.LABEL_REF, false);
+ collector.setIgnored(CompletionProposal.LOCAL_VARIABLE_REF, false);
+ collector.setIgnored(CompletionProposal.METHOD_DECLARATION, false);
+ collector.setIgnored(CompletionProposal.METHOD_NAME_REFERENCE, false);
+ collector.setIgnored(CompletionProposal.METHOD_REF, false);
+ collector.setIgnored(CompletionProposal.CONSTRUCTOR_INVOCATION, false);
+ collector.setIgnored(CompletionProposal.METHOD_REF_WITH_CASTED_RECEIVER, false);
+ collector.setIgnored(CompletionProposal.PACKAGE_REF, false);
+ collector.setIgnored(CompletionProposal.POTENTIAL_METHOD_DECLARATION, false);
+ collector.setIgnored(CompletionProposal.VARIABLE_DECLARATION, false);
+ collector.setIgnored(CompletionProposal.TYPE_REF, false);
+ }
+
+ /**
+ * Creates the context that is passed to the completion proposal
+ * computers.
+ *
+ * @param viewer
+ * the viewer that content assist is invoked on
+ * @param offset
+ * the content assist offset
+ * @return the context to be passed to the computers
+ */
+ protected JavaContentAssistInvocationContext createContext(int offset) {
+ if (templateEditorPart instanceof JavaEditor) {
+ JavaContentAssistInvocationContext javaContentAssistInvocationContext = new JavaContentAssistInvocationContext(((JavaEditor) templateEditorPart).getViewer(), offset, templateEditorPart);
+ return javaContentAssistInvocationContext;
+ }
+ return null;
+ }
+
+ /**
+ * Creates the collector used to get proposals from core.
+ *
+ * @param context
+ * the context
+ * @return the collector
+ */
+ protected CompletionProposalCollector createCollector(JavaContentAssistInvocationContext context) {
+ if (PreferenceConstants.getPreferenceStore().getBoolean(PreferenceConstants.CODEASSIST_FILL_ARGUMENT_NAMES))
+ return new FillArgumentNamesCompletionProposalCollector(context);
+ else
+ return new CompletionProposalCollector(context.getCompilationUnit(), true);
+ }
+
+ /**
+ * Returns the array with favorite static members.
+ *
+ * @return the <code>String</code> array with with favorite static members
+ * @see CompletionRequestor#setFavoriteReferences(String[])
+ * @since 3.3
+ */
+ private String[] getFavoriteStaticMembers() {
+ String serializedFavorites = PreferenceConstants.getPreferenceStore().getString(PreferenceConstants.CODEASSIST_FAVORITE_STATIC_MEMBERS);
+ if (serializedFavorites != null && serializedFavorites.length() > 0)
+ return serializedFavorites.split(";"); //$NON-NLS-1$
+ return new String[0];
+ }
+
+ protected final int guessMethodContextInformationPosition(ContentAssistInvocationContext context, int offset) {
+ final int contextPosition = context.getInvocationOffset();
+
+ IDocument document = context.getDocument();
+ if ("".equals(document.get())) {
+ return offset;
+ }
+ JavaHeuristicScanner scanner = new JavaHeuristicScanner(document);
+ int bound = Math.max(-1, contextPosition - 200);
+
+ // try the innermost scope of parentheses that looks like a method call
+ int pos = contextPosition - 1;
+ do {
+ try {
+ int paren = scanner.findOpeningPeer(pos, bound, '(', ')');
+ if (paren == JavaHeuristicScanner.NOT_FOUND)
+ break;
+ int token = scanner.previousToken(paren - 1, bound);
+ // next token must be a method name (identifier) or the closing
+ // angle of a
+ // constructor call of a parameterized type.
+ if (token == Symbols.TokenIDENT || token == Symbols.TokenGREATERTHAN)
+ return paren + 1;
+ pos = paren - 1;
+ } catch (Exception e) {
+ return offset;
+ }
+
+ } while (true);
+
+ return contextPosition;
+ }
+
+ /**
+ * Returns a new progress monitor that get cancelled after the given
+ * timeout.
+ *
+ * @param timeout
+ * the timeout in ms
+ * @return the progress monitor
+ * @since 3.5
+ */
+ private IProgressMonitor createTimeoutProgressMonitor(final long timeout) {
+ return new IProgressMonitor() {
+
+ private long fEndTime;
+
+ public void beginTask(String name, int totalWork) {
+ fEndTime = System.currentTimeMillis() + timeout;
+ }
+
+ public boolean isCanceled() {
+ return fEndTime <= System.currentTimeMillis();
+ }
+
+ public void done() {
+ }
+
+ public void internalWorked(double work) {
+ }
+
+ public void setCanceled(boolean value) {
+ }
+
+ public void setTaskName(String name) {
+ }
+
+ public void subTask(String name) {
+ }
+
+ public void worked(int work) {
+ }
+ };
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/javaTextEditorMessages.properties b/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/javaTextEditorMessages.properties
new file mode 100644
index 0000000..91c7b6a
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/javaTextEditorMessages.properties
@@ -0,0 +1 @@
+JavaTextEditorContentAssistProcessor_No_Default_proposals=No Default Proposals
diff --git a/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/template/JavaTemplateEditor.java b/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/template/JavaTemplateEditor.java
new file mode 100644
index 0000000..8084903
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.java/src/org/eclipse/egf/pattern/ui/java/template/JavaTemplateEditor.java
@@ -0,0 +1,190 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.java.template;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.pattern.ui.editors.templateEditor.AbstractTemplateEditor;
+import org.eclipse.egf.pattern.ui.java.Activator;
+import org.eclipse.egf.pattern.ui.java.editor.JavaTextEditor;
+import org.eclipse.egf.pattern.ui.java.editor.JavaTextEditorHelper;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.editors.text.TextEditor;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class JavaTemplateEditor extends AbstractTemplateEditor {
+
+ private final static String TEMPLATE_FILE_EXTENTION = ".java";
+
+ private IAnnotationModel javaAnnotationModel;
+
+ private IFile templateFile;
+
+ private Map<String, Map<Annotation, Position>> methodJavaAnnotations = new HashMap<String, Map<Annotation, Position>>();
+
+ private static Map<String, Map<Annotation, Position>> METHODJAVAANNOTATIONS = new HashMap<String, Map<Annotation, Position>>();
+
+ protected void createPages() {
+ Pattern pattern = getPattern();
+ addPatternChangeAdapter(pattern);
+ EList<PatternMethod> methods = pattern.getMethods();
+ try {
+ templateFile = setPublicTemplateEditor(pattern, methods, TEMPLATE_FILE_EXTENTION);
+ } catch (Exception e) {
+ Activator.getDefault().log(e);
+ }
+ initProblems();
+ divideByMethods();
+ for (int i = 0; i < methods.size(); i++) {
+ createPage(methods.get(i), pattern);
+ }
+ String patternName = pattern.getName();
+ setTitle(patternName);
+ }
+
+ void createPage(PatternMethod method, Pattern pattern) {
+ try {
+ JavaTextEditor editor = new JavaTextEditor(pattern);
+ addEditor(editor, method);
+ } catch (Exception e) {
+ Activator.getDefault().logError(e);
+ }
+ }
+
+ protected void initProblems() {
+ IEditorPart editorPart = openEditor;
+ if (editorPart == null) {
+ return;
+ }
+ JavaEditor javaEditor = (JavaEditor) editorPart;
+ javaAnnotationModel = JavaTextEditorHelper.getAnnotationModel(javaEditor);
+ }
+
+ protected void divideByMethods() {
+ methodJavaAnnotations.clear();
+ METHODJAVAANNOTATIONS.clear();
+ for (String key : startPositions.keySet()) {
+ Position position = startPositions.get(key);
+ int startOffset = position.offset;
+ int endOffset = position.offset + position.length;
+ Map javaAnnotations = new HashMap();
+ if (javaAnnotationModel == null) {
+ continue;
+ }
+ Iterator annotationIterator = javaAnnotationModel.getAnnotationIterator();
+ while (annotationIterator.hasNext()) {
+ Annotation annotation = (Annotation) annotationIterator.next();
+ Position posi = javaAnnotationModel.getPosition(annotation);
+ if (posi == null) {
+ continue;
+ }
+ int offset = posi.offset;
+ int length = posi.length;
+ if (startOffset == 0 && offset == -1) {
+ javaAnnotations.put(annotation, posi);
+ }
+ if (offset >= startOffset && offset <= endOffset) {
+ posi.setOffset(offset - startOffset);
+ javaAnnotations.put(annotation, posi);
+ }
+ }
+ methodJavaAnnotations.put(key, javaAnnotations);
+ METHODJAVAANNOTATIONS = methodJavaAnnotations;
+ }
+ }
+
+ public static Map<String, Map<Annotation, Position>> getMethodJavaAnnotations() {
+ return METHODJAVAANNOTATIONS;
+ }
+
+ public IEditorPart getTemplateFileEditorPart() {
+ return openEditor;
+ }
+
+ public IFile getTemplateFile() {
+ return templateFile;
+ }
+
+ @Override
+ public void doSave(IProgressMonitor monitor) {
+ super.doSave(monitor);
+ JavaTextEditorHelper.mappingErrorFromTemplateEditor((JavaTextEditor) this.getActiveEditor());
+ }
+
+ @Override
+ public void setActivePage(String methodId) {
+ if (methodId != null && !"".equals(methodId)) {
+ JavaTextEditor javaTextEditor = (JavaTextEditor) editorMap.get(methodId);
+ if (javaTextEditor != null) {
+ this.setActiveEditor(javaTextEditor);
+ }
+ }
+ }
+
+ @Override
+ protected void executeMethodEditorAdd(PatternMethod addMethod) {
+ try {
+ if (addMethod.getID() == null)
+ return;
+ // Add the pattern file path to method in order to create add
+ // editor's input file.
+ setPatternFilePath(addMethod);
+ JavaTextEditor newEditor = new JavaTextEditor(getPattern());
+ addEditor(newEditor, addMethod);
+ super.executeMethodEditorAdd(addMethod);
+ } catch (CoreException e) {
+ Activator.getDefault().logError(e);
+ } catch (IOException e) {
+ Activator.getDefault().logError(e);
+ }
+ }
+
+ protected TextEditor createNewEditor() {
+ JavaTextEditor newEditor;
+ try {
+ newEditor = new JavaTextEditor(getPattern());
+ return newEditor;
+ } catch (CoreException e) {
+ Activator.getDefault().logError(e);
+ } catch (IOException e) {
+ Activator.getDefault().logError(e);
+ }
+ return null;
+ }
+
+ @Override
+ protected String getDelegateEditorID() {
+
+ return "org.eclipse.jdt.ui.CompilationUnitEditor";
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui.jet/.classpath b/org.eclipse.egf.pattern.ui.jet/.classpath
new file mode 100644
index 0000000..2d1a430
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.jet/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.egf.pattern.ui.jet/.project b/org.eclipse.egf.pattern.ui.jet/.project
new file mode 100644
index 0000000..363fdaa
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.jet/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.pattern.ui.jet</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.pattern.ui.jet/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egf.pattern.ui.jet/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..29c00cc
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.jet/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:54:38 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.egf.pattern.ui.jet/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egf.pattern.ui.jet/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..671d0ef
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.jet/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Fri Dec 18 13:01:09 CET 2009
+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/org.eclipse.egf.pattern.ui.jet/META-INF/MANIFEST.MF b/org.eclipse.egf.pattern.ui.jet/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..f2eda21
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.jet/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-Vendor: %providerName
+Bundle-ClassPath: .
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.egf.pattern.ui.jet;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-Activator: org.eclipse.egf.pattern.ui.jet.Activator
+Require-Bundle:
+ org.eclipse.egf.common.ui,
+ org.eclipse.egf.pattern.ui,
+ org.eclipse.jet,
+ org.eclipse.jet.editor,
+ org.eclipse.jface.text,
+ org.eclipse.egf.model.jetpattern
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/org.eclipse.egf.pattern.ui.jet/about.html b/org.eclipse.egf.pattern.ui.jet/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.jet/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/org.eclipse.egf.pattern.ui.jet/build.properties b/org.eclipse.egf.pattern.ui.jet/build.properties
new file mode 100644
index 0000000..185b3fc
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.jet/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ icons/,\
+ .,\
+ about.html,\
+ plugin.xml,\
+ plugin.properties
+src.includes = about.html
diff --git a/org.eclipse.egf.pattern.ui.jet/icons/sample.gif b/org.eclipse.egf.pattern.ui.jet/icons/sample.gif
new file mode 100644
index 0000000..e326f86
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.jet/icons/sample.gif
Binary files differ
diff --git a/org.eclipse.egf.pattern.ui.jet/plugin.properties b/org.eclipse.egf.pattern.ui.jet/plugin.properties
new file mode 100644
index 0000000..805355a
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.jet/plugin.properties
@@ -0,0 +1,15 @@
+##
+# 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 UI JET Pattern (Incubation)
+providerName=Eclipse Modeling Project
+
+editor.name=Jet Template Editor
diff --git a/org.eclipse.egf.pattern.ui.jet/plugin.xml b/org.eclipse.egf.pattern.ui.jet/plugin.xml
new file mode 100644
index 0000000..2a23b67
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.jet/plugin.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.egf.pattern.ui.templateEditor">
+ <editor
+ class="org.eclipse.egf.pattern.ui.jet.template.JetTemplateEditor"
+ id="org.eclipse.egf.pattern.ui.JetTemplateEditor"
+ nature="JetNature">
+ </editor>
+ </extension>
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ class="org.eclipse.egf.pattern.ui.jet.template.JetTemplateEditor"
+ default="false"
+ icon="icons/sample.gif"
+ id="org.eclipse.egf.pattern.ui.JetTemplateEditor"
+ name="%editor.name">
+ </editor>
+ </extension>
+
+
+</plugin>
diff --git a/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/Activator.java b/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/Activator.java
new file mode 100644
index 0000000..671a817
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/Activator.java
@@ -0,0 +1,103 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.pattern.ui.jet;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.egf.common.ui.activator.EGFAbstractUIPlugin;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.osgi.framework.BundleContext;
+
+/**
+ * @author Yahong Song - Soyatec
+ *
+ */
+public class Activator extends EGFAbstractUIPlugin {
+
+ public static final String PLUGIN_ID = "org.eclipse.egf.pattern.ui.jet";
+
+ // The shared instance
+ private static Activator _plugin;
+
+ /**
+ *
+ * Returns the currently active window for this workbench (if any). Returns
+ * <code>null</code> if there is no active workbench window. Returns
+ * <code>null</code> if called from a non-UI thread.
+ *
+ * @return the active workbench window, or <code>null</code> if there is
+ * no active workbench window or if called from a non-UI thread
+ */
+ public static IWorkbenchWindow getActiveWorkbenchWindow() {
+ return getDefault().getWorkbench().getActiveWorkbenchWindow();
+ }
+
+ /**
+ * Returns the currently active shell for this workbench (if any).
+ *
+ * @return the active workbench shell.
+ */
+ public static Shell getActiveWorkbenchShell() {
+ IWorkbenchWindow window = getActiveWorkbenchWindow();
+ if (window == null) {
+ IWorkbenchWindow[] windows = getDefault().getWorkbench().getWorkbenchWindows();
+ if (windows.length > 0) {
+ return windows[0].getShell();
+ }
+ } else {
+ return window.getShell();
+ }
+ return null;
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
+ * )
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ _plugin = this;
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
+ * )
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ super.stop(context);
+ _plugin = null;
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return _plugin;
+ }
+
+ /**
+ * Log an exception in Eclipse's logger with this plugin ID
+ * @param e
+ */
+ public static void log(Exception e) {
+ IStatus status = new Status(IStatus.ERROR, "", e.getMessage(), e);
+ getDefault().getLog().log(status);
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/editor/JETAnnotationModel.java b/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/editor/JETAnnotationModel.java
new file mode 100644
index 0000000..338ada9
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/editor/JETAnnotationModel.java
@@ -0,0 +1,71 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+package org.eclipse.egf.pattern.ui.jet.editor;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.ui.texteditor.MarkerAnnotation;
+import org.eclipse.ui.texteditor.ResourceMarkerAnnotationModel;
+
+/**
+ * @author Yahong Song - Soyatec
+ *
+ */
+public class JETAnnotationModel extends ResourceMarkerAnnotationModel {
+ private boolean fireChanges;
+
+ public JETAnnotationModel(IResource resource) {
+ super(resource);
+ fireChanges = true;
+ }
+
+ public synchronized boolean isFireChanges() {
+ return fireChanges;
+ }
+
+ public synchronized void setFireChanges(boolean b) {
+ fireChanges = b;
+ }
+
+ public synchronized void addAnnotation(Annotation annotation, Position position) {
+ try {
+ addAnnotation(annotation, position, fireChanges);
+ } catch (BadLocationException _ex) {
+ }
+ }
+
+ public synchronized void removeAllAnnotations() {
+ super.removeAllAnnotations(fireChanges);
+ }
+
+ public synchronized void removeAnnotation(Annotation annotation) {
+ super.removeAnnotation(annotation, fireChanges);
+ }
+
+ public MarkerAnnotation createMarkerAnnotation(IMarker marker) {
+ return super.createMarkerAnnotation(marker);
+ }
+
+ public Position createPositionFromMarker(IMarker marker) {
+ return super.createPositionFromMarker(marker);
+ }
+
+ public void fireAnnotationModelChanged() {
+ fireModelChanged();
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/editor/JETProblemAnnotation.java b/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/editor/JETProblemAnnotation.java
new file mode 100644
index 0000000..bbe9c9c
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/editor/JETProblemAnnotation.java
@@ -0,0 +1,42 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.jet.editor;
+
+import org.eclipse.jet.core.parser.ProblemSeverity;
+import org.eclipse.jet.core.parser.ast.Problem;
+import org.eclipse.jface.text.source.Annotation;
+
+/**
+ * @author Yahong Song - Soyatec
+ *
+ */
+public class JETProblemAnnotation extends Annotation {
+
+ public static final String ERROR_ANNOTATION_TYPE = "org.eclipse.jet.editor.error";
+
+ public static final String WARNING_ANNOTATION_TYPE = "org.eclipse.jet.editor.warning";
+
+ public static final String INFO_ANNOTATION_TYPE = "org.eclipse.jet.editor.info";
+
+ public JETProblemAnnotation(Problem problem) {
+ if (problem.getProblemSeverity() == ProblemSeverity.ERROR)
+ setType(ERROR_ANNOTATION_TYPE);
+ else if (problem.getProblemSeverity() == ProblemSeverity.WARNING)
+ setType(WARNING_ANNOTATION_TYPE);
+ setText(problem.getMessage());
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/editor/JetDocumentProvider.java b/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/editor/JetDocumentProvider.java
new file mode 100644
index 0000000..c395091
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/editor/JetDocumentProvider.java
@@ -0,0 +1,57 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.jet.editor;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jet.internal.editor.JETTextEditor;
+import org.eclipse.jet.internal.editor.configuration.JETDocumentProvider;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.ui.IFileEditorInput;
+
+/**
+ * @author Yahong Song - Soyatec
+ *
+ */
+public class JetDocumentProvider extends JETDocumentProvider {
+
+ JETTextEditor editor;
+
+ public JetDocumentProvider(JETTextEditor editor) {
+ super(editor);
+ this.editor = editor;
+ }
+
+ protected IAnnotationModel createAnnotationModel(Object element) throws CoreException {
+ if (element instanceof IFileEditorInput) {
+ IFileEditorInput input = (IFileEditorInput) element;
+ return new JETAnnotationModel(input.getFile());
+ } else {
+ return super.createAnnotationModel(element);
+ }
+ }
+
+ @Override
+ public boolean isSynchronized(Object element) {
+ boolean isSynchronized = super.isSynchronized(element);
+ if (isSynchronized && editor.isDirty()) {
+ long modificationStamp = getModificationStamp(element);
+ long synchronizationStamp = getSynchronizationStamp(element);
+ return isSynchronized && (modificationStamp == synchronizationStamp);
+ }
+ return isSynchronized;
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/editor/JetEditorHelper.java b/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/editor/JetEditorHelper.java
new file mode 100644
index 0000000..4f9423e
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/editor/JetEditorHelper.java
@@ -0,0 +1,499 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.jet.editor;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.io.StringBufferInputStream;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.model.pattern.PatternParameter;
+import org.eclipse.egf.model.pattern.PatternVariable;
+import org.eclipse.egf.pattern.extension.PatternFactory;
+import org.eclipse.egf.pattern.ui.jet.Activator;
+import org.eclipse.egf.pattern.ui.jet.template.JetTemplateEditor;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IPackageFragment;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.IProblemRequestor;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.WorkingCopyOwner;
+import org.eclipse.jdt.core.compiler.IProblem;
+import org.eclipse.jet.core.parser.ProblemSeverity;
+import org.eclipse.jet.core.parser.ast.JETASTElement;
+import org.eclipse.jet.core.parser.ast.JETCompilationUnit;
+import org.eclipse.jet.core.parser.ast.Problem;
+import org.eclipse.jet.internal.editor.JETEditorHelper;
+import org.eclipse.jet.internal.editor.JETTextEditor;
+import org.eclipse.jet.internal.editor.annotations.JETProblemAnnotation;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.IWorkbenchPartSite;
+import org.eclipse.ui.editors.text.TextEditor;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.internal.WorkbenchPage;
+import org.eclipse.ui.part.MultiPageEditorPart;
+import org.eclipse.ui.part.MultiPageEditorSite;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.ui.texteditor.MarkerAnnotation;
+
+/**
+ * @author Yahong Song - Soyatec
+ *
+ */
+public class JetEditorHelper extends JETEditorHelper {
+ private static final class JETJavaContentProblemRequestor implements IProblemRequestor {
+
+ /**
+ * The JET problems computed from the java problems
+ */
+ private List problems;
+
+ /**
+ * The problems collected from the compiled java source
+ */
+ private List javaProblems;
+
+ /**
+ * The jet source
+ */
+ private IDocument jetDocument;
+
+ private Map mappingPositions;
+
+ private JETJavaContentProblemRequestor(List problems, Map mappings, IDocument jetDocument) {
+ this.problems = problems;
+ mappingPositions = mappings;
+ javaProblems = new ArrayList();
+ this.jetDocument = jetDocument;
+ }
+
+ /**
+ * @return
+ */
+ public List getProblems() {
+ return problems;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jdt.core.IProblemRequestor#acceptProblem(org.eclipse.
+ * jdt.core.compiler.IProblem)
+ */
+ public void acceptProblem(IProblem problem) {
+ javaProblems.add(problem);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jdt.core.IProblemRequestor#beginReporting()
+ */
+ public void beginReporting() {
+ javaProblems.clear();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jdt.core.IProblemRequestor#endReporting()
+ */
+ public void endReporting() {
+ Problem problem;
+ // walk through the java problems collected from the generated java
+ // source and create the
+ // corresponding JET problems in the JET source using the position
+ // mappings
+ for (Iterator iter = javaProblems.iterator(); iter.hasNext();) {
+ IProblem javaProblem = (IProblem) iter.next();
+
+ int javaProblemOffset = javaProblem.getSourceStart();
+ int problemLength = (javaProblem.getSourceEnd() - javaProblemOffset) + 1;
+
+ JETASTElement astElement = getElementForJavaOffset(javaProblemOffset);
+ Position pos = (Position) mappingPositions.get(astElement);
+ int astElementJavaContentStart = pos == null ? -1 : pos.getOffset();
+ int jetOffset = pos == null ? 0 : JETEditorHelper.getASTElementContentStart(astElement, jetDocument) + (javaProblemOffset - astElementJavaContentStart);
+
+ // Create the problem at the specified location
+ URI baseLocation = URI.create("");
+ problem = new Problem(baseLocation, "", javaProblem.isWarning() ? ProblemSeverity.WARNING : ProblemSeverity.ERROR, -1, javaProblem.getMessage(), javaProblem.getArguments(), jetOffset, jetOffset + problemLength, -1, -1);
+ // add the problem to the problems list
+ problems.add(problem);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jdt.core.IProblemRequestor#isActive()
+ */
+ public boolean isActive() {
+ return true;
+ }
+
+ /**
+ * Find the JET AST element that matches the given java offset in the
+ * generated java template source
+ *
+ * @param javaOffset
+ * @return
+ */
+ private JETASTElement getElementForJavaOffset(int javaOffset) {
+ for (Iterator iterator = mappingPositions.keySet().iterator(); iterator.hasNext();) {
+ JETASTElement element = (JETASTElement) iterator.next();
+ Position pos = (Position) mappingPositions.get(element);
+ if (pos.getOffset() <= javaOffset && javaOffset < pos.getOffset() + pos.getLength())
+ return element;
+ }
+ return null;
+ }
+ } // End class JETJavaContentProblemRequestor
+
+ public static List evaluateProblems(JETTextEditor jetEditor, IDocument jetDocument) {
+ JETCompilationUnit cu = jetEditor.requestCompilationUnit();
+ String packageName = cu.getOutputJavaPackage();
+ String className = cu.getOutputJavaClassName();
+ List problems = new ArrayList();
+ if (packageName == null || className == null)
+ return problems;
+ Map mappingPositions = new HashMap();
+ String javaSource = jetEditor.compilationHelper().getJavaCode(cu, mappingPositions);
+ JETJavaContentProblemRequestor problemRequestor = new JETJavaContentProblemRequestor(problems, mappingPositions, jetDocument);
+ try {
+ ICompilationUnit compilationUnit = null;
+ IJavaProject javaProject = jetEditor.getJavaProject();
+ IPackageFragmentRoot roots[] = javaProject.getPackageFragmentRoots();
+ for (int i = 0; i < roots.length; i++) {
+ IPackageFragmentRoot root = roots[i];
+ if (IPackageFragmentRoot.K_SOURCE != root.getKind()) {
+ continue;
+ }
+ IPackageFragment packageFragment = root.getPackageFragment(packageName);
+ if (packageFragment == null || !packageFragment.exists())
+ packageFragment = root.createPackageFragment(packageName, true, new NullProgressMonitor());
+ compilationUnit = packageFragment.createCompilationUnit((new StringBuilder(String.valueOf(className))).append(".java").toString(), javaSource, true, new NullProgressMonitor());
+ break;
+ }
+ WorkingCopyOwner owner = new WorkingCopyOwner() {
+ };
+ ICompilationUnit copy = compilationUnit.getWorkingCopy(owner, problemRequestor, null);
+ copy.reconcile(0, true, owner, null);
+ } catch (JavaModelException e) {
+ Activator.getDefault().log(e);
+ }
+ return problems;
+ }
+
+ /**
+ * While do code completion, refresh the template file's content via the
+ * content of method editor.
+ */
+ public static void refreshPublicTemplateEditor(Pattern pattern, IFile templateFile, JetTextEditor editor) {
+ MultiPageEditorPart multiPageEditorPart = getMultiPageEditorPart(editor);
+ List<TextEditor> editors = ((JetTemplateEditor) multiPageEditorPart).getEditorList();
+ if (templateFile.exists()) {
+ try {
+ templateFile.setContents(new ByteArrayInputStream(new byte[0]), true, false, null);
+ if (editors == null) {
+ return;
+ }
+ int size = editors.size();
+ if (size == 0) {
+ return;
+ }
+ JetTextEditor footerEditor = null;
+ for (int i = 0; i < size; i++) {
+ JetTextEditor currentEditor = (JetTextEditor) editors.get(i);
+ String partName = currentEditor.getPartName();
+ if (partName.equals(PatternFactory.FOOTER_METHOD_NAME)) {
+ footerEditor = currentEditor;
+ continue;
+ }
+ visitMethod(currentEditor, templateFile, true);
+ }
+ visitMethod(footerEditor, templateFile, false);
+ } catch (Exception e) {
+ Activator.getDefault().log(e);
+ }
+ } else {
+ try {
+ templateFile.create(new ByteArrayInputStream(new byte[0]), true, null);
+ } catch (CoreException e) {
+ Activator.getDefault().log(e);
+ }
+ refreshPublicTemplateEditor(pattern, templateFile, editor);
+ }
+ }
+
+ private static void visitMethod(JetTextEditor currentEditor, IFile templateFile, boolean seprator) throws CoreException {
+ if (currentEditor == null) {
+ return;
+ }
+ if (currentEditor != null) {
+ InputStream inputStreamOfEditor = getInputStreamOfEditor(currentEditor);
+ if (inputStreamOfEditor == null) {
+ return;
+ }
+ templateFile.appendContents(inputStreamOfEditor, false, false, null);
+ if (seprator) {
+ templateFile.appendContents(new StringBufferInputStream("\n"), true, false, null);
+ }
+ }
+ }
+
+ /**
+ * add by PanPan.Liu
+ * mapping errors from TemplateEditor to sub editors.
+ */
+ public static void mappingErrorFromTemplateEditor(JetTextEditor editor) {
+ MultiPageEditorPart multiPageEditorPart = getMultiPageEditorPart(editor);
+ if (multiPageEditorPart == null)
+ return;
+ JetTemplateEditor jetTemplateEditor = (JetTemplateEditor) multiPageEditorPart;
+ IEditorPart templateEditorPart = jetTemplateEditor.getTemplateFileEditorPart();
+ Pattern pattern = editor.getPattern();
+ Map<String, TextEditor> editors = ((JetTemplateEditor) multiPageEditorPart).getEditorMap();
+ if (!(templateEditorPart instanceof TextEditor)) {
+ return;
+ }
+ JETTextEditor fEditor = (JETTextEditor) templateEditorPart;
+ IDocumentProvider fDocumentProvider = fEditor.getDocumentProvider();
+ if (fDocumentProvider == null) {
+ IFile templateFile = jetTemplateEditor.getTemplateFile();
+ WorkbenchPage templateActivePage = jetTemplateEditor.getTemplateActivePage();
+ try {
+ if (templateActivePage == null || templateFile == null) {
+ return;
+ }
+ fEditor = (JETTextEditor) IDE.openEditor(templateActivePage, templateFile, false);
+ templateActivePage.setEditorAreaVisible(false);
+ } catch (Exception e) {
+ Activator.getDefault().log(e);
+ }
+ fDocumentProvider = fEditor.getDocumentProvider();
+ }
+ if (fEditor == null) {
+ return;
+ }
+ IDocument fDocument = fDocumentProvider.getDocument(fEditor.getEditorInput());
+ if (fDocument == null) {
+ return;
+ }
+
+ Map<String, Position> mappings = getMappings(pattern, editors);
+ if (mappings == null || mappings.size() == 0) {
+ return;
+ }
+ List<Problem> javaContentProblems = JETEditorHelper.evaluateProblems(fEditor, fDocument);
+ JETCompilationUnit cUnit = fEditor.requestCompilationUnit();
+ List<Problem> cUnitProblems = cUnit.getProblems();
+ javaContentProblems.addAll(cUnitProblems);
+
+ EList<PatternParameter> allParameters = editor.getPattern().getAllParameters();
+ EList<PatternVariable> allVariables = editor.getPattern().getAllVariables();
+
+ javaContentProblems = clearProblemsForParameterAndVariable(allParameters, javaContentProblems);
+ javaContentProblems = clearProblemsForParameterAndVariable(allVariables, javaContentProblems);
+
+ for (String id : editors.keySet()) {
+ JetTextEditor textEditor = (JetTextEditor) editors.get(id);
+ List<Problem> problems = javaContentProblems;
+ Position position = mappings.get(id);
+ if (position == null) {
+ continue;
+ }
+ int startOffset = position.offset;
+ int endOffset = position.offset + position.length - 1;
+
+ if (problems == null || problems.size() == 0) {
+ continue;
+ }
+
+ IDocumentProvider documentProvider = textEditor.getDocumentProvider();
+ IAnnotationModel annotationModel = documentProvider.getAnnotationModel(textEditor.getEditorInput());
+ JETAnnotationModel jetAnnotationModel = (JETAnnotationModel) annotationModel;
+ if (jetAnnotationModel != null) {
+ jetAnnotationModel.setFireChanges(false);
+ for (Iterator it = jetAnnotationModel.getAnnotationIterator(); it.hasNext();) {
+ Annotation annotation = (Annotation) it.next();
+ if ((annotation instanceof JETProblemAnnotation) || (annotation instanceof MarkerAnnotation))
+ jetAnnotationModel.removeAnnotation(annotation);
+ }
+
+ Iterator<Problem> iterator = problems.iterator();
+ while (iterator.hasNext()) {
+ Problem problem = iterator.next();
+ JETProblemAnnotation annotation = new JETProblemAnnotation(problem);
+ Position posi = createPositionFromProblem(problem);
+ if (posi == null) {
+ continue;
+ }
+ int offset = posi.offset;
+ if (startOffset == 0 && offset == -1) {
+ jetAnnotationModel.addAnnotation(annotation, posi);
+ }
+ if (offset >= startOffset && offset <= endOffset) {
+ posi.setOffset(offset - startOffset);
+ jetAnnotationModel.addAnnotation(annotation, posi);
+ }
+ }
+ jetAnnotationModel.setFireChanges(true);
+ jetAnnotationModel.fireAnnotationModelChanged();
+ }
+ }
+ }
+
+ public static List<Problem> clearProblemsForParameterAndVariable(EList filters, List<Problem> problems) {
+ if (filters == null || filters.size() == 0) {
+ return problems;
+ }
+ Iterator iterator = filters.iterator();
+ List<Problem> newProblems = new ArrayList<Problem>();
+ while (iterator.hasNext()) {
+ Object next = iterator.next();
+ String filter = "";
+ if (next instanceof PatternParameter) {
+ filter = ((PatternParameter) next).getName();
+ } else if (next instanceof PatternVariable) {
+ filter = ((PatternVariable) next).getName();
+ }
+ filter = filter + " cannot be resolved";
+ for (Problem problem : problems) {
+ if (!problem.getMessage().equals(filter)) {
+ newProblems.add(problem);
+ }
+ }
+ }
+ return newProblems;
+ }
+
+ public static Position createPositionFromProblem(Problem problem) {
+ int start = problem.getStart();
+ int end = problem.getEnd();
+
+ if (end == 0 && start == 0)
+ return new Position(0, 0);
+
+ int length = end - start + 1;
+ if (length < 0)
+ return null;
+
+ return new Position(start, length);
+ }
+
+ /**
+ * Get the new offset which mapping from the template file to method file.
+ *
+ * @param editors
+ */
+ public static Map<String, Position> getMappings(Pattern pattern, Map<String, TextEditor> editors) {
+ EList<PatternMethod> methods = pattern.getMethods();
+ Map<String, Position> mappings = new HashMap<String, Position>();
+ int startOffset = 0;
+ for (PatternMethod method : methods) {
+ String id = method.getID();
+ TextEditor textEditor = editors.get(id);
+ if (textEditor == null) {
+ continue;
+ }
+ ISourceViewer viewer = ((JetTextEditor) textEditor).getViewer();
+ if (viewer == null || viewer.getDocument() == null) {
+ return null;
+ }
+ int length = viewer.getDocument().getLength();
+ mappings.put(id, new Position(startOffset, length));
+ startOffset = startOffset + length + 1;
+ }
+ return mappings;
+ }
+
+ /**
+ * add by PanPan.Liu
+ * do the refresh sync. job
+ */
+ public static void refreshPublicTemplateEditor(JetTextEditor editor) {
+ MultiPageEditorPart multiPageEditorPart = getMultiPageEditorPart(editor);
+ if (multiPageEditorPart == null)
+ return;
+ IEditorPart templateEditorPart = ((JetTemplateEditor) multiPageEditorPart).getTemplateFileEditorPart();
+ Pattern pattern = editor.getPattern();
+ if(templateEditorPart == null)
+ return;
+ IEditorInput editorInput = templateEditorPart.getEditorInput();
+ if (editorInput instanceof IFileEditorInput) {
+ IFile templateFile = ((IFileEditorInput) editorInput).getFile();
+ refreshPublicTemplateEditor(pattern, templateFile, editor);
+ }
+ }
+
+ public static MultiPageEditorPart getMultiPageEditorPart(TextEditor editor) {
+ IWorkbenchPartSite site = editor.getSite();
+ if (site instanceof MultiPageEditorSite) {
+ return ((MultiPageEditorSite) site).getMultiPageEditor();
+ }
+ return null;
+ }
+
+ /**
+ * Get the inputStream of the editor.
+ */
+ public static InputStream getInputStreamOfEditor(JetTextEditor editor) {
+ ISourceViewer viewer = ((JetTextEditor) editor).getViewer();
+ if (viewer == null) {
+ return null;
+ }
+ IDocument document = viewer.getDocument();
+ return new ByteArrayInputStream(document.get().getBytes());
+ }
+
+ public static ICompletionProposal[] getAssistResult(ICompletionProposal[] proposals, List<ICompletionProposal> proposalsAdd) {
+ ICompletionProposal[] result = new ICompletionProposal[proposalsAdd.size() + proposals.length];
+
+ if (proposalsAdd.size() > 0) {
+ for (int i = 0; i < proposalsAdd.size(); i++) {
+ result[i] = proposalsAdd.get(i);
+ }
+ }
+ if (proposals.length > 0) {
+ for (int i = 0; i < proposals.length; i++) {
+ result[i + proposalsAdd.size()] = proposals[i];
+ }
+ }
+ return result;
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/editor/JetReconcilingStrategy.java b/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/editor/JetReconcilingStrategy.java
new file mode 100644
index 0000000..bb9e60a
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/editor/JetReconcilingStrategy.java
@@ -0,0 +1,156 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.jet.editor;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.model.pattern.PatternParameter;
+import org.eclipse.egf.model.pattern.PatternVariable;
+import org.eclipse.egf.pattern.ui.jet.template.JetTemplateEditor;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jet.core.parser.ast.JETCompilationUnit;
+import org.eclipse.jet.core.parser.ast.Problem;
+import org.eclipse.jet.internal.editor.JETEditorHelper;
+import org.eclipse.jet.internal.editor.JETTextEditor;
+import org.eclipse.jet.internal.editor.annotations.JETProblemAnnotation;
+import org.eclipse.jet.internal.editor.configuration.JETReconcilingStrategy;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.reconciler.DirtyRegion;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.texteditor.MarkerAnnotation;
+
+/**
+ * @author Yahong Song - Soyatec
+ *
+ */
+public class JetReconcilingStrategy extends JETReconcilingStrategy {
+ private JETTextEditor jetEditor;
+
+ private ISourceViewer sourceViewer;
+
+ /**
+ * Main constructor
+ *
+ * @param sourceViewer
+ * @param jetEditor
+ */
+ public JetReconcilingStrategy(ISourceViewer sourceViewer, JETTextEditor jetEditor) {
+ super(sourceViewer, jetEditor);
+ this.jetEditor = jetEditor;
+ this.sourceViewer = sourceViewer;
+ }
+
+ /**
+ * This is the single method that performs the annotation model problems
+ * evaluations and update
+ */
+ private void internalReconcile() {
+ JetTextEditor jetTextEditor = null;
+ JETCompilationUnit cUnit = jetEditor.requestCompilationUnit();
+ List<Problem> cUnitProblems = cUnit.getProblems();
+ IEditorInput editorInput = jetEditor.getEditorInput();
+ String name = editorInput.getName();
+ Map<String, List<Problem>> methodProblems = JetTemplateEditor.getMethodProblems();
+ List<Problem> javaContentProblems = new ArrayList<Problem>();
+ if (methodProblems != null && !methodProblems.isEmpty()) {
+ if (methodProblems.containsKey(name))
+ javaContentProblems = methodProblems.get(name);
+ }
+ List<Problem> evaluateProblems = JETEditorHelper.evaluateProblems(jetEditor, sourceViewer.getDocument());
+ Iterator<Problem> iter = evaluateProblems.iterator();
+ while (iter.hasNext()) {
+ Problem next = iter.next();
+ if (!javaContentProblems.contains(next)) {
+ javaContentProblems.add(next);
+ }
+ }
+
+ if (jetEditor instanceof JetTextEditor) {
+ jetTextEditor = (JetTextEditor) jetEditor;
+ }
+
+ EList<PatternParameter> allParameters = jetTextEditor.getPattern().getAllParameters();
+ EList<PatternVariable> allVariables = jetTextEditor.getPattern().getAllVariables();
+
+ javaContentProblems = JetEditorHelper.clearProblemsForParameterAndVariable(allParameters, javaContentProblems);
+ javaContentProblems = JetEditorHelper.clearProblemsForParameterAndVariable(allVariables, javaContentProblems);
+
+ IAnnotationModel annotationModelq = sourceViewer.getAnnotationModel();
+ JETAnnotationModel annotationModel = (JETAnnotationModel) annotationModelq;
+ if (annotationModel != null) {
+ // avoid changes to the annotation model to be notified to the
+ // viewers until the job is done
+ annotationModel.setFireChanges(false);
+
+ // Remove all the previous annotations related to JET problems
+ // and related to resource markers
+ for (Iterator it = annotationModel.getAnnotationIterator(); it.hasNext();) {
+ Annotation annotation = (Annotation) it.next();
+ if ((annotation instanceof JETProblemAnnotation) || (annotation instanceof MarkerAnnotation))
+ annotationModel.removeAnnotation(annotation);
+ }
+
+ // Problems for JET document structure
+ for (Iterator iterator = cUnitProblems.iterator(); iterator.hasNext();) {
+ Problem problem = (Problem) iterator.next();
+ JETProblemAnnotation annotation = new JETProblemAnnotation(problem);
+ Position position = new Position(problem.getStart(), problem.getEnd() - problem.getStart());
+ annotationModel.addAnnotation(annotation, position);
+ }
+
+ // Problems in java contents of the JET document
+ for (Iterator iterator = javaContentProblems.iterator(); iterator.hasNext();) {
+ Problem problem = (Problem) iterator.next();
+ JETProblemAnnotation annotation = new JETProblemAnnotation(problem);
+ Position position = new Position(problem.getStart(), problem.getEnd() - problem.getStart());
+ annotationModel.addAnnotation(annotation, position);
+ }
+
+ annotationModel.setFireChanges(true);
+ annotationModel.fireAnnotationModelChanged();
+ }
+ }
+
+ public void setDocument(IDocument idocument) {
+ }
+
+ public void initialReconcile() {
+ internalReconcile();
+ }
+
+ public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
+ internalReconcile();
+ }
+
+ public void reconcile(IRegion partition) {
+ JetTextEditor jetTextEditor = (JetTextEditor) jetEditor;
+ JetEditorHelper.refreshPublicTemplateEditor(jetTextEditor);
+ JetEditorHelper.mappingErrorFromTemplateEditor(jetTextEditor);
+ }
+
+ public void setProgressMonitor(IProgressMonitor iprogressmonitor) {
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/editor/JetSourceViewerConfigure.java b/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/editor/JetSourceViewerConfigure.java
new file mode 100644
index 0000000..aa86f41
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/editor/JetSourceViewerConfigure.java
@@ -0,0 +1,79 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.jet.editor;
+
+import org.eclipse.egf.pattern.ui.jet.editor.contentassist.JetJavaExpressionAssistProcessor;
+import org.eclipse.egf.pattern.ui.jet.editor.contentassist.JetJavaScriptletAssistProcessor;
+import org.eclipse.jet.internal.editor.JETTextEditor;
+import org.eclipse.jet.internal.editor.configuration.JETSourceViewerConfiguration;
+import org.eclipse.jet.internal.editor.contentassist.JETJavaExpressionAssistProcessor;
+import org.eclipse.jet.internal.editor.contentassist.JETJavaScriptletAssistProcessor;
+import org.eclipse.jface.text.contentassist.ContentAssistant;
+import org.eclipse.jface.text.contentassist.IContentAssistant;
+import org.eclipse.jface.text.reconciler.IReconciler;
+import org.eclipse.jface.text.source.ISourceViewer;
+
+/**
+ * @author Yahong Song - Soyatec
+ *
+ */
+public class JetSourceViewerConfigure extends JETSourceViewerConfiguration {
+ private JETTextEditor editor;
+
+ public JetSourceViewerConfigure(JETTextEditor editor) {
+ super(editor);
+ this.editor = editor;
+ }
+
+ public IReconciler getReconciler(ISourceViewer sourceViewer) {
+ // Disable the reconciler since it introduces some problems
+ return null;
+
+ // JETReconcilingStrategy strategy = new
+ // JetReconcilingStrategy(sourceViewer, editor);
+ // MonoReconciler reconciler = new MonoReconciler(strategy, false);
+ // reconciler.setProgressMonitor(new NullProgressMonitor());
+ // reconciler.setDelay(500);
+ // return reconciler;
+
+ }
+
+ public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
+ ContentAssistant assistant = new ContentAssistant();
+ assistant.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
+ String configuredContentTypes[] = getConfiguredContentTypes(sourceViewer);
+ for (int i = 0; i < configuredContentTypes.length; i++) {
+ String contentType = configuredContentTypes[i];
+ org.eclipse.jface.text.contentassist.IContentAssistProcessor processor = editor.getPartitionScanner().getCompletionProcessor(contentType, assistant);
+ if (processor != null)
+ if (processor instanceof JETJavaScriptletAssistProcessor) {
+ JetJavaScriptletAssistProcessor jetJavaScriptletAssistProcessor = new JetJavaScriptletAssistProcessor((JetTextEditor) editor);
+ assistant.setContentAssistProcessor(jetJavaScriptletAssistProcessor, contentType);
+ } else if (processor instanceof JETJavaExpressionAssistProcessor) {
+ JetJavaExpressionAssistProcessor jetJavaExpressionAssistProcessor = new JetJavaExpressionAssistProcessor((JetTextEditor) editor);
+ assistant.setContentAssistProcessor(jetJavaExpressionAssistProcessor, contentType);
+ } else {
+ assistant.setContentAssistProcessor(processor, contentType);
+ }
+ }
+
+ assistant.setContextInformationPopupOrientation(20);
+ assistant.setInformationControlCreator(getInformationControlCreator(sourceViewer));
+ assistant.enableAutoInsert(false);
+ assistant.enableAutoActivation(true);
+ return assistant;
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/editor/JetTextEditor.java b/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/editor/JetTextEditor.java
new file mode 100644
index 0000000..94c31ba
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/editor/JetTextEditor.java
@@ -0,0 +1,147 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.jet.editor;
+
+import java.io.IOException;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.pattern.ui.editors.templateEditor.MethodEditorActivationListener;
+import org.eclipse.jet.internal.editor.JETTextEditor;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IPartService;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.editors.text.TextEditor;
+
+/**
+ * @author Yahong Song - Soyatec
+ *
+ */
+public class JetTextEditor extends JETTextEditor {
+
+ private RefreshUIJob job;
+
+ private Pattern pattern;
+
+ private ActivationListener fActivationListener;
+
+ public JetTextEditor(Pattern pattern) throws CoreException, IOException {
+ super();
+ this.pattern = pattern;
+ setSourceViewerConfiguration(new JetSourceViewerConfigure(this));
+ setDocumentProvider(new JetDocumentProvider(this));
+ }
+
+ @Override
+ public void init(IEditorSite site, IEditorInput input) throws PartInitException {
+
+ super.init(site, input);
+ fActivationListener = new ActivationListener(site.getWorkbenchWindow().getPartService(), this);
+ }
+
+ public Pattern getPattern() {
+ return pattern;
+ }
+
+ /**
+ * @return the source viewer used by this editor
+ */
+ public final ISourceViewer getViewer() {
+ return getSourceViewer();
+ }
+
+ @Override
+ public void createPartControl(Composite parent) {
+ super.createPartControl(parent);
+ // StyledText textWidget = getSourceViewer().getTextWidget();
+ // textWidget.addModifyListener((ModifyListener) new
+ // JetModifyListener());
+ }
+
+ class JetModifyListener implements ModifyListener {
+ public void modifyText(ModifyEvent e) {
+ if (job == null) {
+ job = new RefreshUIJob("RefreshTemplateEditor");
+ }
+ job.start();
+ }
+ }
+
+ class RefreshUIJob extends Job {
+
+ private long timestamp = -1;
+
+ private boolean lazy = false;
+
+ public RefreshUIJob(String name) {
+ super(name);
+ }
+
+ private void start() {
+ if (!lazy) {
+ schedule(1000);
+ } else if (System.currentTimeMillis() - timestamp > 999 && !lazy) {
+ lazy = true;
+ }
+ timestamp = System.currentTimeMillis();
+ }
+
+ protected IStatus run(IProgressMonitor monitor) {
+ JetEditorHelper.refreshPublicTemplateEditor(JetTextEditor.this);
+ if (lazy) {
+ schedule();
+ lazy = false;
+ }
+ return Status.OK_STATUS;
+ }
+ }
+
+ public RefreshUIJob getJob() {
+ return job;
+ }
+
+ @Override
+ public void dispose() {
+ if (fActivationListener != null) {
+ fActivationListener.dispose();
+ fActivationListener = null;
+ }
+ super.dispose();
+ }
+
+ class ActivationListener extends MethodEditorActivationListener {
+
+ public ActivationListener(IPartService partService, TextEditor editor) {
+ super(partService, editor);
+
+ }
+
+ @Override
+ protected void handleActivation() {
+ safelySanityCheckState(getEditorInput());
+ }
+
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/editor/contentassist/JetJavaExpressionAssistProcessor.java b/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/editor/contentassist/JetJavaExpressionAssistProcessor.java
new file mode 100644
index 0000000..c0c6e42
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/editor/contentassist/JetJavaExpressionAssistProcessor.java
@@ -0,0 +1,50 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.jet.editor.contentassist;
+
+import java.util.List;
+
+import org.eclipse.egf.pattern.ui.editors.templateEditor.TemplateEditorUtility;
+import org.eclipse.egf.pattern.ui.jet.editor.JetEditorHelper;
+import org.eclipse.egf.pattern.ui.jet.editor.JetTextEditor;
+import org.eclipse.jet.internal.editor.contentassist.JETJavaExpressionAssistProcessor;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class JetJavaExpressionAssistProcessor extends JETJavaExpressionAssistProcessor {
+
+ private JetTextEditor editor;
+
+ public JetJavaExpressionAssistProcessor(JetTextEditor editor) {
+ super(editor);
+ this.editor = editor;
+ }
+
+ public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
+
+ ICompletionProposal[] computeCompletionProposals = TemplateEditorUtility.filterJavaMethodProposals(super.computeCompletionProposals(viewer, offset));
+
+ JetParameterVariableAssistUtility utility = new JetParameterVariableAssistUtility(editor, viewer, offset);
+ List<ICompletionProposal> proposals = utility.getParameterVariableAssist();
+
+ return JetEditorHelper.getAssistResult(computeCompletionProposals, proposals);
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/editor/contentassist/JetJavaScriptletAssistProcessor.java b/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/editor/contentassist/JetJavaScriptletAssistProcessor.java
new file mode 100644
index 0000000..34a7f9e
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/editor/contentassist/JetJavaScriptletAssistProcessor.java
@@ -0,0 +1,50 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.jet.editor.contentassist;
+
+import java.util.List;
+
+import org.eclipse.egf.pattern.ui.editors.templateEditor.TemplateEditorUtility;
+import org.eclipse.egf.pattern.ui.jet.editor.JetEditorHelper;
+import org.eclipse.egf.pattern.ui.jet.editor.JetTextEditor;
+import org.eclipse.jet.internal.editor.contentassist.JETJavaScriptletAssistProcessor;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class JetJavaScriptletAssistProcessor extends JETJavaScriptletAssistProcessor {
+
+ private JetTextEditor editor;
+
+ public JetJavaScriptletAssistProcessor(JetTextEditor editor) {
+ super(editor);
+ this.editor = editor;
+ }
+
+ public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
+
+ ICompletionProposal[] computeCompletionProposals = TemplateEditorUtility.filterJavaMethodProposals(super.computeCompletionProposals(viewer, offset));
+
+ JetParameterVariableAssistUtility utility = new JetParameterVariableAssistUtility(editor, viewer, offset);
+ List<ICompletionProposal> proposals = utility.getParameterVariableAssist();
+
+ return JetEditorHelper.getAssistResult(computeCompletionProposals, proposals);
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/editor/contentassist/JetParameterVariableAssistUtility.java b/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/editor/contentassist/JetParameterVariableAssistUtility.java
new file mode 100644
index 0000000..1d223b7
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/editor/contentassist/JetParameterVariableAssistUtility.java
@@ -0,0 +1,68 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.jet.editor.contentassist;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.pattern.ui.editors.templateEditor.computer.PatternParameterProposalComputer;
+import org.eclipse.egf.pattern.ui.editors.templateEditor.computer.PatternVariableProposalComputer;
+import org.eclipse.egf.pattern.ui.jet.editor.JetTextEditor;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class JetParameterVariableAssistUtility {
+
+ private JetTextEditor editor;
+ private ITextViewer viewer;
+ private int offset;
+
+ public JetParameterVariableAssistUtility(JetTextEditor editor, ITextViewer viewer, int offset) {
+ this.editor = editor;
+ this.viewer = viewer;
+ this.offset = offset;
+ }
+
+ public List<ICompletionProposal> getParameterVariableAssist() {
+ List<ICompletionProposal> proposals = new ArrayList<ICompletionProposal>();
+
+ Pattern pattern = editor.getPattern();
+ // Get the pattern parameter proposals.
+ PatternParameterProposalComputer parameterProposalComputer = new PatternParameterProposalComputer(viewer, offset, pattern);
+ addProposal(proposals, parameterProposalComputer.computeProposal());
+
+ // Get the pattern variable proposals.
+ PatternVariableProposalComputer variableProposalComputer = new PatternVariableProposalComputer(viewer, offset, pattern);
+ addProposal(proposals, variableProposalComputer.computeProposal());
+
+ return proposals;
+ }
+
+ /**
+ * Add the find new proposals in to proposals.
+ */
+ private void addProposal(List proposals, List newProposals) {
+ if (newProposals != null && newProposals.size() != 0) {
+ proposals.addAll(newProposals);
+ }
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/template/JetTemplateEditor.java b/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/template/JetTemplateEditor.java
new file mode 100644
index 0000000..5be1eb5
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui.jet/src/org/eclipse/egf/pattern/ui/jet/template/JetTemplateEditor.java
@@ -0,0 +1,197 @@
+package org.eclipse.egf.pattern.ui.jet.template;
+
+import java.io.IOException;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.pattern.ui.editors.templateEditor.AbstractTemplateEditor;
+import org.eclipse.egf.pattern.ui.jet.Activator;
+import org.eclipse.egf.pattern.ui.jet.editor.JetTextEditor;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jet.core.parser.ProblemSeverity;
+import org.eclipse.jet.core.parser.ast.Problem;
+import org.eclipse.jet.internal.editor.JETEditorHelper;
+import org.eclipse.jet.internal.editor.JETTextEditor;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.Position;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.editors.text.TextEditor;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class JetTemplateEditor extends AbstractTemplateEditor {
+
+ private String TEMPLATE_FILE_EXTENTION = ".jet";
+
+ private List<Problem> problems = new ArrayList<Problem>();
+
+ private Map<String, List<Problem>> methodProblems = new HashMap<String, List<Problem>>();
+
+ private IFile templateFile;
+
+ private static Map<String, List<Problem>> METHODPROBLEMS = new HashMap<String, List<Problem>>();
+
+ protected void createPages() {
+ Pattern pattern = getPattern();
+ addPatternChangeAdapter(pattern);
+ EList<PatternMethod> methods = pattern.getMethods();
+ try {
+ templateFile = setPublicTemplateEditor(pattern, methods, TEMPLATE_FILE_EXTENTION);
+ } catch (Exception e) {
+ Activator.getDefault().log(e);
+ }
+ initProblems();
+ divideByMethods();
+ for (int i = 0; i < methods.size(); i++) {
+ createPage(methods.get(i));
+ }
+ String patternName = pattern.getName();
+ setTitle(patternName);
+ }
+
+ void createPage(PatternMethod method) {
+ try {
+ JetTextEditor editor = new JetTextEditor(getPattern());
+ addEditor(editor, method);
+ } catch (Exception e) {
+ Activator.getDefault().logError(e);
+ }
+ }
+
+ protected void initProblems() {
+ IEditorPart editorPart = openEditor;
+ JETTextEditor jetTextEditor = (JETTextEditor) editorPart;
+ if (jetTextEditor == null) {
+ return;
+ }
+ IDocumentProvider documentProvider = jetTextEditor.getDocumentProvider();
+ IEditorInput editorInput = jetTextEditor.getEditorInput();
+ if (documentProvider == null || editorInput == null) {
+ return;
+ }
+ IDocument document = documentProvider.getDocument(editorInput);
+ List javaContentProblems = JETEditorHelper.evaluateProblems(jetTextEditor, document);
+ problems.addAll(javaContentProblems);
+ }
+
+ protected void divideByMethods() {
+ methodProblems.clear();
+ METHODPROBLEMS.clear();
+ for (String key : startPositions.keySet()) {
+ Position position = startPositions.get(key);
+ List<Problem> methodproblems = new LinkedList<Problem>();
+ int startOffset = position.offset;
+ int endOffset = position.offset + position.length;
+ Iterator<Problem> iterator = problems.iterator();
+ while (iterator.hasNext()) {
+ Problem problem = iterator.next();
+ int offset = problem.getStart();
+ if (startOffset == 0 && offset == -1) {
+ methodproblems.add(problem);
+ }
+ if (offset >= startOffset && offset <= endOffset) {
+ problem = translateOffsetForProblem(problem, offset - startOffset);
+ methodproblems.add(problem);
+ }
+ }
+ methodProblems.put(key, methodproblems);
+ }
+ METHODPROBLEMS = methodProblems;
+ }
+
+ private Problem translateOffsetForProblem(Problem problem, int newStart) {
+ int colOffset = problem.getColOffset();
+ int end = problem.getEnd();
+ int id = problem.getId();
+ int lineNumber = problem.getLineNumber();
+ String message = problem.getMessage();
+ Object[] messageArgs = problem.getMessageArgs();
+ ProblemSeverity problemSeverity = problem.getProblemSeverity();
+ if (templateFile == null) {
+ return null;
+ }
+ URI locationURI = templateFile.getProject().getLocationURI();
+ String string = templateFile.getProjectRelativePath().toString();
+ Problem newProblem = new Problem(locationURI, string, problemSeverity, id, message, messageArgs, newStart, end, lineNumber, colOffset);
+ return newProblem;
+ }
+
+ public static Map<String, List<Problem>> getMethodProblems() {
+ return METHODPROBLEMS;
+ }
+
+ public IEditorPart getTemplateFileEditorPart() {
+ return openEditor;
+ }
+
+ public IFile getTemplateFile() {
+ return templateFile;
+ }
+
+ @Override
+ public void setFocus() {
+ super.setFocus();
+ // JetEditorHelper.mappingErrorFromTemplateEditor((JetTextEditor)
+ // this.getActiveEditor());
+ }
+
+ @Override
+ public void setActivePage(String methodId) {
+ if (methodId != null && !"".equals(methodId)) {
+ JetTextEditor javaTextEditor = (JetTextEditor) editorMap.get(methodId);
+ if (javaTextEditor != null) {
+ this.setActiveEditor(javaTextEditor);
+ }
+ }
+ }
+
+ @Override
+ protected void executeMethodEditorAdd(PatternMethod addMethod) {
+ try {
+ if (addMethod.getID() == null)
+ return;
+ // Add the pattern file path to method in order to create add
+ // editor's input file.
+ setPatternFilePath(addMethod);
+ JetTextEditor newEditor = new JetTextEditor(getPattern());
+ addEditor(newEditor, addMethod);
+ super.executeMethodEditorAdd(addMethod);
+ } catch (CoreException e) {
+ Activator.getDefault().logError(e);
+ } catch (IOException e) {
+ Activator.getDefault().logError(e);
+ }
+ }
+
+ protected TextEditor createNewEditor() {
+ JetTextEditor newEditor;
+ try {
+ newEditor = new JetTextEditor(getPattern());
+ return newEditor;
+ } catch (CoreException e) {
+ Activator.getDefault().logError(e);
+ } catch (IOException e) {
+ Activator.getDefault().logError(e);
+ }
+ return null;
+ }
+
+ @Override
+ protected String getDelegateEditorID() {
+
+ return "org.eclipse.jet.editor.JETEditor";
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/.classpath b/org.eclipse.egf.pattern.ui/.classpath
new file mode 100644
index 0000000..64c5e31
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.egf.pattern.ui/.project b/org.eclipse.egf.pattern.ui/.project
new file mode 100644
index 0000000..c8b48b0
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.pattern.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.pattern.ui/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egf.pattern.ui/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..e8eeda5
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:54:17 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.egf.pattern.ui/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egf.pattern.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..5b3639b
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Mon Feb 15 16:06:53 CET 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/org.eclipse.egf.pattern.ui/META-INF/MANIFEST.MF b/org.eclipse.egf.pattern.ui/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..28fc279
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,41 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.pattern.ui;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.egf.pattern.ui.Activator
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle:
+ org.eclipse.core.runtime,
+ org.eclipse.ui,
+ org.eclipse.ui.ide,
+ org.eclipse.egf.common.ui,
+ org.eclipse.egf.core.pde,
+ org.eclipse.egf.pattern;visibility:=reexport,
+ org.eclipse.ui.editors,
+ org.eclipse.ui.forms,
+ org.eclipse.emf.edit,
+ org.eclipse.emf.edit.ui,
+ org.eclipse.emf.workspace,
+ org.eclipse.emf.workspace.ui,
+ org.eclipse.emf.databinding,
+ org.eclipse.emf.databinding.edit,
+ org.eclipse.core.databinding.beans,
+ org.eclipse.core.databinding.property,
+ org.eclipse.jface.databinding,
+ org.eclipse.jdt.ui,
+ org.eclipse.emf.ecore.edit,
+ org.eclipse.emf.ecore.editor,
+ org.eclipse.egf.core.ui,
+ org.eclipse.jface.text,
+ org.eclipse.search,
+ org.eclipse.pde.ui,
+ org.eclipse.egf.model.edit
+Bundle-ActivationPolicy: lazy
+Export-Package:
+ org.eclipse.egf.pattern.ui.editors,
+ org.eclipse.egf.pattern.ui.editors.templateEditor,
+ org.eclipse.egf.pattern.ui.editors.templateEditor.computer
diff --git a/org.eclipse.egf.pattern.ui/about.html b/org.eclipse.egf.pattern.ui/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/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/org.eclipse.egf.pattern.ui/build.properties b/org.eclipse.egf.pattern.ui/build.properties
new file mode 100644
index 0000000..91f371d
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/build.properties
@@ -0,0 +1,20 @@
+##
+# 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
+##
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ schema/,\
+ icons/,\
+ about.html,\
+ plugin.xml,\
+ plugin.properties
+src.includes = about.html
diff --git a/org.eclipse.egf.pattern.ui/icons/add.gif b/org.eclipse.egf.pattern.ui/icons/add.gif
new file mode 100644
index 0000000..252d7eb
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/icons/add.gif
Binary files differ
diff --git a/org.eclipse.egf.pattern.ui/icons/category_obj.gif b/org.eclipse.egf.pattern.ui/icons/category_obj.gif
new file mode 100644
index 0000000..662f24f
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/icons/category_obj.gif
Binary files differ
diff --git a/org.eclipse.egf.pattern.ui/icons/class_obj.gif b/org.eclipse.egf.pattern.ui/icons/class_obj.gif
new file mode 100644
index 0000000..e4c2a83
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/icons/class_obj.gif
Binary files differ
diff --git a/org.eclipse.egf.pattern.ui/icons/delete.gif b/org.eclipse.egf.pattern.ui/icons/delete.gif
new file mode 100644
index 0000000..b6922ac
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/icons/delete.gif
Binary files differ
diff --git a/org.eclipse.egf.pattern.ui/icons/downward.gif b/org.eclipse.egf.pattern.ui/icons/downward.gif
new file mode 100644
index 0000000..51f3757
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/icons/downward.gif
Binary files differ
diff --git a/org.eclipse.egf.pattern.ui/icons/edit.gif b/org.eclipse.egf.pattern.ui/icons/edit.gif
new file mode 100644
index 0000000..e8de662
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/icons/edit.gif
Binary files differ
diff --git a/org.eclipse.egf.pattern.ui/icons/help.gif b/org.eclipse.egf.pattern.ui/icons/help.gif
new file mode 100644
index 0000000..9d70301
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/icons/help.gif
Binary files differ
diff --git a/org.eclipse.egf.pattern.ui/icons/innerclass_default_obj.gif b/org.eclipse.egf.pattern.ui/icons/innerclass_default_obj.gif
new file mode 100644
index 0000000..4244a7f
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/icons/innerclass_default_obj.gif
Binary files differ
diff --git a/org.eclipse.egf.pattern.ui/icons/innerclass_public_obj.gif b/org.eclipse.egf.pattern.ui/icons/innerclass_public_obj.gif
new file mode 100644
index 0000000..e191e1d
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/icons/innerclass_public_obj.gif
Binary files differ
diff --git a/org.eclipse.egf.pattern.ui/icons/kind_backCall.gif b/org.eclipse.egf.pattern.ui/icons/kind_backCall.gif
new file mode 100644
index 0000000..7689bdb
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/icons/kind_backCall.gif
Binary files differ
diff --git a/org.eclipse.egf.pattern.ui/icons/kind_methodCall.gif b/org.eclipse.egf.pattern.ui/icons/kind_methodCall.gif
new file mode 100644
index 0000000..8bbfd04
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/icons/kind_methodCall.gif
Binary files differ
diff --git a/org.eclipse.egf.pattern.ui/icons/kind_patternCall.gif b/org.eclipse.egf.pattern.ui/icons/kind_patternCall.gif
new file mode 100644
index 0000000..cb55e33
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/icons/kind_patternCall.gif
Binary files differ
diff --git a/org.eclipse.egf.pattern.ui/icons/kind_patternInjectedCall.gif b/org.eclipse.egf.pattern.ui/icons/kind_patternInjectedCall.gif
new file mode 100644
index 0000000..1702c06
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/icons/kind_patternInjectedCall.gif
Binary files differ
diff --git a/org.eclipse.egf.pattern.ui/icons/kind_superPatternCall.gif b/org.eclipse.egf.pattern.ui/icons/kind_superPatternCall.gif
new file mode 100644
index 0000000..6cb185c
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/icons/kind_superPatternCall.gif
Binary files differ
diff --git a/org.eclipse.egf.pattern.ui/icons/localvariable_obj.gif b/org.eclipse.egf.pattern.ui/icons/localvariable_obj.gif
new file mode 100644
index 0000000..8adce95
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/icons/localvariable_obj.gif
Binary files differ
diff --git a/org.eclipse.egf.pattern.ui/icons/method.gif b/org.eclipse.egf.pattern.ui/icons/method.gif
new file mode 100644
index 0000000..835d945
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/icons/method.gif
Binary files differ
diff --git a/org.eclipse.egf.pattern.ui/icons/method_content_edit.gif b/org.eclipse.egf.pattern.ui/icons/method_content_edit.gif
new file mode 100644
index 0000000..9312d7e
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/icons/method_content_edit.gif
Binary files differ
diff --git a/org.eclipse.egf.pattern.ui/icons/method_override.png b/org.eclipse.egf.pattern.ui/icons/method_override.png
new file mode 100644
index 0000000..1b944b8
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/icons/method_override.png
Binary files differ
diff --git a/org.eclipse.egf.pattern.ui/icons/methpub_obj.gif b/org.eclipse.egf.pattern.ui/icons/methpub_obj.gif
new file mode 100644
index 0000000..7d24707
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/icons/methpub_obj.gif
Binary files differ
diff --git a/org.eclipse.egf.pattern.ui/icons/over_obj.gif b/org.eclipse.egf.pattern.ui/icons/over_obj.gif
new file mode 100644
index 0000000..938767b
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/icons/over_obj.gif
Binary files differ
diff --git a/org.eclipse.egf.pattern.ui/icons/parameter_obj.gif b/org.eclipse.egf.pattern.ui/icons/parameter_obj.gif
new file mode 100644
index 0000000..da1a166
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/icons/parameter_obj.gif
Binary files differ
diff --git a/org.eclipse.egf.pattern.ui/icons/plugin_mf_obj.gif b/org.eclipse.egf.pattern.ui/icons/plugin_mf_obj.gif
new file mode 100644
index 0000000..eedacd2
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/icons/plugin_mf_obj.gif
Binary files differ
diff --git a/org.eclipse.egf.pattern.ui/icons/query_set.gif b/org.eclipse.egf.pattern.ui/icons/query_set.gif
new file mode 100644
index 0000000..6bd54e3
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/icons/query_set.gif
Binary files differ
diff --git a/org.eclipse.egf.pattern.ui/icons/sample.gif b/org.eclipse.egf.pattern.ui/icons/sample.gif
new file mode 100644
index 0000000..34fb3c9
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/icons/sample.gif
Binary files differ
diff --git a/org.eclipse.egf.pattern.ui/icons/tree_mode.gif b/org.eclipse.egf.pattern.ui/icons/tree_mode.gif
new file mode 100644
index 0000000..e242b7f
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/icons/tree_mode.gif
Binary files differ
diff --git a/org.eclipse.egf.pattern.ui/icons/upward.gif b/org.eclipse.egf.pattern.ui/icons/upward.gif
new file mode 100644
index 0000000..0716475
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/icons/upward.gif
Binary files differ
diff --git a/org.eclipse.egf.pattern.ui/icons/variable.gif b/org.eclipse.egf.pattern.ui/icons/variable.gif
new file mode 100644
index 0000000..1fe064e
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/icons/variable.gif
Binary files differ
diff --git a/org.eclipse.egf.pattern.ui/icons/variable_obj.gif b/org.eclipse.egf.pattern.ui/icons/variable_obj.gif
new file mode 100644
index 0000000..146a903
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/icons/variable_obj.gif
Binary files differ
diff --git a/org.eclipse.egf.pattern.ui/plugin.properties b/org.eclipse.egf.pattern.ui/plugin.properties
new file mode 100644
index 0000000..60bb1ce
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/plugin.properties
@@ -0,0 +1,17 @@
+##
+# 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 Pattern UI (Incubation)
+providerName = Eclipse Modeling Project
+
+EGFPatternBuilder = EGF Pattern Builder
+patternEditorLabel = Pattern Editor
+patternTemplateEditorLabel = Pattern Templates Editor
diff --git a/org.eclipse.egf.pattern.ui/plugin.xml b/org.eclipse.egf.pattern.ui/plugin.xml
new file mode 100644
index 0000000..8e2a139
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/plugin.xml
@@ -0,0 +1,224 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension-point id="templateEditor" name="templateEditor" schema="schema/templateEditor.exsd"/>
+
+ <extension
+ point="org.eclipse.egf.core.ui.editor.menu.contributor">
+ <contribution
+ class="org.eclipse.egf.pattern.ui.contributions.PatternMenuContributor">
+ </contribution>
+ </extension>
+
+ <extension
+ point="org.eclipse.egf.core.ui.editor.listener.contributor">
+ <contribution
+ class="org.eclipse.egf.pattern.ui.contributions.PatternListenerContributor">
+ </contribution>
+ </extension>
+
+ <extension point="org.eclipse.egf.core.ui.editor.property.contributor">
+ <contribution class="org.eclipse.egf.pattern.ui.contributions.PatternPropertyEditorContributor"/>
+ </extension>
+
+
+
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ name="%patternEditorLabel"
+ extensions="fcore"
+ icon="icons/sample.gif"
+ contributorClass="org.eclipse.egf.pattern.ui.editors.PatternEditorContributor"
+ class="org.eclipse.egf.pattern.ui.editors.PatternEditor"
+ id="org.eclipse.egf.pattern.ui.editors.PatternEditor">
+ </editor>
+
+ </extension>
+
+ <extension point="org.eclipse.ui.editors.documentProviders">
+ <provider
+ inputTypes="org.eclipse.egf.pattern.ui.editors.PatternMethodEditorInput"
+ class="org.eclipse.ui.editors.text.FileDocumentProvider"
+ id="org.eclipse.egf.pattern.ui.editors.PatternMethodDocumentProvider">
+ </provider>
+ </extension>
+
+ <extension point="org.eclipse.ui.elementFactories">
+ <factory id="org.eclipse.egf.pattern.ui.pattern.factory.id" class="org.eclipse.egf.pattern.ui.editors.PatternElementFactory" />
+ </extension>
+
+ <extension
+ id="PatternBuilder"
+ point="org.eclipse.core.resources.builders"
+ name="%EGFPatternBuilder">
+ <builder>
+ <run
+ class="org.eclipse.egf.pattern.ui.builder.PatternBuilder">
+ </run>
+ </builder>
+ </extension>
+ <extension
+ point="org.eclipse.emf.validation.constraintProviders">
+ <category
+ id="org.eclipse.egf.model.pattern"
+ name="pattern">
+ </category>
+ <category
+ id="org.eclipse.egf.model.patternParameter"
+ name="patternParameter">
+ </category>
+ <category
+ id="org.eclipse.egf.model.patternVariable"
+ name="patternVariable">
+ </category>
+ <constraintProvider
+ cache="true">
+ <package
+ namespaceUri="http://www.eclipse.org/egf/1.0.0/pattern">
+ </package>
+ <constraints
+ categories="org.eclipse.egf.model.pattern">
+ <constraint
+ class="org.eclipse.egf.pattern.ui.editors.validation.PatternNonEmptyNamesConstraint"
+ id="org.eclipse.egf.pattern.ui.PatternNameNotEmpty"
+ lang="Java"
+ mode="Live"
+ name="PATTERN NON EMPTY NAME"
+ severity="ERROR"
+ statusCode="1">
+ <message>
+ The pattern has been found to have no name.
+ </message>
+ <description>
+ All patterns should have some unique identifier or name.
+ </description>
+ <target
+ class="Pattern">
+ <event
+ name="Set">
+ <feature
+ name="name">
+ </feature>
+ </event>
+ <event
+ name="Unset">
+ <feature
+ name="name">
+ </feature>
+ </event>
+ </target>
+ </constraint>
+ </constraints>
+ <constraints
+ categories="org.eclipse.egf.model.patternParameter">
+ <constraint
+ class="org.eclipse.egf.pattern.ui.editors.validation.ParameterNonEmptyNamesConstraint"
+ id="org.eclipse.egf.pattern.ui.PatternParameterNameNotEmpty"
+ lang="Java"
+ mode="Live"
+ name="PATTERN PARAMETER NON EMPTY NAME"
+ severity="ERROR"
+ statusCode="2">
+ <message>
+ One or more parameters have been found to have no name in this table.
+ </message>
+ <description>
+ All parameters should have some unique identifier or name.
+ </description>
+ <target
+ class="PatternParameter">
+ <event
+ name="Set">
+ <feature
+ name="name">
+ </feature>
+ </event>
+ <event
+ name="Unset">
+ <feature
+ name="name">
+ </feature>
+ </event>
+ </target>
+ </constraint>
+ </constraints>
+ <constraints
+ categories="org.eclipse.egf.model.patternVariable">
+ <constraint
+ class="org.eclipse.egf.pattern.ui.editors.validation.VariableNonEmptyNamesConstraint"
+ id="org.eclipse.egf.pattern.ui.PatternVariableNameNotEmpty"
+ lang="Java"
+ mode="Live"
+ name="PATTERN VARIABLE NON EMPTY NAME"
+ severity="ERROR"
+ statusCode="3">
+ <message>
+ One or more variables have been found to have no name in this table.
+ </message>
+ <description>
+ All variables should have some unique identifier or name.
+ </description>
+ <target
+ class="PatternVariable">
+ <event
+ name="Set">
+ <feature
+ name="name">
+ </feature>
+ </event>
+ <event
+ name="Unset">
+ <feature
+ name="name">
+ </feature>
+ </event>
+ </target>
+ </constraint>
+ </constraints>
+ </constraintProvider>
+ </extension>
+ <extension
+ point="org.eclipse.emf.validation.constraintBindings">
+ <clientContext
+ default="false"
+ id="org.eclipse.egf.pattern.ui.patternContext">
+ <selector
+ class="org.eclipse.egf.pattern.ui.editors.selector.DefaultClientSelector">
+ </selector>
+ </clientContext>
+ <binding
+ category="org.eclipse.egf.model.pattern"
+ constraint="org.eclipse.egf.pattern.ui.PatternNameNotEmpty"
+ context="org.eclipse.egf.pattern.ui.patternContext">
+ </binding>
+ <clientContext
+ default="false"
+ id="org.eclipse.egf.pattern.ui.patternParameterContext">
+ <selector
+ class="org.eclipse.egf.pattern.ui.editors.selector.DefaultClientSelector">
+ </selector>
+ </clientContext>
+ <binding
+ category="org.eclipse.egf.model.patternParameter"
+ constraint="org.eclipse.egf.pattern.ui.PatternParameterNameNotEmpty"
+ context="org.eclipse.egf.pattern.ui.patternParameterContext">
+ </binding>
+ <clientContext
+ default="false"
+ id="org.eclipse.egf.pattern.ui.patternVariableContext">
+ <selector
+ class="org.eclipse.egf.pattern.ui.editors.selector.DefaultClientSelector">
+ </selector>
+ </clientContext>
+ <binding
+ category="org.eclipse.egf.model.patternVariable"
+ constraint="org.eclipse.egf.pattern.ui.PatternVariableNameNotEmpty"
+ context="org.eclipse.egf.pattern.ui.patternVariableContext">
+ </binding>
+ </extension>
+
+
+
+
+</plugin>
diff --git a/org.eclipse.egf.pattern.ui/schema/templateEditor.exsd b/org.eclipse.egf.pattern.ui/schema/templateEditor.exsd
new file mode 100644
index 0000000..86981bd
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/schema/templateEditor.exsd
@@ -0,0 +1,127 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.egf.pattern.ui" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.egf.pattern.ui" id="templateEditor" name="templateEditor"/>
+ </appinfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="editor"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="editor">
+ <complexType>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="identifier" basedOn="org.eclipse.ui.editors/editor/@id"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="nature" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="JavaNature">
+ </enumeration>
+ <enumeration value="JetNature">
+ </enumeration>
+ </restriction>
+ </simpleType>
+ </attribute>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn="org.eclipse.egf.pattern.ui.editors.templateEditor.AbstractTemplateEditor:"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/Activator.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/Activator.java
new file mode 100644
index 0000000..0412bef
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/Activator.java
@@ -0,0 +1,87 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.pattern.ui;
+
+import org.eclipse.egf.common.ui.activator.EGFAbstractUIPlugin;
+import org.eclipse.egf.core.pde.EGFPDEPlugin;
+import org.eclipse.egf.pattern.ui.builder.FcoreListener;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.osgi.framework.BundleContext;
+
+/**
+ * Common plug-in activator.
+ *
+ * @author Xavier Maysonnave
+ */
+public class Activator extends EGFAbstractUIPlugin {
+
+ /**
+ * Shared instance.
+ */
+ protected static Activator __plugin;
+
+ /**
+ * Get shared instance.
+ *
+ * @return
+ */
+ public static Activator getDefault() {
+ return __plugin;
+ }
+
+ /**
+ *
+ * Returns the currently active window for this workbench (if any). Returns
+ * <code>null</code> if there is no active workbench window. Returns
+ * <code>null</code> if called from a non-UI thread.
+ *
+ * @return the active workbench window, or <code>null</code> if there is
+ * no active workbench window or if called from a non-UI thread
+ */
+ public static IWorkbenchWindow getActiveWorkbenchWindow() {
+ return getDefault().getWorkbench().getActiveWorkbenchWindow();
+ }
+
+ /**
+ * Returns the currently active shell for this workbench (if any).
+ *
+ * @return the active workbench shell.
+ */
+ public static Shell getActiveWorkbenchShell() {
+ IWorkbenchWindow window = getActiveWorkbenchWindow();
+ if (window == null) {
+ IWorkbenchWindow[] windows = getDefault().getWorkbench().getWorkbenchWindows();
+ if (windows.length > 0) {
+ return windows[0].getShell();
+ }
+ } else {
+ return window.getShell();
+ }
+ return null;
+ }
+
+ @Override
+ public void start(BundleContext context_p) throws Exception {
+ super.start(context_p);
+ __plugin = this;
+ EGFPDEPlugin.getDefault().addResourceFcoreListener(FcoreListener.INSTANCE);
+ }
+
+ @Override
+ public void stop(BundleContext context_p) throws Exception {
+ __plugin = null;
+ if (EGFPDEPlugin.getDefault() != null)
+ EGFPDEPlugin.getDefault().removeResourceFcoreListener(FcoreListener.INSTANCE);
+ super.stop(context_p);
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/ImageShop.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/ImageShop.java
new file mode 100644
index 0000000..202edc6
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/ImageShop.java
@@ -0,0 +1,98 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ */
+public class ImageShop {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.egf.pattern.ui"; //$NON-NLS-1$
+
+ private static final String ICON_PATH = "/icons/"; //$NON-NLS-1$
+
+ public static final String IMG_PLUGIN_MF_OBJ = ICON_PATH + "plugin_mf_obj.gif"; //$NON-NLS-1$
+
+ public static final String IMG_LOCALVARIABLE_OBJ = ICON_PATH + "localvariable_obj.gif"; //$NON-NLS-1$
+
+ public static final String IMG_METHPUB_OBJ = ICON_PATH + "methpub_obj.gif"; //$NON-NLS-1$
+
+ public static final String IMG_HELP = ICON_PATH + "help.gif"; //$NON-NLS-1$
+
+ public static final String IMG_INNERCLASS_PUBLIC_OBJ = ICON_PATH + "innerclass_public_obj.gif"; //$NON-NLS-1$
+
+ public static final String IMG_METHOD_OVERRIDE = ICON_PATH + "method_override.png"; //$NON-NLS-1$
+
+ public static final String IMG_KIND_METHODCALL = ICON_PATH + "kind_methodCall.gif"; //$NON-NLS-1$
+
+ public static final String IMG_KIND_PATTERNCALL = ICON_PATH + "kind_patternCall.gif"; //$NON-NLS-1$
+
+ public static final String IMG_KIND_PATTERNINJECTEDCALL = ICON_PATH + "kind_patternInjectedCall.gif"; //$NON-NLS-1$
+
+ public static final String IMG_KIND_BACKCALL = ICON_PATH + "kind_backCall.gif"; //$NON-NLS-1$
+
+ public static final String IMG_KIND_SUPERPATTERNCALL = ICON_PATH + "kind_superPatternCall.gif"; //$NON-NLS-1$
+
+ public static final String IMG_OVER_OBJ = ICON_PATH + "over_obj.gif"; //$NON-NLS-1$
+
+ public static final String IMG_CATEGORY_OBJ = ICON_PATH + "category_obj.gif"; //$NON-NLS-1$
+
+ public static final String IMG_TREE_MODE = ICON_PATH + "tree_mode.gif"; //$NON-NLS-1$
+
+ public static final String IMG_CLASS_OBJ = ICON_PATH + "class_obj.gif"; //$NON-NLS-1$
+
+ public static final String IMG_ADD_OBJ = ICON_PATH + "add.gif"; //$NON-NLS-1$
+
+ public static final String IMG_EDIT_OBJ = ICON_PATH + "edit.gif"; //$NON-NLS-1$
+
+ public static final String IMG_DELETE_OBJ = ICON_PATH + "delete.gif"; //$NON-NLS-1$
+
+ public static final String IMG_DOWNWARD_OBJ = ICON_PATH + "downward.gif"; //$NON-NLS-1$
+
+ public static final String IMG_UPWARD_OBJ = ICON_PATH + "upward.gif"; //$NON-NLS-1$
+
+ public static final String IMG_METHOD = ICON_PATH + "method.gif"; //$NON-NLS-1$
+
+ public static final String IMG_METHOD_CONTENT_EDIT = ICON_PATH + "method_content_edit.gif"; //$NON-NLS-1$
+
+ public static final String IMG_VARIABLE = ICON_PATH + "variable.gif"; //$NON-NLS-1$
+
+ public static final String IMG_QUERY_SET = ICON_PATH + "query_set.gif"; //$NON-NLS-1$
+
+ public static final String IMG_PARAMETER_OBJ = ICON_PATH + "parameter_obj.gif"; //$NON-NLS-1$
+
+ public static final String IMG_VARIABLE_OBJ = ICON_PATH + "variable_obj.gif"; //$NON-NLS-1$
+
+ private static final ImageRegistry REGISTRY = new ImageRegistry();
+
+ public static Image get(String imageFilePath) {
+ Image image = REGISTRY.get(imageFilePath);
+ if (image != null) {
+ return image;
+ }
+ ImageDescriptor descriptor = AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, imageFilePath);
+ image = descriptor.createImage();
+ REGISTRY.put(imageFilePath, image);
+ return image;
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/Messages.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/Messages.java
new file mode 100644
index 0000000..0150b43
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/Messages.java
@@ -0,0 +1,290 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class Messages extends NLS {
+ public static String Editor_wrong_input;
+
+ // Overview Page
+ public static String OverviewPage_title;
+
+ public static String OverviewPage_browse_dialog_title;
+
+ public static String OverviewPage_button_browse;
+
+ public static String OverviewPage_sectionLeft_desci_label;
+
+ public static String OverviewPage_sectionLeft_descripition_label;
+
+ public static String OverviewPage_sectionLeft_fullName_label;
+
+ public static String OverviewPage_sectionLeft_id_label;
+
+ public static String OverviewPage_sectionLeft_name_label;
+
+ public static String OverviewPage_sectionLeft_title;
+
+ public static String OverviewPage_sectionLeft_title_label;
+
+ public static String OverviewPage_sectionRight_impl_label;
+
+ public static String OverviewPage_sectionRight_implLink_label;
+
+ public static String OverviewPage_sectionRight_spec_label;
+
+ public static String OverviewPage_sectionRight_specLink_label;
+
+ public static String OverviewPage_sectionRight_title;
+
+ public static String OverviewPage_sectionRight_title_label;
+
+ // Implementation Page
+ public static String ImplementationPage_title;
+
+ public static String ImplementationPage_button_add;
+
+ public static String ImplementationPage_button_down;
+
+ public static String ImplementationPage_button_edit;
+
+ public static String ImplementationPage_button_methodsOpenTemplate;
+
+ public static String ImplementationPage_button_remove;
+
+ public static String ImplementationPage_button_up;
+
+ public static String ImplementationPage_column_title_name;
+
+ public static String ImplementationPage_column_title_type;
+
+ public static String ImplementationPage_Error;
+
+ public static String ImplementationPage_footer;
+
+ public static String ImplementationPage_header;
+
+ public static String ImplementationPage_init;
+
+ public static String ImplementationPage_Methods;
+ public static String ImplementationPage_Methods_2;
+ public static String ImplementationPage_Methods_3;
+
+ public static String ImplementationPage_methAdd_dialog_title;
+
+ public static String ImplementationPage_methEdit_dialog_title;
+
+ public static String ImplementationPage_method_cannot_delete_message;
+
+ public static String ImplementationPage_methSection_label;
+
+ public static String ImplementationPage_orchSection_label;
+
+ public static String ImplementationPage_orchSection_title;
+
+ public static String ImplementationPage_split_mark;
+
+ public static String ImplementationPage_variable_cannot_delete_message;
+
+ public static String ImplementationPage_variablesEditDialog_title;
+
+ public static String ImplementationPage_varSection_label;
+
+ public static String ImplementationPage_varSection_title;
+
+ // Specification Page
+ public static String SpecificationPage_title;
+
+ public static String SpecificationPage_browse_dialog_title;
+
+ public static String SpecificationPage_button_add;
+
+ public static String SpecificationPage_button_browse;
+
+ public static String SpecificationPage_button_down;
+
+ public static String SpecificationPage_button_edit;
+
+ public static String SpecificationPage_button_remove;
+
+ public static String SpecificationPage_button_up;
+
+ public static String SpecificationPage_change_nature_type;
+
+ public static String SpecificationPage_column_title_name;
+
+ public static String SpecificationPage_column_title_query;
+
+ public static String SpecificationPage_column_title_type;
+
+ public static String SpecificationPage_inherSection_discrip_label;
+
+ public static String SpecificationPage_inherSection_parent_label;
+
+ public static String SpecificationPage_inherSection_title;
+
+ public static String SpecificationPage_No_patent;
+
+ public static String SpecificationPage_parametersEditDialog_title;
+
+ public static String SpecificationPage_paraSection_discrip_label;
+
+ public static String SpecificationPage_paraSection_title;
+
+ public static String SpecificationPage_patternSection_discrip_label;
+
+ public static String SpecificationPage_patternSection_title;
+
+ public static String SpecificationPage_patternSection_type_label;
+
+ // ChooseCall Page
+ public static String ChooseCallPage_description;
+
+ public static String ChooseCallPage_label_text;
+
+ public static String ChooseCallPage_methodCall_title;
+
+ public static String ChooseCallPage_no_call_selected_error_message;
+
+ public static String ChooseCallPage_no_variable_selected_error_message;
+
+ public static String ChooseCallPage_patternCall_title;
+
+ public static String ChooseCallPage_patternInjectCall_title;
+
+ public static String ChooseCallPage_superPatternCall_title;
+
+ public static String ChooseCallPage_title;
+
+ // ChooseKind Page
+ public static String ChooseKindPage_description;
+
+ public static String ChooseKindPage_label_text;
+
+ public static String ChooseKindPage_radio_methodCall;
+
+ public static String ChooseKindPage_radio_patternCall;
+
+ public static String ChooseKindPage_radio_patternInjectedCall;
+
+ public static String ChooseKindPage_radio_superPatternCall;
+
+ public static String ChooseKindPage_title;
+
+ // ChooseType Page
+ public static String ChooseTypePage_choose_model_button_title;
+
+ public static String ChooseTypePage_coreTypeTabItem_title;
+
+ public static String ChooseTypePage_description;
+
+ public static String ChooseTypePage_ecore_file;
+
+ public static String ChooseTypePage_javaTypeTabItem_title;
+
+ public static String ChooseTypePage_title;
+
+ // ContainerLibrarySelection Dialog
+ public static String ContainerLibrarySelectionDialog_dialogArea_label;
+
+ public static String ContainerLibrarySelectionDialog_pattern_label;
+
+ // ParameterMatching Page
+ public static String ParameterMatchingPage_button_create;
+
+ public static String ParameterMatchingPage_button_delete;
+
+ public static String ParameterMatchingPage_button_edit;
+
+ public static String ParameterMatchingPage_current_mathings_title;
+
+ public static String ParameterMatchingPage_label_text;
+
+ public static String ParameterMatchingPage_missing_information;
+
+ public static String ParameterMatchingPage_title;
+
+ // ParametersEdit Dialog
+ public static String ParametersEditDialog_Browse;
+
+ public static String ParametersEditDialog_duplicate_key_error_message;
+
+ public static String ParametersEditDialog_Key_title;
+
+ public static String ParametersEditDialog_Name;
+
+ public static String ParametersEditDialog_Query;
+
+ public static String ParametersEditDialog_query_context_label;
+
+ public static String ParametersEditDialog_Type;
+
+ public static String ParametersEditDialog_Value_title;
+
+ // PatternSelection Dialog
+ public static String PatternSelectiondialog_dialogArea_label;
+
+ public static String PatternSelectiondialog_pattern_label;
+
+ // OpenType Page
+ public static String OpenTypeWizard_window_title;
+
+ public static String OrchestrationTableLabelProvider_MethodCall;
+
+ public static String OrchestrationTableLabelProvider_PatternCall;
+
+ public static String OrchestrationTableLabelProvider_PatternInjectedCall;
+
+ public static String OrchestrationTableLabelProvider_SuperPatternCall;
+
+ public static String OrchestrationTableLabelProvider_BackCall;
+
+ public static String OrchestrationWizard_title;
+
+ // Common
+ public static String common_mark1;
+
+ public static String common_mark2;
+
+ public static String input_tooltip;
+
+ // Viewpoint contributor
+ public static String ViewpointContributor_openAction_label;
+ public static String ViewpointContributor_openTemplateAction_label;
+ public static String ViewpointContributor_missingPattern_title;
+ public static String ViewpointContributor_missingPattern_message;
+ public static String ViewpointContributor_newPattern_label;
+
+ public static String ViewpointContributor_generatePatternAction_label;
+
+ public static String ChooseKindPage_radio_backCall;
+
+ public static String ListBuilderDialog_initialvalue_label;
+ public static String ListBuilderDialog_searchPatternValue_label;
+ public static String ListBuilderDialog_currentValue_label;
+
+ private static final String BUNDLE_NAME = "org.eclipse.egf.pattern.ui.PatternUIMessages";//$NON-NLS-1$
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/PatternUIHelper.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/PatternUIHelper.java
new file mode 100644
index 0000000..54debcd
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/PatternUIHelper.java
@@ -0,0 +1,267 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.egf.model.pattern.MethodCall;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternInjectedCall;
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.pattern.ui.editors.adapter.LiveValidationContentAdapter;
+import org.eclipse.egf.pattern.ui.editors.adapter.RefresherAdapter;
+import org.eclipse.egf.pattern.ui.editors.models.QueryContent;
+import org.eclipse.egf.pattern.ui.editors.validation.EMFvalidator;
+import org.eclipse.egf.pattern.ui.editors.validation.ValidationConstants;
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.dialogs.IMessageProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.forms.IMessageManager;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class PatternUIHelper {
+ /**
+ * Get the pattern's parent methods.
+ */
+ public static List<String> getPatternParentMethodsNameList(Pattern pattern) {
+ List<String> parentMethods = new ArrayList<String>();
+ Pattern parent = pattern == null ? null : pattern.getSuperPattern();
+ if (parent != null) {
+ for (PatternMethod patternMethod : parent.getMethods()) {
+ String name = patternMethod.getName();
+ parentMethods.add(name);
+ }
+ }
+ return parentMethods;
+ }
+
+ /**
+ * Get the pattern's parent methods with out header/init/footer methods.
+ */
+ public static List<PatternMethod> getAllUseablePatternMethods(Pattern pattern) {
+ List<PatternMethod> parentMethods = new ArrayList<PatternMethod>();
+ Set<String> names = new HashSet<String>();
+ if (pattern != null) {
+ for (PatternMethod patternMethod : pattern.getAllMethods()) {
+ String name = patternMethod.getName();
+ if (!(Messages.ImplementationPage_header.equals(name) || Messages.ImplementationPage_init.equals(name) || Messages.ImplementationPage_footer.equals(name))) {
+ if (!names.contains(name)) {
+ parentMethods.add(patternMethod);
+ names.add(name);
+ }
+ }
+ }
+ }
+ return parentMethods;
+ }
+
+ /**
+ * Get the pattern's parent methods name list with out header/init/footer
+ * methods.
+ */
+ public static List<String> getUseablePatternMethodsNameList(Pattern pattern) {
+ List<String> parentMethods = new ArrayList<String>();
+ if (pattern != null) {
+ for (PatternMethod patternMethod : pattern.getMethods()) {
+ String name = patternMethod.getName();
+ if (!(Messages.ImplementationPage_header.equals(name) || Messages.ImplementationPage_init.equals(name) || Messages.ImplementationPage_footer.equals(name))) {
+ parentMethods.add(name);
+ }
+ }
+ }
+ return parentMethods;
+ }
+
+ /**
+ * Add the refresher adapter for object.
+ */
+ public static void addAdapter(Object object, AdapterImpl refresher) {
+ if (object instanceof EObject) {
+ EList<Adapter> eAdapters = ((EObject) object).eAdapters();
+ addIntoAdapters(eAdapters, refresher);
+ addChildAdapter(object, refresher);
+ }
+ }
+
+ /**
+ * Remove the refresher adapter for object.
+ */
+ public static void removeAdapter(Object object, AdapterImpl refresher) {
+ if (object instanceof EObject) {
+ EList<Adapter> eAdapters = ((EObject) object).eAdapters();
+ removeFromeAdapters(eAdapters, refresher);
+ removeChildAdapter(object, refresher);
+ }
+ }
+
+ /**
+ * Add adapter for the MethodCall's called or PatternInjectedCall's context.
+ */
+ public static void addChildAdapter(Object object, AdapterImpl refresher) {
+ if (object instanceof MethodCall) {
+ EList<Adapter> eAdapters = ((MethodCall) object).getCalled().eAdapters();
+ addIntoAdapters(eAdapters, refresher);
+ } else if (object instanceof PatternInjectedCall) {
+ EList<Adapter> eAdapters = ((PatternInjectedCall) object).getContext().eAdapters();
+ addIntoAdapters(eAdapters, refresher);
+ }
+ }
+
+ /**
+ * Remove the MethodCall's called or PatternInjectedCall's context adapters.
+ */
+ public static void removeChildAdapter(Object object, AdapterImpl refresher) {
+ if (object instanceof MethodCall) {
+ EList<Adapter> eAdapters = ((MethodCall) object).getCalled().eAdapters();
+ removeFromeAdapters(eAdapters, refresher);
+
+ } else if (object instanceof PatternInjectedCall) {
+ EList<Adapter> eAdapters = ((PatternInjectedCall) object).getContext().eAdapters();
+ removeFromeAdapters(eAdapters, refresher);
+ }
+ }
+
+ /**
+ * Add the refresher into the eAdapters.
+ */
+ public static void addIntoAdapters(EList<Adapter> eAdapters, AdapterImpl refresher) {
+ if (!eAdapters.contains(refresher)) {
+ eAdapters.add(refresher);
+ }
+ }
+
+ /**
+ * Remove the refresher into the eAdapters.
+ */
+ public static void removeFromeAdapters(EList<Adapter> eAdapters, AdapterImpl refresher) {
+ if (eAdapters.contains(refresher)) {
+ eAdapters.remove(refresher);
+ }
+ }
+
+ /**
+ * Add adapter for pattern.
+ */
+ public static void addAdapterForPattern(Pattern pattern, AdapterImpl liveValidationContentAdapter) {
+ if (pattern != null) {
+ EList<Adapter> eAdapters = pattern.eAdapters();
+ addIntoAdapters(eAdapters, liveValidationContentAdapter);
+ }
+ }
+
+ /**
+ * Remove adapter for pattern.
+ */
+ public static void removeAdapterForPattern(Pattern pattern, AdapterImpl adapter) {
+ if (pattern != null) {
+ EList<Adapter> eAdapters = pattern.eAdapters();
+ removeFromeAdapters(eAdapters, adapter);
+ }
+ }
+
+ /**
+ * Create validation for object.
+ */
+ public static void validationContent(IMessageManager mmng, EObject object, final String key, Control control) {
+ if (control != null && !control.isDisposed()) {
+ IStatus status = EMFvalidator.batchValidate(object, key);
+ setErrorMessage(status, mmng, key, control);
+ }
+ }
+
+ /**
+ * Set decoration for contorl.
+ *
+ * @param control
+ * @param key
+ * @param mmng
+ */
+ public static void setErrorMessage(IStatus status, IMessageManager mmng, String key, Control control) {
+ if (!status.isOK()) {
+ if (status.isMultiStatus()) {
+ status = status.getChildren()[0];
+ }
+ if ((status.getCode() == 1 && ValidationConstants.CONSTRAINTS_PATTERN_NAME_NOT_EMPTY_ID.equals(key)) || (status.getCode() == 2 && ValidationConstants.CONSTRAINTS_PATTERN_PARAMETER_NOT_EMPTY_NAME_ID.equals(key)) || (status.getCode() == 3 && ValidationConstants.CONSTRAINTS_PATTERN_VARIABLE_NAME_NOT_EMPTY_ID.equals(key)))
+ mmng.addMessage(key, status.getMessage(), null, IMessageProvider.ERROR, control);
+ } else {
+ mmng.removeMessage(key, control);
+ }
+ }
+
+ /**
+ * Return whether the method can be rename.
+ */
+ public static boolean isRenameDisable(PatternMethod element) {
+ Pattern pattern = element.getPattern();
+ if (pattern.getInitMethod().equals(element) || pattern.getHeaderMethod().equals(element) || pattern.getFooterMethod().equals(element)) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * If the validation adapter is not exist,add a new one.
+ */
+ public static LiveValidationContentAdapter addValidationAdapeter(IMessageManager mmng, Pattern pattern, String key, Control control) {
+ LiveValidationContentAdapter liveValidationContentAdapter = new LiveValidationContentAdapter(control, mmng, key, pattern);
+ PatternUIHelper.addAdapterForPattern(pattern, liveValidationContentAdapter);
+ validationContent(mmng, pattern, key, control);
+ return liveValidationContentAdapter;
+ }
+
+ /**
+ * Add a refresh adapter for the new item.
+ */
+ public static void addAdapterForNewItem(TableViewer tableViewer, Object newItem) {
+ final AdapterImpl refresher = new RefresherAdapter(tableViewer);
+ addAdapter(newItem, refresher);
+ }
+
+ public static void addEMFValidationAfterRemove(IMessageManager mmng, Pattern pattern, String key, Control control, LiveValidationContentAdapter liveValidationContentAdapter) {
+ liveValidationContentAdapter = new LiveValidationContentAdapter(control, mmng, key, pattern);
+ PatternUIHelper.addAdapterForPattern(pattern, liveValidationContentAdapter);
+
+ }
+
+ /**
+ * Check the queryContents whether has duplicate keys.
+ */
+ public static boolean hasDuplicateKey(List<QueryContent> queryContents) {
+ if (queryContents != null) {
+ for (int i = 0; i < queryContents.size(); i++) {
+ String key = queryContents.get(i).getKey();
+ for (int j = i + 1; j < queryContents.size(); j++) {
+ String currentKey = queryContents.get(j).getKey();
+ if (currentKey.equals(key)) {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/PatternUIMessages.properties b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/PatternUIMessages.properties
new file mode 100644
index 0000000..78eac0d
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/PatternUIMessages.properties
@@ -0,0 +1,143 @@
+ListBuilderDialog_initialvalue_label = Available Patterns and Libraries:
+ListBuilderDialog_searchPatternValue_label = Filter (* or ?):
+ListBuilderDialog_currentValue_label = Selected elements:
+
+
+Editor_wrong_input = Invalid Input: Must be PatternEditorInput
+
+OpenTypeWizard_window_title=Parameter type selection
+
+OrchestrationTableLabelProvider_MethodCall=\ - [MethodCall]
+OrchestrationTableLabelProvider_PatternCall=\ - [PatternCall]
+OrchestrationTableLabelProvider_PatternInjectedCall=\ - [PatternInjectedCall]
+OrchestrationTableLabelProvider_SuperPatternCall=[Call to super pattern orchestration]
+OrchestrationTableLabelProvider_BackCall=[Callback to Strategy/Task]
+OrchestrationWizard_title=Orchestration
+
+OverviewPage_browse_dialog_title=Change Container Library
+OverviewPage_button_browse=Browse
+OverviewPage_sectionLeft_desci_label=Fill-in description with as much information about the pattern behavior as
+OverviewPage_sectionLeft_descripition_label=Description
+OverviewPage_sectionLeft_fullName_label=Library:
+OverviewPage_sectionLeft_id_label=Id:
+OverviewPage_sectionLeft_name_label=Name:
+OverviewPage_sectionLeft_title=General Information
+OverviewPage_sectionLeft_title_label=This section describes general information about this pattern.
+OverviewPage_sectionRight_impl_label=defines the pattern operations and their associated templates.
+OverviewPage_sectionRight_implLink_label=Implementation:
+OverviewPage_sectionRight_spec_label=defines the pattern parameters and the applicable condition for pattern matching.
+OverviewPage_sectionRight_specLink_label=Specification:
+OverviewPage_sectionRight_title=Pattern Content
+OverviewPage_sectionRight_title_label=The content of the pattern is made up of several sections:
+OverviewPage_title = Overview
+
+ImplementationPage_button_add=Add
+ImplementationPage_button_down=Down
+ImplementationPage_button_edit=Edit
+ImplementationPage_button_methodsOpenTemplate=Open template editor
+ImplementationPage_button_remove=Remove
+ImplementationPage_button_up=Up
+ImplementationPage_column_title_name=Name
+ImplementationPage_column_title_type=Type
+ImplementationPage_Error=Error
+ImplementationPage_footer=footer
+ImplementationPage_header=header
+ImplementationPage_init=init
+ImplementationPage_methAdd_dialog_title=Add Method
+ImplementationPage_methEdit_dialog_title=Edit Method
+ImplementationPage_method_cannot_delete_message=You can't deleted this method, because it is used in a methodCall\!
+ImplementationPage_methSection_label=Manage pattern methods:
+ImplementationPage_Methods=Methods
+ImplementationPage_Methods_2=Pattern methods:
+ImplementationPage_Methods_3=Implementation methods:
+ImplementationPage_orchSection_label=Organize method calls:
+ImplementationPage_orchSection_title=Orchestration
+ImplementationPage_split_mark=\#
+ImplementationPage_title = Implementation
+ImplementationPage_variable_cannot_delete_message=You can't deleted this variable, because it is used in a patternInjectedCall\!
+ImplementationPage_variablesEditDialog_title=Edit Variable
+ImplementationPage_varSection_label=Set up some variable available in all methods:
+ImplementationPage_varSection_title=Variables
+
+SpecificationPage_browse_dialog_title=Pattern Selection
+SpecificationPage_button_add=Add
+SpecificationPage_button_browse=Browse
+SpecificationPage_button_down=Down
+SpecificationPage_button_edit=Edit
+SpecificationPage_button_remove=Remove
+SpecificationPage_button_up=Up
+SpecificationPage_change_nature_type=Do you really want to change the nature and update the header and footer?
+SpecificationPage_column_title_name=Name
+SpecificationPage_column_title_query=Query
+SpecificationPage_column_title_type=Type
+SpecificationPage_inherSection_discrip_label=Choose the super pattern:
+SpecificationPage_inherSection_parent_label=Parent:
+SpecificationPage_inherSection_title=Inheritance
+SpecificationPage_No_patent=\ No parent
+SpecificationPage_parametersEditDialog_title=Edit Parameter
+SpecificationPage_paraSection_discrip_label=Define parameters for this pattern in the following section.
+SpecificationPage_paraSection_title=Parameters
+SpecificationPage_patternSection_discrip_label=Select the kind of the pattern:
+SpecificationPage_patternSection_title=Pattern Nature
+SpecificationPage_patternSection_type_label=Type:
+SpecificationPage_title = Specification
+
+ChooseCallPage_description=Organize method calls.
+ChooseCallPage_label_text=Matching items:
+ChooseCallPage_methodCall_title=Choose a method to call:
+ChooseCallPage_no_call_selected_error_message=No call is selected or no call is available.
+ChooseCallPage_no_variable_selected_error_message=No variable is selected or no variable is available.
+ChooseCallPage_patternCall_title=Choose a pattern to call:
+ChooseCallPage_patternInjectCall_title=Choose the context object to inject:
+ChooseCallPage_superPatternCall_title=Choose a superPattern to call:
+ChooseCallPage_title=ChooseToCall
+
+ChooseKindPage_description=Choose a kind of call.
+ChooseKindPage_label_text=Please to choose the kind of call:
+ChooseKindPage_radio_methodCall=methodCall
+ChooseKindPage_radio_patternCall=patternCall
+ChooseKindPage_radio_patternInjectedCall=patternInjectedCall
+ChooseKindPage_radio_superPatternCall=superPatternCall
+ChooseKindPage_radio_backCall=Call back to task/strategy
+ChooseKindPage_title=ChooseKind
+
+ChooseTypePage_choose_model_button_title=Choose model...
+ChooseTypePage_coreTypeTabItem_title=Ecore type
+ChooseTypePage_description=Select a type in the following list of available types
+ChooseTypePage_ecore_file=.ecore
+ChooseTypePage_javaTypeTabItem_title=Java type
+ChooseTypePage_title=Type selection
+
+ContainerLibrarySelectionDialog_dialogArea_label=Matching items:
+ContainerLibrarySelectionDialog_pattern_label=Enter type name prefix or pattern (*,?,or camel case)
+
+ParameterMatchingPage_button_create=Create matching
+ParameterMatchingPage_button_delete=Delete matching
+ParameterMatchingPage_button_edit=Edit matching
+ParameterMatchingPage_current_mathings_title=Current parameter matchings:
+ParameterMatchingPage_label_text=Choose parameters to setup 'parameter matching':
+ParameterMatchingPage_missing_information=There is no available caller parameters or callee parameters to setup.
+ParameterMatchingPage_title=Parameter Matching
+
+ParametersEditDialog_Browse=Browse
+ParametersEditDialog_duplicate_key_error_message=Same key exist in table.
+ParametersEditDialog_Key_title=Key
+ParametersEditDialog_Name=Name
+ParametersEditDialog_Query=Query
+ParametersEditDialog_query_context_label=QueryContext
+ParametersEditDialog_Type=Type
+ParametersEditDialog_Value_title=Value
+
+PatternSelectiondialog_dialogArea_label=Matching items:
+PatternSelectiondialog_pattern_label=Enter type name prefix or pattern (*,?,or camel case)
+
+common_mark1=\ - [
+common_mark2=]
+input_tooltip = tooltip
+
+ViewpointContributor_missingPattern_title = Impossible to edit the pattern
+ViewpointContributor_missingPattern_message = Save your model before editing a pattern.
+ViewpointContributor_openAction_label = Open
+ViewpointContributor_openTemplateAction_label= Open templates
+ViewpointContributor_newPattern_label= {0} Pattern
+ViewpointContributor_generatePatternAction_label=Update generated elements
\ No newline at end of file
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/builder/FcoreListener.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/builder/FcoreListener.java
new file mode 100644
index 0000000..4740769
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/builder/FcoreListener.java
@@ -0,0 +1,93 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.builder;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.egf.core.fcore.IResourceFcoreDelta;
+import org.eclipse.egf.core.fcore.IResourceFcoreListener;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.pattern.Messages;
+import org.eclipse.egf.pattern.engine.PatternHelper;
+import org.eclipse.egf.pattern.engine.TranslationHelper;
+import org.eclipse.egf.pattern.ui.Activator;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
+
+/**
+ * TODO faut il mettre à jour le nom du package destination quand le nom d'une
+ * lib change (meme question pour le nom du pattern) ?
+ *
+ * @author Thomas Guiu
+ *
+ */
+public class FcoreListener implements IResourceFcoreListener {
+
+ public static final FcoreListener INSTANCE = new FcoreListener();
+
+ public void fcoreChanged(IResourceFcoreDelta delta) {
+ translate(delta.getUpdatedFcores());
+ }
+
+ private void translate(final List<URI> uris) {
+ if (uris == null || uris.size() == 0)
+ return;
+ Job job = new Job(Messages.translation_job_label) {
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ new WorkspaceModifyOperation() {
+ @Override
+ protected void execute(IProgressMonitor innerMonitor) throws CoreException, InvocationTargetException, InterruptedException {
+ Set<Pattern> patterns = new HashSet<Pattern>();
+ PatternHelper patternCollector = PatternHelper.createCollector();
+ try {
+ innerMonitor.beginTask(Messages.translation_job_label, uris.size());
+ for (URI uri : uris)
+ patterns.addAll(patternCollector.getPatterns(uri));
+
+ new TranslationHelper().translate(patterns);
+ } catch (Exception e) {
+ throw new InvocationTargetException(e);
+ } finally {
+ patterns.clear();
+ patternCollector.clear();
+ }
+ }
+ }.run(monitor);
+ } catch (InvocationTargetException e) {
+ Activator.getDefault().logError(e.getTargetException());
+ } catch (InterruptedException e) {
+ Activator.getDefault().logError(e);
+ }
+ return Status.OK_STATUS;
+ }
+
+ };
+ job.schedule();
+
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/builder/PatternBuilder.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/builder/PatternBuilder.java
new file mode 100644
index 0000000..61acb74
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/builder/PatternBuilder.java
@@ -0,0 +1,115 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.builder;
+
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceDeltaVisitor;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.pattern.Activator;
+import org.eclipse.egf.pattern.Messages;
+import org.eclipse.egf.pattern.PatternConstants;
+import org.eclipse.egf.pattern.engine.PatternHelper;
+import org.eclipse.egf.pattern.engine.TranslationHelper;
+import org.eclipse.egf.pattern.engine.PatternHelper.FilenameFormatException;
+
+/**
+ * Performs pattern translation each time a pt file is changed.
+ *
+ * TODO gérer le cas où le model est modifié/supprimé et quand la classe générée
+ * est supprimée.
+ *
+ * @author Thomas Guiu
+ *
+ */
+public class PatternBuilder extends IncrementalProjectBuilder {
+
+ @SuppressWarnings("unchecked")
+ @Override
+ protected IProject[] build(int kind, Map args, IProgressMonitor monitor) throws CoreException {
+ Set<String> patternIds = null;
+ IResourceDelta delta = getDelta(getProject());
+ if (delta != null && delta.getKind() != IResourceDelta.NO_CHANGE) {
+ PatternVisitor patternVisitor = new PatternVisitor();
+ delta.accept(patternVisitor);
+ patternIds = patternVisitor.getPatternId2translate();
+ if (patternIds.isEmpty())
+ return null;
+ }
+
+ checkCancellation(monitor);
+
+ PatternHelper helper = PatternHelper.createCollector();
+ Set<Pattern> patterns = helper.getPatterns(getProject(), patternIds);
+ // if (patternIds != null && patterns.size() != patternIds.size())
+ // Activator.getDefault().logWarning(Messages.PatternBuilding_warning);
+ try {
+ new TranslationHelper().translate(patterns);
+ } catch (PatternException e) {
+ // log the error instead of throwing a CoreException
+ Activator.getDefault().logError(Messages.PatternBuilding_Failed, e);
+ } finally {
+ helper.clear();
+ patterns.clear();
+ }
+ return null;
+ }
+
+ private void checkCancellation(IProgressMonitor monitor) {
+ if (monitor != null && monitor.isCanceled())
+ throw new OperationCanceledException();
+ }
+
+ class PatternVisitor implements IResourceDeltaVisitor {
+
+ private final Set<String> patternId2translate = new HashSet<String>();
+
+ public PatternVisitor() {
+ }
+
+ public boolean visit(IResourceDelta delta) throws CoreException {
+
+ IResource resource = delta.getResource();
+ if (resource.getType() == IResource.FILE) {
+ if (delta.getKind() != IResourceDelta.REMOVED && PatternConstants.PATTERN_UNIT_FILE_EXTENSION.equals(resource.getFileExtension())) {
+ try {
+ patternId2translate.add(PatternHelper.Filename.extractPatternId(resource.getProjectRelativePath()));
+ } catch (FilenameFormatException e) {
+ Activator.getDefault().logError(e);
+ }
+ }
+ return false;
+ }
+ return true;
+ }
+
+ public Set<String> getPatternId2translate() {
+ return patternId2translate;
+ }
+
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/contributions/EditHelper.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/contributions/EditHelper.java
new file mode 100644
index 0000000..c3c9335
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/contributions/EditHelper.java
@@ -0,0 +1,74 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.contributions;
+
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.pattern.engine.PatternHelper;
+import org.eclipse.egf.pattern.ui.Activator;
+import org.eclipse.egf.pattern.ui.Messages;
+import org.eclipse.egf.pattern.ui.editors.PatternEditor;
+import org.eclipse.egf.pattern.ui.editors.PatternEditorInput;
+import org.eclipse.egf.pattern.ui.editors.templateEditor.AbstractTemplateEditor;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.ide.IDE;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class EditHelper {
+ public static final String PATTERN_EDITOR_ID = "PatternEditor";
+
+ public static final String TEMPLATE_EDITOR_ID = "TemplateEditor";
+
+ public static void openPatternEditor(IWorkbenchPage page, String patternId) {
+ Pattern pattern = PatternHelper.TRANSACTIONNAL_COLLECTOR.getPattern(patternId);
+ if (pattern == null)
+ MessageDialog.openInformation(page.getWorkbenchWindow().getShell(), Messages.ViewpointContributor_missingPattern_title, Messages.ViewpointContributor_missingPattern_message);
+ else if (!isDuplicateEditor(page, pattern, PATTERN_EDITOR_ID)) {
+ PatternEditor.openEditor(page, pattern);
+ }
+ }
+
+ public static void openTemplateEditor(IWorkbenchPage page, Pattern pattern, String editor) {
+ PatternEditorInput input = new PatternEditorInput(pattern.eResource(), pattern.getID());
+ if (!isDuplicateEditor(page, pattern, TEMPLATE_EDITOR_ID)) {
+ try {
+ IDE.openEditor(page, input, editor);
+ } catch (PartInitException e) {
+ Activator.getDefault().logError(e);
+ }
+ }
+ }
+
+ public static boolean isDuplicateEditor(IWorkbenchPage page, Pattern pattern, String editorId) {
+ IEditorPart[] editors = page.getEditors();
+ for (IEditorPart editor : editors) {
+ if ((editor instanceof PatternEditor && PATTERN_EDITOR_ID.equals(editorId)) || (editor instanceof AbstractTemplateEditor && TEMPLATE_EDITOR_ID.equals(editorId))) {
+ PatternEditorInput editorInput = (PatternEditorInput) editor.getEditorInput();
+ Pattern currentPattern = editorInput.getPattern();
+ if (pattern.equals(currentPattern)) {
+ page.activate(editor);
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/contributions/PatternListenerContributor.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/contributions/PatternListenerContributor.java
new file mode 100644
index 0000000..6cbe2d2
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/contributions/PatternListenerContributor.java
@@ -0,0 +1,48 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.contributions;
+
+import org.eclipse.egf.core.ui.contributor.ListenerContributor;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.ui.IWorkbenchPage;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class PatternListenerContributor extends ListenerContributor {
+
+ @Override
+ public void addListeners(final IWorkbenchPage page, StructuredViewer viewer) {
+ viewer.addDoubleClickListener(new IDoubleClickListener() {
+
+ public void doubleClick(DoubleClickEvent event) {
+ if (event.getSelection().isEmpty())
+ return;
+ Object firstElement = ((IStructuredSelection) event.getSelection()).getFirstElement();
+ if (firstElement instanceof Pattern) {
+ EditHelper.openPatternEditor(page, ((Pattern) firstElement).getID());
+ }
+
+ }
+ });
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/contributions/PatternMenuContributor.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/contributions/PatternMenuContributor.java
new file mode 100644
index 0000000..edd32dd
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/contributions/PatternMenuContributor.java
@@ -0,0 +1,268 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.contributions;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.egf.common.ui.constant.EGFCommonUIConstants;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.core.ui.contributor.MenuContributor;
+import org.eclipse.egf.core.ui.l10n.CoreUIMessages;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.model.pattern.PatternLibrary;
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.egf.model.pattern.PatternViewpoint;
+import org.eclipse.egf.pattern.engine.PatternHelper;
+import org.eclipse.egf.pattern.engine.TranslationHelper;
+import org.eclipse.egf.pattern.extension.ExtensionHelper;
+import org.eclipse.egf.pattern.extension.PatternExtension;
+import org.eclipse.egf.pattern.extension.PatternInitializer;
+import org.eclipse.egf.pattern.extension.ExtensionHelper.MissingExtensionException;
+import org.eclipse.egf.pattern.ui.Activator;
+import org.eclipse.egf.pattern.ui.Messages;
+import org.eclipse.egf.pattern.ui.editors.templateEditor.TemplateExtensionRegistry;
+import org.eclipse.emf.common.command.AbstractCommand;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.UnexecutableCommand;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.edit.command.CommandParameter;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.ui.action.CreateChildAction;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IEditorPart;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class PatternMenuContributor extends MenuContributor {
+
+ public static final String EDIT_ACTION_ID = "edit-pattern"; //$NON-NLS-1$
+
+ public static final String EDIT_TEMPLATE_ACTION_ID = "edit-template-pattern"; //$NON-NLS-1$
+
+ private final EditPatternAction editAction = new EditPatternAction();
+
+ private final EditTemplatePatternAction editTemplateAction = new EditTemplatePatternAction();
+
+ private final GeneratePatternAction generateAction = new GeneratePatternAction();
+
+ @Override
+ public void menuAboutToShow(IMenuManager menuManager) {
+ IStructuredSelection selection2 = (IStructuredSelection) selection;
+ if (selection2.size() == 1) {
+ if (selection2.getFirstElement() instanceof PatternLibrary) {
+ IContributionItem item = menuManager.find(EGFCommonUIConstants.CREATE_CHILD);
+ MenuManager createChildMenuManager = null;
+ if (item != null && item instanceof MenuManager) {
+ createChildMenuManager = (MenuManager) item;
+ } else {
+ createChildMenuManager = new MenuManager(CoreUIMessages.MenuContributor_newChildGroup_label);
+ menuManager.insertBefore(EGFCommonUIConstants.CREATE_SIBLING, createChildMenuManager);
+ }
+ Map<String, PatternExtension> extensions = ExtensionHelper.getExtensions();
+ for (String nature : extensions.keySet()) {
+ PatternExtension patternExtension = extensions.get(nature);
+ CommandParameter descriptor = new CommandParameter(null, PatternPackage.Literals.PATTERN_LIBRARY__ELEMENTS, patternExtension.getFactory().createPattern(null, "myPattern"));
+ CreateChildAction createChildAction = new CreatePatternAction(activeEditorPart, selection, descriptor, (PatternLibrary) selection2.getFirstElement());
+ createChildAction.setText(Messages.bind(Messages.ViewpointContributor_newPattern_label, nature));
+ createChildAction.setImageDescriptor(ImageDescriptor.createFromURL(patternExtension.getImageURL()));
+ createChildMenuManager.add(createChildAction);
+ }
+ // menuManager.insertBefore("edit", createChildAction);
+ } else if (selection2.getFirstElement() instanceof Pattern) {
+ menuManager.insertBefore(EGFCommonUIConstants.OPEN_MENU_GROUP, editAction);
+ menuManager.insertBefore(EGFCommonUIConstants.OPEN_MENU_GROUP, editTemplateAction);
+ } else if (selection2.getFirstElement() instanceof PatternViewpoint) {
+ menuManager.insertBefore(EGFCommonUIConstants.OPEN_MENU_GROUP, generateAction);
+ }
+ }
+ }
+
+ private final class CreatePatternAction extends CreateChildAction {
+
+ private final PatternLibrary library;
+
+ public CreatePatternAction(IEditorPart editorPart, ISelection selection, Object descriptor, PatternLibrary library) {
+ super(editorPart, selection, descriptor);
+ this.library = library;
+ }
+
+ @Override
+ protected Command createActionCommand(EditingDomain editingDomain, Collection<?> collection) {
+
+ final Command createActionCommand = super.createActionCommand(editingDomain, collection);
+ if (UnexecutableCommand.INSTANCE.equals(createActionCommand))
+ return UnexecutableCommand.INSTANCE;
+ return createActionCommand.chain(new AbstractCommand() {
+
+ @Override
+ protected boolean prepare() {
+ return true;
+ }
+
+ public void execute() {
+ Collection<?> affectedObjects = createActionCommand.getAffectedObjects();
+ Pattern pattern = (Pattern) affectedObjects.iterator().next();
+ // update method file URIs
+ for (PatternMethod m : pattern.getMethods()) {
+ m.setPatternFilePath(PatternHelper.Filename.computeFileURI(m));
+ }
+
+ // create template files
+ IProject project = EGFCorePlugin.getPlatformFcore(library.eResource()).getPlatformBundle().getProject();
+ try {
+ PatternInitializer initializer = ExtensionHelper.getExtension(pattern.getNature()).createInitializer(project, pattern);
+ initializer.initContent();
+ } catch (PatternException e) {
+ Activator.getDefault().logError(e);
+
+ } catch (MissingExtensionException e) {
+ Activator.getDefault().logError(e);
+
+ }
+ }
+
+ public void undo() {
+ Collection<?> affectedObjects = createActionCommand.getAffectedObjects();
+ Pattern pattern = (Pattern) affectedObjects.iterator().next();
+ IProject project = EGFCorePlugin.getPlatformFcore(library.eResource()).getPlatformBundle().getProject();
+ IFile currentFile = null;
+ try {
+ for (PatternMethod m : pattern.getMethods()) {
+ currentFile = project.getFile(m.getPatternFilePath().path());
+ currentFile.delete(true, false, null);
+ }
+ if (currentFile != null && currentFile.getParent() != null)
+ currentFile.getParent().delete(true, null);
+ } catch (CoreException e) {
+ Activator.getDefault().logError(e);
+ }
+
+ }
+
+ public void redo() {
+ }
+ });
+ }
+ }
+
+ private final class GeneratePatternAction extends Action {
+
+ public GeneratePatternAction() {
+ super(Messages.ViewpointContributor_generatePatternAction_label);
+ setId(getText());
+ }
+
+ @Override
+ public void run() {
+ if (selection == null)
+ throw new IllegalStateException();
+ IStructuredSelection sselection = (IStructuredSelection) selection;
+ if (sselection.isEmpty() || !(sselection.getFirstElement() instanceof EObject))
+ throw new IllegalStateException();
+
+ Resource resource = ((EObject) sselection.getFirstElement()).eResource();
+
+ Set<Pattern> patterns = new HashSet<Pattern>();
+ PatternHelper patternCollector = PatternHelper.createCollector();
+ try {
+ patterns.addAll(patternCollector.getPatterns(resource.getURI()));
+
+ new TranslationHelper().translate(patterns);
+ } catch (PatternException e) {
+ Activator.getDefault().logError(e);
+ } finally {
+ patterns.clear();
+ patternCollector.clear();
+ }
+ }
+ }
+
+ private abstract class PatternAction extends Action {
+
+ public PatternAction(String label, String id) {
+ super(label);
+ setId(id);
+ }
+
+ protected Pattern getPattern() {
+ if (selection == null)
+ throw new IllegalStateException();
+ IStructuredSelection sselection = (IStructuredSelection) selection;
+ if (sselection.size() != 1 || !(sselection.getFirstElement() instanceof Pattern))
+ throw new IllegalStateException();
+ return (Pattern) sselection.getFirstElement();
+ }
+
+ protected Pattern getPatternInTransactionalEditingDomain() {
+ Pattern pattern = getPattern();
+ return PatternHelper.TRANSACTIONNAL_COLLECTOR.getPattern(pattern.getID());
+ }
+ }
+
+ private final class EditTemplatePatternAction extends PatternAction {
+
+ public EditTemplatePatternAction() {
+ super(Messages.ViewpointContributor_openTemplateAction_label, EDIT_TEMPLATE_ACTION_ID);
+ }
+
+ @Override
+ public void run() {
+ Pattern patternInTransactionalEditingDomain = getPatternInTransactionalEditingDomain();
+ if (patternInTransactionalEditingDomain == null)
+ MessageDialog.openInformation(parent.getPage().getWorkbenchWindow().getShell(), Messages.ViewpointContributor_missingPattern_title, Messages.ViewpointContributor_missingPattern_message);
+ else {
+ // PatternTemplateEditor.openEditor(parent.getPage(),
+ // patternInTransactionalEditingDomain, null);
+ Pattern pattern = getPattern();
+ String editor = TemplateExtensionRegistry.getEditor(pattern);
+ if (editor != null) {
+ EditHelper.openTemplateEditor(parent.getPage(), pattern, editor);
+ }
+ }
+ }
+ }
+
+ private final class EditPatternAction extends PatternAction {
+
+ public EditPatternAction() {
+ super(Messages.ViewpointContributor_openAction_label, EDIT_ACTION_ID);
+ }
+
+ @Override
+ public void run() {
+ EditHelper.openPatternEditor(parent.getPage(), getPattern().getID());
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/contributions/PatternPropertyEditorContributor.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/contributions/PatternPropertyEditorContributor.java
new file mode 100644
index 0000000..ff0ceac
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/contributions/PatternPropertyEditorContributor.java
@@ -0,0 +1,67 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.contributions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.egf.core.ui.contributor.DefaultPropertyEditorContributor;
+import org.eclipse.egf.model.pattern.PatternElement;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.egf.model.pattern.TypePatternList;
+import org.eclipse.egf.pattern.engine.PatternHelper;
+import org.eclipse.egf.pattern.ui.editors.dialogs.ListBuilderDialog;
+import org.eclipse.egf.pattern.ui.editors.providers.PatternElementLabelProvider;
+import org.eclipse.egf.pattern.ui.editors.providers.PatternElementcontentProvider;
+import org.eclipse.emf.common.ui.celleditor.ExtendedDialogCellEditor;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.IBaseLabelProvider;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class PatternPropertyEditorContributor extends DefaultPropertyEditorContributor {
+
+ public boolean canApply(Object object, IItemPropertyDescriptor descriptor) {
+ return checkFeature(object, descriptor, PatternPackage.Literals.TYPE_PATTERN_LIST__ELEMENTS) && object instanceof TypePatternList;
+ }
+
+ public CellEditor createPropertyEditor(final Composite composite, Object object, IItemPropertyDescriptor descriptor) {
+
+ final TypePatternList value = (TypePatternList) object;
+ return new ExtendedDialogCellEditor(composite, getLabelProvider(object, descriptor)) {
+ @Override
+ protected Object openDialogBox(Control cellEditorWindow) {
+ IStructuredContentProvider contentProvider = new PatternElementcontentProvider();
+ IBaseLabelProvider labelProvider = new PatternElementLabelProvider();
+
+ List<PatternElement> possibleValues = new ArrayList<PatternElement>(PatternHelper.createCollector().getAllLibraries());
+ List<PatternElement> initialValues = new ArrayList<PatternElement>(value.getElements());
+ ListBuilderDialog<PatternElement> dialog = new ListBuilderDialog<PatternElement>(composite.getShell(), contentProvider, labelProvider, possibleValues, initialValues);
+ if (dialog.open() == Window.OK) {
+ return dialog.getResult();
+ }
+ return null;
+ }
+ };
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/PatternEditor.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/PatternEditor.java
new file mode 100644
index 0000000..e4ffc98
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/PatternEditor.java
@@ -0,0 +1,523 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.pattern.ui.editors;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.commands.operations.IOperationHistory;
+import org.eclipse.core.commands.operations.IOperationHistoryListener;
+import org.eclipse.core.commands.operations.IUndoContext;
+import org.eclipse.core.commands.operations.IUndoableOperation;
+import org.eclipse.core.commands.operations.ObjectUndoContext;
+import org.eclipse.core.commands.operations.OperationHistoryEvent;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.common.ui.helper.ThrowableHandler;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.core.domain.EGFResourceLoadedListener;
+import org.eclipse.egf.core.domain.EGFResourceLoadedListener.ResourceListener;
+import org.eclipse.egf.core.domain.EGFResourceLoadedListener.ResourceUser;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.pattern.extension.ExtensionHelper;
+import org.eclipse.egf.pattern.ui.Activator;
+import org.eclipse.egf.pattern.ui.Messages;
+import org.eclipse.egf.pattern.ui.editors.pages.ImplementationPage;
+import org.eclipse.egf.pattern.ui.editors.pages.OverviewPage;
+import org.eclipse.egf.pattern.ui.editors.pages.PatternEditorPage;
+import org.eclipse.egf.pattern.ui.editors.pages.SpecificationPage;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.EContentAdapter;
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.workspace.IWorkspaceCommandStack;
+import org.eclipse.emf.workspace.ResourceUndoContext;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IPartListener;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
+import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.forms.editor.IFormPage;
+import org.eclipse.ui.ide.IDE;
+
+/**
+ *
+ * @author Thomas Guiu
+ *
+ */
+public class PatternEditor extends FormEditor implements ResourceUser, IEditingDomainProvider {
+
+ private String initialPatternName;
+
+ protected ObjectUndoContext undoContext;
+
+ private TransactionalEditingDomain editingDomain;
+
+ /**
+ * Whether or not user saved this resource in this editor
+ */
+ protected boolean userHasSavedResource;
+
+ /**
+ * Whether or not this resource has been externally changed
+ */
+ protected boolean resourceHasBeenExternallyChanged;
+
+ /**
+ * Whether or not this resource has been removed
+ */
+ protected boolean resourceHasBeenRemoved;
+
+ private final ResourceListener resourceListener = new ResourceListener() {
+
+ public void resourceMoved(Resource movedResource, final URI oldURI) {
+ if (movedResource == getResource()) {
+ resourceHasBeenExternallyChanged = false;
+ resourceHasBeenRemoved = false;
+ userHasSavedResource = false;
+ for (PatternEditorPage page : pages) {
+ page.rebind();
+ }
+ addPatternChangeAdapter();
+ getSite().getShell().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ getOperationHistory().dispose(undoContext, true, true, true);
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+ }
+ });
+ }
+ }
+
+ public void resourceDeleted(Resource deletedResource) {
+ if ((deletedResource == getResource())) {
+ if (isDirty() == false) {
+ // just close now without prompt
+ getSite().getShell().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ getSite().getPage().closeEditor(PatternEditor.this, false);
+ }
+ });
+ } else {
+ resourceHasBeenRemoved = true;
+ }
+ }
+ }
+
+ public void resourceReloaded(Resource reloadedResource) {
+ if (reloadedResource == getResource()) {
+ resourceHasBeenExternallyChanged = false;
+ resourceHasBeenRemoved = false;
+ userHasSavedResource = false;
+ for (PatternEditorPage page : pages) {
+ page.rebind();
+ }
+ addPatternChangeAdapter();
+ getSite().getShell().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ getOperationHistory().dispose(undoContext, true, true, true);
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+ }
+ });
+ }
+ }
+
+ public void externalUpdate(Resource changedResource) {
+ if (changedResource == getResource()) {
+ resourceHasBeenExternallyChanged = true;
+ }
+ }
+
+ public void internalUpdate(Resource changedResource) {
+ if (changedResource == getResource()) {
+ resourceHasBeenExternallyChanged = false;
+ resourceHasBeenRemoved = false;
+ userHasSavedResource = false;
+ getSite().getShell().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+ String name = getPattern().getName();
+ if (initialPatternName != null && !initialPatternName.equals(name)) {
+ try {
+ ExtensionHelper.getExtension(getPattern().getNature()).getRefactoringManager().renamePattern(getPattern(), initialPatternName, name);
+ } catch (Exception e) {
+ Activator.getDefault().logError(e);
+ }
+ initialPatternName = name;
+ }
+ }
+ });
+ }
+ }
+
+ };
+
+ /**
+ * This listens for when the outline becomes active
+ */
+ protected IPartListener partListener = new IPartListener() {
+
+ public void partActivated(IWorkbenchPart p) {
+ if (p == PatternEditor.this) {
+ handleActivate();
+ }
+ }
+
+ public void partBroughtToTop(IWorkbenchPart p) {
+ // Nothing to do
+ }
+
+ public void partClosed(IWorkbenchPart p) {
+ // Nothing to do
+ }
+
+ public void partDeactivated(IWorkbenchPart p) {
+ // Nothing to do
+ }
+
+ public void partOpened(IWorkbenchPart p) {
+ // Nothing to do
+ }
+
+ };
+
+ private final List<PatternEditorPage> pages = new ArrayList<PatternEditorPage>();
+
+ /**
+ * Adapter used to update the problem indication when resources are demanded
+ * loaded.
+ */
+ protected EContentAdapter editorResourceAdapter = new EContentAdapter() {
+ @Override
+ public void notifyChanged(Notification notification) {
+ // Process Resource who belongs to a resource set
+ if (notification.getNotifier() instanceof Resource) {
+ switch (notification.getFeatureID(Resource.class)) {
+ case Resource.RESOURCE__URI: {
+ getSite().getShell().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+ }
+ });
+ break;
+ }
+ }
+ } else {
+ super.notifyChanged(notification);
+ }
+ }
+
+ @Override
+ protected void setTarget(Resource innerTarget) {
+ basicSetTarget(innerTarget);
+ }
+
+ @Override
+ protected void unsetTarget(Resource innerTarget) {
+ basicUnsetTarget(innerTarget);
+ }
+ };
+
+ // The adapter is for refreshing the editor title while the name of pattern
+ // has been changed.
+ AdapterImpl refresher = new AdapterImpl() {
+ @Override
+ public void notifyChanged(Notification msg) {
+ if (FcorePackage.Literals.NAMED_MODEL_ELEMENT__NAME.equals(msg.getFeature())) {
+ setPartName((String) msg.getNewValue());
+ }
+ }
+ };
+
+ public PatternEditor() {
+ initializeEditingDomain();
+ }
+
+ public boolean userHasSavedResource() {
+ return userHasSavedResource;
+ }
+
+ public boolean resourceHasBeenExternallyChanged() {
+ return resourceHasBeenExternallyChanged;
+ }
+
+ /**
+ * Handles activation of the editor or it's associated views.
+ */
+ protected void handleActivate() {
+ if (resourceHasBeenRemoved) {
+ if (handleDirtyConflict()) {
+ getSite().getPage().closeEditor(PatternEditor.this, false);
+ }
+ } else if (resourceHasBeenExternallyChanged) {
+ handleChangedResource();
+ }
+ }
+
+ /**
+ * Handles what to do with changed resource on activation.
+ */
+ protected void handleChangedResource() {
+ if (isDirty() == false || handleDirtyConflict()) {
+ EGFResourceLoadedListener.RESOURCE_MANAGER.reloadResource(getResource());
+ }
+ }
+
+ /**
+ * This is for implementing {@link IEditorPart} and simply saves the model
+ * file.
+ */
+ @Override
+ public void doSave(IProgressMonitor progressMonitor) {
+ // Do the work within an operation because this is a long running
+ // activity that modifies the
+ // workbench.
+ WorkspaceModifyOperation operation = new WorkspaceModifyOperation() {
+ // This is the method that gets invoked when the operation runs.
+ @Override
+ public void execute(IProgressMonitor monitor) {
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+ public void run() {
+ try {
+ Resource resourceToSave = getResource();
+ // Save the resource to the file system.
+ long timeStamp = resourceToSave.getTimeStamp();
+ resourceToSave.save(Collections.EMPTY_MAP);
+ if (resourceToSave.getTimeStamp() != timeStamp) {
+ userHasSavedResource = true;
+ }
+ } catch (IOException ioe) {
+ ThrowableHandler.handleThrowable(Activator.getDefault().getPluginID(), ioe);
+ }
+ }
+ });
+ } catch (Throwable t) {
+ ThrowableHandler.handleThrowable(Activator.getDefault().getPluginID(), t);
+ }
+ }
+ };
+
+ try {
+ // This runs the options, and shows progress.
+ new ProgressMonitorDialog(getSite().getShell()).run(true, false, operation);
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+ } catch (Throwable t) {
+ ThrowableHandler.handleThrowable(Activator.getDefault().getPluginID(), t);
+ }
+ }
+
+ @Override
+ public void doSaveAs() {
+ throw new UnsupportedOperationException();
+ }
+
+ public IOperationHistory getOperationHistory() {
+ return ((IWorkspaceCommandStack) editingDomain.getCommandStack()).getOperationHistory();
+ }
+
+ public ObjectUndoContext getUndoContext() {
+ return undoContext;
+ }
+
+ /**
+ * While the name of the pattern has been changed, refresh the editor title.
+ */
+ private void addPatternChangeAdapter() {
+ Display.getDefault().syncExec(new Runnable() {
+ public void run() {
+ Pattern pattern = getPattern();
+ if (pattern != null) {
+ pattern.eAdapters().add(refresher);
+ setPartName(pattern.getName());
+ }
+ }
+ });
+ }
+
+ /**
+ * Remove the Adapter add for refreshing the editor title
+ */
+ private void removePatternChangeAdapter() {
+ Pattern pattern = getPattern();
+ if (pattern != null && pattern.eAdapters().contains(refresher)) {
+ pattern.eAdapters().remove(refresher);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public Object getAdapter(Class key) {
+ if (key.equals(IUndoContext.class)) {
+ return undoContext;
+ }
+
+ return super.getAdapter(key);
+ }
+
+ @Override
+ public boolean isSaveAsAllowed() {
+ return false;
+ }
+
+ @Override
+ public boolean isDirty() {
+ if (getResource() == null) {
+ return false;
+ }
+ return getResource().isModified();
+ }
+
+ @Override
+ protected void addPages() {
+ try {
+ addPage(new OverviewPage(this));
+ addPage(new SpecificationPage(this));
+ addPage(new ImplementationPage(this));
+ } catch (PartInitException e) {
+ Activator.getDefault().logError(e);
+ }
+ }
+
+ private Pattern getPattern() {
+ PatternEditorInput input = (PatternEditorInput) getEditorInput();
+ if (input == null)
+ throw new IllegalStateException();
+ return input.getPattern();
+ }
+
+ public Resource getResource() {
+ PatternEditorInput input = (PatternEditorInput) getEditorInput();
+ if (input == null)
+ throw new IllegalStateException();
+ return input.getResource();
+ }
+
+ public TransactionalEditingDomain getEditingDomain() {
+ return editingDomain;
+ }
+
+ /**
+ * The <code>MultiPageEditorExample</code> implementation of this method
+ * checks that the input is an instance of <code>IFileEditorInput</code>.
+ */
+ @Override
+ public void init(IEditorSite site, IEditorInput editorInput) throws PartInitException {
+ if (editorInput instanceof PatternEditorInput == false) {
+ throw new PartInitException(Messages.Editor_wrong_input);
+ }
+ super.init(site, editorInput);
+ initialPatternName = getPattern().getName();
+ site.getPage().addPartListener(partListener);
+ resourceHasBeenExternallyChanged = EGFResourceLoadedListener.RESOURCE_MANAGER.resourceHasBeenExternallyChanged(getResource());
+ EGFResourceLoadedListener.RESOURCE_MANAGER.addObserver(this);
+ // populate operation history if applicable
+ EGFResourceLoadedListener.RESOURCE_MANAGER.populateUndoContext(getOperationHistory(), undoContext, getResource());
+ addPatternChangeAdapter();
+ }
+
+ protected void initializeEditingDomain() {
+ editingDomain = TransactionalEditingDomain.Registry.INSTANCE.getEditingDomain(EGFCorePlugin.EDITING_DOMAIN_ID);
+ undoContext = new ObjectUndoContext(this, "undoContext label"); //$NON-NLS-1$
+ getOperationHistory().addOperationHistoryListener(historyListener);
+ editingDomain.getResourceSet().eAdapters().add(editorResourceAdapter);
+ }
+
+ @Override
+ public void dispose() {
+ // if init failed, dispose should not called this
+ if (getEditorInput() != null && getEditorInput() instanceof PatternEditorInput) {
+ EGFResourceLoadedListener.RESOURCE_MANAGER.removeObserver(this);
+ getSite().getPage().removePartListener(partListener);
+ removePatternChangeAdapter();
+ }
+ // Initialized in initializeEditingDomain, if init failed, this must be disposed
+ getOperationHistory().removeOperationHistoryListener(historyListener);
+ getOperationHistory().dispose(undoContext, true, true, true);
+ editingDomain.getResourceSet().eAdapters().remove(editorResourceAdapter);
+ super.dispose();
+ }
+
+ private final IOperationHistoryListener historyListener = new IOperationHistoryListener() {
+ public void historyNotification(final OperationHistoryEvent event) {
+ Set<Resource> affectedResources = ResourceUndoContext.getAffectedResources(event.getOperation());
+ switch (event.getEventType()) {
+ case OperationHistoryEvent.DONE:
+ if (affectedResources.contains(getResource())) {
+ final IUndoableOperation operation = event.getOperation();
+ // remove the default undo context so that we can have
+ // independent undo/redo of independent resource changes
+ operation.removeContext(((IWorkspaceCommandStack) getEditingDomain().getCommandStack()).getDefaultUndoContext());
+ // add our undo context to populate our undo menu
+ operation.addContext(undoContext);
+ getSite().getShell().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+ }
+ });
+ }
+ break;
+ case OperationHistoryEvent.UNDONE:
+ case OperationHistoryEvent.REDONE:
+ if (affectedResources.contains(getResource())) {
+ getSite().getShell().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+ }
+ });
+ }
+ break;
+ }
+ }
+ };
+
+ public void addPage(PatternEditorPage page) throws PartInitException {
+ pages.add(page);
+ addPage((IFormPage) page);
+ }
+
+ /**
+ * Shows a dialog that asks if conflicting changes should be discarded. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ */
+ protected boolean handleDirtyConflict() {
+ return MessageDialog.openQuestion(getSite().getShell(), "File Conflict", //$NON-NLS-1$
+ "External changes, close the editor ?"); //$NON-NLS-1$
+ }
+
+ public ResourceListener getListener() {
+ return resourceListener;
+ }
+
+ public static void openEditor(IWorkbenchPage page, Pattern pattern) {
+ if (page == null || pattern == null)
+ throw new IllegalArgumentException();
+ Resource resource = pattern.eResource();
+ try {
+ IDE.openEditor(page, new PatternEditorInput(resource, pattern.getID()), "org.eclipse.egf.pattern.ui.editors.PatternEditor"); //$NON-NLS-1$
+ } catch (PartInitException e) {
+ Activator.getDefault().logError(e);
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/PatternEditorContributor.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/PatternEditorContributor.java
new file mode 100644
index 0000000..68c1855
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/PatternEditorContributor.java
@@ -0,0 +1,67 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors;
+
+import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
+import org.eclipse.emf.workspace.ui.actions.RedoActionWrapper;
+import org.eclipse.emf.workspace.ui.actions.UndoActionWrapper;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.ActionFactory;
+
+/**
+ * Manages the installation/deinstallation of global actions for multi-page
+ * editors.
+ * Responsible for the redirection of global actions to the active editor.
+ * Multi-page contributor replaces the contributors for the individual editors
+ * in the multi-page editor.
+ *
+ * @author Thomas Guiu
+ *
+ */
+public class PatternEditorContributor extends EditingDomainActionBarContributor {
+
+ public PatternEditorContributor() {
+ super(ADDITIONS_LAST_STYLE);
+ }
+
+ /**
+ * Extends the inherited method to replace the action handlers for undo
+ * and redo with our operation-history-aware implementations.
+ */
+ @Override
+ public void init(IActionBars actionBars) {
+ super.init(actionBars);
+
+ ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages();
+
+ undoAction = new UndoActionWrapper();
+ undoAction.setImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_UNDO));
+ actionBars.setGlobalActionHandler(ActionFactory.UNDO.getId(), undoAction);
+
+ redoAction = new RedoActionWrapper();
+ redoAction.setImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_REDO));
+ actionBars.setGlobalActionHandler(ActionFactory.REDO.getId(), redoAction);
+
+ actionBars.setGlobalActionHandler(ActionFactory.CUT.getId(), null);
+
+ actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), null);
+
+ actionBars.setGlobalActionHandler(ActionFactory.PASTE.getId(), null);
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/PatternEditorInput.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/PatternEditorInput.java
new file mode 100644
index 0000000..cb4a8d7
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/PatternEditorInput.java
@@ -0,0 +1,110 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors;
+
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.IPersistableElement;
+
+/**
+ *
+ * @author Thomas Guiu
+ *
+ */
+
+public class PatternEditorInput implements IEditorInput {
+
+ public static final String PATTERN_ID = "patternId"; //$NON-NLS-1$
+
+ public static final String RESSOURCE_URI = "uri"; //$NON-NLS-1$
+
+ private final PatternPersistableElement persistable = new PatternPersistableElement();
+
+ private final String fragment;
+
+ private final Resource resource;
+
+ // Add for test read only mode --start;
+ private boolean isReadOnly = false;
+
+ public void setReadOnly(boolean isReadOnly) {
+ this.isReadOnly = isReadOnly;
+ }
+
+ // Add for test read only mode --end;
+
+ public PatternEditorInput(Resource resource, String fragment) {
+ if (fragment == null || resource == null)
+ throw new IllegalArgumentException();
+ this.resource = resource;
+ this.fragment = fragment;
+ }
+
+ public boolean exists() {
+ return true;
+ }
+
+ public boolean isReadOnly() {
+ return isReadOnly;
+ }
+
+ public Pattern getPattern() {
+ return (Pattern) resource.getEObject(fragment);
+ }
+
+ public Resource getResource() {
+ return resource;
+ }
+
+ public ImageDescriptor getImageDescriptor() {
+ return null;
+ }
+
+ public String getName() {
+ if (getPattern() == null)
+ return ""; //$NON-NLS-1$
+ return getPattern().getName();
+ }
+
+ public IPersistableElement getPersistable() {
+ return persistable;
+ }
+
+ public String getToolTipText() {
+ return resource.getURI().toPlatformString(false);
+ }
+
+ public Object getAdapter(Class adapter) {
+ return null;
+ }
+
+ private class PatternPersistableElement implements IPersistableElement {
+ public void saveState(IMemento memento) {
+ if (getPattern() != null) {
+ memento.putString(PATTERN_ID, getPattern().getID());
+ memento.putString(RESSOURCE_URI, resource.getURI().toString());
+ }
+ }
+
+ public String getFactoryId() {
+ return "org.eclipse.egf.pattern.ui.pattern.factory.id"; //$NON-NLS-1$
+ }
+
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/PatternElementFactory.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/PatternElementFactory.java
new file mode 100644
index 0000000..61e7e61
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/PatternElementFactory.java
@@ -0,0 +1,47 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.ui.IElementFactory;
+import org.eclipse.ui.IMemento;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class PatternElementFactory implements IElementFactory {
+
+ public IAdaptable createElement(IMemento memento) {
+ final String patternId = memento.getString(PatternEditorInput.PATTERN_ID);
+ final String patternMethodId = memento.getString(PatternMethodEditorInput.PATTERN_METHOD_ID);
+ final String resourceURI = memento.getString(PatternEditorInput.RESSOURCE_URI);
+ URI uri = URI.createURI(resourceURI);
+ TransactionalEditingDomain editingDomain = TransactionalEditingDomain.Registry.INSTANCE.getEditingDomain(EGFCorePlugin.EDITING_DOMAIN_ID);
+
+ Resource res = editingDomain.getResourceSet().getResource(uri, true);
+ if (patternId != null)
+ return new PatternEditorInput(res, patternId);
+ if (patternMethodId != null)
+ return new PatternMethodEditorInput(res, patternMethodId);
+ throw new IllegalStateException();
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/PatternMethodEditorInput.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/PatternMethodEditorInput.java
new file mode 100644
index 0000000..4c8f9c5
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/PatternMethodEditorInput.java
@@ -0,0 +1,141 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors;
+
+import java.io.ByteArrayInputStream;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IStorage;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.core.fcore.IPlatformFcore;
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.pattern.ui.Messages;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.IPersistableElement;
+
+/**
+ *
+ * @author Thomas Guiu
+ *
+ */
+
+public class PatternMethodEditorInput implements IFileEditorInput {
+ public static final String PATTERN_METHOD_ID = "methodId";
+ public static final String RESSOURCE_URI = "uri";
+
+ private final PatternPersistableElement persistable = new PatternPersistableElement();
+ private final String fragment;
+ private final Resource resource;
+
+ private String path;
+
+ public PatternMethodEditorInput(Resource resource, String fragment) {
+ this.resource = resource;
+ this.fragment = fragment;
+ this.path = getPatternMethod().getPatternFilePath().path();
+ }
+
+ public boolean exists() {
+
+ return true;
+ }
+
+ public PatternMethod getPatternMethod() {
+ return (PatternMethod) resource.getEObject(fragment);
+ }
+
+ public Resource getResource() {
+ return resource;
+ }
+
+ public ImageDescriptor getImageDescriptor() {
+
+ return null;
+ }
+
+ public String getName() {
+
+ return getPatternMethod().getName();
+ }
+
+ public IPersistableElement getPersistable() {
+
+ return persistable;
+ }
+
+ public String getToolTipText() {
+ if (getPatternMethod() != null) {
+ return getPatternMethod().getName();
+ } else {
+ return Messages.input_tooltip;
+ }
+ }
+
+ public Object getAdapter(Class adapter) {
+ if (IFile.class == adapter) {
+ return getFile();
+ }
+ return null;
+ }
+
+ private class PatternPersistableElement implements IPersistableElement {
+ public void saveState(IMemento memento) {
+ memento.putString(PATTERN_METHOD_ID, getPatternMethod().getID());
+ memento.putString(RESSOURCE_URI, resource.getURI().toString());
+ }
+
+ public String getFactoryId() {
+
+ return "org.eclipse.egf.pattern.ui.pattern.factory.id";
+ }
+
+ }
+
+ public IFile getFile() {
+ IPlatformFcore platformFcore = EGFCorePlugin.getPlatformFcore(getResource());
+ IProject project = platformFcore.getPlatformBundle().getProject();
+ PatternMethod patternMethod = getPatternMethod();
+ IFile file;
+ if (patternMethod == null)
+ return project.getFile(path);
+ file = project.getFile(patternMethod.getPatternFilePath().path());
+ if (file.exists())
+ return file;
+ // this is a new method so we need to create the template file
+ try {
+ file.create(new ByteArrayInputStream(new byte[0]), true, null);
+ } catch (CoreException e) {
+ /*
+ * all modifications of the recources that subclipse
+ * touches do happen outside of eclipse own
+ * control.Resources
+ * are out of synch .
+ */
+ // Activator.getDefault().logError(e);
+ }
+ return file;
+ }
+
+ public IStorage getStorage() throws CoreException {
+
+ return getFile();
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/actions/OpenPatternDebugAction.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/actions/OpenPatternDebugAction.java
new file mode 100644
index 0000000..f73155d
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/actions/OpenPatternDebugAction.java
@@ -0,0 +1,79 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.actions;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.egf.common.helper.URIHelper;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternLibrary;
+import org.eclipse.egf.model.pattern.PatternViewpoint;
+import org.eclipse.egf.pattern.ui.editors.PatternEditorInput;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PartInitException;
+
+/**
+ *
+ * @author Thomas Guiu
+ *
+ */
+
+public class OpenPatternDebugAction implements IObjectActionDelegate {
+
+ protected IStructuredSelection selection;
+
+ private IWorkbenchPart targetPart;
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ this.selection = (IStructuredSelection) selection;
+ }
+
+ public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+ this.targetPart = targetPart;
+
+ }
+
+ public void run(IAction action) {
+ try {
+ IFile file = (IFile) selection.getFirstElement();
+ URI uri = URIHelper.getPlatformURI(file.getFullPath());
+ TransactionalEditingDomain editingDomain = TransactionalEditingDomain.Registry.INSTANCE.getEditingDomain(EGFCorePlugin.EDITING_DOMAIN_ID);
+
+ Resource res = editingDomain.getResourceSet().getResource(uri, true);
+
+ FactoryComponent fc = (FactoryComponent) res.getContents().get(0);
+ PatternViewpoint pvp = (PatternViewpoint) fc.getViewpointContainer().getViewpoints().get(0);
+ PatternLibrary patternLibrary = pvp.getLibraries().get(0);
+
+ Pattern pattern = (Pattern) patternLibrary.getElements().get(0);
+ // URI uri2 = EcoreUtil.getURI(pattern);
+ PatternEditorInput input = new PatternEditorInput(res, pattern.getID());
+
+ targetPart.getSite().getPage().openEditor(input, "org.eclipse.egf.pattern.ui.editors.PatternEditor");
+ } catch (PartInitException e) {
+ e.printStackTrace();
+
+ }
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/actions/OpenPatternTemplateDebugAction.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/actions/OpenPatternTemplateDebugAction.java
new file mode 100644
index 0000000..a2ecfc0
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/actions/OpenPatternTemplateDebugAction.java
@@ -0,0 +1,81 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.actions;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.egf.common.helper.URIHelper;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternLibrary;
+import org.eclipse.egf.model.pattern.PatternViewpoint;
+import org.eclipse.egf.pattern.ui.Activator;
+import org.eclipse.egf.pattern.ui.editors.PatternEditorInput;
+import org.eclipse.egf.pattern.ui.editors.templateEditor.TemplateExtensionRegistry;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.ide.IDE;
+
+/**
+ *
+ * @author Thomas Guiu
+ *
+ */
+
+public class OpenPatternTemplateDebugAction implements IObjectActionDelegate {
+
+ protected IStructuredSelection selection;
+
+ private IWorkbenchPart targetPart;
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ this.selection = (IStructuredSelection) selection;
+ }
+
+ public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+ this.targetPart = targetPart;
+
+ }
+
+ public void run(IAction action) {
+ Object firstElement = selection.getFirstElement();
+ TransactionalEditingDomain editingDomain = TransactionalEditingDomain.Registry.INSTANCE.getEditingDomain(EGFCorePlugin.EDITING_DOMAIN_ID);
+ IFile file = (IFile) firstElement;
+ URI uri = URIHelper.getPlatformURI(file.getFullPath());
+ Resource res = editingDomain.getResourceSet().getResource(uri, true);
+ FactoryComponent fc = (FactoryComponent) res.getContents().get(0);
+ PatternViewpoint pvp = (PatternViewpoint) fc.getViewpointContainer().getViewpoints().get(0);
+ PatternLibrary patternLibrary = pvp.getLibraries().get(0);
+ Pattern pattern = (Pattern) patternLibrary.getElements().get(0);
+ String editor = TemplateExtensionRegistry.getEditor(pattern);
+ if (editor != null) {
+ try {
+ PatternEditorInput input = new PatternEditorInput(pattern.eResource(), pattern.getID());
+ IDE.openEditor(targetPart.getSite().getPage(), input, editor);
+ } catch (PartInitException e) {
+ Activator.getDefault().logError(e);
+ }
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/actions/OpenReadOnlyPatternDebugAction.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/actions/OpenReadOnlyPatternDebugAction.java
new file mode 100644
index 0000000..e822407
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/actions/OpenReadOnlyPatternDebugAction.java
@@ -0,0 +1,82 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.actions;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.egf.common.helper.URIHelper;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternLibrary;
+import org.eclipse.egf.model.pattern.PatternViewpoint;
+import org.eclipse.egf.pattern.ui.editors.PatternEditorInput;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PartInitException;
+
+/**
+ * This class is used to test open the editor on a pattern in read only mode
+ *
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class OpenReadOnlyPatternDebugAction implements IObjectActionDelegate {
+
+ protected IStructuredSelection selection;
+
+ private IWorkbenchPart targetPart;
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ this.selection = (IStructuredSelection) selection;
+ }
+
+ public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+ this.targetPart = targetPart;
+
+ }
+
+ public void run(IAction action) {
+ try {
+ IFile file = (IFile) selection.getFirstElement();
+ URI uri = URIHelper.getPlatformURI(file.getFullPath());
+ TransactionalEditingDomain editingDomain = TransactionalEditingDomain.Registry.INSTANCE.getEditingDomain(EGFCorePlugin.EDITING_DOMAIN_ID);
+
+ Resource res = editingDomain.getResourceSet().getResource(uri, true);
+
+ FactoryComponent fc = (FactoryComponent) res.getContents().get(0);
+ PatternViewpoint pvp = (PatternViewpoint) fc.getViewpointContainer().getViewpoints().get(0);
+ PatternLibrary patternLibrary = pvp.getLibraries().get(0);
+
+ Pattern pattern = (Pattern) patternLibrary.getElements().get(0);
+ // URI uri2 = EcoreUtil.getURI(pattern);
+ PatternEditorInput input = new PatternEditorInput(res, pattern.getID());
+ // Set the editor on a pattern in read only mode.
+ input.setReadOnly(true);
+
+ targetPart.getSite().getPage().openEditor(input, "org.eclipse.egf.pattern.ui.editors.PatternEditor");
+ } catch (PartInitException e) {
+ e.printStackTrace();
+
+ }
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/adapter/LiveValidationContentAdapter.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/adapter/LiveValidationContentAdapter.java
new file mode 100644
index 0000000..e90b0e9
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/adapter/LiveValidationContentAdapter.java
@@ -0,0 +1,56 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.adapter;
+
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.pattern.ui.PatternUIHelper;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.util.EContentAdapter;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.forms.IMessageManager;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class LiveValidationContentAdapter extends EContentAdapter {
+ private Control control;
+
+ private IMessageManager mmng;
+
+ private String key;
+
+ private Pattern pattern;
+
+ public LiveValidationContentAdapter(Control control, IMessageManager mmng, String key, Pattern pattern) {
+ this.control = control;
+ this.mmng = mmng;
+ this.key = key;
+ this.pattern = pattern;
+ }
+
+ public void notifyChanged(final Notification notification) {
+ super.notifyChanged(notification);
+
+ Object feature = notification.getFeature();
+ if (feature == null) {
+ return;
+ }
+
+ PatternUIHelper.validationContent(mmng, pattern, key, control);
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/adapter/RefresherAdapter.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/adapter/RefresherAdapter.java
new file mode 100644
index 0000000..46e4a61
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/adapter/RefresherAdapter.java
@@ -0,0 +1,26 @@
+package org.eclipse.egf.pattern.ui.editors.adapter;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.jface.viewers.TableViewer;
+
+public class RefresherAdapter extends AdapterImpl {
+
+ private TableViewer tableViewer;
+
+ public RefresherAdapter(TableViewer tableViewer) {
+ this.tableViewer = tableViewer;
+ }
+
+ public void notifyChanged(org.eclipse.emf.common.notify.Notification msg) {
+ if (msg.isTouch()) {
+ return;
+ }
+ if (msg.getFeature() instanceof EAttribute && (msg.getEventType() == Notification.SET || msg.getEventType() == Notification.UNSET)) {
+ if (tableViewer != null && tableViewer.getTable() != null && !tableViewer.getTable().isDisposed()) {
+ tableViewer.refresh();
+ }
+ }
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/dialogs/ContainerLibrarySelectionDialog.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/dialogs/ContainerLibrarySelectionDialog.java
new file mode 100644
index 0000000..b07aebd
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/dialogs/ContainerLibrarySelectionDialog.java
@@ -0,0 +1,187 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.dialogs;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.egf.model.pattern.PatternLibrary;
+import org.eclipse.egf.pattern.engine.PatternHelper;
+import org.eclipse.egf.pattern.ui.Messages;
+import org.eclipse.egf.pattern.ui.editors.providers.CommonListContentProvider;
+import org.eclipse.egf.pattern.ui.editors.providers.ContainerLibraryLabelProvider;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jface.util.Policy;
+import org.eclipse.jface.util.Util;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class ContainerLibrarySelectionDialog extends PatternElementSelectionDialog {
+ private TableViewer tableViewer;
+
+ private Text text;
+
+ private PatternLibrary patternLibrary;
+
+ private String librayName;
+
+ private List<PatternLibrary> containerLibrarys;
+
+ public ContainerLibrarySelectionDialog(Shell shell, PatternLibrary patternLibrary) {
+ super(shell);
+ this.patternLibrary = patternLibrary;
+ if (patternLibrary != null) {
+ librayName = patternLibrary.getName();
+ }
+ }
+
+ protected Control createDialogArea(Composite parent) {
+ containerLibrarys = getContainerLibraryList();
+ checkContainerExist(librayName);
+
+ Composite dialogArea = (Composite) super.createDialogArea(parent);
+ Composite container = new Composite(dialogArea, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.marginWidth = 5;
+ container.setLayout(layout);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ gd.minimumHeight = 380;
+ container.setLayoutData(gd);
+
+ Label patternLabel = new Label(container, SWT.NONE);
+ patternLabel.setText(Messages.ContainerLibrarySelectionDialog_pattern_label);
+
+ text = new Text(container, SWT.BORDER);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.widthHint = 550;
+ text.setLayoutData(gd);
+ text.setText("");
+ text.addModifyListener(new ModifyListener() {
+
+ public void modifyText(ModifyEvent e) {
+ List<PatternLibrary> listAreaDisplay = getListAreaDisplay(text.getText());
+ tableViewer.setInput(listAreaDisplay);
+ checkContainerExist(text.getText());
+ getSelectDefault(listAreaDisplay);
+ }
+ });
+
+ Label label = new Label(container, SWT.NONE);
+ label.setText(Messages.ContainerLibrarySelectionDialog_dialogArea_label);
+
+ createListArea(container);
+ return dialogArea;
+ }
+
+ private void createListArea(Composite container) {
+ Table listTable = new Table(container, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ listTable.setLayoutData(gd);
+
+ TableColumn tableColumn = new TableColumn(listTable, SWT.NONE);
+ tableColumn.setWidth(500);
+ tableViewer = new TableViewer(listTable);
+
+ tableViewer.setLabelProvider(new ContainerLibraryLabelProvider());
+ tableViewer.setContentProvider(new CommonListContentProvider());
+ List<PatternLibrary> listAreaDisplay = getListAreaDisplay(librayName);
+ tableViewer.setInput(listAreaDisplay);
+ getSelectDefault(listAreaDisplay);
+
+ tableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ public void selectionChanged(SelectionChangedEvent event) {
+ IStructuredSelection selection = (IStructuredSelection) event.getSelection();
+ if (selection.getFirstElement() instanceof PatternLibrary) {
+ patternLibrary = (PatternLibrary) selection.getFirstElement();
+ }
+ }
+ });
+
+ tableViewer.addDoubleClickListener(new IDoubleClickListener() {
+
+ public void doubleClick(DoubleClickEvent event) {
+ okPressed();
+ }
+ });
+ }
+
+ /**
+ * Get all the library containers.
+ */
+ private List<PatternLibrary> getContainerLibraryList() {
+ containerLibrarys = new ArrayList<PatternLibrary>();
+ Set<PatternLibrary> allLibrarys = PatternHelper.TRANSACTIONNAL_COLLECTOR.getAllLibraries();
+ for (PatternLibrary library : allLibrarys) {
+ containerLibrarys.add(library);
+ }
+ return containerLibrarys;
+ }
+
+ private void checkContainerExist(String name) {
+ IStatus fLastStatusErr = new Status(IStatus.ERROR, JavaCore.PLUGIN_ID, -1, "", null);
+ IStatus fLastStatusOk = new Status(IStatus.OK, Policy.JFACE, IStatus.OK, Util.ZERO_LENGTH_STRING, null);
+ if (getListAreaDisplay(name).size() > 0) {
+ updateStatus(fLastStatusOk);
+ return;
+ }
+ updateStatus(fLastStatusErr);
+ }
+
+ private List<PatternLibrary> getListAreaDisplay(String name) {
+ List<PatternLibrary> containerLibrarysNew = new ArrayList<PatternLibrary>();
+ for (PatternLibrary containerLibrary : containerLibrarys) {
+ if (searchContainer(containerLibrary.getName(), name)) {
+ containerLibrarysNew.add(containerLibrary);
+ }
+ }
+ return containerLibrarysNew;
+ }
+
+ private void getSelectDefault(List<PatternLibrary> model) {
+ Object selectEntry = selectDefault(model, tableViewer);
+ if (selectEntry instanceof PatternLibrary) {
+ patternLibrary = (PatternLibrary) selectEntry;
+ }
+ }
+
+ public PatternLibrary getLibraryContainer() {
+ return patternLibrary;
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/dialogs/EcoreModelSelectionDialog.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/dialogs/EcoreModelSelectionDialog.java
new file mode 100644
index 0000000..5fd4daf
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/dialogs/EcoreModelSelectionDialog.java
@@ -0,0 +1,227 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.dialogs;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EPackage.Registry;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.emf.ecore.presentation.EcoreEditorPlugin;
+import org.eclipse.emf.ecore.provider.EcoreEditPlugin;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.ui.action.LoadResourceAction.LoadResourceDialog;
+import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.dialogs.ElementListSelectionDialog;
+
+/**
+ *
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class EcoreModelSelectionDialog extends LoadResourceDialog {
+ protected Set<EPackage> registeredPackages = new LinkedHashSet<EPackage>();
+
+ public EcoreModelSelectionDialog(Shell parent, EditingDomain domain) {
+ super(parent, domain);
+ }
+
+ @Override
+ protected boolean processResource(Resource resource) {
+ // Put all static package in the package registry.
+ //
+ ResourceSet resourceSet = domain.getResourceSet();
+ if (!resourceSet.getResources().contains(resource)) {
+ Registry packageRegistry = resourceSet.getPackageRegistry();
+ for (EPackage ePackage : getAllPackages(resource)) {
+ packageRegistry.put(ePackage.getNsURI(), ePackage);
+ registeredPackages.add(ePackage);
+ }
+ }
+ return true;
+ }
+
+ public Set<EPackage> getRegisteredPackages() {
+ return registeredPackages;
+ }
+
+ protected Collection<EPackage> getAllPackages(Resource resource) {
+ List<EPackage> result = new ArrayList<EPackage>();
+ for (TreeIterator<?> j = new EcoreUtil.ContentTreeIterator<Object>(resource.getContents()) {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected Iterator<? extends EObject> getEObjectChildren(EObject eObject) {
+ return eObject instanceof EPackage ? ((EPackage) eObject).getESubpackages().iterator() : Collections.<EObject> emptyList().iterator();
+ }
+ }; j.hasNext();) {
+ Object content = j.next();
+ if (content instanceof EPackage) {
+ result.add((EPackage) content);
+ }
+ }
+ return result;
+ }
+
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ Composite composite = (Composite) super.createDialogArea(parent);
+ Composite buttonComposite = (Composite) composite.getChildren()[0];
+ Button browseRegisteredPackagesButton = new Button(buttonComposite, SWT.PUSH);
+ browseRegisteredPackagesButton.setText(EcoreEditorPlugin.INSTANCE.getString("_UI_BrowseRegisteredPackages_label"));
+ prepareBrowseRegisteredPackagesButton(browseRegisteredPackagesButton);
+ {
+ FormData data = new FormData();
+ Control[] children = buttonComposite.getChildren();
+ data.left = new FormAttachment(0, 0);
+ data.right = new FormAttachment(children[0], -CONTROL_OFFSET);
+ browseRegisteredPackagesButton.setLayoutData(data);
+ }
+ return composite;
+ }
+
+ protected void prepareBrowseRegisteredPackagesButton(Button browseRegisteredPackagesButton) {
+ browseRegisteredPackagesButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent event) {
+ RegisteredPackageDialog registeredPackageDialog = new RegisteredPackageDialog(getShell());
+ registeredPackageDialog.open();
+ Object[] result = registeredPackageDialog.getResult();
+ if (result != null) {
+ List<?> nsURIs = Arrays.asList(result);
+ if (registeredPackageDialog.isDevelopmentTimeVersion()) {
+ ResourceSet resourceSet = new ResourceSetImpl();
+ resourceSet.getURIConverter().getURIMap().putAll(EcorePlugin.computePlatformURIMap());
+ StringBuffer uris = new StringBuffer();
+ Map<String, URI> ePackageNsURItoGenModelLocationMap = EcorePlugin.getEPackageNsURIToGenModelLocationMap();
+ for (int i = 0, length = result.length; i < length; i++) {
+ URI location = ePackageNsURItoGenModelLocationMap.get(result[i]);
+ Resource resource = resourceSet.getResource(location, true);
+ EcoreUtil.resolveAll(resource);
+ }
+ for (Resource resource : resourceSet.getResources()) {
+ for (EPackage ePackage : getAllPackages(resource)) {
+ if (nsURIs.contains(ePackage.getNsURI())) {
+ URI resourceUri = resource.getURI();
+ uris.append(resourceUri);
+ uris.append(" ");
+ break;
+ }
+ }
+ }
+ uriField.setText((uriField.getText() + " " + uris.toString()).trim());
+ } else {
+ StringBuffer uris = new StringBuffer();
+ for (int i = 0, length = result.length; i < length; i++) {
+ uris.append(result[i]);
+ uris.append(" ");
+ }
+ uriField.setText((uriField.getText() + " " + uris.toString()).trim());
+ }
+ }
+ }
+ });
+
+ }
+
+ public static class RegisteredPackageDialog extends ElementListSelectionDialog {
+ protected boolean isDevelopmentTimeVersion = true;
+
+ public RegisteredPackageDialog(Shell parent) {
+ super(parent, new LabelProvider() {
+ @Override
+ public Image getImage(Object element) {
+ return ExtendedImageRegistry.getInstance().getImage(EcoreEditPlugin.INSTANCE.getImage("full/obj16/EPackage"));
+ }
+ });
+
+ setMultipleSelection(true);
+ setMessage(EcoreEditorPlugin.INSTANCE.getString("_UI_SelectRegisteredPackageURI"));
+ setFilter("*");
+ setTitle(EcoreEditorPlugin.INSTANCE.getString("_UI_PackageSelection_label"));
+ }
+
+ public boolean isDevelopmentTimeVersion() {
+ return isDevelopmentTimeVersion;
+ }
+
+ protected void updateElements() {
+ if (isDevelopmentTimeVersion) {
+ Map<String, URI> ePackageNsURItoGenModelLocationMap = EcorePlugin.getEPackageNsURIToGenModelLocationMap();
+ Object[] result = ePackageNsURItoGenModelLocationMap.keySet().toArray(new Object[ePackageNsURItoGenModelLocationMap.size()]);
+ Arrays.sort(result);
+ setListElements(result);
+ } else {
+ Object[] result = EPackage.Registry.INSTANCE.keySet().toArray(new Object[EPackage.Registry.INSTANCE.size()]);
+ Arrays.sort(result);
+ setListElements(result);
+ }
+ }
+
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ Composite result = (Composite) super.createDialogArea(parent);
+ Composite buttonGroup = new Composite(result, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ buttonGroup.setLayout(layout);
+ final Button developmentTimeVersionButton = new Button(buttonGroup, SWT.RADIO);
+ developmentTimeVersionButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent event) {
+ isDevelopmentTimeVersion = developmentTimeVersionButton.getSelection();
+ updateElements();
+ }
+ });
+ developmentTimeVersionButton.setText(EcoreEditorPlugin.INSTANCE.getString("_UI_DevelopmentTimeVersion_label"));
+ Button runtimeTimeVersionButton = new Button(buttonGroup, SWT.RADIO);
+ runtimeTimeVersionButton.setText(EcoreEditorPlugin.INSTANCE.getString("_UI_RuntimeVersion_label"));
+ developmentTimeVersionButton.setSelection(true);
+
+ updateElements();
+
+ return result;
+ }
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/dialogs/JavaTypeSelectionDialog.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/dialogs/JavaTypeSelectionDialog.java
new file mode 100644
index 0000000..1164dd8
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/dialogs/JavaTypeSelectionDialog.java
@@ -0,0 +1,68 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.dialogs;
+
+import org.eclipse.jdt.core.search.IJavaSearchConstants;
+import org.eclipse.jdt.core.search.SearchEngine;
+import org.eclipse.jdt.internal.ui.dialogs.OpenTypeSelectionDialog;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.IWizardContainer;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+@SuppressWarnings("restriction")
+public class JavaTypeSelectionDialog extends OpenTypeSelectionDialog {
+
+ private Shell shell;
+ private IWizard wizard;
+
+ public JavaTypeSelectionDialog(Shell shell, IWizard wizard) {
+ super(shell, false, PlatformUI.getWorkbench().getProgressService(), SearchEngine.createWorkspaceScope(), IJavaSearchConstants.TYPE);
+ this.shell = shell;
+ this.wizard = wizard;
+ }
+
+ public Shell getShell() {
+ return shell;
+ }
+
+ public Control createPage(Composite parent) {
+ return dialogArea = createDialogArea(parent);
+ }
+
+ public void computeResult() {
+ super.computeResult();
+ }
+
+ @Override
+ protected void handleDoubleClick() {
+ okPressed();
+ wizard.performFinish();
+ IWizardContainer wizardContainer = wizard.getContainer();
+ if (wizardContainer instanceof WizardDialog) {
+ ((WizardDialog) wizardContainer).close();
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/dialogs/ListBuilderDialog.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/dialogs/ListBuilderDialog.java
new file mode 100644
index 0000000..1200c43
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/dialogs/ListBuilderDialog.java
@@ -0,0 +1,368 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.dialogs;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.egf.pattern.ui.ImageShop;
+import org.eclipse.egf.pattern.ui.Messages;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.viewers.AbstractTreeViewer;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IBaseLabelProvider;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerSorter;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.ui.dialogs.PatternFilter;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class ListBuilderDialog<E> extends Dialog {
+ protected final IBaseLabelProvider labelProvider;
+ protected final IStructuredContentProvider contentProvider;
+ protected String displayName;
+ protected EList<E> result;
+ protected boolean multiLine;
+
+ private List<?> possibleValues;
+ private final List<E> currentValues = new ArrayList<E>();
+
+ public ListBuilderDialog(Shell parent, IStructuredContentProvider contentProvider, IBaseLabelProvider labelProvider, List<E> possibleValues, List<E> initialValues) {
+ super(parent);
+ this.contentProvider = contentProvider;
+ this.labelProvider = labelProvider;
+ if (possibleValues == null)
+ throw new IllegalArgumentException();
+ if (labelProvider == null)
+ throw new IllegalArgumentException();
+ if (contentProvider == null)
+ throw new IllegalArgumentException();
+ if (initialValues == null)
+ throw new IllegalArgumentException();
+ this.currentValues.addAll(initialValues);
+ this.possibleValues = possibleValues;
+
+ }
+
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ Composite contents = (Composite) super.createDialogArea(parent);
+
+ GridLayout contentsGridLayout = (GridLayout) contents.getLayout();
+ contentsGridLayout.numColumns = 3;
+
+ GridData contentsGridData = (GridData) contents.getLayoutData();
+ contentsGridData.horizontalAlignment = SWT.FILL;
+ contentsGridData.verticalAlignment = SWT.FILL;
+
+ Text patternText = null;
+
+ {
+ Group filterGroupComposite = new Group(contents, SWT.NONE);
+ filterGroupComposite.setLayout(new GridLayout(2, false));
+ filterGroupComposite.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, true, false, 3, 1));
+
+ Label label = new Label(filterGroupComposite, SWT.NONE);
+ label.setText(Messages.ListBuilderDialog_searchPatternValue_label);
+
+ patternText = new Text(filterGroupComposite, SWT.BORDER);
+ patternText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ }
+
+ Composite initialComposite = new Composite(contents, SWT.NONE);
+ {
+ GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
+ data.horizontalAlignment = SWT.END;
+ initialComposite.setLayoutData(data);
+
+ GridLayout layout = new GridLayout();
+ data.horizontalAlignment = SWT.FILL;
+ layout.marginHeight = 0;
+ layout.marginWidth = 0;
+ layout.numColumns = 1;
+ initialComposite.setLayout(layout);
+ }
+
+ Label initialLabel = new Label(initialComposite, SWT.NONE);
+ initialLabel.setText(Messages.ListBuilderDialog_initialvalue_label);
+ GridData initialLabelGridData = new GridData();
+ initialLabelGridData.verticalAlignment = SWT.FILL;
+ initialLabelGridData.horizontalAlignment = SWT.FILL;
+ initialLabel.setLayoutData(initialLabelGridData);
+
+ final Tree initialTree = new Tree(initialComposite, SWT.MULTI | SWT.BORDER);
+ GridData initialTreeGridData = new GridData();
+ initialTreeGridData.widthHint = Display.getCurrent().getBounds().width / 5;
+ initialTreeGridData.heightHint = Display.getCurrent().getBounds().height / 3;
+ initialTreeGridData.verticalAlignment = SWT.FILL;
+ initialTreeGridData.horizontalAlignment = SWT.FILL;
+ initialTreeGridData.grabExcessHorizontalSpace = true;
+ initialTreeGridData.grabExcessVerticalSpace = true;
+ initialTree.setLayoutData(initialTreeGridData);
+
+ final TreeViewer initialTreeViewer = new TreeViewer(initialTree);
+ initialTreeViewer.setContentProvider(contentProvider);
+ initialTreeViewer.setLabelProvider(labelProvider);
+ final PatternFilter filter = new PatternFilter() {
+ @Override
+ protected boolean isParentMatch(Viewer viewer, Object element) {
+ return viewer instanceof AbstractTreeViewer && super.isParentMatch(viewer, element);
+ }
+ };
+ initialTreeViewer.addFilter(filter);
+ initialTreeViewer.setSorter(new ViewerSorter());
+ assert patternText != null;
+ patternText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ filter.setPattern(((Text) e.widget).getText());
+ initialTreeViewer.refresh();
+ }
+ });
+ initialTreeViewer.setInput(possibleValues);
+
+ Composite controlButtons = new Composite(contents, SWT.NONE);
+ GridData controlButtonsGridData = new GridData();
+ controlButtonsGridData.verticalAlignment = SWT.FILL;
+ controlButtonsGridData.horizontalAlignment = SWT.FILL;
+ controlButtons.setLayoutData(controlButtonsGridData);
+
+ GridLayout controlsButtonGridLayout = new GridLayout();
+ controlButtons.setLayout(controlsButtonGridLayout);
+
+ new Label(controlButtons, SWT.NONE);
+
+ final Button addButton = new Button(controlButtons, SWT.PUSH);
+ addButton.setText(Messages.SpecificationPage_button_add);
+ addButton.setImage(ImageShop.get(ImageShop.IMG_ADD_OBJ));
+ GridData addButtonGridData = new GridData();
+ addButtonGridData.verticalAlignment = SWT.FILL;
+ addButtonGridData.horizontalAlignment = SWT.FILL;
+ addButton.setLayoutData(addButtonGridData);
+
+ final Button removeButton = new Button(controlButtons, SWT.PUSH);
+ removeButton.setText(Messages.SpecificationPage_button_remove);
+ removeButton.setImage(ImageShop.get(ImageShop.IMG_DELETE_OBJ));
+ GridData removeButtonGridData = new GridData();
+ removeButtonGridData.verticalAlignment = SWT.FILL;
+ removeButtonGridData.horizontalAlignment = SWT.FILL;
+ removeButton.setLayoutData(removeButtonGridData);
+
+ Label spaceLabel = new Label(controlButtons, SWT.NONE);
+ GridData spaceLabelGridData = new GridData();
+ spaceLabelGridData.verticalSpan = 2;
+ spaceLabel.setLayoutData(spaceLabelGridData);
+
+ final Button upButton = new Button(controlButtons, SWT.PUSH);
+ upButton.setText(Messages.SpecificationPage_button_up);
+ upButton.setImage(ImageShop.get(ImageShop.IMG_UPWARD_OBJ));
+ GridData upButtonGridData = new GridData();
+ upButtonGridData.verticalAlignment = SWT.FILL;
+ upButtonGridData.horizontalAlignment = SWT.FILL;
+ upButton.setLayoutData(upButtonGridData);
+
+ final Button downButton = new Button(controlButtons, SWT.PUSH);
+ downButton.setText(Messages.SpecificationPage_button_down);
+ downButton.setImage(ImageShop.get(ImageShop.IMG_DOWNWARD_OBJ));
+ GridData downButtonGridData = new GridData();
+ downButtonGridData.verticalAlignment = SWT.FILL;
+ downButtonGridData.horizontalAlignment = SWT.FILL;
+ downButton.setLayoutData(downButtonGridData);
+
+ Composite currentComposite = new Composite(contents, SWT.NONE);
+ {
+ GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
+ data.horizontalAlignment = SWT.END;
+ currentComposite.setLayoutData(data);
+
+ GridLayout layout = new GridLayout();
+ data.horizontalAlignment = SWT.FILL;
+ layout.marginHeight = 0;
+ layout.marginWidth = 0;
+ layout.numColumns = 1;
+ currentComposite.setLayout(layout);
+ }
+
+ Label currentLabel = new Label(currentComposite, SWT.NONE);
+ currentLabel.setText(Messages.ListBuilderDialog_currentValue_label);
+ GridData currentLabelGridData = new GridData();
+ currentLabelGridData.horizontalSpan = 2;
+ currentLabelGridData.horizontalAlignment = SWT.FILL;
+ currentLabelGridData.verticalAlignment = SWT.FILL;
+ currentLabel.setLayoutData(currentLabelGridData);
+
+ final Tree currentTree = new Tree(currentComposite, SWT.MULTI | SWT.BORDER);
+ GridData currentTableGridData = new GridData();
+ currentTableGridData.widthHint = Display.getCurrent().getBounds().width / 5;
+ currentTableGridData.heightHint = Display.getCurrent().getBounds().height / 3;
+ currentTableGridData.verticalAlignment = SWT.FILL;
+ currentTableGridData.horizontalAlignment = SWT.FILL;
+ currentTableGridData.grabExcessHorizontalSpace = true;
+ currentTableGridData.grabExcessVerticalSpace = true;
+ currentTree.setLayoutData(currentTableGridData);
+
+ final TreeViewer currentTreeViewer = new TreeViewer(currentTree);
+ currentTreeViewer.setContentProvider(contentProvider);
+ currentTreeViewer.setLabelProvider(labelProvider);
+ currentTreeViewer.setInput(currentValues);
+ if (!currentValues.isEmpty()) {
+ currentTreeViewer.setSelection(new StructuredSelection(currentValues.get(0)));
+ }
+
+ if (initialTreeViewer != null) {
+ initialTreeViewer.addDoubleClickListener(new IDoubleClickListener() {
+ public void doubleClick(DoubleClickEvent event) {
+ if (addButton.isEnabled()) {
+ addButton.notifyListeners(SWT.Selection, null);
+ }
+ }
+ });
+
+ currentTreeViewer.addDoubleClickListener(new IDoubleClickListener() {
+ public void doubleClick(DoubleClickEvent event) {
+ if (removeButton.isEnabled()) {
+ removeButton.notifyListeners(SWT.Selection, null);
+ }
+ }
+ });
+ }
+
+ upButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent event) {
+ // IStructuredSelection selection = (IStructuredSelection)
+ // featureTableViewer.getSelection();
+ // int minIndex = 0;
+ // for (Iterator<?> i = selection.iterator(); i.hasNext();) {
+ // Object value = i.next();
+ // int index = initialValues.indexOf(value);
+ // initialValues.move(Math.max(index - 1, minIndex++), value);
+ // }
+ }
+ });
+
+ downButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent event) {
+ // IStructuredSelection selection = (IStructuredSelection)
+ // featureTableViewer.getSelection();
+ // int maxIndex = values.getChildren().size() -
+ // selection.size();
+ // for (Iterator<?> i = selection.iterator(); i.hasNext();) {
+ // Object value = i.next();
+ // int index = values.getChildren().indexOf(value);
+ // values.getChildren().move(Math.min(index + 1, maxIndex++),
+ // value);
+ // }
+ }
+ });
+
+ addButton.addSelectionListener(new SelectionAdapter() {
+ // event is null when choiceTableViewer is double clicked
+ @Override
+ public void widgetSelected(SelectionEvent event) {
+ IStructuredSelection selection = (IStructuredSelection) initialTreeViewer.getSelection();
+ for (Iterator<?> i = selection.iterator(); i.hasNext();) {
+ currentValues.add((E) i.next());
+ }
+ currentTreeViewer.setSelection(selection);
+ currentTreeViewer.refresh();
+ // if (choiceText != null) {
+ // try {
+ // Object value = EcoreUtil.createFromString((EDataType)
+ // eClassifier, choiceText.getText());
+ // values.getChildren().add(value);
+ // choiceText.setText("");
+ // featureTableViewer.setSelection(new
+ // StructuredSelection(value));
+ // } catch (RuntimeException exception) {
+ // // Ignore
+ // }
+ // }
+ }
+ });
+
+ removeButton.addSelectionListener(new SelectionAdapter() {
+ // event is null when featureTableViewer is double clicked
+ @Override
+ public void widgetSelected(SelectionEvent event) {
+ IStructuredSelection selection = (IStructuredSelection) currentTreeViewer.getSelection();
+ Object firstValue = null;
+ for (Iterator<?> i = selection.iterator(); i.hasNext();) {
+ Object value = i.next();
+ if (firstValue == null) {
+ firstValue = value;
+ }
+ currentValues.remove(value);
+ }
+
+ if (!currentValues.isEmpty()) {
+ currentTreeViewer.setSelection(new StructuredSelection(currentValues.get(0)));
+ }
+
+ initialTreeViewer.setSelection(selection);
+ currentTreeViewer.refresh();
+ // } else if (choiceText != null) {
+ // if (firstValue != null) {
+ // String value = EcoreUtil.convertToString((EDataType)
+ // eClassifier, firstValue);
+ // choiceText.setText(value);
+ // }
+ }
+ });
+
+ return contents;
+ }
+
+ @Override
+ protected void okPressed() {
+ super.okPressed();
+ }
+
+ @Override
+ public boolean close() {
+ contentProvider.dispose();
+ return super.close();
+ }
+
+ public List<E> getResult() {
+ return currentValues;
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/dialogs/MethodAddOrEditDialog.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/dialogs/MethodAddOrEditDialog.java
new file mode 100644
index 0000000..2bed099
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/dialogs/MethodAddOrEditDialog.java
@@ -0,0 +1,117 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.dialogs;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.egf.pattern.ui.Messages;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jface.util.Policy;
+import org.eclipse.jface.util.Util;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.dialogs.SelectionStatusDialog;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class MethodAddOrEditDialog extends SelectionStatusDialog {
+
+ private List<String> parentMethodNames;
+
+ private Combo combo;
+
+ private String name;
+
+ private String oldName;
+
+ public MethodAddOrEditDialog(Shell shell, List<String> parentMethods, String oldName) {
+ super(shell);
+ this.parentMethodNames = parentMethods;
+ this.oldName = oldName;
+ }
+
+ protected Control createDialogArea(Composite parent) {
+ final IStatus fLastStatusOk = new Status(IStatus.OK, Policy.JFACE, IStatus.OK, Util.ZERO_LENGTH_STRING, null);
+ final IStatus fLastStatusErr = new Status(IStatus.ERROR, JavaCore.PLUGIN_ID, -1, "", null);
+ updateStatus(fLastStatusErr);
+
+ Composite dialogArea = (Composite) super.createDialogArea(parent);
+
+ combo = new Combo(dialogArea, SWT.DROP_DOWN);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ combo.setLayoutData(gd);
+ combo.setText(oldName);
+ if (parentMethodNames != null) {
+ for (String parentMethodName : parentMethodNames) {
+ combo.add(parentMethodName);
+ }
+ }
+ combo.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ updateStatus(fLastStatusOk);
+ name = combo.getItem(combo.getSelectionIndex());
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+
+ }
+ });
+ combo.addModifyListener(new ModifyListener() {
+
+ public void modifyText(ModifyEvent e) {
+ name = combo.getText();
+ if ("".equals(name)) {
+ updateStatus(fLastStatusErr);
+ return;
+ }
+ updateStatus(fLastStatusOk);
+ }
+ });
+
+ checkRenameEnable();
+
+ return dialogArea;
+ }
+
+ private void checkRenameEnable() {
+ if (Messages.ImplementationPage_header.equals(oldName) || Messages.ImplementationPage_init.equals(oldName) || Messages.ImplementationPage_footer.equals(oldName)) {
+ combo.setEnabled(false);
+ }
+ }
+
+ @Override
+ protected void computeResult() {
+ // TODO Auto-generated method stub
+ }
+
+ public String getName() {
+ return name;
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/dialogs/ParametersEditDialog.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/dialogs/ParametersEditDialog.java
new file mode 100644
index 0000000..d5c77da
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/dialogs/ParametersEditDialog.java
@@ -0,0 +1,360 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.dialogs;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.egf.model.pattern.PatternParameter;
+import org.eclipse.egf.model.pattern.Query;
+import org.eclipse.egf.pattern.query.IQuery;
+import org.eclipse.egf.pattern.query.QueryKind;
+import org.eclipse.egf.pattern.ui.ImageShop;
+import org.eclipse.egf.pattern.ui.Messages;
+import org.eclipse.egf.pattern.ui.PatternUIHelper;
+import org.eclipse.egf.pattern.ui.editors.models.QueryContent;
+import org.eclipse.egf.pattern.ui.editors.modifiers.QueryContentTableCellModifier;
+import org.eclipse.egf.pattern.ui.editors.providers.CommonListContentProvider;
+import org.eclipse.egf.pattern.ui.editors.providers.QueryContentTableLabelProvider;
+import org.eclipse.emf.common.util.EMap;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jface.layout.TableColumnLayout;
+import org.eclipse.jface.util.Policy;
+import org.eclipse.jface.util.Util;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TextCellEditor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class ParametersEditDialog extends VariablesEditDialog {
+
+ private Combo queryCombo;
+
+ private String query;
+
+ private Query itemQuery;
+
+ private TableViewer tableViewer;
+
+ private Button add;
+
+ private Button remove;
+
+ public static final String KEY_ID = "key"; //$NON-NLS-1$
+
+ public static final String VALUE_ID = "value"; //$NON-NLS-1$
+
+ private List<QueryContent> queryContents;
+
+ public ParametersEditDialog(Shell shell, PatternParameter selectItem, TransactionalEditingDomain editingDomain) {
+ super(shell, selectItem, editingDomain);
+ setDefaultQuery(selectItem);
+ }
+
+ private void setDefaultQuery(PatternParameter selectItem) {
+ if (selectItem != null) {
+ itemQuery = selectItem.getQuery();
+ query = itemQuery == null ? "" : itemQuery.getExtensionId(); //$NON-NLS-1$
+ QueryKind queryKind = IQuery.INSTANCE.getQueryKind(query);
+ if (queryKind != null) {
+ query = queryKind.getName();
+ }
+ }
+ }
+
+ protected Control createDialogArea(Composite parent) {
+ Composite dialogArea = (Composite) super.createDialogArea(parent);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ dialogArea.setLayout(layout);
+
+ createLabel(dialogArea, Messages.ParametersEditDialog_Query);
+ queryCombo = new Combo(dialogArea, SWT.NONE | SWT.READ_ONLY);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ queryCombo.setLayoutData(gd);
+ queryCombo.add(query);
+ setQueryComboList(queryCombo, query);
+ queryCombo.addModifyListener(new ModifyListener() {
+
+ public void modifyText(ModifyEvent e) {
+ query = queryCombo.getText();
+ }
+ });
+ queryCombo.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ setQueryContentAreaStatus();
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+ queryCombo.select(0);
+ setQueryContentArea(dialogArea);
+ setQueryContentAreaStatus();
+ setButtonsStatus();
+ return dialogArea;
+ }
+
+ private void createQueryContentTable(Composite parent) {
+ Composite tableComp = new Composite(parent, SWT.NONE);
+ TableColumnLayout layout = new TableColumnLayout();
+ tableComp.setLayout(layout);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ gd.horizontalSpan = 2;
+ gd.heightHint = 100;
+ gd.widthHint = 400;
+ tableComp.setLayoutData(gd);
+
+ Table table = new Table(tableComp, SWT.FULL_SELECTION | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
+ table.setHeaderVisible(true);
+ table.setLinesVisible(true);
+
+ gd = new GridData(GridData.FILL_BOTH);
+ gd.verticalIndent = 10;
+ gd.horizontalIndent = 10;
+ gd.widthHint = 130;
+ table.setLayoutData(gd);
+
+ tableViewer = new TableViewer(table);
+ int[] colWidths = { 110, 200 };
+ String[] colNames = { Messages.ParametersEditDialog_Key_title, Messages.ParametersEditDialog_Value_title };
+ for (int i = 0; i < colWidths.length; i++) {
+ TableColumn tableColumn = new TableColumn(table, SWT.NONE);
+ tableColumn.setWidth(colWidths[i]);
+ tableColumn.setText(colNames[i]);
+ layout.setColumnData(tableColumn, new ColumnWeightData(colWidths[i], true));
+ }
+
+ tableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+
+ public void selectionChanged(SelectionChangedEvent event) {
+ checkKeyDuplicate();
+ setButtonsStatus();
+ }
+ });
+ initTableEditor();
+ tableViewer.setContentProvider(new CommonListContentProvider());
+ tableViewer.setLabelProvider(new QueryContentTableLabelProvider());
+ getInitTableInput();
+ tableViewer.setInput(queryContents);
+ }
+
+ private void initTableEditor() {
+ tableViewer.setColumnProperties(new String[] { KEY_ID, VALUE_ID });
+ final TextCellEditor stringEditor = new TextCellEditor(tableViewer.getTable());
+ tableViewer.setCellEditors(new CellEditor[] { stringEditor, stringEditor });
+
+ QueryContentTableCellModifier modifier = new QueryContentTableCellModifier(tableViewer);
+ tableViewer.setCellModifier(modifier);
+ }
+
+ private void setQueryContentArea(Composite parent) {
+ Label queryContextLabel = createLabel(parent, Messages.ParametersEditDialog_query_context_label);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 3;
+ queryContextLabel.setLayoutData(gd);
+
+ createQueryContentTable(parent);
+ createQueryContentButtons(parent);
+ }
+
+ private void createQueryContentButtons(Composite parent) {
+ Composite buttons = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ buttons.setLayout(layout);
+
+ GridData gd = new GridData();
+ gd.widthHint = 40;
+
+ add = new Button(buttons, SWT.PUSH);
+ add.setImage(ImageShop.get(ImageShop.IMG_ADD_OBJ));
+ add.setToolTipText(Messages.SpecificationPage_button_add);
+ add.setLayoutData(gd);
+ add.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ executeAdd();
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ remove = new Button(buttons, SWT.PUSH);
+ remove.setImage(ImageShop.get(ImageShop.IMG_DELETE_OBJ));
+ remove.setToolTipText(Messages.SpecificationPage_button_remove);
+ remove.setLayoutData(gd);
+ remove.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ executeRemove();
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+ }
+
+ /**
+ * Add a new entry for the content of a Map<String,String>.
+ */
+ private void executeAdd() {
+ String key = KEY_ID; //$NON-NLS-1$
+ String value = VALUE_ID; //$NON-NLS-1$
+ QueryContent newContent = new QueryContent(key, value);
+ if (queryContents == null) {
+ queryContents = new ArrayList<QueryContent>();
+ }
+ queryContents.add(newContent);
+ tableViewer.setInput(queryContents);
+ tableViewer.getTable().setSelection(tableViewer.getTable().getItemCount() - 1);
+ checkKeyDuplicate();
+ setButtonsStatus();
+ }
+
+ /**
+ * Remove a entry from the content of a Map<String,String>.
+ */
+ private void executeRemove() {
+ int selectionIndex = tableViewer.getTable().getSelectionIndex();
+ QueryContent selectItem = getSelectItem();
+ if (queryContents != null) {
+ queryContents.remove(selectItem);
+ }
+ tableViewer.setInput(queryContents);
+
+ int itemCount = tableViewer.getTable().getItemCount();
+ if (selectionIndex < itemCount) {
+ tableViewer.getTable().setSelection(selectionIndex);
+ } else {
+ tableViewer.getTable().setSelection(selectionIndex - 1);
+ }
+ setButtonsStatus();
+ }
+
+ /**
+ * Get the select item of table.
+ */
+ private QueryContent getSelectItem() {
+ int selectionIndex = tableViewer.getTable().getSelectionIndex();
+ Object element = tableViewer.getElementAt(selectionIndex);
+ if (element instanceof QueryContent) {
+ return (QueryContent) element;
+ }
+ return null;
+ }
+
+ private void setButtonsStatus() {
+ if (getSelectItem() == null) {
+ remove.setEnabled(false);
+ } else {
+ remove.setEnabled(true);
+ }
+ }
+
+ private void getInitTableInput() {
+ queryContents = new ArrayList<QueryContent>();
+ if (itemQuery != null) {
+ EMap<String, String> queryContext = itemQuery.getQueryContext();
+ Set<String> keySet = queryContext.keySet();
+ Iterator<String> iterator = keySet.iterator();
+ while (iterator.hasNext()) {
+ String key = iterator.next();
+ String value = queryContext.get(key);
+ QueryContent content = new QueryContent(key, value);
+ queryContents.add(content);
+ }
+ }
+ }
+
+ private void setQueryComboList(Combo combo, String query) {
+ List<QueryKind> availableQueries = IQuery.INSTANCE.getAvailableQueries();
+ for (QueryKind kind : availableQueries) {
+ String name = kind.getName();
+ if (!name.equals(query)) {
+ combo.add(name);
+ }
+ }
+ if (query != null && !"".equals(query)) {
+ combo.add("");
+ }
+ }
+
+ private void checkKeyDuplicate() {
+ IStatus fLastStatusErr = new Status(IStatus.ERROR, JavaCore.PLUGIN_ID, -1, Messages.ParametersEditDialog_duplicate_key_error_message, null);
+ IStatus fLastStatusOk = new Status(IStatus.OK, Policy.JFACE, IStatus.OK, Util.ZERO_LENGTH_STRING, null);
+ if (PatternUIHelper.hasDuplicateKey(queryContents)) {
+ updateStatus(fLastStatusErr);
+ } else {
+ updateStatus(fLastStatusOk);
+ }
+
+ }
+
+ private void setQueryContentAreaStatus() {
+ String query = getQuery();
+ if (query != null && !"".equals(query)) { //$NON-NLS-1$
+ setQueryContentAreaEnable(true);
+ } else {
+ setQueryContentAreaEnable(false);
+ queryContents = new ArrayList<QueryContent>();
+ tableViewer.setInput(queryContents);
+ }
+ }
+
+ private void setQueryContentAreaEnable(boolean isEnable) {
+ add.setEnabled(isEnable);
+ remove.setEnabled(isEnable);
+ tableViewer.getTable().setEnabled(isEnable);
+ }
+
+ public List<QueryContent> getQueryContents() {
+ return queryContents;
+ }
+
+ public String getQuery() {
+ return query;
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/dialogs/PatternElementSelectionDialog.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/dialogs/PatternElementSelectionDialog.java
new file mode 100644
index 0000000..5f0b8f3
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/dialogs/PatternElementSelectionDialog.java
@@ -0,0 +1,72 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.dialogs;
+
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.dialogs.SelectionStatusDialog;
+
+/**
+ *
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class PatternElementSelectionDialog extends SelectionStatusDialog {
+
+ public PatternElementSelectionDialog(Shell parent) {
+ super(parent);
+
+ }
+
+ @Override
+ protected void computeResult() {
+ }
+
+ /**
+ * Matching patternElements.
+ */
+ public static boolean searchContainer(String content, String regex) {
+ if (regex == null || regex.length() == 0)
+ return true;
+ try {
+ Matcher matcher = Pattern.compile(regex.toLowerCase()).matcher(content.toLowerCase());
+ if (matcher.find()) {
+ return true;
+ } else {
+ return false;
+ }
+ } catch (Exception e) {
+ return false;
+ }
+ }
+
+ /**
+ * Make list area's first element selected.
+ */
+ protected Object selectDefault(List<?> list, TableViewer tableViewer) {
+ if (list.size() > 0) {
+ tableViewer.setSelection(new StructuredSelection(list.get(0)));
+ return list.get(0);
+ }
+ return null;
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/dialogs/PatternSelectionDialog.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/dialogs/PatternSelectionDialog.java
new file mode 100644
index 0000000..7fe5a18
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/dialogs/PatternSelectionDialog.java
@@ -0,0 +1,211 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.dialogs;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.pattern.engine.PatternHelper;
+import org.eclipse.egf.pattern.ui.Messages;
+import org.eclipse.egf.pattern.ui.editors.providers.CommonListContentProvider;
+import org.eclipse.egf.pattern.ui.editors.providers.PatternSelectionLabelProvider;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jface.util.Policy;
+import org.eclipse.jface.util.Util;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class PatternSelectionDialog extends PatternElementSelectionDialog {
+
+ private Pattern parent;
+
+ private String parentName = "";
+
+ private TableViewer tableViewer;
+
+ private Text text;
+
+ private Text statusLine;
+
+ private List<Pattern> patternList;
+
+ public PatternSelectionDialog(Shell shell, Pattern parent) {
+ super(shell);
+ this.parent = parent;
+ if (parent != null) {
+ parentName = parent.getName();
+ }
+ }
+
+ protected Control createDialogArea(Composite parent) {
+ patternList = getPatternsList();
+ checkPatternExist(parentName);
+
+ Composite dialogArea = (Composite) super.createDialogArea(parent);
+ Composite container = new Composite(dialogArea, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.marginWidth = 5;
+ container.setLayout(layout);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ gd.minimumHeight = 380;
+ container.setLayoutData(gd);
+
+ Label patternLabel = new Label(container, SWT.NONE);
+ patternLabel.setText(Messages.PatternSelectiondialog_pattern_label);
+
+ text = new Text(container, SWT.BORDER);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.widthHint = 550;
+ text.setLayoutData(gd);
+ text.setText(parentName);
+ text.addModifyListener(new ModifyListener() {
+
+ public void modifyText(ModifyEvent e) {
+ List<Pattern> listAreaDisplay = getListAreaDisplay(text.getText());
+ tableViewer.setInput(listAreaDisplay);
+ parentName = text.getText();
+ checkPatternExist(text.getText());
+ getSelectDefault(listAreaDisplay);
+ }
+ });
+
+ Label label = new Label(container, SWT.NONE);
+ label.setText(Messages.PatternSelectiondialog_dialogArea_label);
+
+ createListArea(container);
+ createStatusLine(container);
+ return dialogArea;
+ }
+
+ private void createStatusLine(Composite container) {
+ String statusContent = PatternHelper.getPlatformFcore(parent).getName();
+ statusLine = new Text(container, SWT.BORDER);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ statusLine.setText(statusContent);
+ statusLine.setEditable(false);
+ statusLine.setLayoutData(gd);
+ }
+
+ private void createListArea(Composite container) {
+ Table listTable = new Table(container, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ listTable.setLayoutData(gd);
+
+ TableColumn tableColumn = new TableColumn(listTable, SWT.NONE);
+ tableColumn.setWidth(500);
+ tableViewer = new TableViewer(listTable);
+
+ tableViewer.setLabelProvider(new PatternSelectionLabelProvider());
+ tableViewer.setContentProvider(new CommonListContentProvider());
+ List<Pattern> listAreaDisplay = getListAreaDisplay(parentName);
+ tableViewer.setInput(listAreaDisplay);
+ getSelectDefault(listAreaDisplay);
+
+ tableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ public void selectionChanged(SelectionChangedEvent event) {
+ IStructuredSelection selection = (IStructuredSelection) event.getSelection();
+ if (selection.getFirstElement() instanceof Pattern) {
+ parent = (Pattern) selection.getFirstElement();
+ parentName = parent.getName();
+ String statusContent = PatternHelper.getPlatformFcore(parent).getName();
+ statusLine.setText(statusContent);
+ }
+ }
+ });
+
+ tableViewer.addDoubleClickListener(new IDoubleClickListener() {
+
+ public void doubleClick(DoubleClickEvent event) {
+ okPressed();
+ }
+ });
+
+ }
+
+ private List<Pattern> getPatternsList() {
+ patternList = new ArrayList<Pattern>();
+ Set<Pattern> patterns = PatternHelper.TRANSACTIONNAL_COLLECTOR.getAllPatterns();
+ for (Pattern pattern : patterns) {
+ patternList.add(pattern);
+ }
+ return patternList;
+ }
+
+ private List<Pattern> getListAreaDisplay(String name) {
+ List<Pattern> patternsListNew = new ArrayList<Pattern>();
+ for (Object patternEntry : patternList) {
+ if (patternEntry instanceof Pattern) {
+ Pattern pattern = (Pattern) patternEntry;
+ String content = pattern.getName();
+ if (searchContainer(content, name)) {
+ patternsListNew.add(pattern);
+ }
+ }
+ }
+ return patternsListNew;
+ }
+
+ private void checkPatternExist(String name) {
+ IStatus fLastStatusErr = new Status(IStatus.ERROR, JavaCore.PLUGIN_ID, -1, "", null);
+ IStatus fLastStatusOk = new Status(IStatus.OK, Policy.JFACE, IStatus.OK, Util.ZERO_LENGTH_STRING, null);
+ if (getListAreaDisplay(name).size() > 0) {
+ updateStatus(fLastStatusOk);
+ return;
+ }
+ updateStatus(fLastStatusErr);
+ }
+
+ private void getSelectDefault(List<Pattern> model) {
+ Object selectEntry = selectDefault(model, tableViewer);
+ if (selectEntry instanceof Pattern) {
+ parent = (Pattern) selectEntry;
+ parentName = parent.getName();
+ }
+ }
+
+ public Pattern getParent() {
+ return parent;
+ }
+
+ public String getParentName() {
+ return parentName;
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/dialogs/VariablesEditDialog.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/dialogs/VariablesEditDialog.java
new file mode 100644
index 0000000..d957dc7
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/dialogs/VariablesEditDialog.java
@@ -0,0 +1,170 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.dialogs;
+
+import org.eclipse.egf.model.fcore.NamedModelElement;
+import org.eclipse.egf.model.pattern.PatternParameter;
+import org.eclipse.egf.model.pattern.PatternVariable;
+import org.eclipse.egf.pattern.ui.Messages;
+import org.eclipse.egf.pattern.ui.editors.providers.ParametersTableLabelProvider;
+import org.eclipse.egf.pattern.ui.editors.wizards.OpenTypeWizard;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jdt.internal.core.BinaryType;
+import org.eclipse.jface.window.Window;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.SelectionStatusDialog;
+
+/**
+ *
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+@SuppressWarnings("restriction")
+public class VariablesEditDialog extends SelectionStatusDialog {
+
+ private Text nameText;
+
+ private Text typeText;
+
+ private String name;
+
+ private String typeName;
+
+ private String type;
+
+ private TransactionalEditingDomain editingDomain;
+
+ public VariablesEditDialog(Shell shell, Object selectItem, TransactionalEditingDomain editingDomain) {
+ super(shell);
+ this.editingDomain = editingDomain;
+ setDefaultValue(selectItem);
+ }
+
+ private void setDefaultValue(Object selectItem) {
+ if (selectItem instanceof PatternVariable) {
+ PatternVariable PatternVariable = (PatternVariable) selectItem;
+ type = PatternVariable.getType();
+ setValue(PatternVariable);
+ } else if (selectItem instanceof PatternParameter) {
+ PatternParameter patternParameter = (PatternParameter) selectItem;
+ type = patternParameter.getType();
+ setValue(patternParameter);
+ }
+ }
+
+ private void setValue(NamedModelElement selection) {
+ name = selection.getName();
+ typeName = ParametersTableLabelProvider.getType(type);
+ }
+
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ Composite composite = (Composite) super.createDialogArea(parent);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ composite.setLayout(layout);
+
+ createLabel(composite, Messages.ParametersEditDialog_Name);
+ nameText = new Text(composite, SWT.BORDER);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ nameText.setLayoutData(gd);
+ nameText.setText(name);
+ nameText.addModifyListener(new ModifyListener() {
+
+ public void modifyText(ModifyEvent e) {
+ name = nameText.getText();
+ }
+ });
+
+ createLabel(composite, Messages.ParametersEditDialog_Type);
+ typeText = new Text(composite, SWT.READ_ONLY | SWT.BORDER);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ typeText.setLayoutData(gd);
+ typeText.setText(typeName);
+ typeText.addModifyListener(new ModifyListener() {
+
+ public void modifyText(ModifyEvent e) {
+ typeName = typeText.getText();
+ }
+ });
+ Button typeButton = new Button(composite, SWT.PUSH);
+ gd = new GridData();
+ typeButton.setLayoutData(gd);
+ typeButton.setText(Messages.ParametersEditDialog_Browse);
+ typeButton.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ OpenTypeWizard wizard = new OpenTypeWizard(editingDomain, type);
+ wizard.init(PlatformUI.getWorkbench(), null);
+ WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), wizard);
+ int returnValue = dialog.open();
+ if (Window.OK == returnValue) {
+ Object selectType = wizard.getSelectType();
+ if (selectType instanceof String) {
+ if (selectType != null && !"".equals(selectType)) {
+ type = (String) selectType;
+ typeText.setText(ParametersTableLabelProvider.getType(type));
+ }
+ } else if (selectType instanceof BinaryType) {
+ if (selectType != null) {
+ type = ((BinaryType) selectType).getFullyQualifiedName();
+ typeText.setText(((BinaryType) selectType).getElementName());
+ }
+ }
+ }
+
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+ return composite;
+ }
+
+ public static Label createLabel(Composite parent, String content) {
+ Label label = new Label(parent, SWT.NONE);
+ label.setText(content);
+ return label;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ @Override
+ protected void computeResult() {
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/editor/MethodsComboBoxViewerCellEditor.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/editor/MethodsComboBoxViewerCellEditor.java
new file mode 100644
index 0000000..ca1fe13
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/editor/MethodsComboBoxViewerCellEditor.java
@@ -0,0 +1,350 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.editor;
+
+import java.text.MessageFormat;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.pattern.ui.Messages;
+import org.eclipse.egf.pattern.ui.editors.pages.ImplementationPage;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jface.viewers.ComboBoxViewerCellEditor;
+import org.eclipse.jface.viewers.ComboViewer;
+import org.eclipse.jface.viewers.IBaseLabelProvider;
+import org.eclipse.jface.viewers.IContentProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CCombo;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.TraverseEvent;
+import org.eclipse.swt.events.TraverseListener;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class MethodsComboBoxViewerCellEditor extends ComboBoxViewerCellEditor {
+
+ /**
+ * The custom combo box control.
+ */
+ ComboViewer viewer;
+
+ static Object selectedValue;
+
+ TransactionalEditingDomain editingDomain;
+
+ TableViewer tableViewer;
+
+ ImplementationPage implementationPage;
+
+ CCombo comboBox;
+
+ boolean isModify = false;
+
+ boolean changeSelection = false;
+
+ public MethodsComboBoxViewerCellEditor(Composite parent, TransactionalEditingDomain editingDomain, TableViewer tableViewer, ImplementationPage implementationPage) {
+ super(parent);
+ this.editingDomain = editingDomain;
+ this.tableViewer = tableViewer;
+ this.implementationPage = implementationPage;
+ }
+
+ /*
+ * (non-Javadoc) Method declared on CellEditor.
+ */
+ protected Control createControl(Composite parent) {
+ super.createControl(parent);
+ comboBox = new CCombo(parent, getStyle());
+ comboBox.setFont(parent.getFont());
+ viewer = new ComboViewer(comboBox);
+
+ comboBox.addKeyListener(new KeyAdapter() {
+ // hook key pressed - see PR 14201
+ public void keyPressed(KeyEvent e) {
+ keyReleaseOccured(e);
+ }
+ });
+
+ comboBox.addSelectionListener(new SelectionAdapter() {
+ public void widgetDefaultSelected(SelectionEvent event) {
+ applyEditorValueAndDeactivate();
+ }
+
+ public void widgetSelected(SelectionEvent event) {
+ ISelection selection = viewer.getSelection();
+ if (selection.isEmpty()) {
+ selectedValue = null;
+ } else {
+ selectedValue = ((IStructuredSelection) selection).getFirstElement();
+ }
+ }
+ });
+
+ comboBox.addTraverseListener(new TraverseListener() {
+ public void keyTraversed(TraverseEvent e) {
+ if (e.detail == SWT.TRAVERSE_ESCAPE || e.detail == SWT.TRAVERSE_RETURN) {
+ e.doit = false;
+ }
+ }
+ });
+
+ comboBox.addFocusListener(new FocusAdapter() {
+ public void focusLost(FocusEvent e) {
+ MethodsComboBoxViewerCellEditor.this.focusLost();
+ String text = comboBox.getText();
+ executeModifyMethod(text);
+ isModify = false;
+ }
+ });
+
+ comboBox.addModifyListener(new ModifyListener() {
+
+ public void modifyText(ModifyEvent e) {
+ String text = comboBox.getText();
+ isModify = true;
+ Button editButton = implementationPage.getEditButton();
+ if (editButton != null && !editButton.isDisposed()) {
+ if (Messages.ImplementationPage_header.equals(text) || Messages.ImplementationPage_init.equals(text) || Messages.ImplementationPage_footer.equals(text)) {
+ editButton.setEnabled(false);
+ } else if (!("").equals(text)) {
+ editButton.setEnabled(true);
+ }
+ }
+ }
+ });
+
+ return comboBox;
+ }
+
+ /**
+ * Update the method name while modify the comBox.
+ */
+ private void executeModifyMethod(final String newName) {
+ if (newName != null && !"".equals(newName) && isModify) {
+ int selectionIndex = tableViewer.getTable().getSelectionIndex();
+ if (selectionIndex < 0)
+ return;
+ final PatternMethod method = (PatternMethod) tableViewer.getElementAt(selectionIndex);
+ RecordingCommand cmd = new RecordingCommand(editingDomain) {
+ protected void doExecute() {
+ method.setName(newName);
+ tableViewer.refresh();
+ }
+ };
+ editingDomain.getCommandStack().execute(cmd);
+ }
+ }
+
+ /**
+ * The <code>ComboBoxCellEditor</code> implementation of this
+ * <code>CellEditor</code> framework method returns the zero-based index
+ * of the current selection.
+ *
+ * @return the zero-based index of the current selection wrapped as an
+ * <code>Integer</code>
+ */
+ protected Object doGetValue() {
+ return selectedValue;
+ }
+
+ /*
+ * (non-Javadoc) Method declared on CellEditor.
+ */
+ protected void doSetFocus() {
+ viewer.getControl().setFocus();
+ }
+
+ /**
+ * The <code>ComboBoxCellEditor</code> implementation of this
+ * <code>CellEditor</code> framework method sets the minimum width of the
+ * cell. The minimum width is 10 characters if <code>comboBox</code> is
+ * not <code>null</code> or <code>disposed</code> eles it is 60 pixels
+ * to make sure the arrow button and some text is visible. The list of
+ * CCombo will be wide enough to show its longest item.
+ */
+ public LayoutData getLayoutData() {
+ LayoutData layoutData = super.getLayoutData();
+ if ((viewer.getControl() == null) || viewer.getControl().isDisposed()) {
+ layoutData.minimumWidth = 60;
+ } else {
+ // make the comboBox 10 characters wide
+ GC gc = new GC(viewer.getControl());
+ layoutData.minimumWidth = (gc.getFontMetrics().getAverageCharWidth() * 10) + 10;
+ gc.dispose();
+ }
+ return layoutData;
+ }
+
+ /**
+ * Set a new value
+ *
+ * @param value
+ * the new value
+ */
+ protected void doSetValue(Object value) {
+ Assert.isTrue(viewer != null);
+ selectedValue = value;
+ if (value == null) {
+ viewer.setSelection(StructuredSelection.EMPTY);
+ changeSelection = true;
+ } else {
+ if (isIncomboBoxlist(value)) {
+ viewer.setSelection(new StructuredSelection(value));
+ changeSelection = true;
+ } else {
+ changeSelection = false;
+ }
+ }
+ }
+
+ /**
+ * Return whether the value is in the list of comboBox.
+ */
+ private boolean isIncomboBoxlist(Object value) {
+ String[] items = comboBox.getItems();
+ for (String item : items) {
+ if (item.equals(value))
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @param labelProvider
+ * the label provider used
+ * @see StructuredViewer#setLabelProvider(IBaseLabelProvider)
+ */
+ public void setLabelProvider(IBaseLabelProvider labelProvider) {
+ viewer.setLabelProvider(labelProvider);
+ }
+
+ /**
+ * @param provider
+ * the content provider used
+ * @see StructuredViewer#setContentProvider(IContentProvider)
+ */
+ public void setContenProvider(IStructuredContentProvider provider) {
+ viewer.setContentProvider(provider);
+ }
+
+ /**
+ * @param input
+ * the input used
+ * @see StructuredViewer#setInput(Object)
+ */
+ public void setInput(Object input) {
+ viewer.setInput(input);
+ }
+
+ /**
+ * @return get the viewer
+ */
+ public ComboViewer getViewer() {
+ return viewer;
+ }
+
+ /**
+ * Applies the currently selected value and deactiavates the cell editor
+ */
+ void applyEditorValueAndDeactivate() {
+ // must set the selection before getting value
+ ISelection selection = viewer.getSelection();
+ if (selection.isEmpty()) {
+ selectedValue = null;
+ } else if (changeSelection) {
+ selectedValue = ((IStructuredSelection) selection).getFirstElement();
+ }
+
+ Object newValue = doGetValue();
+ markDirty();
+ boolean isValid = isCorrect(newValue);
+ setValueValid(isValid);
+
+ if (!isValid) {
+ MessageFormat.format(getErrorMessage(), new Object[] { selectedValue });
+ }
+
+ fireApplyEditorValue();
+
+ deactivate();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.CellEditor#focusLost()
+ */
+ protected void focusLost() {
+ if (isActivated()) {
+ applyEditorValueAndDeactivate();
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.viewers.CellEditor#keyReleaseOccured(org.eclipse.swt
+ * .events.KeyEvent)
+ */
+ protected void keyReleaseOccured(KeyEvent keyEvent) {
+ if (keyEvent.character == '\u001b') { // Escape character
+ fireCancelEditor();
+ } else if (keyEvent.character == '\t') { // tab key
+ applyEditorValueAndDeactivate();
+ } else if (keyEvent.keyCode == SWT.DEL) { // DEL key
+ performDelete();
+ }
+ }
+
+ public void performDelete() {
+ Point selection = comboBox.getSelection();
+ int x = selection.x;
+ int y = selection.y;
+ String text = comboBox.getText();
+ if ((y - x) > text.length() || (y - x) == 0) {
+ return;
+ }
+ String header = text.substring(0, x);
+ String footer = text.substring(y);
+ String wordAfterDelete = header + footer;
+ comboBox.setText(wordAfterDelete);
+ Point p = new Point(x, x);
+ comboBox.setSelection(p);
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/models/QueryContent.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/models/QueryContent.java
new file mode 100644
index 0000000..cea98fc
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/models/QueryContent.java
@@ -0,0 +1,46 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.models;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class QueryContent {
+ private String key;
+ private String value;
+
+ public QueryContent(String key, String value) {
+ this.key = key;
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public String getKey() {
+ return key;
+ }
+
+ public void setKey(String key) {
+ this.key = key;
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/modifiers/EditingDomainCellModifier.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/modifiers/EditingDomainCellModifier.java
new file mode 100644
index 0000000..6e77d14
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/modifiers/EditingDomainCellModifier.java
@@ -0,0 +1,50 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.modifiers;
+
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jface.viewers.ICellModifier;
+import org.eclipse.jface.viewers.TableViewer;
+
+/**
+ *
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public abstract class EditingDomainCellModifier implements ICellModifier {
+
+ private TransactionalEditingDomain editingDomain;
+ private TableViewer tableViewer;
+
+ public EditingDomainCellModifier(TransactionalEditingDomain editingDomain, TableViewer tableViewer) {
+ this.editingDomain = editingDomain;
+ this.tableViewer = tableViewer;
+ }
+
+ public void doModify(final Runnable runnable) {
+ RecordingCommand cmd = new RecordingCommand(editingDomain) {
+ protected void doExecute() {
+ runnable.run();
+ if (tableViewer != null && !tableViewer.getTable().isDisposed())
+ tableViewer.refresh();
+ }
+ };
+ editingDomain.getCommandStack().execute(cmd);
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/modifiers/MethodTableCellModifier.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/modifiers/MethodTableCellModifier.java
new file mode 100644
index 0000000..b1bf41c
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/modifiers/MethodTableCellModifier.java
@@ -0,0 +1,76 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.modifiers;
+
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.pattern.ui.PatternUIHelper;
+import org.eclipse.egf.pattern.ui.editors.pages.ImplementationPage;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.widgets.TableItem;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class MethodTableCellModifier extends EditingDomainCellModifier {
+
+ public MethodTableCellModifier(TransactionalEditingDomain editingDomain, TableViewer tableViewer) {
+ super(editingDomain, tableViewer);
+ }
+
+ public boolean canModify(Object element, String property) {
+ if ((ImplementationPage.NAME_COLUMN_ID).equals(property)) {
+ if (element instanceof PatternMethod)
+ return !PatternUIHelper.isRenameDisable((PatternMethod) element);
+ }
+ return false;
+ }
+
+ public Object getValue(Object element, String property) {
+ if ((ImplementationPage.NAME_COLUMN_ID).equals(property)) {
+ if (element instanceof PatternMethod) {
+ String name = ((PatternMethod) element).getName();
+ return name;
+ }
+ }
+ return null;
+ }
+
+ public void modify(Object element, String property, Object value) {
+ if (value == null)
+ return;
+ if (element instanceof TableItem) {
+ element = ((TableItem) element).getData();
+ }
+ String text = (value.toString()).trim();
+ PatternMethod patternMethodel = (PatternMethod) element;
+ if ((ImplementationPage.NAME_COLUMN_ID).equals(property)) {
+ executeModify(text, patternMethodel);
+ }
+ }
+
+ private void executeModify(final String text, final PatternMethod patternMethod) {
+ Runnable runnable = new Runnable() {
+ public void run() {
+ patternMethod.setName(text);
+ }
+ };
+ doModify(runnable);
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/modifiers/ParametersTableCellModifier.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/modifiers/ParametersTableCellModifier.java
new file mode 100644
index 0000000..ed52c46
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/modifiers/ParametersTableCellModifier.java
@@ -0,0 +1,125 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.modifiers;
+
+import org.eclipse.egf.model.pattern.PatternParameter;
+import org.eclipse.egf.model.pattern.Query;
+import org.eclipse.egf.pattern.query.QueryKind;
+import org.eclipse.egf.pattern.ui.editors.pages.SpecificationPage;
+import org.eclipse.egf.pattern.ui.editors.providers.ParametersTableLabelProvider;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.widgets.TableItem;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class ParametersTableCellModifier extends EditingDomainCellModifier {
+
+ public ParametersTableCellModifier(TransactionalEditingDomain editingDomain, TableViewer tableViewer) {
+ super(editingDomain, tableViewer);
+ }
+
+ public boolean canModify(Object element, String property) {
+ if ((SpecificationPage.NAME_COLUMN_ID).equals(property)) {
+ return true;
+ } else if ((SpecificationPage.TYPE_COLUMN_ID).equals(property)) {
+ return true;
+ } else if ((SpecificationPage.QUERY_COLUMN_ID).equals(property)) {
+ return true;
+ }
+ return false;
+ }
+
+ public Object getValue(Object element, String property) {
+ if ((SpecificationPage.NAME_COLUMN_ID).equals(property)) {
+ if (element instanceof PatternParameter) {
+ return ((PatternParameter) element).getName();
+ }
+ } else if ((SpecificationPage.TYPE_COLUMN_ID).equals(property)) {
+ if (element instanceof PatternParameter) {
+ String type = ((PatternParameter) element).getType();
+ return ParametersTableLabelProvider.getType(type);
+ }
+ } else if ((SpecificationPage.QUERY_COLUMN_ID).equals(property)) {
+ if (element instanceof PatternParameter) {
+ Query patternQuery = ((PatternParameter) element).getQuery();
+ String query = patternQuery == null ? "" : patternQuery.getExtensionId();
+ return query;
+ }
+ }
+ return null;
+ }
+
+ public void modify(Object element, String property, Object value) {
+ if (value == null)
+ return;
+
+ if (element instanceof TableItem) {
+ element = ((TableItem) element).getData();
+ }
+ String text = "";
+ if (value instanceof QueryKind) {
+ text = ((QueryKind) value).getId();
+ } else {
+ text = (value.toString()).trim();
+ }
+ PatternParameter patternParameter = (PatternParameter) element;
+ if ((SpecificationPage.NAME_COLUMN_ID).equals(property)) {
+ executeModify(0, patternParameter, text);
+ } else if ((SpecificationPage.TYPE_COLUMN_ID).equals(property)) {
+ executeModify(1, patternParameter, text);
+ } else if ((SpecificationPage.QUERY_COLUMN_ID).equals(property)) {
+ executeModify(2, patternParameter, text);
+ }
+ }
+
+ private void executeModify(final int setFlag, final PatternParameter patternParameter, final String text) {
+ Runnable cmd = new Runnable() {
+ public void run() {
+ switch (setFlag) {
+ case 0:
+ patternParameter.setName(text);
+ case 1:
+ break;
+ case 2:
+ modifyQuery(patternParameter, text);
+ break;
+ default:
+ return;
+ }
+ }
+ };
+ doModify(cmd);
+ }
+
+ protected void modifyQuery(PatternParameter patternParameter, String text) {
+ Query query = patternParameter.getQuery();
+ if (text != null) {
+ if (query == null && (text != null && !"".equals(text))) {
+ Query createBasicQuery = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createBasicQuery();
+ createBasicQuery.setExtensionId(text);
+ patternParameter.setQuery(createBasicQuery);
+ } else if (text != null && !"".equals(text)) {
+ query.setExtensionId(text);
+ } else if ("".equals(text)) {
+ patternParameter.setQuery(null);
+ }
+ }
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/modifiers/QueryContentTableCellModifier.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/modifiers/QueryContentTableCellModifier.java
new file mode 100644
index 0000000..461d651
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/modifiers/QueryContentTableCellModifier.java
@@ -0,0 +1,75 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.modifiers;
+
+import org.eclipse.egf.pattern.ui.editors.dialogs.ParametersEditDialog;
+import org.eclipse.egf.pattern.ui.editors.models.QueryContent;
+import org.eclipse.jface.viewers.ICellModifier;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.widgets.TableItem;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class QueryContentTableCellModifier implements ICellModifier {
+ private TableViewer tableViewer;
+
+ public QueryContentTableCellModifier(TableViewer tableViewer) {
+ this.tableViewer = tableViewer;
+ }
+
+ public boolean canModify(Object element, String property) {
+ if ((ParametersEditDialog.KEY_ID).equals(property)) {
+ return true;
+ } else if ((ParametersEditDialog.VALUE_ID).equals(property)) {
+ return true;
+ }
+ return false;
+ }
+
+ public Object getValue(Object element, String property) {
+ if (element instanceof QueryContent) {
+ QueryContent content = (QueryContent) element;
+ if ((ParametersEditDialog.KEY_ID).equals(property)) {
+ return content.getKey();
+ } else if ((ParametersEditDialog.VALUE_ID).equals(property)) {
+ return content.getValue();
+ }
+ }
+ return null;
+ }
+
+ public void modify(Object element, String property, Object value) {
+ if (value == null)
+ return;
+ if (element instanceof TableItem) {
+ element = ((TableItem) element).getData();
+ }
+ String text = (value.toString()).trim();
+ if (element instanceof QueryContent) {
+ QueryContent content = (QueryContent) element;
+ if ((ParametersEditDialog.KEY_ID).equals(property)) {
+ content.setKey(text);
+ } else if ((ParametersEditDialog.VALUE_ID).equals(property)) {
+ content.setValue(text);
+ }
+ }
+ tableViewer.refresh();
+
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/modifiers/VariablesTableCellModifier.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/modifiers/VariablesTableCellModifier.java
new file mode 100644
index 0000000..7b1e3d7
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/modifiers/VariablesTableCellModifier.java
@@ -0,0 +1,82 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+package org.eclipse.egf.pattern.ui.editors.modifiers;
+
+import org.eclipse.egf.model.pattern.PatternVariable;
+import org.eclipse.egf.pattern.ui.editors.pages.ImplementationPage;
+import org.eclipse.egf.pattern.ui.editors.providers.ParametersTableLabelProvider;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.widgets.TableItem;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class VariablesTableCellModifier extends EditingDomainCellModifier {
+
+ public VariablesTableCellModifier(TransactionalEditingDomain editingDomain, TableViewer tableViewer) {
+ super(editingDomain, tableViewer);
+ }
+
+ public boolean canModify(Object element, String property) {
+ if ((ImplementationPage.NAME_COLUMN_ID).equals(property)) {
+ return true;
+ } else if ((ImplementationPage.TYPE_COLUMN_ID).equals(property)) {
+ return true;
+ }
+ return false;
+ }
+
+ public Object getValue(Object element, String property) {
+ if (element instanceof PatternVariable) {
+ PatternVariable patternVariable = (PatternVariable) element;
+ if ((ImplementationPage.NAME_COLUMN_ID).equals(property)) {
+ return patternVariable.getName();
+ } else if ((ImplementationPage.TYPE_COLUMN_ID).equals(property)) {
+ String type = patternVariable.getType();
+ return ParametersTableLabelProvider.getType(type);
+ }
+ }
+ return null;
+ }
+
+ public void modify(Object element, String property, Object value) {
+ if (value == null)
+ return;
+
+ if (element instanceof TableItem) {
+ element = ((TableItem) element).getData();
+ }
+ String text = (value.toString()).trim();
+
+ if (element instanceof PatternVariable) {
+ PatternVariable patternVariable = (PatternVariable) element;
+ if ((ImplementationPage.NAME_COLUMN_ID).equals(property)) {
+ executeModify(patternVariable, text);
+ }
+ }
+ }
+
+ private void executeModify(final PatternVariable patternVariable, final String text) {
+ Runnable cmd = new Runnable() {
+ public void run() {
+ patternVariable.setName(text);
+ }
+ };
+ doModify(cmd);
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/pages/DebugPage.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/pages/DebugPage.java
new file mode 100644
index 0000000..3534972
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/pages/DebugPage.java
@@ -0,0 +1,126 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.pages;
+
+import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.core.databinding.validation.IValidator;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.pattern.ui.Messages;
+import org.eclipse.emf.databinding.EMFUpdateValueStrategy;
+import org.eclipse.emf.databinding.edit.EMFEditProperties;
+import org.eclipse.emf.databinding.edit.IEMFEditValueProperty;
+import org.eclipse.jface.databinding.swt.IWidgetValueProperty;
+import org.eclipse.jface.databinding.swt.WidgetProperties;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class DebugPage extends PatternEditorPage {
+
+ public static final String ID = "OverviewPage"; //$NON-NLS-1$
+
+ private Text text;
+
+ private Text label;
+
+ public DebugPage(FormEditor editor) {
+ super(editor, ID, Messages.OverviewPage_title);
+
+ }
+
+ @Override
+ protected void doCreateFormContent(IManagedForm managedForm) {
+ FormToolkit toolkit = managedForm.getToolkit();
+ ScrolledForm form = managedForm.getForm();
+ form.getBody().setLayout(new GridLayout());
+
+ text = toolkit.createText(form.getBody(), getPattern().getName(), SWT.BORDER);
+ text.addModifyListener(new ModifyListener() {
+
+ public void modifyText(ModifyEvent e) {
+ Pattern pattern = getPattern();// pattern.eResource()
+ // System.out.println("pattern = " + pattern + "\tresource = " +
+ // pattern.eResource());
+ // System.out.println("Parent is " + pattern.getSuperPattern()
+ // == null ? "none" : pattern.getSuperPattern().getName()));
+ System.out.println("Parent = " + pattern.getSuperPattern() + "\t");
+ String text2 = text.getText();
+ // Command cmd = SetCommand.create(getEditingDomain(), pattern,
+ // FcorePackage.Literals.MODEL_ELEMENT__NAME, text2);
+ // if (cmd.canExecute()) {
+ // execute(cmd);
+ // }
+ }
+
+ });
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ text.setLayoutData(gd);
+
+ label = toolkit.createText(form.getBody(), "", SWT.BORDER);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ label.setLayoutData(gd);
+
+ }
+
+ void bindParentName() {
+ IEMFEditValueProperty mprop = EMFEditProperties.value(getEditingDomain(), FcorePackage.Literals.NAMED_MODEL_ELEMENT__NAME);
+ IWidgetValueProperty labelProp = WidgetProperties.text(SWT.Modify);
+ IObservableValue uiObs = labelProp.observeDelayed(400, label);
+ IObservableValue mObs = mprop.observe(getPattern().getSuperPattern());
+ addBinding(ctx.bindValue(uiObs, mObs, new EMFUpdateValueStrategy().setBeforeSetValidator(new IValidator() {
+
+ public IStatus validate(Object value) {
+
+ return Status.OK_STATUS;
+ }
+ }), null));
+ }
+
+ void bindName() {
+ IEMFEditValueProperty mprop = EMFEditProperties.value(getEditingDomain(), FcorePackage.Literals.NAMED_MODEL_ELEMENT__NAME);
+ IWidgetValueProperty textProp = WidgetProperties.text(SWT.Modify);
+ IObservableValue uiObs = textProp.observeDelayed(400, text);
+ IObservableValue mObs = mprop.observe(getPattern());
+
+ addBinding(ctx.bindValue(uiObs, mObs, new EMFUpdateValueStrategy().setBeforeSetValidator(new IValidator() {
+
+ public IStatus validate(Object value) {
+
+ return Status.OK_STATUS;
+ }
+ }), null));
+ }
+
+ @Override
+ protected void bind() {
+ bindName();
+ bindParentName();
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/pages/ImplementationPage.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/pages/ImplementationPage.java
new file mode 100644
index 0000000..cd7fe12
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/pages/ImplementationPage.java
@@ -0,0 +1,1614 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.pages;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.databinding.observable.list.IObservableList;
+import org.eclipse.egf.model.pattern.BackCall;
+import org.eclipse.egf.model.pattern.Call;
+import org.eclipse.egf.model.pattern.MethodCall;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternCall;
+import org.eclipse.egf.model.pattern.PatternFactory;
+import org.eclipse.egf.model.pattern.PatternInjectedCall;
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.egf.model.pattern.PatternVariable;
+import org.eclipse.egf.model.pattern.SuperCall;
+import org.eclipse.egf.pattern.engine.PatternHelper;
+import org.eclipse.egf.pattern.ui.Activator;
+import org.eclipse.egf.pattern.ui.ImageShop;
+import org.eclipse.egf.pattern.ui.Messages;
+import org.eclipse.egf.pattern.ui.PatternUIHelper;
+import org.eclipse.egf.pattern.ui.editors.PatternEditorInput;
+import org.eclipse.egf.pattern.ui.editors.adapter.LiveValidationContentAdapter;
+import org.eclipse.egf.pattern.ui.editors.dialogs.MethodAddOrEditDialog;
+import org.eclipse.egf.pattern.ui.editors.dialogs.VariablesEditDialog;
+import org.eclipse.egf.pattern.ui.editors.editor.MethodsComboBoxViewerCellEditor;
+import org.eclipse.egf.pattern.ui.editors.modifiers.MethodTableCellModifier;
+import org.eclipse.egf.pattern.ui.editors.modifiers.VariablesTableCellModifier;
+import org.eclipse.egf.pattern.ui.editors.providers.CommonListContentProvider;
+import org.eclipse.egf.pattern.ui.editors.providers.MethodLabelProvider;
+import org.eclipse.egf.pattern.ui.editors.providers.MethodsTableObservableListContentProvider;
+import org.eclipse.egf.pattern.ui.editors.providers.OrchestrationTableLabelProvider;
+import org.eclipse.egf.pattern.ui.editors.providers.ParametersTableLabelProvider;
+import org.eclipse.egf.pattern.ui.editors.providers.TableObservableListContentProvider;
+import org.eclipse.egf.pattern.ui.editors.templateEditor.AbstractTemplateEditor;
+import org.eclipse.egf.pattern.ui.editors.templateEditor.TemplateExtensionRegistry;
+import org.eclipse.egf.pattern.ui.editors.validation.ValidationConstants;
+import org.eclipse.egf.pattern.ui.editors.wizards.OpenTypeWizard;
+import org.eclipse.egf.pattern.ui.editors.wizards.OrchestrationWizard;
+import org.eclipse.egf.pattern.ui.editors.wizards.pages.CallTypeEnum;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.databinding.EMFProperties;
+import org.eclipse.emf.databinding.IEMFListProperty;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jdt.internal.core.BinaryType;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.layout.TableColumnLayout;
+import org.eclipse.jface.util.LocalSelectionTransfer;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.DialogCellEditor;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TextCellEditor;
+import org.eclipse.jface.viewers.ViewerDropAdapter;
+import org.eclipse.jface.window.Window;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CCombo;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.DragSourceEvent;
+import org.eclipse.swt.dnd.DragSourceListener;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.dnd.TransferData;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.IMessageManager;
+import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.forms.events.HyperlinkEvent;
+import org.eclipse.ui.forms.events.IHyperlinkListener;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ImageHyperlink;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.ide.IDE;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+@SuppressWarnings("restriction")
+public class ImplementationPage extends PatternEditorPage {
+ public static final String ID = "ImplementationPage"; //$NON-NLS-1$
+
+ private TableViewer methodsTableViewer;
+
+ private TableViewer variablesTableViewer;
+
+ private TableViewer orchestrationTableViewer;
+
+ public static final String NAME_COLUMN_ID = "Name"; //$NON-NLS-1$
+
+ public static final String TYPE_COLUMN_ID = "Type"; //$NON-NLS-1$
+
+ private Button methodsAdd;
+
+ private Button methodsEdit;
+
+ private Button methodsRemove;
+
+ private Button methodsUp;
+
+ private Button methodsDown;
+
+ private Button methodsOpenTemplate;
+
+ private Button orchestrationAdd;
+
+ private Button orchestrationEdit;
+
+ private Button orchestrationRemove;
+
+ private Button orchestrationUp;
+
+ private Button orchestrationDown;
+
+ private Button variablesAdd;
+
+ private Button variablesEdit;
+
+ private Button variablesRemove;
+
+ private MethodsComboBoxViewerCellEditor nameEditor;
+
+ private PatternMethod dropEntry;
+
+ private int methodsDragIndex = -1;
+
+ private int orchestrationDragIndex = -1;
+
+ private boolean isChangMethodsOrder;
+
+ private boolean isChangOrchestrationeOrder;
+
+ private boolean isReadOnly;
+
+ private static final String VARIABLE_NAME_DEFAULT_VALUE = "variable"; //$NON-NLS-1$
+
+ private static final String VARIABLE_TYPE_DEFAULT_VALUE = "http://www.eclipse.org/emf/2002/Ecore#//EClass"; //$NON-NLS-1$
+
+ private LiveValidationContentAdapter variableNameEmpetyValidationAdapter;
+
+ private IMessageManager mmng;
+
+ public ImplementationPage(FormEditor editor) {
+ super(editor, ID, Messages.ImplementationPage_title);
+ }
+
+ @Override
+ protected void doCreateFormContent(IManagedForm managedForm) {
+ PatternEditorInput editorInput = (PatternEditorInput) getEditorInput();
+ isReadOnly = editorInput.isReadOnly();
+ mmng = managedForm.getMessageManager();
+
+ FormToolkit toolkit = managedForm.getToolkit();
+ ScrolledForm form = managedForm.getForm();
+
+ toolkit.decorateFormHeading(form.getForm());
+
+ GridLayout layout = new GridLayout(2, true);
+ form.getBody().setLayout(layout);
+ form.setImage(ImageShop.get(ImageShop.IMG_PLUGIN_MF_OBJ));
+ form.setText(Messages.ImplementationPage_title);
+
+ Composite containerLeft = createComposite(toolkit, form);
+ createMethodsSection(toolkit, containerLeft);
+ createVariablesSection(toolkit, containerLeft);
+
+ Composite containerRight = createComposite(toolkit, form);
+ createOrchestrationSection(toolkit, containerRight);
+
+ checkReadOnlyModel();
+
+ form.reflow(true);
+ }
+
+ /**
+ * Check whether the editor is on a read only pattern.
+ */
+ private void checkReadOnlyModel() {
+ if (!isReadOnly) {
+ return;
+ }
+ methodsAdd.setEnabled(false);
+ methodsEdit.setEnabled(false);
+ methodsRemove.setEnabled(false);
+ methodsOpenTemplate.setEnabled(false);
+
+ orchestrationAdd.setEnabled(false);
+ orchestrationEdit.setEnabled(false);
+ orchestrationUp.setEnabled(false);
+ orchestrationDown.setEnabled(false);
+
+ variablesAdd.setEnabled(false);
+ variablesEdit.setEnabled(false);
+ variablesRemove.setEnabled(false);
+ }
+
+ private Composite createComposite(FormToolkit toolkit, ScrolledForm form) {
+ Composite composite = toolkit.createComposite(form.getBody(), SWT.NONE);
+ GridLayout layout = new GridLayout(1, true);
+ composite.setLayout(layout);
+ GridData gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_BOTH);
+ composite.setLayoutData(gd);
+ return composite;
+ }
+
+ private void createMethodsSection(FormToolkit toolkit, Composite composite) {
+
+ Section methSection = toolkit.createSection(composite, Section.TITLE_BAR);
+ methSection.setText(Messages.ImplementationPage_Methods);
+
+ GridData gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_BOTH);
+ methSection.setLayoutData(gd);
+
+ Composite methods = createMethodComposite(toolkit, methSection);
+
+ createLabel(toolkit, methods, Messages.ImplementationPage_Methods_2, 1);
+ createLabel(toolkit, methods, Messages.ImplementationPage_Methods_3, 2);
+
+ createPatternMethodsArea(toolkit, methods);
+ createImplementationMethodsTable(toolkit, methods);
+ createImplementationMethodsButtons(toolkit, methods);
+
+ methSection.setClient(methods);
+ }
+
+ private Composite createMethodComposite(FormToolkit toolkit, Section section) {
+ Composite container = toolkit.createComposite(section, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ container.setLayout(layout);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ container.setLayoutData(gd);
+ return container;
+ }
+
+ private void createPatternMethodsArea(FormToolkit toolkit, Composite methods) {
+ Composite patternMethodsArea = toolkit.createComposite(methods, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ patternMethodsArea.setLayout(layout);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ gd.verticalIndent = 20;
+ patternMethodsArea.setLayoutData(gd);
+
+ createPatternMethodsLink(toolkit, patternMethodsArea);
+ }
+
+ private void createPatternMethodsLink(FormToolkit toolkit, Composite container) {
+ ImageHyperlink headerLink = createPatternMethodLink(toolkit, container, org.eclipse.egf.pattern.extension.PatternFactory.HEADER_METHOD_NAME);
+ headerLink.addHyperlinkListener(new IHyperlinkListener() {
+
+ public void linkExited(HyperlinkEvent e) {
+ }
+
+ public void linkEntered(HyperlinkEvent e) {
+ }
+
+ public void linkActivated(HyperlinkEvent e) {
+ PatternMethod headerMethod = getPattern().getHeaderMethod();
+ String headerMethodId = headerMethod.getID();
+ openMethodTemplate(headerMethodId);
+ }
+ });
+
+ ImageHyperlink initLink = createPatternMethodLink(toolkit, container, org.eclipse.egf.pattern.extension.PatternFactory.INIT_METHOD_NAME);
+ initLink.addHyperlinkListener(new IHyperlinkListener() {
+
+ public void linkExited(HyperlinkEvent e) {
+ }
+
+ public void linkEntered(HyperlinkEvent e) {
+ }
+
+ public void linkActivated(HyperlinkEvent e) {
+ PatternMethod initMethod = getPattern().getInitMethod();
+ String initMethodId = initMethod.getID();
+ openMethodTemplate(initMethodId);
+ }
+ });
+
+ ImageHyperlink preConditionLink = createPatternMethodLink(toolkit, container, org.eclipse.egf.pattern.extension.PatternFactory.PRECONDITION_METHOD_NAME);
+ preConditionLink.addHyperlinkListener(new IHyperlinkListener() {
+
+ public void linkExited(HyperlinkEvent e) {
+ }
+
+ public void linkEntered(HyperlinkEvent e) {
+ }
+
+ public void linkActivated(HyperlinkEvent e) {
+ // TODO
+ }
+ });
+
+ ImageHyperlink footerLink = createPatternMethodLink(toolkit, container, org.eclipse.egf.pattern.extension.PatternFactory.FOOTER_METHOD_NAME);
+ footerLink.addHyperlinkListener(new IHyperlinkListener() {
+
+ public void linkExited(HyperlinkEvent e) {
+ }
+
+ public void linkEntered(HyperlinkEvent e) {
+ }
+
+ public void linkActivated(HyperlinkEvent e) {
+ PatternMethod footerMethod = getPattern().getFooterMethod();
+ String footerMethodId = footerMethod.getID();
+ openMethodTemplate(footerMethodId);
+ }
+ });
+
+ }
+
+ private ImageHyperlink createPatternMethodLink(FormToolkit toolkit, Composite methods, String label) {
+ ImageHyperlink patternMethodLink = toolkit.createImageHyperlink(methods, SWT.NULL);
+ patternMethodLink.setText(label);
+ patternMethodLink.setImage(ImageShop.get(ImageShop.IMG_METHOD));
+ GridData gd = new GridData();
+ gd.verticalIndent = 0;
+ patternMethodLink.setLayoutData(gd);
+ return patternMethodLink;
+ }
+
+ private void createLabel(FormToolkit toolkit, Composite container, String label, int horizontalSpan) {
+ Label discrip = toolkit.createLabel(container, label, SWT.WRAP);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ gd = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
+ gd.horizontalSpan = horizontalSpan;
+ gd.horizontalIndent = 4;
+ discrip.setLayoutData(gd);
+ }
+
+ private void createImplementationMethodsTable(FormToolkit toolkit, Composite methods) {
+ Composite tableComp = new Composite(methods, SWT.NONE);
+ TableColumnLayout layout = new TableColumnLayout();
+ tableComp.setLayout(layout);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ tableComp.setLayoutData(gd);
+
+ Table table = toolkit.createTable(tableComp, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
+ gd = new GridData(GridData.FILL_BOTH);
+ gd.verticalIndent = 10;
+ gd.horizontalIndent = 10;
+ gd.widthHint = 100;
+ table.setLayoutData(gd);
+
+ methodsTableViewer = new TableViewer(table);
+ TableColumn tableColumn = new TableColumn(table, SWT.NONE);
+ layout.setColumnData(tableColumn, new ColumnWeightData(200, true));
+
+ methodsTableViewer.setContentProvider(new MethodsTableObservableListContentProvider(methodsTableViewer, 3));
+ initMethodsTableEditor();
+
+ methodsTableViewer.addDoubleClickListener(new IDoubleClickListener() {
+
+ public void doubleClick(DoubleClickEvent event) {
+ if (isReadOnly)
+ return;
+ openPatternTemplate();
+ }
+ });
+ methodsTableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+
+ public void selectionChanged(SelectionChangedEvent event) {
+ if (isReadOnly)
+ return;
+ setMethodsButtonsStatus();
+ CCombo control = (CCombo) nameEditor.getControl();
+ if (control != null && !control.isDisposed()) {
+ PatternMethod selectItem = getmethodsSelectItem();
+ control.setText(selectItem == null ? "" : selectItem.getName()); //$NON-NLS-1$
+ }
+ }
+ });
+
+ addDragDropForMethodsTable();
+ }
+
+ /**
+ * Add drag and drop listener to methodsTableViewer.
+ */
+ private void addDragDropForMethodsTable() {
+ if (isReadOnly)
+ return;
+
+ methodsTableViewer.addDragSupport(DND.DROP_COPY | DND.DROP_MOVE, new Transfer[] { LocalSelectionTransfer.getTransfer() }, new DragSourceListener() {
+
+ public void dragStart(DragSourceEvent event) {
+ isChangOrchestrationeOrder = false;
+ isChangMethodsOrder = true;
+ if (methodsTableViewer.getSelection() == null) {
+ event.doit = false;
+ }
+ }
+
+ public void dragSetData(DragSourceEvent event) {
+ if (methodsTableViewer.getSelection() != null) {
+ dropEntry = getmethodsSelectItem();
+ methodsDragIndex = methodsTableViewer.getTable().getSelectionIndex();
+ }
+ }
+
+ public void dragFinished(DragSourceEvent event) {
+ }
+ });
+
+ methodsTableViewer.addDropSupport(DND.DROP_COPY | DND.DROP_MOVE, new Transfer[] { LocalSelectionTransfer.getTransfer() }, new ViewerDropAdapter(methodsTableViewer) {
+
+ public boolean validateDrop(Object target, int operation, TransferData transferType) {
+ if (isChangMethodsOrder) {
+ return true;
+ }
+ return false;
+ }
+
+ public boolean performDrop(Object data) {
+ Object currentTarget = getCurrentTarget();
+ EList<PatternMethod> methods = getPattern().getMethods();
+ executeChangeOrder(currentTarget, methodsTableViewer, methods, methodsDragIndex);
+ setMethodsButtonsStatus();
+ return false;
+ }
+ });
+ }
+
+ private void initMethodsTableEditor() {
+ if (isReadOnly)
+ return;
+ methodsTableViewer.setColumnProperties(new String[] { NAME_COLUMN_ID });
+ nameEditor = new MethodsComboBoxViewerCellEditor(methodsTableViewer.getTable(), getEditingDomain(), methodsTableViewer, this);
+ nameEditor.setLabelProvider(new LabelProvider());
+ nameEditor.setContenProvider(new CommonListContentProvider());
+
+ methodsTableViewer.setCellEditors(new CellEditor[] { nameEditor });
+ methodsTableViewer.setCellModifier(new MethodTableCellModifier(getEditingDomain(), methodsTableViewer));
+ }
+
+ /**
+ * Create the Methods section's buttons.
+ */
+ private void createImplementationMethodsButtons(FormToolkit toolkit, final Composite methods) {
+ Composite buttons = toolkit.createComposite(methods, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ buttons.setLayout(layout);
+
+ GridData gd = new GridData();
+ gd.widthHint = 65;
+ methodsAdd = toolkit.createButton(buttons, "", SWT.PUSH); //$NON-NLS-1$
+ methodsAdd.setLayoutData(gd);
+ methodsAdd.setImage(ImageShop.get(ImageShop.IMG_ADD_OBJ));
+ methodsAdd.setToolTipText(Messages.ImplementationPage_button_add);
+ methodsAdd.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ Pattern parent = getPatternParent();
+ MethodAddOrEditDialog dialog = new MethodAddOrEditDialog(new Shell(), PatternUIHelper.getUseablePatternMethodsNameList(parent), ""); //$NON-NLS-1$
+ dialog.setTitle(Messages.ImplementationPage_methAdd_dialog_title);
+ if (dialog.open() == Window.OK) {
+ executeMethodsAdd(dialog.getName());
+ setMethodsButtonsStatus();
+ }
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+
+ }
+ });
+
+ methodsEdit = toolkit.createButton(buttons, "", SWT.PUSH); //$NON-NLS-1$
+ methodsEdit.setLayoutData(gd);
+ methodsEdit.setEnabled(false);
+ methodsEdit.setImage(ImageShop.get(ImageShop.IMG_EDIT_OBJ));
+ methodsEdit.setToolTipText(Messages.ImplementationPage_button_edit);
+ methodsEdit.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ int index = methodsTableViewer.getTable().getSelectionIndex();
+ String selectName = ""; //$NON-NLS-1$
+ if (index >= 0) {
+ Object entry = methodsTableViewer.getElementAt(index);
+ if (entry instanceof PatternMethod) {
+ selectName = ((PatternMethod) entry).getName();
+ }
+ }
+ Pattern parent = getPatternParent();
+ MethodAddOrEditDialog dialog = new MethodAddOrEditDialog(new Shell(), PatternUIHelper.getUseablePatternMethodsNameList(parent), selectName);
+ dialog.setTitle(Messages.ImplementationPage_methEdit_dialog_title);
+ if (dialog.open() == Window.OK) {
+ executeMethodsEdit(dialog.getName());
+ }
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+
+ }
+ });
+
+ methodsOpenTemplate = toolkit.createButton(buttons, "", SWT.PUSH); //$NON-NLS-1$
+ methodsOpenTemplate.setLayoutData(gd);
+ methodsOpenTemplate.setEnabled(false);
+ methodsOpenTemplate.setImage(ImageShop.get(ImageShop.IMG_METHOD_CONTENT_EDIT));
+ methodsOpenTemplate.setToolTipText(Messages.ImplementationPage_button_methodsOpenTemplate);
+ methodsOpenTemplate.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ openPatternTemplate();
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ methodsRemove = toolkit.createButton(buttons, "", SWT.PUSH); //$NON-NLS-1$
+ methodsRemove.setLayoutData(gd);
+ methodsRemove.setEnabled(false);
+ methodsRemove.setImage(ImageShop.get(ImageShop.IMG_DELETE_OBJ));
+ methodsRemove.setToolTipText(Messages.ImplementationPage_button_remove);
+ methodsRemove.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ executeMethodsRemove(methods);
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ methodsUp = toolkit.createButton(buttons, "", SWT.PUSH); //$NON-NLS-1$
+ methodsUp.setLayoutData(gd);
+ methodsUp.setEnabled(false);
+ methodsUp.setImage(ImageShop.get(ImageShop.IMG_UPWARD_OBJ));
+ methodsUp.setToolTipText(Messages.ImplementationPage_button_up);
+ methodsUp.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ executeMethodsUpOrDown(-1);
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ methodsDown = toolkit.createButton(buttons, "", SWT.PUSH); //$NON-NLS-1$
+ methodsDown.setLayoutData(gd);
+ methodsDown.setEnabled(false);
+ methodsDown.setImage(ImageShop.get(ImageShop.IMG_DOWNWARD_OBJ));
+ methodsDown.setToolTipText(Messages.ImplementationPage_button_down);
+ methodsDown.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ executeMethodsUpOrDown(1);
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ }
+
+ /**
+ * Execute methods table up or down operation.
+ */
+ protected void executeMethodsUpOrDown(int num) {
+ final EList<PatternMethod> methods = getPattern().getMethods();
+
+ int oldIndex = methodsTableViewer.getTable().getSelectionIndex();
+ final int fromIndex = getIndexOfPatternMethodsMappingTable(oldIndex, methods);
+
+ int newIndex = oldIndex + num;
+ final int toIndex = getIndexOfPatternMethodsMappingTable(newIndex, methods);
+
+ TransactionalEditingDomain editingDomain = getEditingDomain();
+ RecordingCommand cmd = new RecordingCommand(editingDomain) {
+ protected void doExecute() {
+ methods.move(toIndex, fromIndex);
+ }
+ };
+ editingDomain.getCommandStack().execute(cmd);
+
+ methodsTableViewer.refresh();
+ methodsTableViewer.getTable().setSelection(newIndex);
+ setMethodsButtonsStatus();
+ }
+
+ /**
+ * Cet the method's index in pattern mapping methodsTable.
+ */
+ private int getIndexOfPatternMethodsMappingTable(int indexOfTable, EList<PatternMethod> patternMethods) {
+ PatternMethod item = getTableItem(indexOfTable);
+ int index = patternMethods.indexOf(item);
+ if (index == -1) {
+ System.out.println();
+ }
+ return index;
+ }
+
+ /**
+ * Get the method of index in table.
+ */
+ private PatternMethod getTableItem(int index) {
+ Object selectItem = methodsTableViewer.getElementAt(index);
+ if (selectItem instanceof PatternMethod) {
+ return (PatternMethod) selectItem;
+ }
+ return null;
+ }
+
+ /**
+ * Set the Methods section's button status.
+ */
+ private void setMethodsButtonsStatus() {
+ int selectIndex = methodsTableViewer.getTable().getSelectionIndex();
+ int length = methodsTableViewer.getTable().getItemCount();
+ if (selectIndex == -1) {
+ methodsRemove.setEnabled(false);
+ methodsEdit.setEnabled(false);
+ methodsUp.setEnabled(false);
+ methodsDown.setEnabled(false);
+ methodsOpenTemplate.setEnabled(false);
+ return;
+ } else {
+ PatternMethod selectMethod = (PatternMethod) (methodsTableViewer.getElementAt(selectIndex));
+ if (PatternUIHelper.isRenameDisable(selectMethod)) {
+ methodsEdit.setEnabled(false);
+ methodsRemove.setEnabled(false);
+ } else {
+ methodsEdit.setEnabled(true);
+ methodsRemove.setEnabled(true);
+ }
+
+ if (selectIndex <= 0) {
+ methodsUp.setEnabled(false);
+ } else {
+ methodsUp.setEnabled(true);
+ }
+ if ((selectIndex + 1) == length) {
+ methodsDown.setEnabled(false);
+ } else {
+ methodsDown.setEnabled(true);
+ }
+ methodsOpenTemplate.setEnabled(true);
+ }
+ }
+
+ private void executeMethodsRemove(Composite methods) {
+ int index = methodsTableViewer.getTable().getSelectionIndex();
+ if (index >= 0) {
+ final Object selectItem = methodsTableViewer.getElementAt(index);
+ if (selectItem instanceof PatternMethod) {
+ if (isMethodDeleteDisable((PatternMethod) selectItem)) {
+ String message = Messages.ImplementationPage_method_cannot_delete_message;
+ showErrorMessage(methods, message);
+ return;
+ }
+ final Pattern pattern = getPattern();
+ TransactionalEditingDomain editingDomain = getEditingDomain();
+ RecordingCommand cmd = new RecordingCommand(editingDomain) {
+ protected void doExecute() {
+ pattern.getMethods().remove(selectItem);
+ }
+ };
+ editingDomain.getCommandStack().execute(cmd);
+ EList<PatternMethod> allMethods = pattern.getMethods();
+ setDefaultSelection(allMethods.size() - 3, methodsTableViewer, index);
+ }
+ }
+ setMethodsButtonsStatus();
+ }
+
+ private void executeMethodsAdd(final String name) {
+ TransactionalEditingDomain editingDomain = getEditingDomain();
+ RecordingCommand cmd = new RecordingCommand(editingDomain) {
+ protected void doExecute() {
+ PatternMethod newMethod = PatternFactory.eINSTANCE.createPatternMethod();
+ newMethod.setName(name);
+ newMethod.setPattern(getPattern());
+ getPattern().getMethods().add(newMethod);
+ newMethod.setPatternFilePath(PatternHelper.Filename.computeFileURI(newMethod));
+ PatternUIHelper.addAdapterForNewItem(methodsTableViewer, newMethod);
+ }
+ };
+ editingDomain.getCommandStack().execute(cmd);
+ methodsTableViewer.refresh();
+ methodsTableViewer.getTable().setSelection((methodsTableViewer.getTable().getItemCount()) - 1);
+ }
+
+ protected void executeMethodsEdit(final String name) {
+ int index = methodsTableViewer.getTable().getSelectionIndex();
+ final PatternMethod editPatternMethod = (PatternMethod) (methodsTableViewer.getElementAt(index));
+ // Execute edit.
+ TransactionalEditingDomain editingDomain = getEditingDomain();
+ RecordingCommand cmd = new RecordingCommand(editingDomain) {
+ protected void doExecute() {
+ editPatternMethod.setName(name);
+ }
+ };
+ editingDomain.getCommandStack().execute(cmd);
+ }
+
+ /**
+ * tO open a pattern template editor.
+ */
+ private void openPatternTemplate() {
+ ISelection selection = methodsTableViewer.getSelection();
+ String methodId = null;
+ if (selection != null && !selection.isEmpty()) {
+ PatternMethod method = (PatternMethod) ((IStructuredSelection) selection).getFirstElement();
+ methodId = method.getID();
+ }
+ openMethodTemplate(methodId);
+ }
+
+ private void openMethodTemplate(String methodId) {
+ Pattern pattern = getPattern();
+ String editor = TemplateExtensionRegistry.getEditor(pattern);
+ if (editor != null) {
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ IWorkbenchWindow activeWorkbenchWindow = workbench.getActiveWorkbenchWindow();
+ IWorkbenchPage activePage = activeWorkbenchWindow.getActivePage();
+ IEditorPart[] editorParts = activePage.getEditors();
+ if (editorParts.length > 1) {
+ for (int i = editorParts.length - 1; i >= 0; i--) {
+ if (editorParts[i] instanceof AbstractTemplateEditor) {
+ Pattern templateEdtiorPattern = ((AbstractTemplateEditor) editorParts[i]).getPattern();
+ if ((getPattern()).equals(templateEdtiorPattern)) {
+ // Switch to the already opened editor.
+ activePage.activate(editorParts[i]);
+ ((AbstractTemplateEditor) editorParts[i]).setActivePage(methodId);
+ return;
+ }
+ }
+ }
+ }
+ // Open a new template editor.
+ try {
+ PatternEditorInput input = new PatternEditorInput(pattern.eResource(), pattern.getID());
+ AbstractTemplateEditor editorPart = (AbstractTemplateEditor) IDE.openEditor(getEditorSite().getPage(), input, editor);
+ editorPart.setActivePage(methodId);
+ } catch (PartInitException e) {
+ Activator.getDefault().logError(e);
+ }
+
+ }
+ }
+
+ private void createOrchestrationSection(FormToolkit toolkit, Composite composite) {
+ Section orchSection = toolkit.createSection(composite, Section.TITLE_BAR);
+ orchSection.setText(Messages.ImplementationPage_orchSection_title);
+
+ GridData gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_BOTH);
+ orchSection.setLayoutData(gd);
+
+ String label = Messages.ImplementationPage_orchSection_label;
+ Composite orchestration = createComposite(toolkit, orchSection, label);
+
+ createOrchestrationTable(toolkit, orchestration);
+ createOrchestrationButtons(toolkit, orchestration);
+
+ orchSection.setClient(orchestration);
+ }
+
+ private void createOrchestrationTable(FormToolkit toolkit, Composite orchestration) {
+ Composite tableComp = new Composite(orchestration, SWT.NONE);
+ TableColumnLayout layout = new TableColumnLayout();
+ tableComp.setLayout(layout);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ tableComp.setLayoutData(gd);
+
+ Table table = toolkit.createTable(tableComp, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
+
+ gd = new GridData(GridData.FILL_BOTH);
+ gd.verticalIndent = 10;
+ gd.horizontalIndent = 10;
+ gd.widthHint = 100;
+ table.setLayoutData(gd);
+ orchestrationTableViewer = new TableViewer(table);
+ TableColumn tableColumn = new TableColumn(table, SWT.NONE);
+ layout.setColumnData(tableColumn, new ColumnWeightData(230, true));
+
+ orchestrationTableViewer.setContentProvider(new TableObservableListContentProvider(orchestrationTableViewer));
+ orchestrationTableViewer.setLabelProvider(new OrchestrationTableLabelProvider());
+
+ orchestrationTableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+
+ public void selectionChanged(SelectionChangedEvent event) {
+ if (isReadOnly)
+ return;
+ setOrchestrationButtonsStatus();
+ }
+ });
+ orchestrationTableViewer.addDoubleClickListener(new IDoubleClickListener() {
+
+ public void doubleClick(DoubleClickEvent event) {
+ if (isReadOnly)
+ return;
+ openOrchestrationWizard();
+ }
+ });
+ addDragDropForOrchestrationTable();
+ }
+
+ /**
+ * Add drag and drop listener to orchTableViewer.
+ */
+ private void addDragDropForOrchestrationTable() {
+ if (isReadOnly)
+ return;
+ orchestrationTableViewer.addDragSupport(DND.DROP_COPY | DND.DROP_MOVE, new Transfer[] { LocalSelectionTransfer.getTransfer() }, new DragSourceListener() {
+
+ public void dragStart(DragSourceEvent event) {
+ isChangOrchestrationeOrder = true;
+ isChangMethodsOrder = false;
+ if (orchestrationTableViewer.getSelection() == null) {
+ event.doit = false;
+ }
+ }
+
+ public void dragSetData(DragSourceEvent event) {
+ if (orchestrationTableViewer.getSelection() != null) {
+ orchestrationDragIndex = orchestrationTableViewer.getTable().getSelectionIndex();
+ }
+ }
+
+ public void dragFinished(DragSourceEvent event) {
+ }
+ });
+
+ orchestrationTableViewer.addDropSupport(DND.DROP_COPY | DND.DROP_MOVE, new Transfer[] { LocalSelectionTransfer.getTransfer() }, new ViewerDropAdapter(orchestrationTableViewer) {
+
+ public boolean validateDrop(Object target, int operation, TransferData transferType) {
+ if (!isChangOrchestrationeOrder) {
+ return checkDropSupport();
+ }
+ return true;
+ }
+
+ public boolean performDrop(Object data) {
+ if (isChangOrchestrationeOrder) {
+ Object currentTarget = getCurrentTarget();
+ EList<Call> orchestration = getPattern().getOrchestration();
+ executeChangeOrder(currentTarget, orchestrationTableViewer, orchestration, orchestrationDragIndex);
+ setOrchestrationButtonsStatus();
+ } else {
+ executeDrop();
+ }
+ return false;
+ }
+ });
+ }
+
+ /**
+ * Execute the drag and drop operation to change the order of the table
+ * rows.
+ */
+ protected void executeChangeOrder(Object currentTarget, TableViewer tableViewer, EList<?> list, int sourceIndex) {
+ int targetIndex = 0;
+ if (currentTarget == null) {
+ targetIndex = tableViewer.getTable().getItemCount() - 1;
+ } else {
+ TableItem[] items = tableViewer.getTable().getItems();
+ for (TableItem item : items) {
+ if (currentTarget.equals(item.getData())) {
+ targetIndex = tableViewer.getTable().indexOf(item);
+ break;
+ }
+ }
+ }
+ Object item = list.get(0);
+ if (item != null && item instanceof PatternMethod) {
+ int fromIndex = getIndexOfPatternMethodsMappingTable(sourceIndex, (EList<PatternMethod>) list);
+ int toIndex = getIndexOfPatternMethodsMappingTable(targetIndex, (EList<PatternMethod>) list);
+ refreshTableContent(list, toIndex, fromIndex);
+ } else {
+ refreshTableContent(list, targetIndex, sourceIndex);
+ }
+ tableViewer.refresh();
+ tableViewer.getTable().setSelection(targetIndex);
+ }
+
+ /**
+ * Refresh the table content after change the tables order.
+ */
+ private void refreshTableContent(final EList<?> list, final int targetIndex, final int sourceIndex) {
+ TransactionalEditingDomain editingDomain = getEditingDomain();
+ RecordingCommand cmd = new RecordingCommand(editingDomain) {
+ protected void doExecute() {
+ list.move(targetIndex, sourceIndex);
+ }
+ };
+ editingDomain.getCommandStack().execute(cmd);
+ }
+
+ /**
+ * While drag the method from methTableViewer to orchTableViewer,check
+ * whether the method is header/init/footer methods.
+ */
+ protected boolean checkDropSupport() {
+ int index = methodsTableViewer.getTable().getSelectionIndex();
+ PatternMethod drag = (PatternMethod) methodsTableViewer.getElementAt(index);
+ String name = drag.getName();
+ if (Messages.ImplementationPage_header.equals(name) || Messages.ImplementationPage_init.equals(name) || Messages.ImplementationPage_footer.equals(name)) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Drag a method from the methods section and drop it to the orechestration
+ * section.
+ */
+ protected void executeDrop() {
+ if (dropEntry != null) {
+ TransactionalEditingDomain editingDomain = getEditingDomain();
+ RecordingCommand cmd = new RecordingCommand(editingDomain) {
+ protected void doExecute() {
+ MethodCall methodCallNew = PatternFactory.eINSTANCE.createMethodCall();
+ methodCallNew.setCalled(dropEntry);
+ methodCallNew.setPattern(getPattern());
+ getPattern().getOrchestration().add(methodCallNew);
+ PatternUIHelper.addAdapterForNewItem(orchestrationTableViewer, methodCallNew);
+ }
+ };
+ editingDomain.getCommandStack().execute(cmd);
+ setOrchestrationButtonsStatus();
+ }
+ }
+
+ /**
+ * Create the Orchestration section's buttons.
+ */
+ private void createOrchestrationButtons(FormToolkit toolkit, Composite orchestration) {
+ Composite buttons = toolkit.createComposite(orchestration, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ buttons.setLayout(layout);
+
+ GridData gd = new GridData();
+ gd.widthHint = 65;
+
+ orchestrationAdd = toolkit.createButton(buttons, "", SWT.PUSH); //$NON-NLS-1$
+ orchestrationAdd.setLayoutData(gd);
+ orchestrationAdd.setImage(ImageShop.get(ImageShop.IMG_ADD_OBJ));
+ orchestrationAdd.setToolTipText(Messages.ImplementationPage_button_add);
+ orchestrationAdd.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ OrchestrationWizard wizard = new OrchestrationWizard(getPattern(), CallTypeEnum.Add, null, getEditingDomain());
+ wizard.init(PlatformUI.getWorkbench(), null);
+ WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), wizard);
+ int returnValue = dialog.open();
+ if (Window.OK == returnValue) {
+ exectuteOrchestrationAdd(wizard);
+ }
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ orchestrationEdit = toolkit.createButton(buttons, "", SWT.PUSH); //$NON-NLS-1$
+ orchestrationEdit.setLayoutData(gd);
+ orchestrationEdit.setEnabled(false);
+ orchestrationEdit.setImage(ImageShop.get(ImageShop.IMG_EDIT_OBJ));
+ orchestrationEdit.setToolTipText(Messages.ImplementationPage_button_edit);
+ orchestrationEdit.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ openOrchestrationWizard();
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ orchestrationRemove = toolkit.createButton(buttons, "", SWT.PUSH); //$NON-NLS-1$
+ orchestrationRemove.setLayoutData(gd);
+ orchestrationRemove.setEnabled(false);
+ orchestrationRemove.setImage(ImageShop.get(ImageShop.IMG_DELETE_OBJ));
+ orchestrationRemove.setToolTipText(Messages.ImplementationPage_button_remove);
+ orchestrationRemove.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ exectueOrchestrationRemove();
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ orchestrationUp = toolkit.createButton(buttons, "", SWT.PUSH); //$NON-NLS-1$
+ orchestrationUp.setLayoutData(gd);
+ orchestrationUp.setEnabled(false);
+ orchestrationUp.setImage(ImageShop.get(ImageShop.IMG_UPWARD_OBJ));
+ orchestrationUp.setToolTipText(Messages.ImplementationPage_button_up);
+ orchestrationUp.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ executeOrchestrationUpOrDown(-1);
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ orchestrationDown = toolkit.createButton(buttons, "", SWT.PUSH); //$NON-NLS-1$
+ orchestrationDown.setLayoutData(gd);
+ orchestrationDown.setEnabled(false);
+ orchestrationDown.setImage(ImageShop.get(ImageShop.IMG_DOWNWARD_OBJ));
+ orchestrationDown.setToolTipText(Messages.ImplementationPage_button_down);
+ orchestrationDown.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ executeOrchestrationUpOrDown(1);
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+ }
+
+ /**
+ * To open the Orchestration wizard.
+ */
+ private void openOrchestrationWizard() {
+ int index = orchestrationTableViewer.getTable().getSelectionIndex();
+ Object selectItem = orchestrationTableViewer.getElementAt(index);
+
+ CallTypeEnum kind = CallTypeEnum.Add;
+ if (selectItem instanceof MethodCall) {
+ kind = CallTypeEnum.METHOD_CALL;
+ } else if (selectItem instanceof PatternCall) {
+ kind = CallTypeEnum.PATTERN_CALL;
+ } else if (selectItem instanceof PatternInjectedCall) {
+ kind = CallTypeEnum.PATTERNINJECTED_CALL;
+ } else if (selectItem instanceof SuperCall) {
+ kind = CallTypeEnum.SUPERPATTERN_CALL;
+ // Prevent the wizard from pops up from BackCall objects.
+ return;
+ } else if (selectItem instanceof BackCall) {
+ kind = CallTypeEnum.BACK_CALL;
+ // Prevent the wizard from pops up from BackCall objects.
+ return;
+ }
+ OrchestrationWizard wizard = new OrchestrationWizard(getPattern(), kind, selectItem, getEditingDomain());
+ wizard.init(PlatformUI.getWorkbench(), null);
+ WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), wizard);
+ int returnValue = dialog.open();
+ if (Window.OK == returnValue) {
+ final Call selectCall = wizard.getSelectCall();
+ exectuteOrchestrationEdit(selectCall, selectItem);
+ }
+ }
+
+ protected void exectuteOrchestrationAdd(OrchestrationWizard wizard) {
+ List selectCallList = new ArrayList();
+ if (wizard.getDefaultKind() == CallTypeEnum.Add && wizard.getSelectCall() instanceof MethodCall) {
+ selectCallList = wizard.getSelectMethodCallList();
+ } else {
+ Call selectCall = wizard.getSelectCall();
+ selectCallList.add(selectCall);
+ }
+
+ for (Object selectCall : selectCallList) {
+ exectuteOrchestrationAddCall((Call) selectCall);
+ }
+
+ int len = getPattern().getOrchestration().size();
+ orchestrationTableViewer.getTable().setSelection(len - 1);
+ setOrchestrationButtonsStatus();
+ }
+
+ private void exectuteOrchestrationAddCall(final Call selectCall) {
+ TransactionalEditingDomain editingDomain = getEditingDomain();
+ RecordingCommand cmd = new RecordingCommand(editingDomain) {
+ protected void doExecute() {
+ selectCall.setPattern(getPattern());
+ getPattern().getOrchestration().add(selectCall);
+ PatternUIHelper.addAdapterForNewItem(orchestrationTableViewer, selectCall);
+ }
+ };
+ editingDomain.getCommandStack().execute(cmd);
+ }
+
+ protected void exectuteOrchestrationEdit(final Call selectCall, final Object selectItem) {
+ TransactionalEditingDomain editingDomain = getEditingDomain();
+ RecordingCommand cmd = new RecordingCommand(editingDomain) {
+ protected void doExecute() {
+ if (selectItem instanceof Call) {
+ int modifyIndex = getPattern().getOrchestration().indexOf(selectItem);
+ if (modifyIndex >= 0) {
+ getPattern().getOrchestration().set(modifyIndex, selectCall);
+ orchestrationTableViewer.getTable().setSelection(modifyIndex);
+ }
+ setOrchestrationButtonsStatus();
+ }
+ }
+ };
+ editingDomain.getCommandStack().execute(cmd);
+ }
+
+ protected void executeOrchestrationUpOrDown(int num) {
+ final int oldIndex = orchestrationTableViewer.getTable().getSelectionIndex();
+ final int newIndex = oldIndex + num;
+ final EList<Call> orchestration = getPattern().getOrchestration();
+
+ TransactionalEditingDomain editingDomain = getEditingDomain();
+ RecordingCommand cmd = new RecordingCommand(editingDomain) {
+ protected void doExecute() {
+ orchestration.move(newIndex, oldIndex);
+ }
+ };
+ editingDomain.getCommandStack().execute(cmd);
+
+ orchestrationTableViewer.getTable().setSelection(newIndex);
+ setOrchestrationButtonsStatus();
+ }
+
+ protected void exectueOrchestrationRemove() {
+ int index = orchestrationTableViewer.getTable().getSelectionIndex();
+ if (index >= 0) {
+ final Object selectItem = orchestrationTableViewer.getElementAt(index);
+ TransactionalEditingDomain editingDomain = getEditingDomain();
+ RecordingCommand cmd = new RecordingCommand(editingDomain) {
+ protected void doExecute() {
+ if (selectItem instanceof Call) {
+ getPattern().getOrchestration().remove(selectItem);
+ }
+ }
+ };
+ editingDomain.getCommandStack().execute(cmd);
+ EList<Call> orchestration = getPattern().getOrchestration();
+ setDefaultSelection(orchestration.size(), orchestrationTableViewer, index);
+ }
+ setOrchestrationButtonsStatus();
+ }
+
+ private void setOrchestrationButtonsStatus() {
+ int selectIndex = orchestrationTableViewer.getTable().getSelectionIndex();
+ if (selectIndex == -1) {
+ orchestrationRemove.setEnabled(false);
+ orchestrationEdit.setEnabled(false);
+ orchestrationUp.setEnabled(false);
+ orchestrationDown.setEnabled(false);
+ return;
+ }
+
+ int length = orchestrationTableViewer.getTable().getItemCount();
+ if (length > 0) {
+ orchestrationRemove.setEnabled(true);
+ orchestrationEdit.setEnabled(true);
+ } else {
+ orchestrationRemove.setEnabled(false);
+ orchestrationEdit.setEnabled(false);
+ }
+ if (selectIndex <= 0) {
+ orchestrationUp.setEnabled(false);
+ } else {
+ orchestrationUp.setEnabled(true);
+ }
+ if ((selectIndex + 1) == length) {
+ orchestrationDown.setEnabled(false);
+ } else {
+ orchestrationDown.setEnabled(true);
+ }
+
+ // Prevent the wizard from pops up from BackCall objects.
+ Object selectItem = orchestrationTableViewer.getElementAt(selectIndex);
+ if (selectItem instanceof BackCall) {
+ orchestrationEdit.setEnabled(false);
+ }
+ }
+
+ private void createVariablesSection(FormToolkit toolkit, Composite composite) {
+ Section varSection = toolkit.createSection(composite, Section.TITLE_BAR);
+ varSection.setText(Messages.ImplementationPage_varSection_title);
+ GridData gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_BOTH);
+ varSection.setLayoutData(gd);
+
+ String label = Messages.ImplementationPage_varSection_label;
+ Composite variables = createComposite(toolkit, varSection, label);
+
+ createVariablesTable(toolkit, variables);
+ createVariablesButtons(toolkit, variables);
+
+ varSection.setClient(variables);
+ }
+
+ private void createVariablesTable(FormToolkit toolkit, Composite variables) {
+ Composite tableComp = new Composite(variables, SWT.NONE);
+ TableColumnLayout layout = new TableColumnLayout();
+ tableComp.setLayout(layout);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ tableComp.setLayoutData(gd);
+
+ Table table = toolkit.createTable(tableComp, SWT.FULL_SELECTION | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
+ table.setHeaderVisible(true);
+ table.setLinesVisible(true);
+
+ gd = new GridData(GridData.FILL_BOTH);
+ gd.verticalIndent = 10;
+ gd.horizontalIndent = 10;
+ gd.widthHint = 100;
+ table.setLayoutData(gd);
+
+ variablesTableViewer = new TableViewer(table);
+ String[] colNames = { Messages.ImplementationPage_column_title_name, Messages.ImplementationPage_column_title_type };
+ int[] colWidths = { 130, 135 };
+ for (int i = 0; i < colNames.length; i++) {
+ TableColumn tableColumn = new TableColumn(table, SWT.NONE);
+ tableColumn.setWidth(colWidths[i]);
+ tableColumn.setText(colNames[i]);
+ layout.setColumnData(tableColumn, new ColumnWeightData(colWidths[i], true));
+ }
+ initVariablesTableEditor();
+
+ variablesTableViewer.setContentProvider(new TableObservableListContentProvider(variablesTableViewer));//
+ variablesTableViewer.setLabelProvider(new ParametersTableLabelProvider());
+ }
+
+ private void initVariablesTableEditor() {
+ if (isReadOnly)
+ return;
+ variablesTableViewer.setColumnProperties(new String[] { NAME_COLUMN_ID, TYPE_COLUMN_ID });
+ final TextCellEditor nameEditor = new TextCellEditor(variablesTableViewer.getTable());
+ final DialogCellEditor typeEditor = new DialogCellEditor(variablesTableViewer.getTable()) {
+
+ @Override
+ protected Object openDialogBox(Control cellEditorWindow) {
+ OpenTypeWizard wizard = new OpenTypeWizard(getEditingDomain(), getSelectItemType());
+ wizard.init(PlatformUI.getWorkbench(), null);
+ WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), wizard);
+ int returnValue = dialog.open();
+ if (Window.OK == returnValue) {
+ if (wizard.getSelectType() instanceof String) {
+ final String selectType = (String) wizard.getSelectType();
+ updateType(selectType);
+ } else if (wizard.getSelectType() instanceof BinaryType) {
+ final String selectType = ((BinaryType) wizard.getSelectType()).getFullyQualifiedName();
+ updateType(selectType);
+ }
+
+ }
+ return null;
+ }
+ };
+ variablesTableViewer.setCellEditors(new CellEditor[] { nameEditor, typeEditor });
+ variablesTableViewer.setCellModifier(new VariablesTableCellModifier(getEditingDomain(), variablesTableViewer));
+
+ variablesTableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+
+ public void selectionChanged(SelectionChangedEvent event) {
+ setVariablesButtonsStatus();
+ }
+ });
+ }
+
+ protected void updateType(final String selectType) {
+ if (selectType != null && !"".equals(selectType)) { //$NON-NLS-1$
+ ISelection selection = variablesTableViewer.getSelection();
+ final Object selectItem = ((IStructuredSelection) selection).getFirstElement();
+ if (selectItem instanceof PatternVariable) {
+ TransactionalEditingDomain editingDomain = getEditingDomain();
+ RecordingCommand cmd = new RecordingCommand(editingDomain) {
+ protected void doExecute() {
+ ((PatternVariable) selectItem).setType(selectType);
+ }
+ };
+ editingDomain.getCommandStack().execute(cmd);
+ variablesTableViewer.refresh();
+ }
+ }
+ }
+
+ /**
+ * Get the type of selected pattern parameter.
+ */
+ protected String getSelectItemType() {
+ int selectionIndex = variablesTableViewer.getTable().getSelectionIndex();
+ Object selectItem = variablesTableViewer.getElementAt(selectionIndex);
+ if (selectItem instanceof PatternVariable) {
+ return ((PatternVariable) selectItem).getType();
+ }
+ return ""; //$NON-NLS-1$
+ }
+
+ /**
+ * Get the methodsTableViewer's selected item.
+ */
+ protected PatternMethod getmethodsSelectItem() {
+ int selectionIndex = methodsTableViewer.getTable().getSelectionIndex();
+ Object selectItem = methodsTableViewer.getElementAt(selectionIndex);
+ if (selectItem instanceof PatternMethod) {
+ return (PatternMethod) selectItem;
+ }
+ return null; //$NON-NLS-1$
+ }
+
+ /**
+ * Create the Variables section's buttons.
+ */
+ private void createVariablesButtons(FormToolkit toolkit, final Composite variables) {
+ Composite buttons = toolkit.createComposite(variables, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ buttons.setLayout(layout);
+
+ GridData gd = new GridData();
+ gd.widthHint = 65;
+
+ variablesAdd = toolkit.createButton(buttons, "", SWT.PUSH); //$NON-NLS-1$
+ variablesAdd.setLayoutData(gd);
+ variablesAdd.setImage(ImageShop.get(ImageShop.IMG_ADD_OBJ));
+ variablesAdd.setToolTipText(Messages.ImplementationPage_button_add);
+ variablesAdd.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ executeVariablesAdd();
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ variablesEdit = toolkit.createButton(buttons, "", SWT.PUSH); //$NON-NLS-1$
+ variablesEdit.setLayoutData(gd);
+ variablesEdit.setEnabled(false);
+ variablesEdit.setImage(ImageShop.get(ImageShop.IMG_EDIT_OBJ));
+ variablesEdit.setToolTipText(Messages.ImplementationPage_button_edit);
+ variablesEdit.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ ISelection selection = variablesTableViewer.getSelection();
+ final Object selectItem = ((IStructuredSelection) selection).getFirstElement();
+ final VariablesEditDialog dialog = new VariablesEditDialog(new Shell(), selectItem, getEditingDomain());
+ dialog.setTitle(Messages.ImplementationPage_variablesEditDialog_title);
+ if (dialog.open() == Window.OK) {
+ TransactionalEditingDomain editingDomain = getEditingDomain();
+ RecordingCommand cmd = new RecordingCommand(editingDomain) {
+ protected void doExecute() {
+ executeVariableEdit(dialog, selectItem);
+ }
+ };
+ editingDomain.getCommandStack().execute(cmd);
+ variablesTableViewer.refresh();
+ }
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ variablesRemove = toolkit.createButton(buttons, "", SWT.PUSH); //$NON-NLS-1$
+ variablesRemove.setLayoutData(gd);
+ variablesRemove.setEnabled(false);
+ variablesRemove.setImage(ImageShop.get(ImageShop.IMG_DELETE_OBJ));
+ variablesRemove.setToolTipText(Messages.ImplementationPage_button_remove);
+ variablesRemove.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ executeVariablesRemove(variables);
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+ }
+
+ /**
+ * Set the Variables section's button status.
+ */
+ private void setVariablesButtonsStatus() {
+ int selectIndex = variablesTableViewer.getTable().getSelectionIndex();
+ if (selectIndex == -1) {
+ variablesRemove.setEnabled(false);
+ variablesEdit.setEnabled(false);
+ return;
+ }
+
+ int length = variablesTableViewer.getTable().getItemCount();
+ if (length > 0) {
+ variablesRemove.setEnabled(true);
+ variablesEdit.setEnabled(true);
+ } else {
+ variablesRemove.setEnabled(false);
+ variablesEdit.setEnabled(false);
+ }
+ }
+
+ protected void executeVariablesAdd() {
+ final Pattern pattern = getPattern();
+ TransactionalEditingDomain editingDomain = getEditingDomain();
+ RecordingCommand cmd = new RecordingCommand(editingDomain) {
+ protected void doExecute() {
+ PatternVariable patternVariableNew = PatternFactory.eINSTANCE.createPatternVariable();
+ patternVariableNew.setName(VARIABLE_NAME_DEFAULT_VALUE);
+ patternVariableNew.setType(VARIABLE_TYPE_DEFAULT_VALUE);
+ pattern.getVariables().add(patternVariableNew);
+ PatternUIHelper.addAdapterForNewItem(variablesTableViewer, patternVariableNew);
+ }
+ };
+ editingDomain.getCommandStack().execute(cmd);
+
+ EList<PatternVariable> allVariables = pattern.getAllVariables();
+ int len = allVariables.size();
+ variablesTableViewer.getTable().setSelection(len - 1);
+ setVariablesButtonsStatus();
+ }
+
+ private void executeVariableEdit(VariablesEditDialog dialog, Object selectItem) {
+ String newName = dialog.getName();
+ String newType = dialog.getType();
+
+ if (selectItem instanceof PatternVariable) {
+ PatternVariable item = (PatternVariable) selectItem;
+ item.setName(newName);
+ item.setType(newType);
+ }
+ }
+
+ protected void executeVariablesRemove(Composite variables) {
+ int index = variablesTableViewer.getTable().getSelectionIndex();
+ if (index >= 0) {
+ ISelection selection = variablesTableViewer.getSelection();
+ final Object removeit = ((IStructuredSelection) selection).getFirstElement();
+ if (removeit instanceof PatternVariable) {
+ if (isVariableDeleteDisable((PatternVariable) removeit)) {
+ String message = Messages.ImplementationPage_variable_cannot_delete_message;
+ showErrorMessage(variables, message);
+ return;
+ }
+ final Pattern pattern = getPattern();
+ TransactionalEditingDomain editingDomain = getEditingDomain();
+ RecordingCommand cmd = new RecordingCommand(editingDomain) {
+ protected void doExecute() {
+ pattern.getVariables().remove(removeit);
+ }
+ };
+ editingDomain.getCommandStack().execute(cmd);
+ EList<PatternVariable> allParameters = pattern.getAllVariables();
+ setDefaultSelection(allParameters.size(), variablesTableViewer, index);
+ }
+ }
+ setVariablesButtonsStatus();
+ }
+
+ private Composite createComposite(FormToolkit toolkit, Section section, String label) {
+ Composite container = toolkit.createComposite(section, SWT.NONE);
+
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ container.setLayout(layout);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ container.setLayoutData(gd);
+
+ Label discrip = toolkit.createLabel(container, label, SWT.WRAP);
+ gd = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ gd.horizontalIndent = 4;
+ discrip.setLayoutData(gd);
+
+ return container;
+ }
+
+ /**
+ * Set default selection after remove operation.
+ */
+ private void setDefaultSelection(int len, TableViewer tableViewer, int index) {
+ if (index < len) {
+ tableViewer.getTable().setSelection(index);
+ } else if (index >= len) {
+ tableViewer.getTable().setSelection(index - 1);
+ }
+ }
+
+ /**
+ * When can't delete the select item, show a message dialog.
+ */
+ private void showErrorMessage(Composite composite, String message) {
+ MessageDialog.openError(composite.getShell(), Messages.ImplementationPage_Error, message);
+ }
+
+ /**
+ * Check whether the method can be deleted.
+ */
+ private boolean isMethodDeleteDisable(PatternMethod deleteItem) {
+ Pattern pattern = getPattern();
+ if (pattern != null) {
+ EList<Call> orchestration = pattern.getOrchestration();
+ for (Call call : orchestration) {
+ if (call instanceof MethodCall) {
+ PatternMethod currentCalled = ((MethodCall) call).getCalled();
+ if (deleteItem.equals(currentCalled)) {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Check whether the variable can be deleted.
+ */
+ private boolean isVariableDeleteDisable(PatternVariable deleteItem) {
+ Pattern pattern = getPattern();
+ if (pattern != null) {
+ EList<Call> orchestration = pattern.getOrchestration();
+ for (Call call : orchestration) {
+ if (call instanceof PatternInjectedCall) {
+ PatternVariable currentVariable = ((PatternInjectedCall) call).getContext();
+ if (deleteItem.equals(currentVariable)) {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ @Override
+ protected void bind() {
+ addBinding(null);
+ Pattern pattern = getPattern();
+ if (pattern != null) {
+ bindMethodsTable(pattern);
+ bindOrchestrationTable(pattern);
+ bindVariablesTableViewer(pattern);
+ variableNameEmpetyValidationAdapter = PatternUIHelper.addValidationAdapeter(mmng, getPattern(), ValidationConstants.CONSTRAINTS_PATTERN_VARIABLE_NAME_NOT_EMPTY_ID, variablesTableViewer.getTable());
+ }
+ }
+
+ void bindMethodsTable(Pattern pattern) {
+ if (nameEditor != null) {
+ List<String> useablePatternMethods = PatternUIHelper.getUseablePatternMethodsNameList(getPatternParent());
+ nameEditor.setInput(useablePatternMethods);
+ }
+ if (methodsTableViewer != null) {
+ methodsTableViewer.setInput(null);
+ methodsTableViewer.setLabelProvider(new MethodLabelProvider());
+ IEMFListProperty input = EMFProperties.list(PatternPackage.Literals.PATTERN__METHODS);
+ IObservableList observe = input.observe(pattern);
+ methodsTableViewer.setInput(observe);
+ }
+ }
+
+ void bindOrchestrationTable(Pattern pattern) {
+ if (orchestrationTableViewer != null) {
+ IEMFListProperty modelProperty = EMFProperties.list(PatternPackage.Literals.PATTERN__ORCHESTRATION);
+ IObservableList observe = modelProperty.observe(pattern);
+ orchestrationTableViewer.setInput(observe);
+ }
+ }
+
+ void bindVariablesTableViewer(Pattern pattern) {
+ if (variablesTableViewer != null) {
+ IEMFListProperty input = EMFProperties.list(PatternPackage.Literals.PATTERN__VARIABLES);
+ IObservableList observe = input.observe(pattern);
+ variablesTableViewer.setInput(observe);
+ }
+ }
+
+ public Button getEditButton() {
+ return methodsEdit;
+ }
+
+ private Pattern getPatternParent() {
+ Pattern pattern = getPattern();
+ return pattern == null ? null : pattern.getSuperPattern();
+ }
+
+ @Override
+ public void dispose() {
+ PatternUIHelper.removeAdapterForPattern(getPattern(), variableNameEmpetyValidationAdapter);
+ super.dispose();
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/pages/OverviewPage.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/pages/OverviewPage.java
new file mode 100644
index 0000000..428ee67
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/pages/OverviewPage.java
@@ -0,0 +1,434 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.pages;
+
+import org.eclipse.core.databinding.UpdateValueStrategy;
+import org.eclipse.core.databinding.conversion.IConverter;
+import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.core.databinding.validation.IValidator;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternLibrary;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.egf.pattern.engine.PatternHelper;
+import org.eclipse.egf.pattern.ui.ImageShop;
+import org.eclipse.egf.pattern.ui.Messages;
+import org.eclipse.egf.pattern.ui.PatternUIHelper;
+import org.eclipse.egf.pattern.ui.editors.PatternEditorInput;
+import org.eclipse.egf.pattern.ui.editors.adapter.LiveValidationContentAdapter;
+import org.eclipse.egf.pattern.ui.editors.dialogs.ContainerLibrarySelectionDialog;
+import org.eclipse.egf.pattern.ui.editors.validation.ValidationConstants;
+import org.eclipse.emf.databinding.EMFUpdateValueStrategy;
+import org.eclipse.emf.databinding.edit.EMFEditProperties;
+import org.eclipse.emf.databinding.edit.IEMFEditValueProperty;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jface.databinding.swt.IWidgetValueProperty;
+import org.eclipse.jface.databinding.swt.WidgetProperties;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.FormColors;
+import org.eclipse.ui.forms.IFormColors;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.IMessageManager;
+import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.forms.events.HyperlinkEvent;
+import org.eclipse.ui.forms.events.IHyperlinkListener;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ImageHyperlink;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class OverviewPage extends PatternEditorPage {
+
+ public static final String ID = "OverviewPage"; //$NON-NLS-1$
+
+ private FormEditor editor;
+
+ private Text nameText;
+
+ private Text fullNameText;
+
+ private Text descripition;
+
+ private Button browse;
+
+ private FormColors colors = new FormColors(Display.getDefault());
+
+ private LiveValidationContentAdapter patternNameEmpetyValidationAdapter;
+
+ private IMessageManager mmng;
+
+ public OverviewPage(FormEditor editor) {
+ super(editor, ID, Messages.OverviewPage_title);
+ this.editor = editor;
+ }
+
+ protected void doCreateFormContent(IManagedForm managedForm) {
+ FormToolkit toolkit = managedForm.getToolkit();
+ ScrolledForm form = managedForm.getForm();
+ mmng = managedForm.getMessageManager();
+
+ GridLayout gridLayout = new GridLayout();
+ form.getBody().setLayout(gridLayout);
+ form.setImage(ImageShop.get(ImageShop.IMG_PLUGIN_MF_OBJ));
+ form.setText(Messages.OverviewPage_title);
+
+ Composite container = toolkit.createComposite(form.getBody(), SWT.NONE);
+ gridLayout = new GridLayout(2, true);
+ container.setLayout(gridLayout);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ container.setLayoutData(gd);
+ container.setFocus();
+
+ createLeftContainer(toolkit, container);
+ createRightContainer(toolkit, container);
+ createDescriContainer(toolkit, container);
+
+ checkReadOnlyModel();
+
+ form.reflow(true);
+ }
+
+ /**
+ * Check whether the editor is on a read only pattern.
+ */
+ private void checkReadOnlyModel() {
+ PatternEditorInput editorInput = (PatternEditorInput) getEditorInput();
+ if (!editorInput.isReadOnly()) {
+ return;
+ }
+ nameText.setEnabled(false);
+ fullNameText.setEnabled(false);
+ descripition.setEnabled(false);
+ browse.setEnabled(false);
+ }
+
+ private void createLeftContainer(FormToolkit toolkit, Composite container) {
+ Section sectionLeft = toolkit.createSection(container, Section.TITLE_BAR);
+ sectionLeft.setText(Messages.OverviewPage_sectionLeft_title);
+
+ GridData gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL);
+ gd.minimumWidth = 300;
+ gd.heightHint = 200;
+ sectionLeft.setLayoutData(gd);
+
+ Composite containerLeft = toolkit.createComposite(sectionLeft, SWT.NONE);
+ GridLayout gridLayout = new GridLayout(2, false);
+ containerLeft.setLayout(gridLayout);
+ gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_BOTH);
+ containerLeft.setLayoutData(gd);
+
+ String titletext = Messages.OverviewPage_sectionLeft_title_label;
+ Label title = toolkit.createLabel(containerLeft, titletext, SWT.WRAP);
+ gd = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
+ gd.widthHint = 20;
+ gd.horizontalSpan = 2;
+ title.setLayoutData(gd);
+
+ createPatternInfoContainer(toolkit, containerLeft);
+
+ sectionLeft.setClient(containerLeft);
+ }
+
+ private void createPatternInfoContainer(FormToolkit toolkit, Composite containerLeft) {
+ Composite patternInfo = toolkit.createComposite(containerLeft, SWT.NONE);
+ GridLayout gridLayout = new GridLayout(3, false);
+ patternInfo.setLayout(gridLayout);
+
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ patternInfo.setLayoutData(gd);
+
+ Label nameLabel = toolkit.createLabel(patternInfo, Messages.OverviewPage_sectionLeft_name_label, SWT.WRAP);
+ gd = new GridData();
+ gd.widthHint = 80;
+ nameLabel.setLayoutData(gd);
+ nameLabel.setForeground(colors.getColor(IFormColors.TITLE));
+
+ nameText = toolkit.createText(patternInfo, getPattern() == null ? "" : getPattern().getName(), SWT.BORDER); //$NON-NLS-1$
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.widthHint = 20;
+ gd.horizontalIndent = 5;
+ gd.horizontalSpan = 2;
+ nameText.setLayoutData(gd);
+
+ Label fullNameLabel = toolkit.createLabel(patternInfo, Messages.OverviewPage_sectionLeft_fullName_label, SWT.WRAP);
+ gd = new GridData();
+ gd.widthHint = 80;
+ fullNameLabel.setLayoutData(gd);
+ fullNameLabel.setForeground(colors.getColor(IFormColors.TITLE));
+
+ Color color = Display.getDefault().getSystemColor(SWT.COLOR_DARK_GRAY);
+ String fullName = PatternHelper.getFullLibraryName(getPattern());
+
+ fullNameText = toolkit.createText(patternInfo, PatternHelper.getFullLibraryName(getPattern()), SWT.BORDER | SWT.READ_ONLY); //$NON-NLS-1$
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalIndent = 5;
+ fullNameText.setLayoutData(gd);
+ fullNameText.setForeground(color);
+ fullNameText.setText(fullName == null ? "" : fullName); //$NON-NLS-1$
+
+ browse = toolkit.createButton(patternInfo, Messages.OverviewPage_button_browse, SWT.PUSH);
+ gd = new GridData();
+ gd.widthHint = 65;
+ browse.setLayoutData(gd);
+ browse.setEnabled(false);
+ browse.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ ContainerLibrarySelectionDialog dialog = new ContainerLibrarySelectionDialog(new Shell(), getPattern().getContainer());
+ dialog.setTitle(Messages.OverviewPage_browse_dialog_title);
+ if (dialog.open() == Window.OK) {
+ final PatternLibrary patternLibrary = dialog.getLibraryContainer();
+ TransactionalEditingDomain editingDomain = getEditingDomain();
+ RecordingCommand cmd = new RecordingCommand(editingDomain) {
+ protected void doExecute() {
+ Pattern pattern = getPattern();
+ pattern.setContainer(patternLibrary);
+ }
+ };
+ editingDomain.getCommandStack().execute(cmd);
+ }
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ Label idLabel = toolkit.createLabel(patternInfo, Messages.OverviewPage_sectionLeft_id_label, SWT.WRAP);
+ gd = new GridData();
+ idLabel.setLayoutData(gd);
+ idLabel.setForeground(colors.getColor(IFormColors.TITLE));
+
+ Text idText = toolkit.createText(patternInfo, getPattern() == null ? "" : getPattern().getID(), SWT.BORDER | SWT.READ_ONLY); //$NON-NLS-1$
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ gd.widthHint = 20;
+ gd.horizontalIndent = 5;
+ idText.setLayoutData(gd);
+ idText.setForeground(color);
+ }
+
+ private void createDescriContainer(FormToolkit toolkit, Composite container) {
+
+ Composite containerDesci = toolkit.createComposite(container, SWT.NONE);
+ GridLayout gridLayout = new GridLayout();
+ containerDesci.setLayout(gridLayout);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ gd.horizontalSpan = 2;
+ containerDesci.setLayoutData(gd);
+
+ Label title = toolkit.createLabel(containerDesci, Messages.OverviewPage_sectionLeft_descripition_label, SWT.WRAP);
+ gd = new GridData();
+ gd.verticalIndent = 0;
+ title.setLayoutData(gd);
+ title.setForeground(colors.getColor(IFormColors.TITLE));
+
+ Label desciLabel = toolkit.createLabel(containerDesci, Messages.OverviewPage_sectionLeft_desci_label, SWT.WRAP);
+ desciLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
+
+ String patternDescripition = getPattern() == null ? "" : getPattern().getDescription(); //$NON-NLS-1$
+ descripition = toolkit.createText(containerDesci, patternDescripition, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.WRAP);
+ gd = new GridData(GridData.FILL_BOTH);
+ gd.heightHint = 280;
+ gd.widthHint = 280;
+ gd.verticalIndent = 7;
+ gd.horizontalIndent = 3;
+ descripition.setLayoutData(gd);
+ }
+
+ private void createRightContainer(FormToolkit toolkit, Composite container) {
+ Section sectionRight = toolkit.createSection(container, Section.TITLE_BAR);
+ sectionRight.setText(Messages.OverviewPage_sectionRight_title);
+
+ GridData gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL);
+ gd.minimumWidth = 300;
+ gd.heightHint = 200;
+ sectionRight.setLayoutData(gd);
+
+ Composite containerRight = toolkit.createComposite(sectionRight, SWT.NONE);
+ GridLayout gridLayout = new GridLayout(2, false);
+ containerRight.setLayout(gridLayout);
+ gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_BOTH);
+ gd.verticalIndent = 0;
+ containerRight.setLayoutData(gd);
+
+ String titletext = Messages.OverviewPage_sectionRight_title_label;
+ Label title = toolkit.createLabel(containerRight, titletext, SWT.WRAP);
+ gd = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
+ gd.widthHint = 100;
+ gd.horizontalSpan = 2;
+ title.setLayoutData(gd);
+
+ Composite containerLink = toolkit.createComposite(containerRight, SWT.NONE);
+ gridLayout = new GridLayout(2, false);
+ containerLink.setLayout(gridLayout);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ containerLink.setLayoutData(gd);
+
+ ImageHyperlink specLink = toolkit.createImageHyperlink(containerLink, SWT.NULL);
+ specLink.setText(Messages.OverviewPage_sectionRight_specLink_label);
+ specLink.setImage(ImageShop.get(ImageShop.IMG_LOCALVARIABLE_OBJ));
+ gd = new GridData();
+ specLink.setLayoutData(gd);
+ specLink.addHyperlinkListener(new IHyperlinkListener() {
+
+ public void linkExited(HyperlinkEvent e) {
+ }
+
+ public void linkEntered(HyperlinkEvent e) {
+ }
+
+ public void linkActivated(HyperlinkEvent e) {
+ editor.setActivePage(SpecificationPage.ID);
+ }
+ });
+
+ Label specLabel = toolkit.createLabel(containerLink, Messages.OverviewPage_sectionRight_spec_label, SWT.WRAP);
+ gd = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
+ gd.widthHint = 100;
+ specLabel.setLayoutData(gd);
+
+ ImageHyperlink implLink = toolkit.createImageHyperlink(containerLink, SWT.NULL);
+ implLink.setText(Messages.OverviewPage_sectionRight_implLink_label);
+ implLink.setImage(ImageShop.get(ImageShop.IMG_METHPUB_OBJ));
+ gd = new GridData();
+ gd.verticalIndent = 20;
+ implLink.setLayoutData(gd);
+ implLink.addHyperlinkListener(new IHyperlinkListener() {
+
+ public void linkExited(HyperlinkEvent e) {
+ }
+
+ public void linkEntered(HyperlinkEvent e) {
+ }
+
+ public void linkActivated(HyperlinkEvent e) {
+ editor.setActivePage(ImplementationPage.ID);
+ }
+ });
+
+ Label implLabel = toolkit.createLabel(containerLink, Messages.OverviewPage_sectionRight_impl_label, SWT.WRAP);
+ gd = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
+ gd.verticalIndent = 18;
+ gd.widthHint = 100;
+ implLabel.setLayoutData(gd);
+
+ sectionRight.setClient(containerRight);
+ }
+
+ void bindName() {
+ Pattern pattern = getPattern();
+ IEMFEditValueProperty mprop = EMFEditProperties.value(getEditingDomain(), FcorePackage.Literals.NAMED_MODEL_ELEMENT__NAME);
+ IWidgetValueProperty textProp = WidgetProperties.text(SWT.Modify);
+ IObservableValue uiObs = textProp.observeDelayed(400, nameText);
+ IObservableValue mObs = mprop.observe(pattern);
+
+ addBinding(ctx.bindValue(uiObs, mObs, new EMFUpdateValueStrategy().setBeforeSetValidator(new IValidator() {
+
+ public IStatus validate(Object value) {
+
+ return Status.OK_STATUS;
+ }
+ }), null));
+ }
+
+ void bindDescripition() {
+ IEMFEditValueProperty mprop = EMFEditProperties.value(getEditingDomain(), FcorePackage.Literals.MODEL_ELEMENT__DESCRIPTION);
+ IWidgetValueProperty textProp = WidgetProperties.text(SWT.Modify);
+ IObservableValue uiObs = textProp.observeDelayed(400, descripition);
+ IObservableValue mObs = mprop.observe(getPattern());
+
+ addBinding(ctx.bindValue(uiObs, mObs, new EMFUpdateValueStrategy().setBeforeSetValidator(new IValidator() {
+
+ public IStatus validate(Object value) {
+
+ return Status.OK_STATUS;
+ }
+ }), null));
+ }
+
+ void bindContainer() {
+ IEMFEditValueProperty mprop = EMFEditProperties.value(getEditingDomain(), PatternPackage.Literals.PATTERN_ELEMENT__CONTAINER);
+ IWidgetValueProperty textProp = WidgetProperties.text(SWT.Modify);
+ IObservableValue uiObs = textProp.observeDelayed(400, fullNameText);
+ IObservableValue mObs = mprop.observe(getPattern());
+
+ UpdateValueStrategy targetToModel = new EMFUpdateValueStrategy().setBeforeSetValidator(new IValidator() {
+ public IStatus validate(Object value) {
+
+ return Status.OK_STATUS;
+ }
+
+ });
+ UpdateValueStrategy modelToTarget = new UpdateValueStrategy();
+ modelToTarget.setConverter(new IConverter() {
+ public Object getToType() {
+ return String.class;
+ }
+
+ public Object getFromType() {
+ return EReference.class;
+ }
+
+ public Object convert(Object fromObject) {
+ if (fromObject == null || !(fromObject instanceof PatternLibrary)) {
+ return ""; //$NON-NLS-1$
+ }
+ return ((PatternLibrary) fromObject).getName();
+ }
+ });
+
+ addBinding(ctx.bindValue(uiObs, mObs, targetToModel, modelToTarget));
+ }
+
+ @Override
+ protected void bind() {
+ if (getPattern() != null) {
+ bindName();
+ bindDescripition();
+ bindContainer();
+ patternNameEmpetyValidationAdapter = PatternUIHelper.addValidationAdapeter(mmng, getPattern(), ValidationConstants.CONSTRAINTS_PATTERN_NAME_NOT_EMPTY_ID, nameText);
+ }
+ }
+
+ @Override
+ public void dispose() {
+ PatternUIHelper.removeAdapterForPattern(getPattern(), patternNameEmpetyValidationAdapter);
+ super.dispose();
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/pages/PatternEditorPage.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/pages/PatternEditorPage.java
new file mode 100644
index 0000000..0bc0fa6
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/pages/PatternEditorPage.java
@@ -0,0 +1,86 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.pages;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.databinding.Binding;
+import org.eclipse.core.databinding.DataBindingContext;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.pattern.ui.editors.PatternEditor;
+import org.eclipse.egf.pattern.ui.editors.PatternEditorInput;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.databinding.EMFDataBindingContext;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.forms.editor.FormPage;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public abstract class PatternEditorPage extends FormPage {
+
+ protected final DataBindingContext ctx = new EMFDataBindingContext();
+ private final List<Binding> bindings = new ArrayList<Binding>();
+
+ public PatternEditorPage(FormEditor editor, String id, String title) {
+ super(editor, id, title);
+
+ }
+
+ protected Pattern getPattern() {
+ return ((PatternEditorInput) getEditorInput()).getPattern();
+ }
+
+ protected void execute(Command cmd) {
+ getEditingDomain().getCommandStack().execute(cmd);
+ }
+
+ protected TransactionalEditingDomain getEditingDomain() {
+ return ((PatternEditor) getEditor()).getEditingDomain();
+ }
+
+ protected final void createFormContent(IManagedForm managedForm) {
+ doCreateFormContent(managedForm);
+ bind();
+ }
+
+ protected void addBinding(Binding binding) {
+ bindings.add(binding);
+ }
+
+ protected abstract void bind();
+
+ protected abstract void doCreateFormContent(IManagedForm managedForm);
+
+ public final void rebind() {
+ if (!bindings.isEmpty()) {
+ ctx.getValidationRealm().asyncExec(new Runnable() {
+
+ public void run() {
+ for (Binding binding : bindings)
+ ctx.removeBinding(binding);
+ bindings.clear();
+ bind();
+ }
+ });
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/pages/SpecificationPage.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/pages/SpecificationPage.java
new file mode 100644
index 0000000..095cfaf
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/pages/SpecificationPage.java
@@ -0,0 +1,1042 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.pages;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.databinding.UpdateValueStrategy;
+import org.eclipse.core.databinding.conversion.IConverter;
+import org.eclipse.core.databinding.observable.list.IObservableList;
+import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.core.databinding.validation.IValidator;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.model.pattern.PatternFactory;
+import org.eclipse.egf.model.pattern.PatternLibrary;
+import org.eclipse.egf.model.pattern.PatternNature;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.egf.model.pattern.PatternParameter;
+import org.eclipse.egf.model.pattern.Query;
+import org.eclipse.egf.pattern.extension.ExtensionHelper;
+import org.eclipse.egf.pattern.extension.PatternExtension;
+import org.eclipse.egf.pattern.extension.PatternInitializer;
+import org.eclipse.egf.pattern.extension.ExtensionHelper.MissingExtensionException;
+import org.eclipse.egf.pattern.query.IQuery;
+import org.eclipse.egf.pattern.query.QueryKind;
+import org.eclipse.egf.pattern.ui.ImageShop;
+import org.eclipse.egf.pattern.ui.Messages;
+import org.eclipse.egf.pattern.ui.PatternUIHelper;
+import org.eclipse.egf.pattern.ui.contributions.EditHelper;
+import org.eclipse.egf.pattern.ui.editors.PatternEditorInput;
+import org.eclipse.egf.pattern.ui.editors.adapter.LiveValidationContentAdapter;
+import org.eclipse.egf.pattern.ui.editors.dialogs.ParametersEditDialog;
+import org.eclipse.egf.pattern.ui.editors.dialogs.PatternSelectionDialog;
+import org.eclipse.egf.pattern.ui.editors.models.QueryContent;
+import org.eclipse.egf.pattern.ui.editors.modifiers.ParametersTableCellModifier;
+import org.eclipse.egf.pattern.ui.editors.providers.ComboListLabelProvider;
+import org.eclipse.egf.pattern.ui.editors.providers.CommonListContentProvider;
+import org.eclipse.egf.pattern.ui.editors.providers.ParametersTableLabelProvider;
+import org.eclipse.egf.pattern.ui.editors.providers.TableObservableListContentProvider;
+import org.eclipse.egf.pattern.ui.editors.validation.ValidationConstants;
+import org.eclipse.egf.pattern.ui.editors.wizards.OpenTypeWizard;
+import org.eclipse.emf.common.util.BasicEList;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.EMap;
+import org.eclipse.emf.databinding.EMFProperties;
+import org.eclipse.emf.databinding.EMFUpdateValueStrategy;
+import org.eclipse.emf.databinding.IEMFListProperty;
+import org.eclipse.emf.databinding.edit.EMFEditProperties;
+import org.eclipse.emf.databinding.edit.IEMFEditValueProperty;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jdt.internal.core.BinaryType;
+import org.eclipse.jface.databinding.swt.IWidgetValueProperty;
+import org.eclipse.jface.databinding.swt.WidgetProperties;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.layout.TableColumnLayout;
+import org.eclipse.jface.util.LocalSelectionTransfer;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.ComboBoxViewerCellEditor;
+import org.eclipse.jface.viewers.DialogCellEditor;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TextCellEditor;
+import org.eclipse.jface.viewers.ViewerDropAdapter;
+import org.eclipse.jface.window.Window;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.DragSourceEvent;
+import org.eclipse.swt.dnd.DragSourceListener;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.dnd.TransferData;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Link;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.forms.FormColors;
+import org.eclipse.ui.forms.IFormColors;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.IMessageManager;
+import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+@SuppressWarnings("restriction")
+public class SpecificationPage extends PatternEditorPage {
+ public static final String ID = "SpecificationPage"; //$NON-NLS-1$
+
+ private Link parentLink;
+
+ private Button add;
+
+ private Button edit;
+
+ private Button remove;
+
+ private Button up;
+
+ private Button down;
+
+ private Button browse;
+
+ private Button removeParent;
+
+ private Combo combo;
+
+ private TableViewer tableViewer;
+
+ private FormColors colors = new FormColors(Display.getDefault());
+
+ public static final String NAME_COLUMN_ID = "Name"; //$NON-NLS-1$
+
+ public static final String TYPE_COLUMN_ID = "Type"; //$NON-NLS-1$
+
+ public static final String QUERY_COLUMN_ID = "Query"; //$NON-NLS-1$
+
+ private static final String NO_QUERY_VALUE = ""; //$NON-NLS-1$
+
+ private static final String PARAMETER_NAME_DEFAULT_VALUE = "parameter"; //$NON-NLS-1$
+
+ private static final String PARAMETER_TYPE_DEFAULT_VALUE = "http://www.eclipse.org/emf/2002/Ecore#//EClass"; //$NON-NLS-1$
+
+ private int dragIndex = -1;
+
+ private ComboBoxViewerCellEditor queryEditor;
+
+ private boolean isReadOnly;
+
+ private LiveValidationContentAdapter parameterNameEmpetyValidationAdapter;
+
+ private IMessageManager mmng;
+
+ private int comboSelectIndex;
+
+ public SpecificationPage(FormEditor editor) {
+ super(editor, ID, Messages.SpecificationPage_title);
+
+ }
+
+ @Override
+ protected void doCreateFormContent(IManagedForm managedForm) {
+ PatternEditorInput editorInput = (PatternEditorInput) getEditorInput();
+ mmng = managedForm.getMessageManager();
+ isReadOnly = editorInput.isReadOnly();
+
+ FormToolkit toolkit = managedForm.getToolkit();
+ ScrolledForm form = managedForm.getForm();
+
+ toolkit.decorateFormHeading(form.getForm());
+ GridLayout layout = new GridLayout(2, true);
+ form.getBody().setLayout(layout);
+ form.setImage(ImageShop.get(ImageShop.IMG_PLUGIN_MF_OBJ));
+ form.setText(Messages.SpecificationPage_title);
+
+ Composite containerLeft = createComposite(toolkit, form);
+ createInheritanceSection(toolkit, containerLeft);
+ createParametersSection(toolkit, containerLeft);
+
+ Composite containerRight = createComposite(toolkit, form);
+ createPatternNatureSection(toolkit, containerRight);
+
+ checkReadOnlyModel();
+
+ form.reflow(true);
+ }
+
+ private Composite createComposite(FormToolkit toolkit, ScrolledForm form) {
+ Composite composite = toolkit.createComposite(form.getBody(), SWT.NONE);
+ GridLayout layout = new GridLayout(1, true);
+ composite.setLayout(layout);
+ GridData gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_BOTH);
+ composite.setLayoutData(gd);
+ return composite;
+ }
+
+ /**
+ * Check whether the editor is on a read only pattern.
+ */
+ private void checkReadOnlyModel() {
+ if (!isReadOnly) {
+ return;
+ }
+ parentLink.setEnabled(false);
+
+ browse.setEnabled(false);
+ removeParent.setEnabled(false);
+
+ add.setEnabled(false);
+ edit.setEnabled(false);
+ remove.setEnabled(false);
+ up.setEnabled(false);
+ down.setEnabled(false);
+ combo.setEnabled(false);
+ }
+
+ private void createInheritanceSection(FormToolkit toolkit, Composite form) {
+ Section inherSection = toolkit.createSection(form, Section.TITLE_BAR);
+ inherSection.setText(Messages.SpecificationPage_inherSection_title);
+ GridData gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_BOTH);
+ inherSection.setLayoutData(gd);
+
+ Composite inheritance = toolkit.createComposite(inherSection, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ inheritance.setLayout(layout);
+
+ gd = new GridData(GridData.FILL_BOTH);
+ inheritance.setLayoutData(gd);
+
+ Label discrip = toolkit.createLabel(inheritance, Messages.SpecificationPage_inherSection_discrip_label);
+ gd = new GridData();
+ gd.horizontalSpan = 3;
+ gd.horizontalIndent = 4;
+ discrip.setLayoutData(gd);
+
+ Label parentLabel = toolkit.createLabel(inheritance, Messages.SpecificationPage_inherSection_parent_label);
+ gd = new GridData();
+ gd.verticalIndent = 10;
+ parentLabel.setLayoutData(gd);
+ parentLabel.setForeground(colors.getColor(IFormColors.TITLE));
+
+ parentLink = new Link(inheritance, SWT.NONE);
+ gd = new GridData(GridData.FILL_HORIZONTAL | GridData.HORIZONTAL_ALIGN_CENTER);
+ gd.verticalIndent = 10;
+ gd.widthHint = 20;
+ parentLink.setLayoutData(gd);
+ parentLink.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ openParentPatternEditor();
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ createInheritanceButtons(toolkit, inheritance);
+
+ inherSection.setClient(inheritance);
+ }
+
+ protected void openParentPatternEditor() {
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ IWorkbenchWindow activeWorkbenchWindow = workbench.getActiveWorkbenchWindow();
+ IWorkbenchPage activePage = activeWorkbenchWindow.getActivePage();
+ EditHelper.openPatternEditor(activePage, getPattern().getSuperPattern().getID());
+ }
+
+ private void createInheritanceButtons(FormToolkit toolkit, Composite Inheritance) {
+ Composite buttons = toolkit.createComposite(Inheritance, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ buttons.setLayout(layout);
+
+ GridData gd = new GridData();
+ gd.verticalIndent = 10;
+ gd.widthHint = 65;
+
+ browse = toolkit.createButton(buttons, Messages.SpecificationPage_button_browse, SWT.PUSH);
+ browse.setLayoutData(gd);
+ browse.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ PatternSelectionDialog dialog = new PatternSelectionDialog(new Shell(), getParentPattern());
+ dialog.setTitle(Messages.SpecificationPage_browse_dialog_title);
+ if (dialog.open() == Window.OK) {
+ final Pattern parent = dialog.getParent();
+ TransactionalEditingDomain editingDomain = getEditingDomain();
+ RecordingCommand cmd = new RecordingCommand(editingDomain) {
+ protected void doExecute() {
+ getPattern().setSuperPattern(parent);
+ }
+ };
+ editingDomain.getCommandStack().execute(cmd);
+ }
+
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ removeParent = toolkit.createButton(buttons, "", SWT.PUSH); //$NON-NLS-1$
+ removeParent.setLayoutData(gd);
+ removeParent.setImage(ImageShop.get(ImageShop.IMG_DELETE_OBJ));
+ removeParent.setToolTipText(Messages.SpecificationPage_button_remove);
+ removeParent.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ TransactionalEditingDomain editingDomain = getEditingDomain();
+ RecordingCommand cmd = new RecordingCommand(editingDomain) {
+ protected void doExecute() {
+ getPattern().setSuperPattern(null);
+ }
+ };
+ editingDomain.getCommandStack().execute(cmd);
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+ }
+
+ private void createPatternNatureSection(FormToolkit toolkit, Composite form) {
+ Section patternSection = toolkit.createSection(form, Section.TITLE_BAR);
+ patternSection.setText(Messages.SpecificationPage_patternSection_title);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ patternSection.setLayoutData(gd);
+
+ Composite pattern = toolkit.createComposite(patternSection, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ pattern.setLayout(layout);
+
+ Label discrip = toolkit.createLabel(pattern, Messages.SpecificationPage_patternSection_discrip_label, SWT.WRAP);
+ gd = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ gd.horizontalIndent = 4;
+ gd.widthHint = 100;
+ discrip.setLayoutData(gd);
+
+ createTypeArea(toolkit, pattern);
+
+ patternSection.setClient(pattern);
+ }
+
+ private void createTypeArea(FormToolkit toolkit, final Composite composite) {
+ Label type = toolkit.createLabel(composite, Messages.SpecificationPage_patternSection_type_label);
+ GridData gd = new GridData();
+ gd.verticalIndent = 10;
+ type.setLayoutData(gd);
+ type.setForeground(colors.getColor(IFormColors.TITLE));
+
+ combo = new Combo(composite, SWT.NONE | SWT.READ_ONLY);
+
+ Object[] natures = getNatures().keySet().toArray();
+ for (int i = 0; i < natures.length; i++) {
+ PatternNature currentNature = (PatternNature) natures[i];
+ String currentNatureName = ExtensionHelper.getName(currentNature);
+ combo.add(currentNatureName);
+ }
+ combo.select(0);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.verticalIndent = 10;
+ gd.widthHint = 50;
+ combo.setLayoutData(gd);
+
+ combo.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ executeNatureChange(composite);
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+ }
+
+ private void executeNatureChange(Composite composite) {
+ String message = Messages.SpecificationPage_change_nature_type;
+ boolean openQuestion = MessageDialog.openQuestion(composite.getShell(), null, message);
+ if (openQuestion) {
+ // create template files
+ Pattern pattern = getPattern();
+ PatternLibrary library = pattern.getContainer();
+ IProject project = EGFCorePlugin.getPlatformFcore(library.eResource()).getPlatformBundle().getProject();
+ PatternInitializer initializer;
+ try {
+ initializer = ExtensionHelper.getExtension(getPattern().getNature()).createInitializer(project, pattern);
+ initializer.updateContent();
+ } catch (PatternException e) {
+ e.printStackTrace();
+ } catch (MissingExtensionException e) {
+ e.printStackTrace();
+ }
+ comboSelectIndex = combo.getSelectionIndex();
+ } else {
+ combo.select(comboSelectIndex);
+ }
+ getEditor().doSave(null);
+ }
+
+ private void createParametersSection(FormToolkit toolkit, Composite form) {
+ Composite composite = toolkit.createComposite(form, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ composite.setLayout(layout);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ composite.setLayoutData(gd);
+
+ Section paraSection = toolkit.createSection(composite, Section.TITLE_BAR);
+ paraSection.setText(Messages.SpecificationPage_paraSection_title);
+ gd = new GridData(GridData.FILL_BOTH);
+ paraSection.setLayoutData(gd);
+
+ Composite parameters = toolkit.createComposite(paraSection, SWT.NONE);
+ layout = new GridLayout();
+ layout.numColumns = 2;
+ parameters.setLayout(layout);
+
+ Label discrip = toolkit.createLabel(parameters, Messages.SpecificationPage_paraSection_discrip_label, SWT.WRAP);
+ gd = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ gd.horizontalIndent = 4;
+ gd.widthHint = 100;
+ discrip.setLayoutData(gd);
+
+ createParametersTableArea(toolkit, parameters);
+ createParametersButtons(toolkit, parameters);
+ paraSection.setClient(parameters);
+ }
+
+ private void createParametersTableArea(FormToolkit toolkit, Composite parameters) {
+
+ Composite tableComp = new Composite(parameters, SWT.NONE);
+ TableColumnLayout layout = new TableColumnLayout();
+ tableComp.setLayout(layout);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ tableComp.setLayoutData(gd);
+
+ Table table = toolkit.createTable(tableComp, SWT.FULL_SELECTION | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
+ table.setHeaderVisible(true);
+ table.setLinesVisible(true);
+
+ gd = new GridData(GridData.FILL_BOTH);
+ gd.verticalIndent = 10;
+ gd.horizontalIndent = 10;
+ gd.widthHint = 100;
+ table.setLayoutData(gd);
+
+ tableViewer = new TableViewer(table);
+ String[] colNames = { Messages.SpecificationPage_column_title_name, Messages.SpecificationPage_column_title_type, Messages.SpecificationPage_column_title_query };
+ int[] colWidths = { 100, 80, 80 };
+ for (int i = 0; i < colNames.length; i++) {
+ TableColumn tableColumn = new TableColumn(table, SWT.NONE);
+ tableColumn.setWidth(colWidths[i]);
+ tableColumn.setText(colNames[i]);
+ layout.setColumnData(tableColumn, new ColumnWeightData(colWidths[i], true));
+ }
+ initTableEditor();
+
+ tableViewer.setContentProvider(new TableObservableListContentProvider(tableViewer));
+
+ tableViewer.setLabelProvider(new ParametersTableLabelProvider());
+
+ tableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+
+ public void selectionChanged(SelectionChangedEvent event) {
+ if (isReadOnly)
+ return;
+ setButtonsStatus();
+ }
+ });
+ addDragDrop();
+ }
+
+ /**
+ * Add drag and drop listener to tableViewer.
+ */
+ private void addDragDrop() {
+ if (isReadOnly)
+ return;
+ tableViewer.addDragSupport(DND.DROP_COPY | DND.DROP_MOVE, new Transfer[] { LocalSelectionTransfer.getTransfer() }, new DragSourceListener() {
+
+ public void dragStart(DragSourceEvent event) {
+ if (tableViewer.getSelection() == null) {
+ event.doit = false;
+ }
+ }
+
+ public void dragSetData(DragSourceEvent event) {
+ if (tableViewer.getSelection() != null) {
+ dragIndex = tableViewer.getTable().getSelectionIndex();
+ }
+ }
+
+ public void dragFinished(DragSourceEvent event) {
+ }
+ });
+
+ tableViewer.addDropSupport(DND.DROP_COPY | DND.DROP_MOVE, new Transfer[] { LocalSelectionTransfer.getTransfer() }, new ViewerDropAdapter(tableViewer) {
+
+ public boolean validateDrop(Object target, int operation, TransferData transferType) {
+ return true;
+ }
+
+ public boolean performDrop(Object data) {
+ Object currentTarget = getCurrentTarget();
+ executeChangeOrder(currentTarget);
+ return false;
+ }
+ });
+ }
+
+ /**
+ * Execute the drag and drop operation to change the order of the table
+ * rows.
+ */
+ protected void executeChangeOrder(Object currentTarget) {
+ EList<PatternParameter> allParameters = getPattern().getAllParameters();
+ Object currentSource = allParameters.get(dragIndex);
+ BasicEList<PatternParameter> allParametersNew = new BasicEList<PatternParameter>();
+ int targetIndex = 0;
+ int index = 0;
+ if (currentTarget == null) {
+ targetIndex = tableViewer.getTable().getItemCount() - 1;
+ currentTarget = tableViewer.getElementAt(targetIndex);
+ } else {
+ for (Object parameter : allParameters) {
+ if (currentTarget.equals(parameter)) {
+ targetIndex = index;
+ break;
+ }
+ index++;
+ }
+ }
+ for (int i = 0; i < allParameters.size(); i++) {
+ if (i == targetIndex) {
+ if (targetIndex > dragIndex) {
+ allParametersNew.add((PatternParameter) currentTarget);
+ allParametersNew.add((PatternParameter) currentSource);
+ } else {
+ allParametersNew.add((PatternParameter) currentSource);
+ allParametersNew.add((PatternParameter) currentTarget);
+ }
+ } else if (i != dragIndex) {
+ allParametersNew.add(allParameters.get(i));
+ }
+ }
+
+ updateAllParameters(allParametersNew);
+ tableViewer.getTable().setSelection(targetIndex);
+ setButtonsStatus();
+ }
+
+ private void createParametersButtons(FormToolkit toolkit, Composite parameters) {
+ Composite buttons = toolkit.createComposite(parameters, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ buttons.setLayout(layout);
+
+ GridData gd = new GridData();
+ gd.widthHint = 65;
+
+ add = toolkit.createButton(buttons, "", SWT.PUSH); //$NON-NLS-1$
+ add.setLayoutData(gd);
+ add.setImage(ImageShop.get(ImageShop.IMG_ADD_OBJ));
+ add.setToolTipText(Messages.SpecificationPage_button_add);
+ add.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ executeAdd();
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ edit = toolkit.createButton(buttons, "", SWT.PUSH); //$NON-NLS-1$
+ edit.setLayoutData(gd);
+ edit.setEnabled(false);
+ edit.setImage(ImageShop.get(ImageShop.IMG_EDIT_OBJ));
+ edit.setToolTipText(Messages.SpecificationPage_button_edit);
+ edit.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ ISelection selection = tableViewer.getSelection();
+ final Object selectItem = ((IStructuredSelection) selection).getFirstElement();
+ if (selectItem instanceof PatternParameter) {
+ PatternParameter patternParameter = (PatternParameter) selectItem;
+ final ParametersEditDialog dialog = new ParametersEditDialog(new Shell(), patternParameter, getEditingDomain());
+ dialog.setTitle(Messages.SpecificationPage_parametersEditDialog_title);
+ if (dialog.open() == Window.OK) {
+ TransactionalEditingDomain editingDomain = getEditingDomain();
+ RecordingCommand cmd = new RecordingCommand(editingDomain) {
+ protected void doExecute() {
+ executeParameterEdit(dialog, selectItem);
+ }
+ };
+ editingDomain.getCommandStack().execute(cmd);
+ }
+ }
+ tableViewer.refresh();
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ remove = toolkit.createButton(buttons, "", SWT.PUSH); //$NON-NLS-1$
+ remove.setLayoutData(gd);
+ remove.setEnabled(false);
+ remove.setImage(ImageShop.get(ImageShop.IMG_DELETE_OBJ));
+ remove.setToolTipText(Messages.SpecificationPage_button_remove);
+ remove.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ exectueRemove();
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ up = toolkit.createButton(buttons, "", SWT.PUSH); //$NON-NLS-1$
+ up.setLayoutData(gd);
+ up.setEnabled(false);
+ up.setImage(ImageShop.get(ImageShop.IMG_UPWARD_OBJ));
+ up.setToolTipText(Messages.SpecificationPage_button_up);
+ up.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ executeUpOrDown(-1);
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ down = toolkit.createButton(buttons, "", SWT.PUSH); //$NON-NLS-1$
+ down.setLayoutData(gd);
+ down.setEnabled(false);
+ down.setImage(ImageShop.get(ImageShop.IMG_DOWNWARD_OBJ));
+ down.setToolTipText(Messages.SpecificationPage_button_down);
+ down.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ executeUpOrDown(1);
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+ }
+
+ protected void executeParameterEdit(ParametersEditDialog dialog, Object selectItem) {
+ String newName = dialog.getName();
+ String newType = dialog.getType();
+ String newQuey = dialog.getQuery();
+
+ QueryKind queryKind = IQuery.INSTANCE.getQueryKindByName(newQuey);
+ if (queryKind != null) {
+ newQuey = queryKind.getId();
+ }
+
+ if (selectItem instanceof PatternParameter) {
+ PatternParameter item = (PatternParameter) selectItem;
+ item.setName(newName);
+ item.setType(newType);
+ Query queryItem = item.getQuery();
+ if (queryItem != null) {
+ queryItem.setExtensionId(newQuey);
+ setQueryContent(dialog, queryItem);
+ } else if (!NO_QUERY_VALUE.equals(newQuey)) { //$NON-NLS-1$
+ Query query = PatternFactory.eINSTANCE.createBasicQuery();
+ query.setExtensionId(newQuey);
+ item.setQuery(query);
+ query.setParameter(item);
+ setQueryContent(dialog, query);
+ }
+ if (NO_QUERY_VALUE.equals(queryItem)) {
+ item.setQuery(null);
+ }
+ }
+ }
+
+ /**
+ * Update the Query Content of the Query.
+ */
+ private void setQueryContent(ParametersEditDialog dialog, Query query) {
+ List<QueryContent> queryContents = dialog.getQueryContents();
+ EMap<String, String> queryContext = query.getQueryContext();
+ if (queryContext != null && !queryContext.isEmpty()) {
+ queryContext.clear();
+ }
+ for (QueryContent queryContent : queryContents) {
+ queryContext.put(queryContent.getKey(), queryContent.getValue());
+ }
+ }
+
+ private void setButtonsStatus() {
+ int selectIndex = tableViewer.getTable().getSelectionIndex();
+ if (selectIndex == -1) {
+ edit.setEnabled(false);
+ remove.setEnabled(false);
+ up.setEnabled(false);
+ down.setEnabled(false);
+ return;
+ }
+ int length = tableViewer.getTable().getItemCount();
+ if (length > 0) {
+ remove.setEnabled(true);
+ edit.setEnabled(true);
+ } else {
+ remove.setEnabled(false);
+ edit.setEnabled(false);
+ }
+ if (selectIndex <= 0) {
+ up.setEnabled(false);
+ } else {
+ up.setEnabled(true);
+ }
+ if ((selectIndex + 1) == length) {
+ down.setEnabled(false);
+ } else {
+ down.setEnabled(true);
+ }
+ }
+
+ /**
+ * Get all the natures.
+ */
+ private static Map<PatternNature, PatternExtension> getNatures() {
+
+ Map<PatternNature, PatternExtension> result = new HashMap<PatternNature, PatternExtension>();
+ for (PatternExtension ext : ExtensionHelper.getExtensions().values())
+ result.put(ext.getNature(), ext);
+ return result;
+ }
+
+ protected void exectueRemove() {
+ int index = tableViewer.getTable().getSelectionIndex();
+ final Pattern pattern = getPattern();
+ ISelection selection = tableViewer.getSelection();
+ final Object[] removeThem = ((IStructuredSelection) selection).toArray();
+ TransactionalEditingDomain editingDomain = getEditingDomain();
+ RecordingCommand cmd = new RecordingCommand(editingDomain) {
+ protected void doExecute() {
+ for (Object object : removeThem) {
+ if (object instanceof PatternParameter) {
+ pattern.getParameters().remove(object);
+ }
+ }
+ }
+ };
+ editingDomain.getCommandStack().execute(cmd);
+
+ int len = tableViewer.getTable().getItemCount();
+ if (index < len) {
+ tableViewer.getTable().setSelection(index);
+ } else if (index >= len) {
+ tableViewer.getTable().setSelection(index - 1);
+ }
+ setButtonsStatus();
+ }
+
+ /**
+ * Add a new PatternParameter with a default name.
+ */
+ protected void executeAdd() {
+ final Pattern pattern = getPattern();
+ TransactionalEditingDomain editingDomain = getEditingDomain();
+ RecordingCommand cmd = new RecordingCommand(editingDomain) {
+ protected void doExecute() {
+ PatternParameter newPatternParameter = PatternFactory.eINSTANCE.createPatternParameter();
+ newPatternParameter.setName(PARAMETER_NAME_DEFAULT_VALUE);
+ newPatternParameter.setType(PARAMETER_TYPE_DEFAULT_VALUE);
+ pattern.getParameters().add(newPatternParameter);
+ PatternUIHelper.addAdapterForNewItem(tableViewer, newPatternParameter);
+ }
+ };
+ editingDomain.getCommandStack().execute(cmd);
+
+ EList<PatternParameter> allParameters = pattern.getAllParameters();
+ int len = allParameters.size();
+ tableViewer.getTable().setSelection(len - 1);
+ setButtonsStatus();
+ }
+
+ private void executeUpOrDown(int num) {
+ int oldIndex = tableViewer.getTable().getSelectionIndex();
+ int newIndex = oldIndex + num;
+
+ EList<PatternParameter> allParameters = getPattern().getAllParameters();
+ BasicEList<PatternParameter> allParametersNew = new BasicEList<PatternParameter>();
+ for (int i = 0; i < allParameters.size(); i++) {
+ if (i == newIndex) {
+ allParametersNew.add(allParameters.get(oldIndex));
+ } else if (i == oldIndex) {
+ allParametersNew.add(allParameters.get(newIndex));
+ } else {
+ allParametersNew.add(allParameters.get(i));
+ }
+ }
+ updateAllParameters(allParametersNew);
+ tableViewer.getTable().setSelection(newIndex);
+ setButtonsStatus();
+ }
+
+ /**
+ * Refresh the pattern's all parameters after change tableViewer order's.
+ */
+ private void updateAllParameters(final BasicEList<PatternParameter> allParametersNew) {
+ TransactionalEditingDomain editingDomain = getEditingDomain();
+ RecordingCommand cmd = new RecordingCommand(editingDomain) {
+ protected void doExecute() {
+ getPattern().getParameters().removeAll(getPattern().getParameters());
+ getPattern().getParameters().addAll(allParametersNew);
+ }
+ };
+ editingDomain.getCommandStack().execute(cmd);
+ }
+
+ private void initTableEditor() {
+ if (isReadOnly)
+ return;
+ tableViewer.setColumnProperties(new String[] { NAME_COLUMN_ID, TYPE_COLUMN_ID, QUERY_COLUMN_ID });
+ final TextCellEditor nameEditor = new TextCellEditor(tableViewer.getTable());
+ final DialogCellEditor typeEditor = new DialogCellEditor(tableViewer.getTable()) {
+
+ @Override
+ protected Object openDialogBox(Control cellEditorWindow) {
+ OpenTypeWizard wizard = new OpenTypeWizard(getEditingDomain(), getSelectItemType());
+ wizard.init(PlatformUI.getWorkbench(), null);
+ WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), wizard);
+ int returnValue = dialog.open();
+ if (Window.OK == returnValue) {
+ if (wizard.getSelectType() instanceof String) {
+ final String selectType = (String) wizard.getSelectType();
+ updateType(selectType);
+ } else if (wizard.getSelectType() instanceof BinaryType) {
+ final String selectType = ((BinaryType) wizard.getSelectType()).getFullyQualifiedName();
+ updateType(selectType);
+ }
+
+ }
+ return null;
+ }
+ };
+ queryEditor = new ComboBoxViewerCellEditor(tableViewer.getTable(), SWT.NONE);
+ queryEditor.setLabelProvider(new ComboListLabelProvider());
+ queryEditor.setContenProvider(new CommonListContentProvider());
+ setComboViewerInput();
+ tableViewer.setCellEditors(new CellEditor[] { nameEditor, typeEditor, queryEditor });
+ ParametersTableCellModifier modifier = new ParametersTableCellModifier(getEditingDomain(), tableViewer);
+ tableViewer.setCellModifier(modifier);
+ tableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+
+ public void selectionChanged(SelectionChangedEvent event) {
+ List availableQueries = IQuery.INSTANCE.getAvailableQueries();
+ availableQueries.add(0, ""); //$NON-NLS-1$
+ queryEditor.setInput(availableQueries);
+ }
+ });
+
+ }
+
+ private void updateType(final String selectType) {
+ if (selectType != null && !"".equals(selectType)) { //$NON-NLS-1$
+ ISelection selection = tableViewer.getSelection();
+ final Object selectItem = ((IStructuredSelection) selection).getFirstElement();
+ if (selectItem instanceof PatternParameter) {
+ TransactionalEditingDomain editingDomain = getEditingDomain();
+ RecordingCommand cmd = new RecordingCommand(editingDomain) {
+ protected void doExecute() {
+ ((PatternParameter) selectItem).setType(selectType);
+ }
+ };
+ editingDomain.getCommandStack().execute(cmd);
+ tableViewer.refresh();
+ }
+ }
+ }
+
+ private void setComboViewerInput() {
+ List availableQueries = IQuery.INSTANCE.getAvailableQueries();
+ availableQueries.add(0, ""); //$NON-NLS-1$
+ queryEditor.setInput(availableQueries);
+ }
+
+ /**
+ * Get the type of selected pattern parameter.
+ */
+ private String getSelectItemType() {
+ int selectionIndex = tableViewer.getTable().getSelectionIndex();
+ Object selectItem = tableViewer.getElementAt(selectionIndex);
+ if (selectItem instanceof PatternParameter) {
+ return ((PatternParameter) selectItem).getType();
+ }
+ return ""; //$NON-NLS-1$
+ }
+
+ @Override
+ protected void bind() {
+ if (getPattern() != null) {
+ bindParent();
+ bindNature();
+ bindTableViewer();
+ parameterNameEmpetyValidationAdapter = PatternUIHelper.addValidationAdapeter(mmng, getPattern(), ValidationConstants.CONSTRAINTS_PATTERN_PARAMETER_NOT_EMPTY_NAME_ID, tableViewer.getTable());
+ }
+ }
+
+ void bindParent() {
+ IEMFEditValueProperty mprop = EMFEditProperties.value(getEditingDomain(), PatternPackage.Literals.PATTERN__SUPER_PATTERN);
+ IWidgetValueProperty textProp = WidgetProperties.text();
+ IObservableValue uiObs = textProp.observeDelayed(400, parentLink);
+ IObservableValue mObs = mprop.observe(getPattern());
+
+ UpdateValueStrategy targetToModel = new EMFUpdateValueStrategy().setBeforeSetValidator(new IValidator() {
+ public IStatus validate(Object value) {
+
+ return Status.OK_STATUS;
+ }
+
+ });
+ UpdateValueStrategy modelToTarget = new UpdateValueStrategy();
+ modelToTarget.setConverter(new IConverter() {
+ public Object getToType() {
+ return String.class;
+ }
+
+ public Object getFromType() {
+ return EReference.class;
+ }
+
+ public Object convert(Object fromObject) {
+ if (fromObject == null || !(fromObject instanceof Pattern)) {
+ return Messages.SpecificationPage_No_patent;
+ }
+ return "<a> " + ((Pattern) fromObject).getName() + " </a>"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ });
+
+ addBinding(ctx.bindValue(uiObs, mObs, targetToModel, modelToTarget));
+ }
+
+ void bindNature() {
+ IEMFEditValueProperty mprop = EMFEditProperties.value(getEditingDomain(), PatternPackage.Literals.PATTERN__NATURE);
+ IWidgetValueProperty comboProp = WidgetProperties.selection();
+ IObservableValue uiObs = comboProp.observeDelayed(400, combo);
+ IObservableValue mObs = mprop.observe(getPattern());
+
+ UpdateValueStrategy targetToModel = new EMFUpdateValueStrategy().setBeforeSetValidator(new IValidator() {
+ public IStatus validate(Object value) {
+
+ return Status.OK_STATUS;
+ }
+
+ });
+ targetToModel.setConverter(new IConverter() {
+ public Object getToType() {
+ return EReference.class;
+ }
+
+ public Object getFromType() {
+ return String.class;
+ }
+
+ public Object convert(Object fromObject) {
+ if (fromObject == null || !(fromObject instanceof String)) {
+ return ""; //$NON-NLS-1$
+ }
+ if (fromObject.equals(ExtensionHelper.getName(getPattern().getNature())))
+ return getPattern().getNature();
+ return ExtensionHelper.createNature((String) fromObject);
+ }
+ });
+
+ UpdateValueStrategy modelToTarget = new UpdateValueStrategy();
+ modelToTarget.setConverter(new IConverter() {
+ public Object getToType() {
+ return String.class;
+ }
+
+ public Object getFromType() {
+ return EReference.class;
+ }
+
+ public Object convert(Object fromObject) {
+ if (fromObject == null || !(fromObject instanceof PatternNature)) {
+ return ""; //$NON-NLS-1$
+ }
+ return ExtensionHelper.getName((PatternNature) fromObject);
+ }
+ });
+
+ addBinding(ctx.bindValue(uiObs, mObs, targetToModel, modelToTarget));
+ if (combo != null && !combo.isDisposed())
+ comboSelectIndex = combo.getSelectionIndex();
+ }
+
+ private void bindTableViewer() {
+ Pattern pattern = getPattern();
+ if (pattern != null && tableViewer != null) {
+ IEMFListProperty input = EMFProperties.list(PatternPackage.Literals.PATTERN__PARAMETERS);
+ IObservableList observe = input.observe(pattern);
+ tableViewer.setInput(observe);
+ }
+ }
+
+ public Pattern getParentPattern() {
+ return getPattern() != null ? getPattern().getSuperPattern() : null;
+ }
+
+ @Override
+ public void dispose() {
+ PatternUIHelper.removeAdapterForPattern(getPattern(), parameterNameEmpetyValidationAdapter);
+ super.dispose();
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/ComboListLabelProvider.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/ComboListLabelProvider.java
new file mode 100644
index 0000000..377db8a
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/ComboListLabelProvider.java
@@ -0,0 +1,59 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.providers;
+
+import org.eclipse.egf.pattern.query.QueryKind;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class ComboListLabelProvider implements ILabelProvider {
+
+ public Image getImage(Object element) {
+ return null;
+ }
+
+ public String getText(Object element) {
+ if (element instanceof QueryKind) {
+ return ((QueryKind) element).getName();
+ }
+ return "";
+ }
+
+ public void addListener(ILabelProviderListener listener) {
+
+ }
+
+ public void dispose() {
+
+ }
+
+ public boolean isLabelProperty(Object element, String property) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void removeListener(ILabelProviderListener listener) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/CommonListContentProvider.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/CommonListContentProvider.java
new file mode 100644
index 0000000..e3f7859
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/CommonListContentProvider.java
@@ -0,0 +1,44 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.providers;
+
+import java.util.List;
+
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class CommonListContentProvider implements IStructuredContentProvider {
+
+ public Object[] getElements(Object inputElement) {
+ if (inputElement instanceof List<?>)
+ return ((List<?>) inputElement).toArray();
+ return null;
+ }
+
+ public void dispose() {
+
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ viewer.refresh();
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/ContainerLibraryLabelProvider.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/ContainerLibraryLabelProvider.java
new file mode 100644
index 0000000..b4f46c7
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/ContainerLibraryLabelProvider.java
@@ -0,0 +1,60 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+package org.eclipse.egf.pattern.ui.editors.providers;
+
+import org.eclipse.egf.model.pattern.PatternLibrary;
+import org.eclipse.egf.pattern.engine.PatternHelper;
+import org.eclipse.egf.pattern.ui.ImageShop;
+import org.eclipse.egf.pattern.ui.Messages;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class ContainerLibraryLabelProvider implements ITableLabelProvider {
+
+ public Image getColumnImage(Object element, int columnIndex) {
+
+ return ImageShop.get(ImageShop.IMG_INNERCLASS_PUBLIC_OBJ);
+ }
+
+ public String getColumnText(Object element, int columnIndex) {
+
+ if (element instanceof PatternLibrary) {
+ PatternLibrary libraryEntry = (PatternLibrary) element;
+ return (libraryEntry.getName() + Messages.common_mark1 + PatternHelper.getFactoryConponentName(libraryEntry) + Messages.common_mark2);
+ }
+ return "";
+ }
+
+ public void addListener(ILabelProviderListener listener) {
+ }
+
+ public void dispose() {
+ }
+
+ public boolean isLabelProperty(Object element, String property) {
+
+ return false;
+ }
+
+ public void removeListener(ILabelProviderListener listener) {
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/EcoreContentProvider.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/EcoreContentProvider.java
new file mode 100644
index 0000000..9616f04
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/EcoreContentProvider.java
@@ -0,0 +1,67 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.providers;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+
+/**
+ *
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class EcoreContentProvider implements ITreeContentProvider {
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+
+ public void dispose() {
+ }
+
+ public Object[] getElements(Object inputElement) {
+ return getChildren(inputElement);
+ }
+
+ public boolean hasChildren(Object element) {
+ return getChildren(element).length > 0;
+ }
+
+ public Object getParent(Object element) {
+ if (element instanceof EObject) {
+ return ((EObject) element).eContainer();
+ }
+ return null;
+ }
+
+ public Object[] getChildren(Object parentElement) {
+ if (parentElement instanceof Resource) {
+ Resource res = (Resource) parentElement;
+ return res.getContents().toArray();
+ }
+ if (parentElement instanceof List<?>)
+ return ((List<?>) parentElement).toArray();
+ if (parentElement instanceof EPackage) {
+ EPackage ePack = (EPackage) parentElement;
+ return ePack.eContents().toArray();
+ }
+ return new Object[0];
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/EcoreLabelProvider.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/EcoreLabelProvider.java
new file mode 100644
index 0000000..f18e68c
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/EcoreLabelProvider.java
@@ -0,0 +1,75 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.providers;
+
+import org.eclipse.egf.pattern.ui.ImageShop;
+import org.eclipse.emf.ecore.ENamedElement;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class EcoreLabelProvider implements ITableLabelProvider, ILabelProvider {
+
+ public Image getColumnImage(Object element, int columnIndex) {
+ if (element instanceof EPackage)
+ return ImageShop.get(ImageShop.IMG_TREE_MODE);
+ if (element instanceof EObject)
+ return ImageShop.get(ImageShop.IMG_CATEGORY_OBJ);
+
+ return null;
+ }
+
+ public String getColumnText(Object element, int columnIndex) {
+ if (element instanceof ENamedElement) {
+ ENamedElement eNamedElement = (ENamedElement) element;
+ return eNamedElement.getName();
+ }
+ return "";
+ }
+
+ public void addListener(ILabelProviderListener listener) {
+ }
+
+ public void dispose() {
+ }
+
+ public boolean isLabelProperty(Object element, String property) {
+
+ return false;
+ }
+
+ public void removeListener(ILabelProviderListener listener) {
+ }
+
+ public Image getImage(Object element) {
+
+ return getColumnImage(element, 0);
+ }
+
+ public String getText(Object element) {
+
+ return getColumnText(element, 0);
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/MethodLabelProvider.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/MethodLabelProvider.java
new file mode 100644
index 0000000..214a391
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/MethodLabelProvider.java
@@ -0,0 +1,71 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.providers;
+
+import java.util.List;
+
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.pattern.ui.ImageShop;
+import org.eclipse.egf.pattern.ui.PatternUIHelper;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class MethodLabelProvider extends LabelProvider implements ITableLabelProvider {
+
+ private List<String> parentMethods;
+
+ public Image getColumnImage(Object element, int columnIndex) {
+ if (element instanceof PatternMethod)
+ if (isOverride(element))
+ return ImageShop.get(ImageShop.IMG_METHOD_OVERRIDE);
+
+ return ImageShop.get(ImageShop.IMG_METHOD);
+ }
+
+ private boolean isOverride(Object element) {
+ if (element instanceof PatternMethod) {
+ PatternMethod patternMethod = (PatternMethod) element;
+ Pattern pattern = patternMethod.getPattern();
+ parentMethods = PatternUIHelper.getPatternParentMethodsNameList(pattern);
+ for (String parentMethod : parentMethods) {
+ String elementName = patternMethod.getName();
+ if (elementName.equals(parentMethod)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ public String getColumnText(Object element, int columnIndex) {
+ if (element instanceof PatternMethod) {
+ PatternMethod patternMethod = (PatternMethod) element;
+ return patternMethod.getName();
+ }
+ return "";
+ }
+
+ public String getText(Object element) {
+ return getColumnText(element, 0);
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/MethodsTableObservableListContentProvider.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/MethodsTableObservableListContentProvider.java
new file mode 100644
index 0000000..71f2380
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/MethodsTableObservableListContentProvider.java
@@ -0,0 +1,54 @@
+package org.eclipse.egf.pattern.ui.editors.providers;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.pattern.ui.PatternUIHelper;
+import org.eclipse.egf.pattern.ui.editors.adapter.RefresherAdapter;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.widgets.TableItem;
+
+public class MethodsTableObservableListContentProvider extends ObservableListContentProvider {
+
+ private TableViewer tableViewer;
+
+ protected AdapterImpl refresher;
+
+ public MethodsTableObservableListContentProvider(TableViewer tableViewer, int patternMethodsNum) {
+ super(patternMethodsNum, tableViewer);
+ this.tableViewer = tableViewer;
+ refresher = new RefresherAdapter(tableViewer);
+ addDisposeListener();
+ }
+
+ private void addDisposeListener() {
+ tableViewer.getTable().addDisposeListener(new DisposeListener() {
+
+ public void widgetDisposed(DisposeEvent e) {
+ TableItem[] items = tableViewer.getTable().getItems();
+ for (TableItem item : items) {
+ Object object = item.getData();
+ PatternUIHelper.removeAdapter(object, refresher);
+ }
+ }
+ });
+ }
+
+ public Object[] getElements(Object inputElement) {
+ Object[] elements = super.getElements(inputElement);
+ List displayItems = new ArrayList();
+ for (Object element : elements) {
+ if (!PatternUIHelper.isRenameDisable((PatternMethod) element)) {
+ displayItems.add(element);
+ PatternUIHelper.addAdapter(elements, refresher);
+ } else {
+ PatternUIHelper.removeAdapter(elements, refresher);
+ }
+ }
+ return displayItems.toArray();
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/ObservableListContentProvider.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/ObservableListContentProvider.java
new file mode 100644
index 0000000..f4b301c
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/ObservableListContentProvider.java
@@ -0,0 +1,219 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ * Tom Schindl<tom.schindl@bestsolution.at> - bugfix in: 214355
+ * Matthew Hall - bugs 215531, 226765, 222991, 238296, 226292, 266038
+ * XiaoRu Chen - Soyatec
+ *******************************************************************************/
+package org.eclipse.egf.pattern.ui.editors.providers;
+
+import java.util.Set;
+
+import org.eclipse.core.databinding.observable.IObservableCollection;
+import org.eclipse.core.databinding.observable.list.IListChangeListener;
+import org.eclipse.core.databinding.observable.list.IObservableList;
+import org.eclipse.core.databinding.observable.list.ListChangeEvent;
+import org.eclipse.core.databinding.observable.list.ListDiffVisitor;
+import org.eclipse.core.databinding.observable.set.IObservableSet;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.emf.databinding.internal.EMFObservableListDecorator;
+import org.eclipse.jface.databinding.viewers.IViewerUpdater;
+import org.eclipse.jface.internal.databinding.viewers.ObservableCollectionContentProvider;
+import org.eclipse.jface.internal.databinding.viewers.ViewerElementSet;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.widgets.TableItem;
+
+public class ObservableListContentProvider implements IStructuredContentProvider {
+ private ObservableCollectionContentProvider impl;
+
+ private static int patternMethodsCount = 0;
+
+ private static TableViewer tableViewer;
+
+ private static class Impl extends ObservableCollectionContentProvider implements IListChangeListener {
+ private Viewer viewer;
+
+ Impl(IViewerUpdater explicitViewerUpdater) {
+ super(explicitViewerUpdater);
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ this.viewer = viewer;
+ super.inputChanged(viewer, oldInput, newInput);
+ }
+
+ protected void checkInput(Object input) {
+ Assert.isTrue(input instanceof IObservableList, "This content provider only works with input of type IObservableList"); //$NON-NLS-1$
+ }
+
+ protected void addCollectionChangeListener(IObservableCollection collection) {
+ ((IObservableList) collection).addListChangeListener(this);
+ }
+
+ protected void removeCollectionChangeListener(IObservableCollection collection) {
+ ((IObservableList) collection).removeListChangeListener(this);
+ }
+
+ public void handleListChange(ListChangeEvent event) {
+ if (isViewerDisposed())
+ return;
+
+ // Determine which elements were added and removed
+ final Set knownElementAdditions = ViewerElementSet.withComparer(comparer);
+ final Set knownElementRemovals = ViewerElementSet.withComparer(comparer);
+ final boolean[] suspendRedraw = new boolean[] { false };
+ event.diff.accept(new ListDiffVisitor() {
+ public void handleAdd(int index, Object element) {
+ knownElementAdditions.add(element);
+ }
+
+ public void handleRemove(int index, Object element) {
+ knownElementRemovals.add(element);
+ }
+
+ public void handleMove(int oldIndex, int newIndex, Object element) {
+ suspendRedraw[0] = true;
+ super.handleMove(oldIndex, newIndex, element);
+ }
+
+ public void handleReplace(int index, Object oldElement, Object newElement) {
+ suspendRedraw[0] = true;
+ super.handleReplace(index, oldElement, newElement);
+ }
+ });
+ knownElementAdditions.removeAll(knownElements);
+ knownElementRemovals.removeAll(event.getObservableList());
+
+ knownElements.addAll(knownElementAdditions);
+ if (realizedElements != null) {
+ realizedElements.removeAll(knownElementRemovals);
+ }
+
+ if (suspendRedraw[0])
+ viewer.getControl().setRedraw(false);
+ try {
+ event.diff.accept(new ListDiffVisitor() {
+ public void handleAdd(int index, Object element) {
+ int indexInTable = getAddIndexInTable(index);
+ viewerUpdater.insert(element, indexInTable);
+ }
+
+ public void handleRemove(int index, Object element) {
+ int indexInTable = getIndexInTable(element);
+ viewerUpdater.remove(element, indexInTable);
+ }
+
+ public void handleReplace(int index, Object oldElement, Object newElement) {
+ viewerUpdater.replace(oldElement, newElement, index);
+ }
+
+ public void handleMove(int oldIndex, int newIndex, Object element) {
+ int moveFormIndexInTable = getIndexInTable(element);
+ int moveToIndexInTable = getMoveToIndexInTable(newIndex);
+ viewerUpdater.move(element, moveFormIndexInTable, moveToIndexInTable);
+ }
+ });
+ } finally {
+ if (suspendRedraw[0])
+ viewer.getControl().setRedraw(true);
+ }
+
+ if (realizedElements != null) {
+ realizedElements.addAll(knownElementAdditions);
+ }
+ knownElements.removeAll(knownElementRemovals);
+ }
+ }
+
+ /**
+ * Constructs an ObservableListContentProvider
+ */
+ public ObservableListContentProvider(int patternMethodsNum, TableViewer tableViewer) {
+ this(null);
+ this.patternMethodsCount = patternMethodsNum;
+ this.tableViewer = tableViewer;
+ }
+
+ /**
+ * Constructs an ObservableListContentProvider with the given viewer updater
+ *
+ * @param viewerUpdater
+ * the viewer updater to use when elements are added, removed,
+ * moved or replaced in the input observable list.
+ * @since 1.3
+ */
+ public ObservableListContentProvider(IViewerUpdater viewerUpdater) {
+ impl = new Impl(viewerUpdater);
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ impl.inputChanged(viewer, oldInput, newInput);
+ }
+
+ public Object[] getElements(Object inputElement) {
+ return impl.getElements(inputElement);
+ }
+
+ public void dispose() {
+ impl.dispose();
+ }
+
+ /**
+ * Returns the set of elements known to this content provider. Label
+ * providers may track this set if they need to be notified about additions
+ * before the viewer sees the added element, and notified about removals
+ * after the element was removed from the viewer. This is intended for use
+ * by label providers, as it will always return the items that need labels.
+ *
+ * @return readableSet of items that will need labels
+ */
+ public IObservableSet getKnownElements() {
+ return impl.getKnownElements();
+ }
+
+ /**
+ * Returns the set of known elements which have been realized in the viewer.
+ * Clients may track this set in order to perform custom actions on elements
+ * while they are known to be present in the viewer.
+ *
+ * @return the set of known elements which have been realized in the viewer.
+ * @since 1.3
+ */
+ public IObservableSet getRealizedElements() {
+ return impl.getRealizedElements();
+ }
+
+ protected static int getAddIndexInTable(int index) {
+ return index - patternMethodsCount;
+ }
+
+ private static int getIndexInTable(Object element) {
+ TableItem[] items = tableViewer.getTable().getItems();
+ for (int i = 0; i < items.length; i++) {
+ Object data = items[i].getData();
+ if (element.equals(data)) {
+ return i;
+ }
+ }
+ return 0;
+ }
+
+ private static int getMoveToIndexInTable(int index) {
+ Object input = tableViewer.getInput();
+ if (input instanceof EMFObservableListDecorator) {
+ Object[] array = ((EMFObservableListDecorator) input).toArray();
+ Object moveToItem = array[index - 1];
+ int indexInTable = getIndexInTable(moveToItem);
+ return indexInTable;
+ }
+ return 0;
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/OrchestrationMethodLabelProvider.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/OrchestrationMethodLabelProvider.java
new file mode 100644
index 0000000..c007f54
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/OrchestrationMethodLabelProvider.java
@@ -0,0 +1,36 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.providers;
+
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternMethod;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class OrchestrationMethodLabelProvider extends MethodLabelProvider {
+ public String getColumnText(Object element, int columnIndex) {
+ if (element instanceof PatternMethod) {
+ PatternMethod patternMethod = (PatternMethod) element;
+ Pattern pattern = patternMethod.getPattern();
+ String patternName = pattern == null ? "" : pattern.getName();
+ return patternMethod.getName() + " [" + patternName + "]";
+ }
+ return "";
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/OrchestrationTableLabelProvider.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/OrchestrationTableLabelProvider.java
new file mode 100644
index 0000000..6704632
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/OrchestrationTableLabelProvider.java
@@ -0,0 +1,90 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.providers;
+
+import org.eclipse.egf.model.pattern.BackCall;
+import org.eclipse.egf.model.pattern.MethodCall;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternCall;
+import org.eclipse.egf.model.pattern.PatternInjectedCall;
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.model.pattern.PatternVariable;
+import org.eclipse.egf.model.pattern.SuperCall;
+import org.eclipse.egf.pattern.ui.ImageShop;
+import org.eclipse.egf.pattern.ui.Messages;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class OrchestrationTableLabelProvider extends LabelProvider implements ITableLabelProvider {
+
+ public Image getColumnImage(Object element, int columnIndex) {
+ if (element instanceof MethodCall)
+ return ImageShop.get(ImageShop.IMG_KIND_METHODCALL);
+ else if (element instanceof PatternCall)
+ return ImageShop.get(ImageShop.IMG_KIND_PATTERNCALL);
+ else if (element instanceof PatternInjectedCall)
+ return ImageShop.get(ImageShop.IMG_KIND_PATTERNINJECTEDCALL);
+ else if (element instanceof SuperCall)
+ return ImageShop.get(ImageShop.IMG_KIND_SUPERPATTERNCALL);
+ else if (element instanceof BackCall)
+ return ImageShop.get(ImageShop.IMG_KIND_BACKCALL);
+ return null;
+ }
+
+ public String getColumnText(Object element, int columnIndex) {
+ if (element instanceof MethodCall) {
+ MethodCall methodCall = (MethodCall) element;
+ PatternMethod patternMethod = methodCall.getCalled();
+ return (patternMethod == null ? "" : patternMethod.getName()) + Messages.OrchestrationTableLabelProvider_MethodCall; //$NON-NLS-1$
+ } else if (element instanceof PatternCall) {
+ PatternCall patternCall = (PatternCall) element;
+ Pattern pattern = patternCall.getCalled();
+ return (pattern == null ? "" : pattern.getName()) + Messages.OrchestrationTableLabelProvider_PatternCall; //$NON-NLS-1$
+ } else if (element instanceof PatternInjectedCall) {
+ PatternInjectedCall patternInjectedCall = (PatternInjectedCall) element;
+ Pattern pattern = patternInjectedCall.getCalled();
+ PatternVariable patternVariable = patternInjectedCall.getContext();
+ return (pattern == null ? "" : pattern.getName() + " -> " + patternVariable.getName()) + Messages.OrchestrationTableLabelProvider_PatternInjectedCall; //$NON-NLS-1$
+ } else if (element instanceof SuperCall) {
+ return Messages.OrchestrationTableLabelProvider_SuperPatternCall; //$NON-NLS-1$
+ } else if (element instanceof BackCall) {
+ return Messages.OrchestrationTableLabelProvider_BackCall; //$NON-NLS-1$
+ }
+ return ""; //$NON-NLS-1$
+ }
+
+ public void addListener(ILabelProviderListener listener) {
+ }
+
+ public void dispose() {
+ }
+
+ public boolean isLabelProperty(Object element, String property) {
+
+ return false;
+ }
+
+ public void removeListener(ILabelProviderListener listener) {
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/ParameterMatchingLibraryProvider.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/ParameterMatchingLibraryProvider.java
new file mode 100644
index 0000000..c44504b
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/ParameterMatchingLibraryProvider.java
@@ -0,0 +1,60 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.providers;
+
+import org.eclipse.egf.model.pattern.PatternParameter;
+import org.eclipse.egf.model.pattern.impl.Paramerter2ParameterMapImpl;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class ParameterMatchingLibraryProvider implements ITableLabelProvider {
+
+ public Image getColumnImage(Object element, int columnIndex) {
+
+ return null;
+ }
+
+ public String getColumnText(Object element, int columnIndex) {
+ if (element instanceof Paramerter2ParameterMapImpl) {
+ Paramerter2ParameterMapImpl entry = (Paramerter2ParameterMapImpl) element;
+ PatternParameter key = entry.getKey();
+ PatternParameter value = entry.getValue();
+ return (value.getName() == null ? "" : value.getName()) + " -> " + (key.getName() == null ? "" : key.getName());
+ }
+ return null;
+ }
+
+ public void addListener(ILabelProviderListener listener) {
+ }
+
+ public void dispose() {
+ }
+
+ public boolean isLabelProperty(Object element, String property) {
+
+ return false;
+ }
+
+ public void removeListener(ILabelProviderListener listener) {
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/ParametersTableLabelProvider.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/ParametersTableLabelProvider.java
new file mode 100644
index 0000000..a82e45f
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/ParametersTableLabelProvider.java
@@ -0,0 +1,124 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.providers;
+
+import org.eclipse.egf.model.pattern.PatternParameter;
+import org.eclipse.egf.model.pattern.PatternVariable;
+import org.eclipse.egf.model.pattern.Query;
+import org.eclipse.egf.pattern.query.IQuery;
+import org.eclipse.egf.pattern.query.QueryKind;
+import org.eclipse.egf.pattern.ui.ImageShop;
+import org.eclipse.emf.common.util.EMap;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class ParametersTableLabelProvider extends LabelProvider implements ITableLabelProvider {
+
+ public Image getColumnImage(Object element, int columnIndex) {
+ if (element instanceof PatternParameter && columnIndex == 2) {
+ Query query = ((PatternParameter) element).getQuery();
+ if (query != null) {
+ EMap<String, String> queryContext = query.getQueryContext();
+ if (queryContext != null && !queryContext.isEmpty()) {
+ return ImageShop.get(ImageShop.IMG_QUERY_SET);
+ }
+ }
+ }
+ return null;
+ }
+
+ public String getColumnText(Object element, int columnIndex) {
+
+ if (element instanceof PatternParameter) {
+ PatternParameter patternParameter = (PatternParameter) element;
+ switch (columnIndex) {
+ case 0:
+ return patternParameter.getName();
+ case 1:
+ return getType(patternParameter.getType());
+ case 2:
+ Query query = patternParameter.getQuery();
+ if (query != null) {
+ String extensionId = query.getExtensionId();
+ QueryKind queryKind = IQuery.INSTANCE.getQueryKind(extensionId);
+ String queryKindName = queryKind == null ? null : queryKind.getName();
+ if (queryKindName != null) {
+ return queryKindName;
+ }
+ return extensionId == null ? "" : extensionId;
+ }
+ return "";
+ }
+ } else if (element instanceof PatternVariable) {
+ PatternVariable patternVariable = (PatternVariable) element;
+ switch (columnIndex) {
+ case 0:
+ return patternVariable.getName();
+ case 1:
+ return getType(patternVariable.getType());
+ }
+ }
+ return "";
+ }
+
+ public void addListener(ILabelProviderListener listener) {
+ }
+
+ public void dispose() {
+ }
+
+ public boolean isLabelProperty(Object element, String property) {
+
+ return false;
+ }
+
+ public void removeListener(ILabelProviderListener listener) {
+ }
+
+ /**
+ * Drop any package or uri information of the type.
+ */
+ public static String getType(String type) {
+ if (type == null || type.length() == 0)
+ return "";
+ int mark1Index = type.lastIndexOf("$");
+ int mark2Index = type.lastIndexOf(".");
+ int mark3 = type.lastIndexOf("//");
+ int mark3Index = mark3 == -1 ? -1 : mark3 + 1;
+ int index = getIndex(mark1Index, mark2Index, mark3Index);
+ if (index != -1) {
+ return type.substring(index + 1);
+ }
+ return type;
+ }
+
+ private static int getIndex(int mark1Index, int mark2Index, int mark3Index) {
+ if (mark1Index > 0) {
+ return mark1Index;
+ } else if (mark3Index > 0) {
+ return mark3Index;
+ }
+ return mark2Index;
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/PatternElementLabelProvider.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/PatternElementLabelProvider.java
new file mode 100644
index 0000000..fac3de1
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/PatternElementLabelProvider.java
@@ -0,0 +1,91 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.providers;
+
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternLibrary;
+import org.eclipse.egf.model.pattern.provider.PatternItemProviderAdapterFactory;
+import org.eclipse.egf.model.pattern.util.PatternSwitch;
+import org.eclipse.egf.pattern.engine.PatternHelper;
+import org.eclipse.egf.pattern.ui.Messages;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class PatternElementLabelProvider implements ILabelProvider {
+
+ public void addListener(ILabelProviderListener listener) {
+ }
+
+ public void dispose() {
+ }
+
+ public boolean isLabelProperty(Object element, String property) {
+
+ return false;
+ }
+
+ public void removeListener(ILabelProviderListener listener) {
+ }
+
+ public Image getImage(Object element) {
+
+ return imageSwitch.doSwitch((EObject) element);
+ }
+
+ public String getText(Object element) {
+
+ return textSwitch.doSwitch((EObject) element);
+ }
+
+ private final PatternSwitch<Image> imageSwitch = new PatternSwitch<Image>() {
+ private final PatternItemProviderAdapterFactory patternItemProviderAdapterFactory = new PatternItemProviderAdapterFactory();
+
+ @Override
+ public Image casePattern(Pattern object) {
+ ItemProviderAdapter prov = ((ItemProviderAdapter) patternItemProviderAdapterFactory.createPatternAdapter());
+ return ExtendedImageRegistry.getInstance().getImage(prov.getImage(object));
+ }
+
+ @Override
+ public Image casePatternLibrary(PatternLibrary object) {
+ ItemProviderAdapter prov = ((ItemProviderAdapter) patternItemProviderAdapterFactory.createPatternLibraryAdapter());
+ return ExtendedImageRegistry.getInstance().getImage(prov.getImage(object));
+ }
+ };
+
+ private final PatternSwitch<String> textSwitch = new PatternSwitch<String>() {
+
+ @Override
+ public String casePattern(Pattern object) {
+
+ return object.getName();
+ }
+
+ @Override
+ public String casePatternLibrary(PatternLibrary object) {
+ return object.getName() + Messages.common_mark1 + PatternHelper.getFactoryConponentName(object) + Messages.common_mark2 + " - " + object.eResource().getURI();
+ }
+ };
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/PatternElementcontentProvider.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/PatternElementcontentProvider.java
new file mode 100644
index 0000000..89a3a94
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/PatternElementcontentProvider.java
@@ -0,0 +1,63 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.providers;
+
+import java.util.List;
+
+import org.eclipse.egf.model.pattern.PatternLibrary;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class PatternElementcontentProvider implements ITreeContentProvider {
+
+ private static final Object[] EMPTY_ARRAY = new Object[0];
+
+ public Object[] getElements(Object inputElement) {
+ if (inputElement instanceof List<?>)
+ return ((List<?>) inputElement).toArray();
+ else if (inputElement instanceof PatternLibrary)
+ return ((PatternLibrary) inputElement).getElements().toArray();
+ return EMPTY_ARRAY;
+ }
+
+ public void dispose() {
+
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+
+ public Object[] getChildren(Object parentElement) {
+
+ return getElements(parentElement);
+ }
+
+ public Object getParent(Object element) {
+
+ return ((EObject) element).eContainer();
+ }
+
+ public boolean hasChildren(Object element) {
+
+ return getElements(element).length != 0;
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/PatternSelectionLabelProvider.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/PatternSelectionLabelProvider.java
new file mode 100644
index 0000000..ea8c6c3
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/PatternSelectionLabelProvider.java
@@ -0,0 +1,70 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.providers;
+
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternVariable;
+import org.eclipse.egf.pattern.engine.PatternHelper;
+import org.eclipse.egf.pattern.ui.ImageShop;
+import org.eclipse.egf.pattern.ui.Messages;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class PatternSelectionLabelProvider implements ITableLabelProvider {
+
+ public Image getColumnImage(Object element, int columnIndex) {
+ if (element instanceof Pattern) {
+ return ImageShop.get(ImageShop.IMG_INNERCLASS_PUBLIC_OBJ);
+ } else if (element instanceof PatternVariable) {
+ return ImageShop.get(ImageShop.IMG_VARIABLE);
+ }
+ return null;
+ }
+
+ public String getColumnText(Object element, int columnIndex) {
+ if (element instanceof Pattern) {
+ Pattern pattern = (Pattern) element;
+ switch (columnIndex) {
+ case 0:
+ return pattern.getName() + Messages.common_mark1 + PatternHelper.getFactoryConponentName(pattern) + Messages.common_mark2 + " - " + pattern.eResource().getURI();
+ }
+ } else if (element instanceof PatternVariable) {
+ return ((PatternVariable) element).getName();
+ }
+ return "";
+ }
+
+ public void addListener(ILabelProviderListener listener) {
+ }
+
+ public void dispose() {
+ }
+
+ public boolean isLabelProperty(Object element, String property) {
+
+ return false;
+ }
+
+ public void removeListener(ILabelProviderListener listener) {
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/QueryContentTableLabelProvider.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/QueryContentTableLabelProvider.java
new file mode 100644
index 0000000..cc4c5d7
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/QueryContentTableLabelProvider.java
@@ -0,0 +1,42 @@
+package org.eclipse.egf.pattern.ui.editors.providers;
+
+import org.eclipse.egf.pattern.ui.editors.models.QueryContent;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.swt.graphics.Image;
+
+public class QueryContentTableLabelProvider implements ITableLabelProvider {
+
+ public Image getColumnImage(Object element, int columnIndex) {
+
+ return null;
+ }
+
+ public String getColumnText(Object element, int columnIndex) {
+ if (element instanceof QueryContent) {
+ QueryContent content = (QueryContent) element;
+ switch (columnIndex) {
+ case 0:
+ return content.getKey();
+ case 1:
+ return content.getValue();
+ }
+ }
+ return null;
+ }
+
+ public void addListener(ILabelProviderListener listener) {
+ }
+
+ public void dispose() {
+ }
+
+ public boolean isLabelProperty(Object element, String property) {
+
+ return false;
+ }
+
+ public void removeListener(ILabelProviderListener listener) {
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/TableObservableListContentProvider.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/TableObservableListContentProvider.java
new file mode 100644
index 0000000..1ad86c0
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/providers/TableObservableListContentProvider.java
@@ -0,0 +1,62 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.providers;
+
+import org.eclipse.egf.pattern.ui.PatternUIHelper;
+import org.eclipse.egf.pattern.ui.editors.adapter.RefresherAdapter;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.jface.databinding.viewers.ObservableListContentProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.widgets.TableItem;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class TableObservableListContentProvider extends ObservableListContentProvider {
+ private TableViewer tableViewer;
+
+ protected AdapterImpl refresher;
+
+ public TableObservableListContentProvider(TableViewer tableViewer) {
+ this.tableViewer = tableViewer;
+ refresher = new RefresherAdapter(tableViewer);
+ addDisposeListener();
+ }
+
+ private void addDisposeListener() {
+ tableViewer.getTable().addDisposeListener(new DisposeListener() {
+
+ public void widgetDisposed(DisposeEvent e) {
+ TableItem[] items = tableViewer.getTable().getItems();
+ for (TableItem item : items) {
+ Object object = item.getData();
+ PatternUIHelper.removeAdapter(object, refresher);
+ }
+ }
+ });
+ }
+
+ public Object[] getElements(Object inputElement) {
+ Object[] elements = super.getElements(inputElement);
+ for (int i = 0; i < elements.length; i++) {
+ PatternUIHelper.addAdapter(elements[i], refresher);
+ }
+ return elements;
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/selector/DefaultClientSelector.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/selector/DefaultClientSelector.java
new file mode 100644
index 0000000..ecc0ab8
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/selector/DefaultClientSelector.java
@@ -0,0 +1,33 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.selector;
+
+import org.eclipse.emf.validation.model.IClientSelector;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class DefaultClientSelector implements IClientSelector {
+
+ // Avoid validation from Transaction, the transaction will be rollbacked
+ // when executing validation without use 'running' in DefaultClientSelector.
+ public static boolean running = false;
+
+ public boolean selects(Object object) {
+ return running;
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/templateEditor/AbstractTemplateEditor.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/templateEditor/AbstractTemplateEditor.java
new file mode 100644
index 0000000..ba730d5
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/templateEditor/AbstractTemplateEditor.java
@@ -0,0 +1,481 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.templateEditor;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.StringBufferInputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.Map.Entry;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.core.fcore.IPlatformFcore;
+import org.eclipse.egf.core.platform.pde.IPlatformBundle;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.pattern.engine.PatternHelper;
+import org.eclipse.egf.pattern.ui.Activator;
+import org.eclipse.egf.pattern.ui.Messages;
+import org.eclipse.egf.pattern.ui.editors.PatternEditorInput;
+import org.eclipse.egf.pattern.ui.editors.PatternMethodEditorInput;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jface.text.Position;
+import org.eclipse.pde.core.IBaseModel;
+import org.eclipse.pde.core.plugin.IPluginBase;
+import org.eclipse.pde.core.plugin.IPluginExtension;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.internal.core.ibundle.IBundlePluginModelBase;
+import org.eclipse.pde.internal.ui.editor.plugin.ManifestEditor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.WorkbenchException;
+import org.eclipse.ui.editors.text.TextEditor;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.internal.WorkbenchPage;
+import org.eclipse.ui.internal.WorkbenchWindow;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.part.MultiPageEditorPart;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public abstract class AbstractTemplateEditor extends MultiPageEditorPart {
+
+ private String projectName = "___templateproject";
+
+ protected IEditorPart openEditor;
+
+ protected Map<String, Position> startPositions = new HashMap<String, Position>();
+
+ protected WorkbenchPage templateActivePage;
+
+ protected Map<String, TextEditor> editorMap = new HashMap<String, TextEditor>();
+
+ protected List<TextEditor> editorList = new ArrayList<TextEditor>();
+
+ private static final String JET_TRANSFORM_POINT_ID = "org.eclipse.jet.transform";
+
+ private static final String PLUGIN_EDITOR_ID = "org.eclipse.pde.ui.manifestEditor";
+
+ // The adapter is for refreshing the editor title while the name of pattern
+ // has been changed.
+ AdapterImpl patternAdapter = new AdapterImpl() {
+ public void notifyChanged(Notification msg) {
+ if (FcorePackage.Literals.NAMED_MODEL_ELEMENT__NAME.equals(msg.getFeature())) {
+ setPartName((String) msg.getNewValue());
+ } else if (msg.getFeature() instanceof EReference) {
+ EReference ref = (EReference) msg.getFeature();
+ if ("methods".equals(ref.getName())) {
+ refreshTemplateEditor(msg);
+ }
+ }
+ }
+ };
+
+ AdapterImpl methodAdapter = new AdapterImpl() {
+ public void notifyChanged(Notification msg) {
+ if (FcorePackage.Literals.NAMED_MODEL_ELEMENT__NAME.equals(msg.getFeature())) {
+ executeMethodEditorRename();
+ }
+ }
+ };
+
+ public AbstractTemplateEditor() {
+ super();
+ }
+
+ protected abstract void initProblems();
+
+ protected abstract void divideByMethods();
+
+ public abstract void setActivePage(String methodId);
+
+ public void doSave(IProgressMonitor monitor) {
+ for (int i = 0; i < getPageCount(); i++)
+ getEditor(i).doSave(monitor);
+ }
+
+ public void doSaveAs() {
+ throw new UnsupportedOperationException();
+ }
+
+ /*
+ * (non-Javadoc) Method declared on IEditorPart
+ */
+ public void gotoMarker(IMarker marker) {
+ setActivePage(0);
+ IDE.gotoMarker(getEditor(0), marker);
+ }
+
+ /**
+ * The <code>MultiPageEditorExample</code> implementation of this method
+ * checks that the input is an instance of <code>IFileEditorInput</code>.
+ */
+ public void init(IEditorSite site, IEditorInput editorInput) throws PartInitException {
+ if (!(editorInput instanceof PatternEditorInput))
+ throw new PartInitException(Messages.Editor_wrong_input);
+ super.init(site, editorInput);
+ }
+
+ /*
+ * (non-Javadoc) Method declared on IEditorPart.
+ */
+ public boolean isSaveAsAllowed() {
+ return false;
+ }
+
+ public Pattern getPattern() {
+ PatternEditorInput input = (PatternEditorInput) getEditorInput();
+ if (input == null)
+ throw new IllegalStateException();
+ return input.getPattern();
+ }
+
+ public IEditorPart initEditor(IFile templateFile) throws CoreException {
+ try {
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ IWorkbenchWindow activeWorkbenchWindow = workbench.getActiveWorkbenchWindow();
+ templateActivePage = new WorkbenchPage((WorkbenchWindow) activeWorkbenchWindow, null);
+ if (templateActivePage == null || templateFile == null)
+ return null;
+
+ // TO ensure the JetEditor is used instead of the default one.
+ return templateActivePage.openEditor(new FileEditorInput(templateFile), getDelegateEditorID(), false);
+ } catch (PartInitException e) {
+ Activator.getDefault().logError(e);
+ }
+ return null;
+ }
+
+ protected abstract String getDelegateEditorID();
+
+ protected IFile setPublicTemplateEditor(Pattern pattern, EList<PatternMethod> methods, String fileExtention) {
+ IFile templateFile = null;
+ try {
+ Resource eResource = pattern.eResource();
+ IPlatformFcore platformFcore = EGFCorePlugin.getPlatformFcore(eResource);
+ IPlatformBundle platformBundle = platformFcore.getPlatformBundle();
+ IProject project = platformBundle.getProject();
+
+ NullProgressMonitor monitor = new NullProgressMonitor();
+ String tempProjectName = "." + project.getName() + projectName;
+ IProject templateProject = ResourcesPlugin.getWorkspace().getRoot().getProject(tempProjectName);
+
+ if (!templateProject.exists()) {
+ // Delete project content in disk.
+ getTemplateProject(templateProject, tempProjectName, monitor);
+ templateProject.delete(true, true, monitor);
+ // Create new template project.
+ getTemplateProject(templateProject, tempProjectName, monitor);
+ ConvertPluginProjectOperation convert = new ConvertPluginProjectOperation(templateProject, platformBundle);
+ convert.execute(monitor);
+ }
+ IFolder src = templateProject.getFolder("src");
+ if (!src.exists()) {
+ src.create(true, false, null);
+ }
+ // Filter the template project extensions.
+ filterUselessExtension(templateProject, monitor);
+ templateFile = src.getFile(fileExtention);
+ if (!templateFile.exists()) {
+ templateFile.create(new ByteArrayInputStream(new byte[0]), true, null);
+ } else {
+ templateFile.setContents(new ByteArrayInputStream(new byte[0]), true, false, null);
+ }
+ PatternMethod footMethod = null;
+ for (PatternMethod method : methods) {
+ if (method.equals(pattern.getFooterMethod())) {
+ footMethod = method;
+ continue;
+ }
+ visitMethod(project, method, templateFile, true);
+ }
+ visitMethod(project, footMethod, templateFile, false);
+ openEditor = initEditor(templateFile);
+ } catch (Exception e) {
+ // Ignore
+ }
+ return templateFile;
+ }
+
+ private void visitMethod(IProject project, PatternMethod method, IFile templateFile, boolean seprator) throws CoreException, IOException {
+ IFile file = project.getFile(method.getPatternFilePath().path());
+ if (!file.exists()) {
+ file.create(new ByteArrayInputStream(new byte[0]), true, null);
+ }
+ templateFile.appendContents(file.getContents(), false, false, null);
+ if (seprator) {
+ templateFile.appendContents(new StringBufferInputStream("\n"), true, false, null);
+ }
+ int startPosition = TemplateEditorUtility.getStartPosition(startPositions);
+ int length = TemplateEditorUtility.getSourceLength(file.getContents());
+ Position position = new Position(startPosition, length);
+ startPositions.put(method.getName(), position);
+ }
+
+ /**
+ * While pattern has been changed, refresh the editor title.
+ */
+ protected void addPatternChangeAdapter(final Pattern pattern) {
+ if (pattern != null && !pattern.eAdapters().contains(patternAdapter)) {
+ pattern.eAdapters().add(patternAdapter);
+ EList<PatternMethod> methods = pattern.getMethods();
+ for (PatternMethod method : methods) {
+ addMethodChangeAdapter(method);
+ }
+ }
+ }
+
+ /**
+ * While method has been changed, refresh the editor title.
+ */
+ protected void addMethodChangeAdapter(PatternMethod method) {
+ if (method != null && !method.eAdapters().contains(methodAdapter)) {
+ method.eAdapters().add(methodAdapter);
+ }
+ }
+
+ /**
+ * Remove the Adapter add for refreshing the editor title
+ */
+ protected void removePatternChangeAdapter() {
+ Pattern pattern = getPattern();
+ if (pattern != null && pattern.eAdapters().contains(patternAdapter)) {
+ pattern.eAdapters().remove(patternAdapter);
+ }
+ if (pattern != null) {
+ EList<PatternMethod> methods = pattern.getMethods();
+ for (PatternMethod method : methods) {
+ removeMethodChangeAdapter(method);
+ }
+ }
+ }
+
+ /**
+ * Remove the Adapter add for refreshing the editor title
+ */
+ protected void removeMethodChangeAdapter(PatternMethod method) {
+ if (method != null && method.eAdapters().contains(methodAdapter)) {
+ method.eAdapters().remove(methodAdapter);
+ }
+ }
+
+ public WorkbenchPage getTemplateActivePage() {
+ return templateActivePage;
+ }
+
+ /**
+ * Refresh the template editor while user change the content of pattern's
+ * methods.
+ */
+ private void refreshTemplateEditor(Notification msg) {
+ Object newValue = msg.getNewValue();
+ Object oldValue = msg.getOldValue();
+ int eventType = msg.getEventType();
+ if ((newValue != null && newValue instanceof PatternMethod) || (newValue == null && oldValue instanceof PatternMethod)) {
+ switch (eventType) {
+ case Notification.ADD:
+ executeMethodEditorAdd((PatternMethod) newValue);
+ break;
+ case Notification.REMOVE:
+ executeMethodEditorRemove((PatternMethod) oldValue);
+ break;
+ case Notification.MOVE:
+ executeMethodEditorsReorder((PatternMethod) newValue, oldValue);
+ break;
+ default:
+ return;
+ }
+ }
+ }
+
+ private void executeMethodEditorRename() {
+ for (TextEditor editor : editorList) {
+ PatternMethod patternMethod = ((PatternMethodEditorInput) editor.getEditorInput()).getPatternMethod();
+ if (patternMethod != null) {
+ int index = getIndexOfMethodEditor(editor);
+ if (index != -1)
+ setPageText(index, patternMethod.getName());
+ }
+ }
+ }
+
+ private void executeMethodEditorRemove(PatternMethod deleteMethod) {
+ for (int i = 0; i < this.getPageCount(); i++) {
+ IEditorPart currentEditor = this.getEditor(i);
+ IEditorInput editorInput = currentEditor.getEditorInput();
+ if (editorInput instanceof PatternMethodEditorInput) {
+ PatternMethod patternMethod = ((PatternMethodEditorInput) editorInput).getPatternMethod();
+ if (patternMethod == null) {
+ removePage(i);
+ removeEditor(currentEditor);
+ }
+ }
+ }
+ }
+
+ private void removeEditor(IEditorPart editor) {
+ editorList.remove(editor);
+ Set<Entry<String, TextEditor>> entrySet = editorMap.entrySet();
+ for (Entry<String, TextEditor> entry : entrySet) {
+ if (entry.getValue().equals(editor)) {
+ editorMap.remove(entry.getKey());
+ return;
+ }
+ }
+ }
+
+ protected void executeMethodEditorAdd(PatternMethod addMethod) {
+ addMethodChangeAdapter(addMethod);
+ }
+
+ protected void addEditor(TextEditor editor, PatternMethod method) {
+ try {
+ PatternMethodEditorInput input = new PatternMethodEditorInput(method.eResource(), method.getID());
+ int index = addPage(editor, input);
+ setPageText(index, method.getName());
+ editorMap.put(method.getID(), editor);
+ editorList.add(editor);
+ } catch (PartInitException e) {
+ Activator.getDefault().logError(e);
+ }
+ }
+
+ protected void setPatternFilePath(PatternMethod addMethod) {
+ URI computeFileURI = PatternHelper.Filename.computeFileURI(addMethod);
+ addMethod.setPatternFilePath(computeFileURI);
+ }
+
+ protected void executeMethodEditorsReorder(PatternMethod moveMethod, Object oldValue) {
+ int newIndex = getPattern().getMethods().indexOf(moveMethod);
+ if (oldValue instanceof Integer) {
+ int oldIndex = (Integer) oldValue;
+ String id = moveMethod.getID();
+ TextEditor textEditor = editorMap.get(id);
+ if (textEditor.isDirty()) {
+ textEditor.doSave(null);
+ }
+ removePage(oldIndex);
+ editorMap.remove(id);
+ editorList.remove(textEditor);
+ try {
+ TextEditor newEditor = createNewEditor();
+ PatternMethodEditorInput input = new PatternMethodEditorInput(moveMethod.eResource(), id);
+ addPage(newIndex, newEditor, input);
+ editorMap.put(id, newEditor);
+ editorList.add(newIndex, newEditor);
+ } catch (PartInitException e) {
+ Activator.getDefault().logError(e);
+ }
+ setPageText(newIndex, moveMethod.getName());
+ }
+ }
+
+ protected int getIndexOfMethodEditor(TextEditor editor) {
+ int index = -1;
+ for (int i = 0; i < this.getPageCount(); i++) {
+ IEditorPart currentEditor = this.getEditor(i);
+ if (editor.equals(currentEditor)) {
+ index = i;
+ break;
+ }
+ }
+ return index;
+ }
+
+ public void filterUselessExtension(IProject project, NullProgressMonitor monitor) {
+ IFile plugInFile = project.getFile(ConvertPluginProjectOperation.F_PLUGIN);
+ if (plugInFile.exists()) {
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ IWorkbenchWindow activeWorkbenchWindow = workbench.getActiveWorkbenchWindow();
+ try {
+ WorkbenchPage templateActivePage = new WorkbenchPage((WorkbenchWindow) activeWorkbenchWindow, null);
+ IEditorPart part = IDE.openEditor(templateActivePage, plugInFile, PLUGIN_EDITOR_ID);
+ if (part instanceof ManifestEditor) {
+ ManifestEditor editor = (ManifestEditor) part;
+ IBaseModel base = editor.getAggregateModel();
+ if (base instanceof IBundlePluginModelBase) {
+ IBundlePluginModelBase bundlePluginModel = (IBundlePluginModelBase) base;
+ IPluginBase pluginBase = bundlePluginModel.getPluginBase();
+ IPluginModelBase pluginModel = pluginBase.getPluginModel();
+ IPluginExtension[] extensions = pluginModel.getPluginBase().getExtensions();
+ for (IPluginExtension currentExtension : extensions) {
+ String point = currentExtension.getPoint();
+ if (!JET_TRANSFORM_POINT_ID.equals(point)) {
+ try {
+ pluginModel.getPluginBase().remove(currentExtension);
+ } catch (CoreException e) {
+ Activator.getDefault().logError(e);
+ }
+ }
+ }
+ part.doSave(monitor);
+ }
+ }
+ part.dispose();
+ } catch (WorkbenchException e) {
+ Activator.getDefault().logError(e);
+ }
+ }
+ }
+
+ public Map<String, TextEditor> getEditorMap() {
+ return editorMap;
+ }
+
+ public List<TextEditor> getEditorList() {
+ return editorList;
+ }
+
+ protected abstract TextEditor createNewEditor();
+
+ private void getTemplateProject(IProject templateProject, String tempProjectName, NullProgressMonitor monitor) {
+ IJavaProject javaProject = TemplateEditorUtility.createJavaProject(tempProjectName, monitor);
+ templateProject = javaProject.getProject();
+ }
+
+ @Override
+ public void dispose() {
+ removePatternChangeAdapter();
+ super.dispose();
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/templateEditor/ConvertPluginProjectOperation.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/templateEditor/ConvertPluginProjectOperation.java
new file mode 100644
index 0000000..1f6380a
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/templateEditor/ConvertPluginProjectOperation.java
@@ -0,0 +1,234 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * PanPan Liu, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.templateEditor;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.core.helper.EclipseBuilderHelper;
+import org.eclipse.egf.core.pde.tools.ConvertProjectOperation;
+import org.eclipse.egf.core.platform.pde.IPlatformBundle;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.internal.ui.wizards.buildpaths.BuildPathsBlock;
+import org.eclipse.jdt.internal.ui.wizards.buildpaths.CPListElement;
+import org.eclipse.pde.core.IModel;
+import org.eclipse.pde.core.IModelChangeProvider;
+import org.eclipse.pde.core.IModelChangedEvent;
+import org.eclipse.pde.core.ModelChangedEvent;
+import org.eclipse.pde.core.plugin.IPluginBase;
+import org.eclipse.pde.core.plugin.IPluginExtension;
+import org.eclipse.pde.core.plugin.IPluginExtensionPoint;
+import org.eclipse.pde.core.plugin.IPluginImport;
+import org.eclipse.pde.core.plugin.IPluginLibrary;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.core.plugin.IPluginObject;
+import org.eclipse.pde.core.plugin.PluginRegistry;
+import org.eclipse.pde.internal.core.bundle.BundlePluginModel;
+import org.eclipse.pde.internal.core.bundle.WorkspaceBundleModel;
+import org.eclipse.pde.internal.core.ibundle.IBundle;
+import org.eclipse.pde.internal.core.plugin.WorkspaceExtensionsModel;
+import org.osgi.framework.Constants;
+
+/**
+ * @author PanPan.Liu
+ */
+public class ConvertPluginProjectOperation extends ConvertProjectOperation {
+
+ public static final String F_MANIFEST = "MANIFEST.MF";
+ public static final String MANIFEST_FOLDER_NAME = "META-INF/";
+ public static final String F_MANIFEST_FP = MANIFEST_FOLDER_NAME + F_MANIFEST;
+ public static final String JET_NATURE_ID = "org.eclipse.jet.jet2Nature";
+ public static final String F_PLUGIN = "plugin.xml";
+ public static final String F_PROPERTIES = ".properties";
+ public static final String F_BUILD = "build" + F_PROPERTIES;
+
+ private static final String PLUGIN_ID = "org.eclipse.jet";
+ private static final String EXTENSION_NAME = "transform";
+ private static final String EXTENSION_POINT_ID = PLUGIN_ID + "." + EXTENSION_NAME;
+
+ private int K_SOURCE = 1;
+
+ private boolean _hasJetNature;
+
+ private IProject _project;
+
+ private IPlatformBundle platformBundle;
+
+ public ConvertPluginProjectOperation(IProject project, IPlatformBundle platformBundle) {
+ super(project, false, false);
+ this._project = project;
+ this.platformBundle = platformBundle;
+ }
+
+ @Override
+ public List<String> addDependencies() {
+ return super.addDependencies();
+ }
+
+ @Override
+ public List<String> addSourceFolders() {
+ return super.addSourceFolders();
+ }
+
+ @Override
+ public void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException {
+ super.execute(monitor);
+
+ _hasJetNature = false;
+ IProjectDescription description = _project.getDescription();
+ String[] natureIds = description.getNatureIds();
+ for (String natureID : natureIds) {
+ if (natureID.equals(JET_NATURE_ID)) {
+ _hasJetNature = true;
+ }
+ }
+
+ if (_hasJetNature == false) {
+ EclipseBuilderHelper.addNature(description, JET_NATURE_ID, monitor);
+ }
+ _project.setDescription(description, monitor);
+
+ IPluginBase pluginBase = platformBundle.getPluginBase();
+ IPluginExtensionPoint[] extensionPoints = pluginBase.getExtensionPoints();
+ IPluginExtension[] extensions = pluginBase.getExtensions();
+ IPluginImport[] imports = pluginBase.getImports();
+ IPluginLibrary[] libraries = pluginBase.getLibraries();
+ IProject project = platformBundle.getProject();
+
+ IFile pluginFile = project.getFile(F_PLUGIN);
+ IFile plugin = _project.getFile(ConvertPluginProjectOperation.F_PLUGIN);
+ if (!plugin.exists()) {
+ if (pluginFile.exists()) {
+ pluginFile.copy(plugin.getFullPath(), true, monitor);
+ }
+ }
+
+ IPluginModelBase model = PluginRegistry.findModel(_project);
+ if (model instanceof BundlePluginModel) {
+ BundlePluginModel bundlePluginModel = (BundlePluginModel) model;
+ WorkspaceBundleModel workspaceBundleModel = (WorkspaceBundleModel) bundlePluginModel.getBundleModel();
+ WorkspaceExtensionsModel workspaceExtensionModel = (WorkspaceExtensionsModel) ((BundlePluginModel) model).getExtensionsModel();
+ workspaceExtensionModel.setEditable(true);
+ workspaceBundleModel.setEditable(true);
+
+ IBundle bundle = workspaceBundleModel.getBundle();
+ IPluginBase templatePluginBase = model.getPluginBase(false);
+ updateManifest(bundle);
+
+ for (IPluginExtensionPoint extensionPoint : extensionPoints) {
+ templatePluginBase.add(extensionPoint);
+ }
+ for (IPluginExtension userExtension : extensions) {
+ if (userExtension.getPoint().equals(EXTENSION_POINT_ID)) {
+ }
+ }
+ for (IPluginImport pluginImport : imports) {
+ templatePluginBase.add(pluginImport);
+ }
+ for (IPluginLibrary librarie : libraries) {
+ templatePluginBase.add(librarie);
+ }
+ workspaceBundleModel.save();
+ workspaceExtensionModel.save();
+ workspaceExtensionModel.setEditable(false);
+ workspaceBundleModel.setEditable(false);
+ }
+
+ addLinkedSource(project, _project, monitor);
+ }
+
+ protected void fireStructureChanged(IPluginObject child, WorkspaceExtensionsModel workspaceExtensionModel, int changeType) {
+ IModel model = workspaceExtensionModel;
+ if (model.isEditable() && model instanceof IModelChangeProvider) {
+ IModelChangedEvent e = new ModelChangedEvent((IModelChangeProvider) model, changeType, new Object[] { child }, null);
+ if (model.isEditable() && model instanceof IModelChangeProvider) {
+ IModelChangeProvider provider = (IModelChangeProvider) model;
+ provider.fireModelChanged(e);
+ }
+ }
+ }
+
+ private void addLinkedSource(IProject userProject, IProject tempProject, IProgressMonitor monitor) throws CoreException {
+ List<IClasspathEntry> entries = new ArrayList<IClasspathEntry>();
+ ;
+ IJavaProject userJavaProject = JavaCore.create(userProject);
+ IJavaProject tempJavaProject = JavaCore.create(tempProject);
+ IPackageFragmentRoot[] allPackageFragmentRoots = userJavaProject.getAllPackageFragmentRoots();
+
+ CPListElement[] existing = CPListElement.createFromExisting(tempJavaProject);
+ List<CPListElement> cpListElements = new ArrayList<CPListElement>();
+ for (CPListElement elment : existing) {
+ cpListElements.add(elment);
+ }
+
+ if (allPackageFragmentRoots != null && allPackageFragmentRoots.length > 0) {
+ for (IPackageFragmentRoot packageFragmentRoot : allPackageFragmentRoots) {
+ int kind = packageFragmentRoot.getKind();
+ if (kind == K_SOURCE) {
+
+ IClasspathEntry rawClasspathEntry = packageFragmentRoot.getRawClasspathEntry();
+ IPath fullPath = packageFragmentRoot.getResource().getLocation();
+ IPath path = rawClasspathEntry.getPath();
+ IPath removeLastSegments = path.removeLastSegments(path.segmentCount() - 1);
+ IPath pathFolder = path.removeFirstSegments(path.segmentCount() - 1);
+ pathFolder = createFolder(fullPath, pathFolder.toString(), tempProject, monitor);
+
+ CPListElement newEntrie = new CPListElement(tempJavaProject, IClasspathEntry.CPE_SOURCE);
+ newEntrie.setLinkTarget(fullPath);
+ newEntrie.setPath(pathFolder);
+ newEntrie.setExported(true);
+
+ cpListElements.add(newEntrie);
+ }
+ }
+ }
+ BuildPathsBlock.flush(cpListElements, tempJavaProject.getOutputLocation(), tempJavaProject, null, monitor);
+ }
+
+ private IPath createFolder(IPath path, String fName, IProject tempProject, IProgressMonitor monitor) throws CoreException {
+ String folderName = fName;
+ IFolder tempFolder = tempProject.getFolder(folderName);
+ IPath fullPath = tempFolder.getFullPath();
+ if (tempFolder.exists()) {
+ folderName = "temp" + folderName;
+ fullPath = createFolder(path, folderName, tempProject, monitor);
+ }
+ return fullPath;
+ }
+
+ private void updateManifest(IBundle bundle) {
+ String pluginId = bundle.getHeader(Constants.BUNDLE_SYMBOLICNAME);
+ String projectName = _project.getName();
+ if (projectName.startsWith(".")) {
+ projectName = projectName.substring(1, projectName.length() - 1);
+ }
+
+ bundle.setHeader(Constants.BUNDLE_SYMBOLICNAME, projectName + ";singleton:=true");
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/templateEditor/DocumentReader.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/templateEditor/DocumentReader.java
new file mode 100644
index 0000000..1a588bc
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/templateEditor/DocumentReader.java
@@ -0,0 +1,72 @@
+/**
+ * <copyright>
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.templateEditor;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class DocumentReader {
+ public static final int EOF = -1;
+
+ private IDocument document;
+
+ private int offset;
+
+ /**
+ * Constructor for JavaDocumentReader.
+ *
+ * @param document
+ * IDocument
+ * @param documentOffset
+ * int
+ */
+ public DocumentReader(IDocument document, int documentOffset) {
+ this.document = null;
+ offset = -1;
+ if (documentOffset > 0)
+ offset = documentOffset;
+ this.document = document;
+ }
+
+ /**
+ * Method readForward.
+ *
+ * @return char
+ */
+ public char readForward() {
+ try {
+ if (document.getChar(offset) == '\uFFFF') {
+ return '\uFFFF';
+ } else {
+ offset++;
+ return document.getChar(offset);
+ }
+ } catch (BadLocationException ex) {
+ return '\uFFFF';
+ }
+ }
+
+ /**
+ * Method readBackward.
+ *
+ * @return char
+ */
+ public char readBackward() {
+ if (offset <= 0)
+ return '\uFFFF';
+ try {
+ offset--;
+ return document.getChar(offset);
+ } catch (BadLocationException e) {
+ return '\uFFFF';
+ }
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/templateEditor/MethodEditorActivationListener.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/templateEditor/MethodEditorActivationListener.java
new file mode 100644
index 0000000..cd95be3
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/templateEditor/MethodEditorActivationListener.java
@@ -0,0 +1,141 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.templateEditor;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.egf.pattern.ui.editors.PatternMethodEditorInput;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IPartListener;
+import org.eclipse.ui.IPartService;
+import org.eclipse.ui.IWindowListener;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.editors.text.TextEditor;
+import org.eclipse.ui.part.MultiPageEditorSite;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public abstract class MethodEditorActivationListener implements IPartListener, IWindowListener {
+
+ /**
+ * The part service.
+ *
+ * @since 3.1
+ */
+ private IPartService fPartService;
+
+ private TextEditor textEditor;
+
+ /**
+ * Creates this activation listener.
+ *
+ * @param partService
+ * the part service on which to add the part listener
+ * @since 3.1
+ */
+ public MethodEditorActivationListener(IPartService partService, TextEditor editor) {
+ textEditor = editor;
+ fPartService = partService;
+ fPartService.addPartListener(this);
+ PlatformUI.getWorkbench().addWindowListener(this);
+ }
+
+ public void partActivated(IWorkbenchPart part) {
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ IWorkbenchWindow activeWorkbenchWindow = workbench.getActiveWorkbenchWindow();
+ IWorkbenchPage activePage = activeWorkbenchWindow.getActivePage();
+ IEditorPart activeEditor = activePage.getActiveEditor();
+ if (activeEditor == getMultiPageEditor()) {
+ gotoCheck();
+ }
+ }
+
+ public void partBroughtToTop(IWorkbenchPart part) {
+ }
+
+ public void partClosed(IWorkbenchPart part) {
+ }
+
+ public void partDeactivated(IWorkbenchPart part) {
+ }
+
+ public void partOpened(IWorkbenchPart part) {
+ }
+
+ public void windowActivated(IWorkbenchWindow window) {
+ IEditorSite editorSite = textEditor.getEditorSite();
+ // The active eidtor.
+ IWorkbenchPage activePage = window.getActivePage();
+ IEditorPart activeEditor = activePage.getActiveEditor();
+
+ if (window == editorSite.getWorkbenchWindow() && getMultiPageEditor() == activeEditor) {
+ window.getShell().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ gotoCheck();
+ }
+ });
+ }
+ }
+
+ public void windowClosed(IWorkbenchWindow window) {
+ }
+
+ public void windowDeactivated(IWorkbenchWindow window) {
+ }
+
+ public void windowOpened(IWorkbenchWindow window) {
+ }
+
+ /**
+ * Disposes this activation listener.
+ *
+ * @since 3.1
+ */
+ public void dispose() {
+ fPartService.removePartListener(this);
+ PlatformUI.getWorkbench().removeWindowListener(this);
+ fPartService = null;
+ }
+
+ private IEditorPart getMultiPageEditor() {
+ IEditorSite editorSite = textEditor.getEditorSite();
+ IEditorPart editor = ((MultiPageEditorSite) editorSite).getMultiPageEditor();
+ return editor;
+ }
+
+ private void gotoCheck() {
+ IEditorInput editorInput = textEditor.getEditorInput();
+ IFile file = ((PatternMethodEditorInput) editorInput).getFile();
+ if (file != null) {
+ handleActivation();
+ }
+ }
+
+ /**
+ * Handles the activation triggering a element state check in the
+ * editor.
+ */
+ protected abstract void handleActivation();
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/templateEditor/TemplateEditorUtility.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/templateEditor/TemplateEditorUtility.java
new file mode 100644
index 0000000..39362b2
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/templateEditor/TemplateEditorUtility.java
@@ -0,0 +1,273 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+package org.eclipse.egf.pattern.ui.editors.templateEditor;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Stack;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.egf.pattern.ui.Activator;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.internal.ui.text.java.JavaMethodCompletionProposal;
+import org.eclipse.jdt.internal.ui.text.java.ParameterGuessingProposal;
+import org.eclipse.jdt.ui.PreferenceConstants;
+import org.eclipse.jdt.ui.text.java.IJavaCompletionProposal;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+
+/**
+ * @author Yahong Song - Soyatec
+ *
+ */
+public class TemplateEditorUtility {
+
+ private static final String EMF_CODEGEN_JET_NATURE_ID = "org.eclipse.emf.codegen.jet.IJETNature"; //$NON-NLS-1$
+
+ /**
+ * @param startPositions2
+ * @return current method's contents start lines in the dummy whole
+ * contents.
+ */
+ public static int getStartPosition(Map<String, Position> startPositions) {
+ int startOffset = 0;
+ if (startPositions == null || startPositions.size() == 0) {
+ return startOffset;
+ } else {
+ Collection<Position> starts = (Collection<Position>) startPositions.values();
+ Iterator<Position> e = starts.iterator();
+ while (e.hasNext()) {
+ Position position = e.next();
+ startOffset = startOffset + position.length + 1;
+ }
+ }
+ return startOffset;
+ }
+
+ public static int getSourceLength(InputStream inputstream) throws IOException {
+ BufferedReader br = new BufferedReader(new InputStreamReader(inputstream));
+ int length = 0;
+ while (br.read() != -1) {
+ ++length;
+ }
+ br.close();
+ return length;
+ }
+
+ /**
+ * Get the words which will be used in code completion.
+ */
+ public static String[] getAllWords(ITextViewer viewer, int offset) {
+ IDocument doc = viewer.getDocument();
+ DocumentReader reader = new DocumentReader(doc, offset);
+ char c = reader.readBackward();
+
+ ArrayList<String> all = new ArrayList<String>(20);
+ char currChar = c;
+ currChar = trimBlanksBackward(reader, currChar);
+ for (boolean done = false; !done;) {
+ Stack stack = new Stack();
+ for (; currChar != '\uFFFF' && !Character.isWhitespace(currChar); currChar = reader.readBackward())
+ stack.push(new Character(currChar));
+
+ String s;
+ for (s = new String(); !stack.empty(); s = (new StringBuilder(String.valueOf(s))).append(((Character) stack.pop()).toString()).toString())
+ ;
+ int jePt = s.indexOf("<%=");
+ if (jePt >= 0) {
+ s = s.substring(jePt + 3);
+ done = true;
+ } else {
+ int jspPt = s.indexOf("<%");
+ if (jspPt >= 0) {
+ s = s.substring(jspPt + 2);
+ done = true;
+ }
+ }
+ all.add(s);
+ currChar = trimBlanksBackward(reader, currChar);
+ if (currChar == '\uFFFF' || currChar == '@')
+ done = true;
+ }
+
+ return (String[]) all.toArray(new String[all.size()]);
+ }
+
+ public static char trimBlanksBackward(DocumentReader reader, char currChar) {
+ for (; currChar != '\uFFFF' && Character.isWhitespace(currChar); currChar = reader.readBackward())
+ ;
+ return currChar;
+ }
+
+ public static IClasspathEntry[] getNewIClasspathEntry(IClasspathEntry[] entries, IClasspathEntry[] jreEntry) {
+ if (entries != null && jreEntry != null) {
+ IClasspathEntry[] newEntries = new IClasspathEntry[entries.length + jreEntry.length];
+ System.arraycopy(entries, 0, newEntries, 0, entries.length);
+ System.arraycopy(jreEntry, 0, newEntries, entries.length, jreEntry.length);
+ return newEntries;
+ }
+ return null;
+ }
+
+ public static void createFolder(IFolder folder, boolean force, boolean local, IProgressMonitor monitor) throws CoreException {
+ if (!folder.exists()) {
+ IContainer parent = folder.getParent();
+ if (parent instanceof IFolder) {
+ createFolder((IFolder) parent, force, local, null);
+ }
+ folder.create(force, local, monitor);
+ }
+ }
+
+ public static IJavaProject createJavaProject(String name, IProgressMonitor monitor) {
+ IJavaProject javaProject = null;
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ IProject project = root.getProject(name);
+ URI locationURI = project.getLocationURI();
+ try {
+ if (monitor == null) {
+ monitor = new NullProgressMonitor();
+ }
+ monitor.beginTask("Creating project...", 10);
+
+ // create the project
+ try {
+ if (!project.exists()) {
+ IProjectDescription desc = project.getWorkspace().newProjectDescription(project.getName());
+ if (locationURI != null && ResourcesPlugin.getWorkspace().getRoot().getLocationURI().equals(locationURI)) {
+ locationURI = null;
+ }
+ desc.setLocationURI(locationURI);
+ setProjectJET1Nature(desc);
+ project.create(desc, monitor);
+ monitor = null;
+ }
+ if (!project.isOpen()) {
+ project.open(monitor);
+ monitor = null;
+ }
+ } finally {
+ if (monitor != null) {
+ monitor.done();
+ }
+ }
+
+ // Nature
+ if (monitor != null && monitor.isCanceled()) {
+ throw new OperationCanceledException();
+ }
+ if (!project.hasNature(JavaCore.NATURE_ID)) {
+ IProjectDescription description = project.getDescription();
+ String[] prevNatures = description.getNatureIds();
+ String[] newNatures = new String[prevNatures.length + 1];
+ System.arraycopy(prevNatures, 0, newNatures, 0, prevNatures.length);
+ newNatures[prevNatures.length] = JavaCore.NATURE_ID;
+ description.setNatureIds(newNatures);
+ project.setDescription(description, monitor);
+ } else {
+ if (monitor != null) {
+ monitor.worked(1);
+ }
+ }
+
+ // Classpath
+ List<IClasspathEntry> cpEntries = new ArrayList<IClasspathEntry>();
+
+ // 1. src
+ IPath sourceFolderPath = new Path(name).makeAbsolute();
+ IPath srcPath = new Path(PreferenceConstants.getPreferenceStore().getString(PreferenceConstants.SRCBIN_SRCNAME));
+ if (srcPath.segmentCount() > 0) {
+ sourceFolderPath = sourceFolderPath.append(srcPath);
+ }
+ IClasspathEntry srcEntry = JavaCore.newSourceEntry(sourceFolderPath);
+ srcPath = srcEntry.getPath();
+ if (srcPath.segmentCount() > 1) {
+ IFolder folder = root.getFolder(srcPath);
+ createFolder(folder, true, true, monitor);
+ }
+ cpEntries.add(srcEntry);
+
+ // 2. jre
+ IClasspathEntry[] jreEntry = PreferenceConstants.getDefaultJRELibrary();
+ for (IClasspathEntry entry : jreEntry) {
+ cpEntries.add(entry);
+ }
+
+ // 3. output
+ IPath outputLocationPath = new Path(name).makeAbsolute();
+ IPath binPath = new Path(PreferenceConstants.getPreferenceStore().getString(PreferenceConstants.SRCBIN_BINNAME));
+ if (binPath.segmentCount() > 0) {
+ outputLocationPath = outputLocationPath.append(binPath);
+ IFolder folder = root.getFolder(outputLocationPath);
+ createFolder(folder, true, true, monitor);
+ }
+
+ javaProject = JavaCore.create(project);
+ javaProject.setRawClasspath(cpEntries.toArray(new IClasspathEntry[cpEntries.size()]), outputLocationPath, monitor);
+
+ } catch (CoreException e) {
+ Activator.getDefault().logError(e);
+ } finally {
+ if (monitor != null) {
+ monitor.done();
+ }
+ }
+ return javaProject;
+ }
+
+ public static ICompletionProposal[] filterJavaMethodProposals(ICompletionProposal[] javaProposals) {
+ if (javaProposals == null) {
+ return null;
+ }
+ List<ICompletionProposal> proposals = new ArrayList<ICompletionProposal>();
+ for (ICompletionProposal javaProposal : javaProposals) {
+ if (javaProposal instanceof ParameterGuessingProposal || !(javaProposal instanceof JavaMethodCompletionProposal)) {
+ proposals.add(javaProposal);
+ }
+ }
+ return (ICompletionProposal[]) proposals.toArray(new IJavaCompletionProposal[proposals.size()]);
+ }
+
+ private static void setProjectJET1Nature(IProjectDescription desc) {
+ if (!desc.hasNature(EMF_CODEGEN_JET_NATURE_ID)) {
+ String[] natureIds = new String[1];
+ natureIds[0] = EMF_CODEGEN_JET_NATURE_ID;
+ desc.setNatureIds(natureIds);
+ }
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/templateEditor/TemplateExtensionRegistry.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/templateEditor/TemplateExtensionRegistry.java
new file mode 100644
index 0000000..549ca82
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/templateEditor/TemplateExtensionRegistry.java
@@ -0,0 +1,60 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.templateEditor;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.egf.common.helper.ExtensionPointHelper;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternNature;
+import org.eclipse.egf.pattern.ui.Activator;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class TemplateExtensionRegistry {
+ protected static final String EXTENSION_POINT_EDITOR = "templateEditor";
+ protected static final String EXTENSION_Id = "id";
+ protected static final String EXTENSION_POINT_NATURE = "nature";
+ private static Map<String, String> editors;
+
+ public static String getEditor(Pattern pattern) {
+ PatternNature nature = pattern.getNature();
+ Map<String, String> editors = getEditors();
+ if (editors != null) {
+ String name = nature.eClass().getName();
+ return editors.get(name);
+ }
+ return null;
+ }
+
+ public static Map<String, String> getEditors() {
+ if (editors == null)
+ editors = new HashMap<String, String>();
+ for (IConfigurationElement configurationElement : ExtensionPointHelper.getConfigurationElements(Activator.getDefault().getPluginID(), EXTENSION_POINT_EDITOR)) {
+ String editorId = ExtensionPointHelper.getAttributeValue(configurationElement, EXTENSION_Id);
+ String natureName = ExtensionPointHelper.getAttributeValue(configurationElement, EXTENSION_POINT_NATURE);
+
+ editors.put(natureName, editorId);
+ }
+ return editors;
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/templateEditor/computer/AbstractProposalComputer.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/templateEditor/computer/AbstractProposalComputer.java
new file mode 100644
index 0000000..bb774e2
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/templateEditor/computer/AbstractProposalComputer.java
@@ -0,0 +1,46 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.templateEditor.computer;
+
+import java.util.List;
+
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public abstract class AbstractProposalComputer {
+ /**
+ * Compute the proposal of java text editor.
+ */
+ public abstract List<ICompletionProposal> computeProposal();
+
+ /**
+ * Get the display String of type.
+ */
+ public static String getType(String type) {
+ if (type == null || type.length() == 0)
+ return "";
+ int index = type.lastIndexOf("//");
+ if (index != -1) {
+ return type.substring(index + 2);
+ }
+ return type;
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/templateEditor/computer/PatternParameterProposalComputer.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/templateEditor/computer/PatternParameterProposalComputer.java
new file mode 100644
index 0000000..dd122ba
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/templateEditor/computer/PatternParameterProposalComputer.java
@@ -0,0 +1,67 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.templateEditor.computer;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternParameter;
+import org.eclipse.egf.pattern.ui.ImageShop;
+import org.eclipse.egf.pattern.ui.editors.templateEditor.TemplateEditorUtility;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jdt.internal.ui.text.java.JavaCompletionProposal;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class PatternParameterProposalComputer extends AbstractProposalComputer {
+ private ITextViewer viewer;
+ private int offset;
+ private Pattern pattern;
+
+ public PatternParameterProposalComputer(ITextViewer viewer, int offset, Pattern pattern) {
+ this.viewer = viewer;
+ this.offset = offset;
+ this.pattern = pattern;
+ }
+
+ @Override
+ public List<ICompletionProposal> computeProposal() {
+ String allWords[] = TemplateEditorUtility.getAllWords(viewer, offset);
+
+ List<ICompletionProposal> parameterProposals = new ArrayList<ICompletionProposal>();
+ if (allWords.length > 0) {
+ String replacedWord = allWords[0];
+ int replacementOffset = offset - replacedWord.length();
+ EList<PatternParameter> allParameters = pattern.getAllParameters();
+ for (PatternParameter parameter : allParameters) {
+ String parameterName = parameter.getName();
+ String displayName = parameterName + " - " + getType(parameter.getType());
+ if (!"".equals(replacedWord) && parameterName.indexOf(replacedWord) == 0) {
+ JavaCompletionProposal propsal = new JavaCompletionProposal(parameterName, replacementOffset, replacedWord.length(), ImageShop.get(ImageShop.IMG_PARAMETER_OBJ), displayName, parameterName.length());
+ parameterProposals.add(propsal);
+ }
+ }
+ }
+ return parameterProposals;
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/templateEditor/computer/PatternVariableProposalComputer.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/templateEditor/computer/PatternVariableProposalComputer.java
new file mode 100644
index 0000000..a3c37ec
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/templateEditor/computer/PatternVariableProposalComputer.java
@@ -0,0 +1,65 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.templateEditor.computer;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternVariable;
+import org.eclipse.egf.pattern.ui.ImageShop;
+import org.eclipse.egf.pattern.ui.editors.templateEditor.TemplateEditorUtility;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jdt.internal.ui.text.java.JavaCompletionProposal;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class PatternVariableProposalComputer extends AbstractProposalComputer {
+ private ITextViewer viewer;
+ private int offset;
+ private Pattern pattern;
+
+ public PatternVariableProposalComputer(ITextViewer viewer, int offset, Pattern pattern) {
+ this.viewer = viewer;
+ this.offset = offset;
+ this.pattern = pattern;
+ }
+
+ @Override
+ public List<ICompletionProposal> computeProposal() {
+ String allWords[] = TemplateEditorUtility.getAllWords(viewer, offset);
+ List<ICompletionProposal> variableProposals = new ArrayList<ICompletionProposal>();
+ if (allWords.length > 0) {
+ String replacedWord = allWords[0];
+ int replacementOffset = offset - replacedWord.length();
+ EList<PatternVariable> allVariables = pattern.getAllVariables();
+ for (PatternVariable variable : allVariables) {
+ String variableName = variable.getName();
+ String displayName = variableName + " - " + getType(variable.getType());
+ if (!"".equals(replacedWord) && variableName.indexOf(replacedWord) == 0) {
+ JavaCompletionProposal propsal = new JavaCompletionProposal(variableName, replacementOffset, replacedWord.length(), ImageShop.get(ImageShop.IMG_VARIABLE_OBJ), displayName, variableName.length());
+ variableProposals.add(propsal);
+ }
+ }
+ }
+ return variableProposals;
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/validation/EMFvalidator.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/validation/EMFvalidator.java
new file mode 100644
index 0000000..5b08a8b
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/validation/EMFvalidator.java
@@ -0,0 +1,82 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+package org.eclipse.egf.pattern.ui.editors.validation;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.egf.pattern.ui.editors.selector.DefaultClientSelector;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.validation.model.EvaluationMode;
+import org.eclipse.emf.validation.service.IBatchValidator;
+import org.eclipse.emf.validation.service.IConstraintDescriptor;
+import org.eclipse.emf.validation.service.IConstraintFilter;
+import org.eclipse.emf.validation.service.ModelValidationService;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class EMFvalidator {
+
+ private static final Map<String, IBatchValidator> batchValidatorCache = new HashMap<String, IBatchValidator>();
+// private static final Map<String, ILiveValidator> liveValidatorCache = new HashMap<String, ILiveValidator>();
+
+// public static IStatus liveValidate(Notification msg, String key) {
+// DefaultClientSelector.running = true;
+// IStatus result = getLive(key).validate(msg);
+// DefaultClientSelector.running = false;
+// return result;
+// }
+
+ public static IStatus batchValidate(EObject obj, String key) {
+ DefaultClientSelector.running = true;
+ IBatchValidator batch = getBatch(key);
+ IStatus result = batch.validate(obj);
+ DefaultClientSelector.running = false;
+ return result;
+ }
+
+// public static ILiveValidator getLive(String key) {
+// ILiveValidator liveValidator = liveValidatorCache.get(key);
+// if (liveValidator == null) {
+// liveValidator = ModelValidationService.getInstance().newValidator(EvaluationMode.LIVE);
+// liveValidator.addConstraintFilter(getFilter(key));
+// liveValidatorCache.put(key, liveValidator);
+// }
+// return liveValidator;
+// }
+
+ public static IBatchValidator getBatch(String key) {
+ IBatchValidator batchValidator = batchValidatorCache.get(key);
+ if (batchValidator == null) {
+ batchValidator = ModelValidationService.getInstance().newValidator(EvaluationMode.BATCH);
+ batchValidator.setIncludeLiveConstraints(true);
+ batchValidator.addConstraintFilter(getFilter(key));
+ batchValidatorCache.put(key, batchValidator);
+ }
+ return batchValidator;
+ }
+
+ public static IConstraintFilter getFilter(final String key) {
+ return new IConstraintFilter() {
+ public boolean accept(IConstraintDescriptor constraint, EObject target) {
+ String id = constraint.getId();
+ return id.equals(key);
+ }
+ };
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/validation/NonEmptyNamesConstraint.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/validation/NonEmptyNamesConstraint.java
new file mode 100644
index 0000000..c6b4cfb
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/validation/NonEmptyNamesConstraint.java
@@ -0,0 +1,44 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.validation;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.egf.model.fcore.NamedModelElement;
+import org.eclipse.emf.validation.AbstractModelConstraint;
+import org.eclipse.emf.validation.IValidationContext;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class NonEmptyNamesConstraint extends AbstractModelConstraint {
+
+ @Override
+ public IStatus validate(IValidationContext ctx) {
+
+ return null;
+ }
+
+ public boolean checkNameEmpty(NamedModelElement element) {
+ String name = element.getName();
+ if (name == null || name.length() == 0) {
+ return true;
+ }
+ return false;
+
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/validation/ParameterNonEmptyNamesConstraint.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/validation/ParameterNonEmptyNamesConstraint.java
new file mode 100644
index 0000000..b69cff6
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/validation/ParameterNonEmptyNamesConstraint.java
@@ -0,0 +1,40 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.validation;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.egf.model.pattern.PatternParameter;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.validation.IValidationContext;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class ParameterNonEmptyNamesConstraint extends NonEmptyNamesConstraint {
+ private EObject eObj;
+
+ @Override
+ public IStatus validate(IValidationContext ctx) {
+ eObj = ctx.getTarget();
+ if (eObj instanceof PatternParameter) {
+ if (checkNameEmpty((PatternParameter) eObj)) {
+ return ctx.createFailureStatus(new Object[] { eObj.eClass().getName() });
+ }
+ }
+ return ctx.createSuccessStatus();
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/validation/PatternNonEmptyNamesConstraint.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/validation/PatternNonEmptyNamesConstraint.java
new file mode 100644
index 0000000..73422d1
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/validation/PatternNonEmptyNamesConstraint.java
@@ -0,0 +1,40 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.validation;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.validation.IValidationContext;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class PatternNonEmptyNamesConstraint extends NonEmptyNamesConstraint {
+ private EObject eObj;
+
+ @Override
+ public IStatus validate(IValidationContext ctx) {
+ eObj = ctx.getTarget();
+ if (eObj instanceof Pattern) {
+ if (checkNameEmpty((Pattern) eObj)) {
+ return ctx.createFailureStatus(new Object[] { eObj.eClass().getName() });
+ }
+ }
+ return ctx.createSuccessStatus();
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/validation/ValidationConstants.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/validation/ValidationConstants.java
new file mode 100644
index 0000000..0ccba8b
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/validation/ValidationConstants.java
@@ -0,0 +1,27 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.validation;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public interface ValidationConstants {
+ // Constraints ID
+ String CONSTRAINTS_PATTERN_NAME_NOT_EMPTY_ID = "org.eclipse.egf.pattern.ui.PatternNameNotEmpty";
+ String CONSTRAINTS_PATTERN_PARAMETER_NOT_EMPTY_NAME_ID = "org.eclipse.egf.pattern.ui.PatternParameterNameNotEmpty";
+ String CONSTRAINTS_PATTERN_VARIABLE_NAME_NOT_EMPTY_ID = "org.eclipse.egf.pattern.ui.PatternVariableNameNotEmpty";
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/validation/VariableNonEmptyNamesConstraint.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/validation/VariableNonEmptyNamesConstraint.java
new file mode 100644
index 0000000..315b383
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/validation/VariableNonEmptyNamesConstraint.java
@@ -0,0 +1,40 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.validation;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.egf.model.pattern.PatternVariable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.validation.IValidationContext;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class VariableNonEmptyNamesConstraint extends NonEmptyNamesConstraint {
+ private EObject eObj;
+
+ @Override
+ public IStatus validate(IValidationContext ctx) {
+ eObj = ctx.getTarget();
+ if (eObj instanceof PatternVariable) {
+ if (checkNameEmpty((PatternVariable) eObj)) {
+ return ctx.createFailureStatus(new Object[] { eObj.eClass().getName() });
+ }
+ }
+ return ctx.createSuccessStatus();
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/wizards/OpenTypeWizard.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/wizards/OpenTypeWizard.java
new file mode 100644
index 0000000..c166e09
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/wizards/OpenTypeWizard.java
@@ -0,0 +1,98 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.wizards;
+
+import org.eclipse.egf.pattern.ui.Messages;
+import org.eclipse.egf.pattern.ui.editors.dialogs.JavaTypeSelectionDialog;
+import org.eclipse.egf.pattern.ui.editors.wizards.pages.ChooseTypePage;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jdt.internal.core.BinaryType;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchWizard;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+@SuppressWarnings("restriction")
+public class OpenTypeWizard extends Wizard implements INewWizard {
+
+ private ChooseTypePage chooseTypePage;
+
+ private ISelection selection;
+
+ private Object selectType;
+
+ private TransactionalEditingDomain editingDomain;
+
+ private String type;
+
+ public OpenTypeWizard(TransactionalEditingDomain editingDomain, String type) {
+ this.editingDomain = editingDomain;
+ this.type = type;
+ }
+
+ @Override
+ public boolean performFinish() {
+ JavaTypeSelectionDialog page = chooseTypePage.getJavaTypePage();
+ if (chooseTypePage.isInCoreTab()) {
+ if (chooseTypePage.getType() != null) {
+ selectType = chooseTypePage.getType();
+ }
+ } else {
+ Object[] result = page.getResult();
+ if (result == null) {
+ page.computeResult();
+ }
+ result = page.getResult();
+ if (result[0] instanceof BinaryType) {
+ selectType = (BinaryType) result[0];
+ System.out.println(selectType);
+ }
+ }
+ return true;
+ }
+
+ /**
+ * We will accept the selection in the workbench to see if
+ * we can initialize from it.
+ *
+ * @see IWorkbenchWizard#init(IWorkbench, IStructuredSelection)
+ */
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ this.selection = selection;
+ }
+
+ /**
+ * Adding the page to the wizard.
+ */
+ public void addPages() {
+ // set the window's title label
+ setWindowTitle(Messages.OpenTypeWizard_window_title);
+ chooseTypePage = new ChooseTypePage(selection, editingDomain, type);
+ addPage(chooseTypePage);
+ }
+
+ public Object getSelectType() {
+ return selectType;
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/wizards/OrchestrationWizard.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/wizards/OrchestrationWizard.java
new file mode 100644
index 0000000..1ad65dd
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/wizards/OrchestrationWizard.java
@@ -0,0 +1,204 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.wizards;
+
+import java.util.List;
+
+import org.eclipse.egf.model.pattern.Call;
+import org.eclipse.egf.model.pattern.MethodCall;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternCall;
+import org.eclipse.egf.model.pattern.PatternFactory;
+import org.eclipse.egf.pattern.ui.Messages;
+import org.eclipse.egf.pattern.ui.editors.wizards.pages.CallTypeEnum;
+import org.eclipse.egf.pattern.ui.editors.wizards.pages.ChooseCallPage;
+import org.eclipse.egf.pattern.ui.editors.wizards.pages.ChooseKindPage;
+import org.eclipse.egf.pattern.ui.editors.wizards.pages.ChooseMethodCallPage;
+import org.eclipse.egf.pattern.ui.editors.wizards.pages.ParameterMatchingPage;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchWizard;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class OrchestrationWizard extends Wizard implements INewWizard {
+
+ private ChooseKindPage chooseKindPage;
+
+ private ChooseCallPage chooseCallPage;
+
+ private ChooseMethodCallPage chooseMethodCallPage;
+
+ private ParameterMatchingPage parameterMatchingPage;
+
+ private ISelection selection;
+
+ private Pattern pattern;
+
+ private Call selectCall;
+
+ private List<MethodCall> chooseMethodCallList;
+
+ private CallTypeEnum defaultKind;
+
+ private Object eidtItem;
+
+ private TransactionalEditingDomain transactionalEditingDomain;
+
+ /**
+ * Constructor for MyWizard.
+ */
+ public OrchestrationWizard(Pattern pattern, CallTypeEnum defaultKind, Object eidtItem, TransactionalEditingDomain transactionalEditingDomain) {
+ super();
+ setNeedsProgressMonitor(true);
+ this.pattern = pattern;
+ this.defaultKind = defaultKind;
+ this.eidtItem = eidtItem;
+ this.transactionalEditingDomain = transactionalEditingDomain;
+ }
+
+ @Override
+ public boolean canFinish() {
+
+ if (chooseKindPage != null && (chooseKindPage.getKind() == CallTypeEnum.BACK_CALL || chooseKindPage.getKind() == CallTypeEnum.SUPERPATTERN_CALL))
+ return true;
+ if (chooseKindPage != null && chooseKindPage.getKind() == CallTypeEnum.METHOD_CALL && defaultKind == CallTypeEnum.Add) {
+ return chooseMethodCallPage.canFinish();
+ } else {
+ return chooseCallPage.canFinish();
+ }
+ }
+
+ /**
+ * Adding the page to the wizard.
+ */
+ public void addPages() {
+ // Set the window's title label
+ setWindowTitle(Messages.OrchestrationWizard_title);
+ // Add chooseKindPage.
+ if (defaultKind.equals(CallTypeEnum.Add)) {
+ chooseKindPage = new ChooseKindPage(selection);
+ addPage(chooseKindPage);
+ }
+ // Add chooseCallPage.
+ chooseCallPage = new ChooseCallPage(pattern, selection, eidtItem);
+ addPage(chooseCallPage);
+ // Add chooseMethodCallPage.
+ chooseMethodCallPage = new ChooseMethodCallPage(pattern, selection, eidtItem);
+ addPage(chooseMethodCallPage);
+ // Add parameterMatchingPage.
+ if (defaultKind.equals(CallTypeEnum.PATTERN_CALL) || defaultKind.equals(CallTypeEnum.Add)) {
+ parameterMatchingPage = new ParameterMatchingPage(selection, pattern, transactionalEditingDomain);
+ Pattern patternCallee = null;
+ if (eidtItem instanceof PatternCall) {
+ patternCallee = ((PatternCall) eidtItem).getCalled();
+ }
+ parameterMatchingPage.setPatternCallee((patternCallee));
+ addPage(parameterMatchingPage);
+ }
+ }
+
+ @Override
+ public IWizardPage getNextPage(IWizardPage page) {
+ IWizardPage nextPage;
+ if (page instanceof ChooseKindPage) {
+ CallTypeEnum kind = ((ChooseKindPage) page).getKind();
+ if (kind == CallTypeEnum.METHOD_CALL && defaultKind.equals(CallTypeEnum.Add)) {
+ nextPage = chooseMethodCallPage;
+ } else if (chooseKindPage.getKind() == CallTypeEnum.BACK_CALL || chooseKindPage.getKind() == CallTypeEnum.SUPERPATTERN_CALL) {
+ return null;
+ } else {
+ nextPage = chooseCallPage;
+ }
+ } else {
+ nextPage = parameterMatchingPage;
+ }
+ return nextPage;
+ }
+
+ /**
+ * This method is called when 'Finish' button is pressed in
+ * the wizard. We will create an operation and run it
+ * using wizard as execution context.
+ */
+ public boolean performFinish() {
+ if (chooseKindPage != null && chooseKindPage.getKind() == CallTypeEnum.BACK_CALL)
+ selectCall = PatternFactory.eINSTANCE.createBackCall();
+ else if (chooseKindPage != null && chooseKindPage.getKind() == CallTypeEnum.SUPERPATTERN_CALL)
+ selectCall = PatternFactory.eINSTANCE.createSuperCall();
+ else {
+ if (chooseKindPage != null && chooseKindPage.getKind() == CallTypeEnum.METHOD_CALL) {
+ chooseMethodCallList = chooseMethodCallPage.getChooseMethodCallList();
+ selectCall = chooseMethodCallPage.getChooseCall();
+ } else {
+ selectCall = chooseCallPage.getChooseCall();
+ }
+ }
+ return true;
+ }
+
+ /**
+ * The <code>Wizard</code> implementation of this <code>IWizard</code>
+ * method does nothing and returns <code>true</code>. Subclasses should
+ * reimplement this method if they need to perform any special cancel
+ * processing for their wizard.
+ */
+ public boolean performCancel() {
+ if (parameterMatchingPage != null && eidtItem != null) {
+ List<RecordingCommand> parameterMatchingCommands = parameterMatchingPage.getParameterMatchingCommands();
+ if (parameterMatchingCommands != null) {
+ for (final RecordingCommand parameterMatchingCommand : parameterMatchingCommands) {
+ if (transactionalEditingDomain.getCommandStack().canUndo())
+ transactionalEditingDomain.getCommandStack().undo();
+ }
+ }
+ }
+ return true;
+ }
+
+ /**
+ * We will accept the selection in the workbench to see if
+ * we can initialize from it.
+ *
+ * @see IWorkbenchWizard#init(IWorkbench, IStructuredSelection)
+ */
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ this.selection = selection;
+ }
+
+ /**
+ * Return the selection content.
+ */
+ public Call getSelectCall() {
+ return selectCall;
+ }
+
+ public List<MethodCall> getSelectMethodCallList() {
+ return chooseMethodCallList;
+ }
+
+ public CallTypeEnum getDefaultKind() {
+ return defaultKind;
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/wizards/pages/CallTypeEnum.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/wizards/pages/CallTypeEnum.java
new file mode 100644
index 0000000..f88cdfb
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/wizards/pages/CallTypeEnum.java
@@ -0,0 +1,27 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.wizards.pages;
+
+/**
+ * This enum is using for call type selection
+ *
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public enum CallTypeEnum {
+ METHOD_CALL, PATTERN_CALL, PATTERNINJECTED_CALL, SUPERPATTERN_CALL, BACK_CALL, Add
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/wizards/pages/ChooseCallPage.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/wizards/pages/ChooseCallPage.java
new file mode 100644
index 0000000..00dd3fb
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/wizards/pages/ChooseCallPage.java
@@ -0,0 +1,613 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.wizards.pages;
+
+import java.text.Collator;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+import java.util.Set;
+
+import org.eclipse.egf.model.pattern.Call;
+import org.eclipse.egf.model.pattern.MethodCall;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternCall;
+import org.eclipse.egf.model.pattern.PatternFactory;
+import org.eclipse.egf.model.pattern.PatternInjectedCall;
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.model.pattern.PatternVariable;
+import org.eclipse.egf.pattern.engine.PatternHelper;
+import org.eclipse.egf.pattern.ui.Messages;
+import org.eclipse.egf.pattern.ui.PatternUIHelper;
+import org.eclipse.egf.pattern.ui.editors.dialogs.PatternElementSelectionDialog;
+import org.eclipse.egf.pattern.ui.editors.providers.CommonListContentProvider;
+import org.eclipse.egf.pattern.ui.editors.providers.MethodLabelProvider;
+import org.eclipse.egf.pattern.ui.editors.providers.PatternSelectionLabelProvider;
+import org.eclipse.egf.pattern.ui.editors.wizards.OrchestrationWizard;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.ViewerSorter;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class ChooseCallPage extends WizardPage {
+
+ private CallTypeEnum selectKind;
+
+ private CallTypeEnum oldKind = CallTypeEnum.Add;
+
+ private Pattern pattern;
+
+ private TableViewer parentTableViewer;
+
+ private TableViewer childTableViewer;
+
+ private Call selectCall;
+
+ private List<MethodCall> selectMethodCallList;
+
+ private Label title;
+
+ private Text text;
+
+ private Label varParaLabel;
+
+ private Object eidtItem;
+
+ protected Composite container;
+
+ private boolean isFirst = true;
+
+ private boolean canFinish = false;
+
+ public ChooseCallPage(Pattern pattern, ISelection selection, Object eidtItem) {
+ super(Messages.ChooseCallPage_title);
+ setTitle(Messages.ChooseCallPage_title);
+ setDescription(Messages.ChooseCallPage_description);
+ this.pattern = pattern;
+ this.eidtItem = eidtItem;
+ }
+
+ public void createControl(Composite parent) {
+ createCallControl(parent);
+ setPageComplete(false);
+ }
+
+ private void createCallControl(Composite parent) {
+ container = new Composite(parent, SWT.NONE);
+ container.setLayoutData(new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL));
+ GridLayout layout = new GridLayout();
+ container.setLayout(layout);
+
+ title = new Label(container, SWT.NONE);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ title.setLayoutData(gd);
+
+ createPatternsMethodsArea();
+ createVariablesArea();
+ setControl(container);
+ }
+
+ private void createPatternsMethodsArea() {
+ text = new Text(container, SWT.BORDER);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.widthHint = 550;
+ text.setLayoutData(gd);
+ text.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+
+ if (selectKind != CallTypeEnum.SUPERPATTERN_CALL) {
+ checkListAreaExist(text.getText());
+ }
+ }
+ });
+ Label label = new Label(container, SWT.NONE);
+ label.setText(Messages.ChooseCallPage_label_text);
+
+ Table listTable = createParentTable();
+ gd = new GridData(GridData.FILL_BOTH);
+ gd.heightHint = 60;
+ listTable.setLayoutData(gd);
+
+ TableColumn tableColumn = new TableColumn(listTable, SWT.NONE);
+ tableColumn.setWidth(500);
+ parentTableViewer = new TableViewer(listTable);
+ parentTableViewer.setContentProvider(new CommonListContentProvider());
+ parentTableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+
+ public void selectionChanged(SelectionChangedEvent event) {
+ checkParentTableSelect();
+ setParameterMatchingCall(selectCall);
+ if (selectKind == CallTypeEnum.PATTERNINJECTED_CALL) {
+ if (isPageComplete()) {
+ checkChildTableSelect();
+ }
+ }
+ }
+ });
+
+ parentTableViewer.addDoubleClickListener(new IDoubleClickListener() {
+
+ public void doubleClick(DoubleClickEvent event) {
+ if (selectKind == CallTypeEnum.METHOD_CALL || selectKind == CallTypeEnum.PATTERN_CALL) {
+ getSelectionContent();
+ setParameterMatchingCall(selectCall);
+ getWizard().performFinish();
+ WizardDialog wizardDialog = (WizardDialog) (getWizard().getContainer());
+ wizardDialog.close();
+ } else {
+ checkChildTableSelect();
+ PatterninjectedCallDoubleClick();
+ }
+ }
+ });
+ }
+
+ protected Table createParentTable() {
+ Table listTable = new Table(container, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
+ return listTable;
+ }
+
+ private void createVariablesArea() {
+ varParaLabel = new Label(container, SWT.NONE);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ varParaLabel.setLayoutData(gd);
+ varParaLabel.setText(Messages.ChooseCallPage_patternInjectCall_title);
+
+ Table listTable = new Table(container, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
+ gd = new GridData(GridData.FILL_BOTH);
+ gd.heightHint = 60;
+ listTable.setLayoutData(gd);
+
+ TableColumn tableColumn = new TableColumn(listTable, SWT.NONE);
+ tableColumn.setWidth(500);
+ childTableViewer = new TableViewer(listTable);
+ childTableViewer.setLabelProvider(new PatternSelectionLabelProvider());
+ childTableViewer.setContentProvider(new CommonListContentProvider());
+ childTableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+
+ public void selectionChanged(SelectionChangedEvent event) {
+ checkChildTableSelect();
+ if (isPageComplete()) {
+ checkParentTableSelect();
+ }
+ }
+ });
+
+ childTableViewer.addDoubleClickListener(new IDoubleClickListener() {
+
+ public void doubleClick(DoubleClickEvent event) {
+ if (selectKind == CallTypeEnum.PATTERNINJECTED_CALL) {
+ checkParentTableSelect();
+ PatterninjectedCallDoubleClick();
+ }
+ }
+ });
+ }
+
+ /**
+ * Get the double click information while the call type is
+ * PATTERNINJECTED_CALL.
+ */
+ private void PatterninjectedCallDoubleClick() {
+ if (isPageComplete()) {
+ getSelectionContent();
+ getWizard().performFinish();
+ WizardDialog wizardDialog = (WizardDialog) (getWizard().getContainer());
+ wizardDialog.close();
+ }
+ }
+
+ /**
+ * If is a edit operation, set the default select value in table.
+ */
+ private void setDefaultSelectValue() {
+ if (eidtItem != null) {
+ if (selectKind == CallTypeEnum.METHOD_CALL && eidtItem instanceof MethodCall) {
+ MethodCall call = (MethodCall) eidtItem;
+ PatternMethod called = call.getCalled();
+ setSelectValue(called, null);
+
+ } else if (selectKind == CallTypeEnum.PATTERN_CALL && eidtItem instanceof PatternCall) {
+ PatternCall call = (PatternCall) eidtItem;
+ Pattern called = call.getCalled();
+ setSelectValue(called, null);
+
+ } else if (selectKind == CallTypeEnum.PATTERNINJECTED_CALL && eidtItem instanceof PatternInjectedCall) {
+ PatternInjectedCall call = (PatternInjectedCall) eidtItem;
+ Pattern called = call.getCalled();
+ PatternVariable context = call.getContext();
+ setSelectValue(called, context);
+ }
+ setParameterMatchingCall(eidtItem);
+ }
+ }
+
+ /**
+ * Set the default select value if has been found in table.
+ */
+ private void setSelectValue(Object called, Object context) {
+ if (called != null) {
+ TableItem[] parentItems = parentTableViewer.getTable().getItems();
+ for (int i = 0; i < parentItems.length; i++) {
+ Object currentData = parentItems[i].getData();
+ if (currentData.equals(called)) {
+ parentTableViewer.getTable().select(i);
+ setTextValue(called);
+ if (selectKind == CallTypeEnum.METHOD_CALL || selectKind == CallTypeEnum.PATTERN_CALL) {
+ checkParentTableSelect();
+ return;
+ } else if (selectKind == CallTypeEnum.PATTERNINJECTED_CALL) {
+ setChildTableSelectValue(called, context);
+ return;
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Set the default text value.
+ */
+ private void setTextValue(Object called) {
+ if (called instanceof PatternMethod) {
+ PatternMethod patternMethod = (PatternMethod) called;
+ text.setText(patternMethod.getName());
+ } else if (called instanceof Pattern) {
+ Pattern pattern = (Pattern) called;
+ text.setText(pattern.getName());
+ }
+ }
+
+ /**
+ * Select the default context in child table if has been found.
+ */
+ private void setChildTableSelectValue(Object called, Object context) {
+ if (context != null) {
+ TableItem[] childItems = childTableViewer.getTable().getItems();
+ for (int i = 0; i < childItems.length; i++) {
+ Object currentData = childItems[i].getData();
+ if (currentData.equals(context)) {
+ childTableViewer.getTable().select(i);
+ checkChildTableSelect();
+ return;
+ }
+ }
+ }
+ }
+
+ /**
+ * Get the kind of call.
+ */
+ public void setVisible(boolean visible) {
+ if (visible) {
+ if (getPreviousPage() != null) {
+ selectKind = ((ChooseKindPage) getPreviousPage()).getKind();
+ } else {
+ selectKind = ((OrchestrationWizard) getWizard()).getDefaultKind();
+ }
+ updateTable(selectKind);
+ }
+ super.setVisible(visible);
+ if (isFirst) {
+ setDefaultSelectValue();
+ isFirst = false;
+ }
+ }
+
+ /**
+ * Refresh the page style by kind of call.
+ */
+ private void updateTable(CallTypeEnum kind) {
+ if (kind == CallTypeEnum.METHOD_CALL) {
+ if (kind != oldKind) {
+ parentTableViewer.setLabelProvider(new MethodLabelProvider());
+ parentTableViewer.setSorter(new ViewerSorter(Collator.getInstance(Locale.ENGLISH)));
+ updateTableInput(getMethods(), null, true, false);
+ }
+ title.setText(Messages.ChooseCallPage_methodCall_title);
+ } else {
+ parentTableViewer.setLabelProvider(new PatternSelectionLabelProvider());
+ }
+
+ if (kind == CallTypeEnum.PATTERN_CALL) {
+ if (kind != oldKind) {
+ updateTableInput(getPatterns(), null, true, false);
+ }
+ title.setText(Messages.ChooseCallPage_patternCall_title);
+ }
+
+ if (kind == CallTypeEnum.PATTERNINJECTED_CALL) {
+ if (kind != oldKind) {
+ updateTableInput(getPatterns(), getVariables(pattern), true, true);
+ }
+ title.setText(Messages.ChooseCallPage_patternCall_title);
+ }
+
+ if (kind == CallTypeEnum.SUPERPATTERN_CALL) {
+ updateTableInput(null, null, false, false);
+ if (kind != oldKind) {
+ title.setText(Messages.ChooseCallPage_superPatternCall_title);
+ }
+ }
+ oldKind = kind;
+ }
+
+ private void redrawControl(boolean exclude) {
+ GridData labelLayoutData = (GridData) varParaLabel.getLayoutData();
+ labelLayoutData.exclude = exclude;
+ varParaLabel.setVisible(!exclude);
+
+ Table table = childTableViewer.getTable();
+ GridData tableLayoutData = (GridData) table.getLayoutData();
+ tableLayoutData.exclude = exclude;
+ table.setVisible(!exclude);
+
+ layout(table);
+ }
+
+ private void layout(Control control) {
+ if (control == null || control.isDisposed()) {
+ return;
+ }
+ if (control instanceof Composite) {
+ ((Composite) control).layout();
+ }
+ layout(control.getParent());
+ }
+
+ /**
+ * While change the call type,update the table input.
+ */
+ private void updateTableInput(List<?> parentTableInput, List<?> childTableInput, boolean parentTableEnable, boolean childTableEnable) {
+ parentTableViewer.setInput(null);
+ parentTableViewer.setInput(parentTableInput);
+ childTableViewer.setInput(childTableInput);
+ parentTableViewer.getTable().setEnabled(parentTableEnable);
+ childTableViewer.getTable().setEnabled(childTableEnable);
+ redrawControl(!childTableEnable);
+ text.setText(""); //$NON-NLS-1$
+ if (selectKind == CallTypeEnum.PATTERNINJECTED_CALL) {
+ checkChildTableSelect();
+ }
+ checkParentTableSelect();
+ }
+
+ private void checkParentTableSelect() {
+ int selectionIndex = parentTableViewer.getTable().getSelectionIndex();
+ if (selectionIndex == -1) {
+ String errorMessage = Messages.ChooseCallPage_no_call_selected_error_message;
+ updateMessage(errorMessage);
+ } else {
+ updateMessage(null);
+ setPatternCalleeForMatch(selectionIndex);
+ }
+ }
+
+ /**
+ * If pattern call is chosen, update the parameterMatchingPage's
+ * patternCallee with pattern item user select.
+ */
+ private void setPatternCalleeForMatch(int index) {
+ if (selectKind == CallTypeEnum.PATTERN_CALL) {
+ Pattern pattern = (Pattern) parentTableViewer.getElementAt(index);
+ ((ParameterMatchingPage) getNextPage()).setPatternCallee((Pattern) pattern);
+ }
+ }
+
+ private void checkChildTableSelect() {
+ int selectionIndex = childTableViewer.getTable().getSelectionIndex();
+ if (selectionIndex == -1) {
+ String errorMessage = Messages.ChooseCallPage_no_variable_selected_error_message;
+ updateMessage(errorMessage);
+ } else {
+ updateMessage(null);
+ }
+ }
+
+ private void updateMessage(String message) {
+ setMessage(message, ERROR);
+ if ("".equals(message) || message == null) { //$NON-NLS-1$
+ getSelectionContent();
+ canFinish(true);
+ setPageComplete(true);
+ } else {
+ canFinish(false);
+ setPageComplete(false);
+ }
+ }
+
+ private List<PatternMethod> getMethods() {
+ return PatternUIHelper.getAllUseablePatternMethods(pattern);
+ }
+
+ private List<Pattern> getPatterns() {
+ Set<Pattern> patterns = PatternHelper.TRANSACTIONNAL_COLLECTOR.getAllPatterns();
+ List<Pattern> parentMethods = new ArrayList<Pattern>();
+ parentMethods.addAll(patterns);
+ return parentMethods;
+ }
+
+ private List<PatternVariable> getVariables(Pattern pattern) {
+ EList<PatternVariable> allVariables = pattern.getAllVariables();
+ return allVariables;
+ }
+
+ private void checkListAreaExist(String name) {
+ if ((getListAreaDisplay(name).size() <= 0)) {
+ setPageComplete(false);
+ }
+ }
+
+ /**
+ * Get the parent table's content by the text value user input.
+ */
+ private List<?> getListAreaDisplay(String name) {
+ List<?> input = new ArrayList<Object>();
+ switch (selectKind) {
+ case METHOD_CALL:
+ input = getMethods();
+ break;
+ case PATTERN_CALL:
+ input = getPatterns();
+ break;
+ case PATTERNINJECTED_CALL:
+ input = getPatterns();
+ break;
+ default:
+ return null;
+ }
+ List callsNew = new ArrayList();
+ if (!"".equals(name)) { //$NON-NLS-1$
+ String currentName = ""; //$NON-NLS-1$
+ for (Object currentItemData : input) {
+ if (selectKind == CallTypeEnum.METHOD_CALL) {
+ if (currentItemData instanceof PatternMethod) {
+ currentName = ((PatternMethod) currentItemData).getName().toLowerCase();
+ }
+ } else if (selectKind == CallTypeEnum.PATTERN_CALL || selectKind == CallTypeEnum.PATTERNINJECTED_CALL) {
+ if (currentItemData instanceof Pattern) {
+ currentName = ((Pattern) currentItemData).getName().toLowerCase();
+ }
+ }
+ if (PatternElementSelectionDialog.searchContainer(currentName, name)) {
+ callsNew.add(currentItemData);
+ }
+ }
+ } else {
+ callsNew.addAll(input);
+ }
+ parentTableViewer.setInput(callsNew);
+ return callsNew;
+ }
+
+ /**
+ * Get the selection content.
+ */
+ protected void getSelectionContent() {
+ int selectParentTableIndex = parentTableViewer.getTable().getSelectionIndex();
+ if (selectParentTableIndex >= 0) {
+ Object selectParentItem = parentTableViewer.getElementAt(selectParentTableIndex);
+ switch (selectKind) {
+ case METHOD_CALL:
+ getSelectMethodCallList();
+ PatternMethod patternMethod = (PatternMethod) selectParentItem;
+ MethodCall methodCall = PatternFactory.eINSTANCE.createMethodCall();
+ methodCall.setCalled(patternMethod);
+ selectCall = methodCall;
+ return;
+ case PATTERN_CALL:
+ Pattern patternKind_1 = (Pattern) selectParentItem;
+ PatternCall patternCall = PatternFactory.eINSTANCE.createPatternCall();
+ patternCall.setCalled(patternKind_1);
+ selectCall = patternCall;
+ return;
+ case PATTERNINJECTED_CALL:
+ Pattern patternKind_2 = (Pattern) selectParentItem;
+ PatternInjectedCall patternInjectedCall = PatternFactory.eINSTANCE.createPatternInjectedCall();
+ patternInjectedCall.setCalled(patternKind_2);
+ // Get the select PatternVariable.
+ int selectChildTableIndex = childTableViewer.getTable().getSelectionIndex();
+ Object selectChildItem = childTableViewer.getElementAt(selectChildTableIndex);
+ if (selectChildItem instanceof PatternVariable) {
+ PatternVariable patternVariable = (PatternVariable) selectChildItem;
+ patternInjectedCall.setContext(patternVariable);
+ }
+ selectCall = patternInjectedCall;
+ return;
+ }
+ }
+ }
+
+ /**
+ * Get select method calls.
+ */
+ private void getSelectMethodCallList() {
+ selectMethodCallList = new ArrayList<MethodCall>();
+ TableItem[] selection = parentTableViewer.getTable().getSelection();
+ for (TableItem item : selection) {
+ Object data = item.getData();
+ PatternMethod patternMethod = (PatternMethod) data;
+ MethodCall methodCall = PatternFactory.eINSTANCE.createMethodCall();
+ methodCall.setCalled(patternMethod);
+ selectMethodCallList.add(methodCall);
+ }
+ }
+
+ /**
+ * Update the new patternCall if the user set a new callee pattern.
+ */
+ private void setParameterMatchingCall(Object call) {
+ if (selectKind == CallTypeEnum.PATTERN_CALL && call != null && call instanceof PatternCall) {
+ PatternCall patternCall = (PatternCall) call;
+ ((ParameterMatchingPage) getNextPage()).setPatternCall(patternCall);
+ }
+ }
+
+ /**
+ * If pattern call is chosen, the second is for selecting the pattern to
+ * call and the the third one is for matching manually the parameters.
+ */
+ public IWizardPage getNextPage() {
+ if (selectKind == CallTypeEnum.PATTERN_CALL)
+ return super.getNextPage();
+ return null;
+ }
+
+ /**
+ * Return the selection content.
+ */
+ public Call getChooseCall() {
+ if (selectKind == CallTypeEnum.PATTERN_CALL) {
+ return ((ParameterMatchingPage) getNextPage()).getPatternCall();
+ }
+ return selectCall;
+ }
+
+ public List<MethodCall> getChooseMethodCallList() {
+ return selectMethodCallList;
+ }
+
+ private void canFinish(boolean isFinish) {
+ canFinish = isFinish;
+ }
+
+ public boolean canFinish() {
+ return canFinish;
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/wizards/pages/ChooseKindPage.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/wizards/pages/ChooseKindPage.java
new file mode 100644
index 0000000..7d12581
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/wizards/pages/ChooseKindPage.java
@@ -0,0 +1,146 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.wizards.pages;
+
+import org.eclipse.egf.pattern.ui.Messages;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class ChooseKindPage extends WizardPage {
+
+ private CallTypeEnum selectedKind;
+
+ private Button methodCall;
+
+ private Button patternCall;
+
+ private Button patternInjectedCall;
+
+ private Button superPatternCall;
+
+ private Button strategyCall;
+
+ private Label label;
+
+ public ChooseKindPage(ISelection selection) {
+ super(Messages.ChooseKindPage_title);
+ setTitle(Messages.ChooseKindPage_title);
+ setDescription(Messages.ChooseKindPage_description);
+ }
+
+ public void createControl(Composite parent) {
+ Composite container = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ container.setLayout(layout);
+
+ label = new Label(container, SWT.NONE);
+ label.setText(Messages.ChooseKindPage_label_text);
+
+ methodCall = new Button(container, SWT.RADIO);
+ methodCall.setText(Messages.ChooseKindPage_radio_methodCall);
+ selectedKind = CallTypeEnum.METHOD_CALL;
+ methodCall.setSelection(true);
+ methodCall.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ selectedKind = CallTypeEnum.METHOD_CALL;
+ getContainer().updateButtons();
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ patternCall = new Button(container, SWT.RADIO);
+ patternCall.setText(Messages.ChooseKindPage_radio_patternCall);
+ patternCall.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ selectedKind = CallTypeEnum.PATTERN_CALL;
+ getContainer().updateButtons();
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ patternInjectedCall = new Button(container, SWT.RADIO);
+ patternInjectedCall.setText(Messages.ChooseKindPage_radio_patternInjectedCall);
+ patternInjectedCall.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ selectedKind = CallTypeEnum.PATTERNINJECTED_CALL;
+ getContainer().updateButtons();
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ superPatternCall = new Button(container, SWT.RADIO);
+ superPatternCall.setText(Messages.ChooseKindPage_radio_superPatternCall);
+ superPatternCall.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ selectedKind = CallTypeEnum.SUPERPATTERN_CALL;
+ getContainer().updateButtons();
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ strategyCall = new Button(container, SWT.RADIO);
+ strategyCall.setText(Messages.ChooseKindPage_radio_backCall);
+ strategyCall.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ selectedKind = CallTypeEnum.BACK_CALL;
+ getContainer().updateButtons();
+ // setPageComplete(true);
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ setControl(container);
+ }
+
+ public IWizardPage getNextPage() {
+ // if (isPageComplete())
+ // return null;
+ return super.getNextPage();
+ }
+
+ public CallTypeEnum getKind() {
+ return selectedKind;
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/wizards/pages/ChooseMethodCallPage.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/wizards/pages/ChooseMethodCallPage.java
new file mode 100644
index 0000000..39902c8
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/wizards/pages/ChooseMethodCallPage.java
@@ -0,0 +1,39 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.wizards.pages;
+
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Table;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class ChooseMethodCallPage extends ChooseCallPage {
+
+ public ChooseMethodCallPage(Pattern pattern, ISelection selection, Object eidtItem) {
+ super(pattern, selection, eidtItem);
+ }
+
+ @Override
+ protected Table createParentTable() {
+ Table listTable = new Table(container, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER | SWT.MULTI);
+ return listTable;
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/wizards/pages/ChooseTypePage.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/wizards/pages/ChooseTypePage.java
new file mode 100644
index 0000000..e2a3150
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/wizards/pages/ChooseTypePage.java
@@ -0,0 +1,312 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009-2010 Thales Corporate Services S.A.S. and other
+ * 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
+ * XiaoRu Chen, Soyatec
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.wizards.pages;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.egf.pattern.ecore.EPackageHelper;
+import org.eclipse.egf.pattern.ui.ImageShop;
+import org.eclipse.egf.pattern.ui.Messages;
+import org.eclipse.egf.pattern.ui.editors.dialogs.EcoreModelSelectionDialog;
+import org.eclipse.egf.pattern.ui.editors.dialogs.JavaTypeSelectionDialog;
+import org.eclipse.egf.pattern.ui.editors.providers.EcoreContentProvider;
+import org.eclipse.egf.pattern.ui.editors.providers.EcoreLabelProvider;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.EcoreSwitch;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerComparator;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.jface.window.Window;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.IWizardContainer;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.TabFolder;
+import org.eclipse.swt.widgets.TabItem;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeColumn;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class ChooseTypePage extends WizardPage {
+
+ private String chooseType;
+
+ private JavaTypeSelectionDialog dialog;
+
+ private TabFolder tabFolder;
+
+ private TransactionalEditingDomain editingDomain;
+
+ private TreeViewer ecoreTypeTreeViewer;
+
+ private String type;
+
+ private static final String PARAMETER_TYPE_DEFAULT_VALUE = "http://www.eclipse.org/emf/2002/Ecore"; //$NON-NLS-1$
+
+ public ChooseTypePage(ISelection selection, TransactionalEditingDomain editingDomain, String type) {
+ super(Messages.ChooseTypePage_title);
+ setTitle(Messages.ChooseTypePage_title);
+ setDescription(Messages.ChooseTypePage_description);
+ this.editingDomain = editingDomain;
+ this.type = type;
+ }
+
+ public void createControl(Composite parent) {
+ Composite container = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ container.setLayout(layout);
+ createTabFolder(container);
+ setControl(container);
+ initContent();
+ }
+
+ /**
+ * Get the types of default model.
+ */
+ private void initContent() {
+ String nsURI;
+ if (!"".equals(type) && type != null) { //$NON-NLS-1$
+ int index = type.indexOf("#//"); //$NON-NLS-1$
+ if (index != -1) {
+ nsURI = type.substring(0, index);
+ } else {
+ nsURI = PARAMETER_TYPE_DEFAULT_VALUE;
+ }
+ } else {
+ nsURI = PARAMETER_TYPE_DEFAULT_VALUE;
+ }
+ EPackage ePackage = EPackageHelper.REGISTRY.getEPackage(nsURI);
+ if (ePackage != null) {
+ ecoreTypeTreeViewer.setInput(ePackage.eResource().getContents());
+ ecoreTypeTreeViewer.expandToLevel(2);
+ }
+ }
+
+ private void createTabFolder(Composite container) {
+ tabFolder = new TabFolder(container, SWT.NONE);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ tabFolder.setLayoutData(gd);
+
+ TabItem coreTypeTabItem = new TabItem(tabFolder, SWT.NONE);
+ coreTypeTabItem.setText(Messages.ChooseTypePage_coreTypeTabItem_title);
+ coreTypeTabItem.setImage(ImageShop.get(ImageShop.IMG_CATEGORY_OBJ));
+
+ Composite compositeCoreType = new Composite(tabFolder, SWT.NONE);
+ createEcoreType(compositeCoreType);
+ coreTypeTabItem.setControl(compositeCoreType);
+
+ TabItem javaTypeTabItem = new TabItem(tabFolder, SWT.NONE);
+ javaTypeTabItem.setText(Messages.ChooseTypePage_javaTypeTabItem_title);
+ javaTypeTabItem.setImage(ImageShop.get(ImageShop.IMG_CLASS_OBJ));
+
+ Composite compositeJavaType = new Composite(tabFolder, SWT.NONE);
+ dialog = new JavaTypeSelectionDialog(compositeJavaType.getShell(), getWizard());
+ compositeJavaType.setLayout(new GridLayout());
+ dialog.createPage(compositeJavaType);
+ compositeJavaType.addDisposeListener(new DisposeListener() {
+ public void widgetDisposed(DisposeEvent e) {
+ dialog.close();
+ }
+ });
+ javaTypeTabItem.setControl(compositeJavaType);
+ }
+
+ /**
+ * Create the ecoreType tabItem.
+ */
+ private void createEcoreType(final Composite compositeEcoreType) {
+ GridLayout layout = new GridLayout();
+ compositeEcoreType.setLayout(layout);
+
+ Composite container = new Composite(compositeEcoreType, SWT.NONE);
+ layout = new GridLayout();
+ layout.marginWidth = 5;
+ container.setLayout(layout);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ container.setLayoutData(gd);
+
+ Tree tree = new Tree(container, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
+ gd = new GridData(GridData.FILL_BOTH);
+ gd.heightHint = tree.getItemHeight() * 11;
+ tree.setLayoutData(gd);
+
+ TreeColumn treeColumn = new TreeColumn(tree, SWT.NONE);
+ treeColumn.setWidth(500);
+
+ ecoreTypeTreeViewer = new TreeViewer(tree);
+ ecoreTypeTreeViewer.setLabelProvider(new EcoreLabelProvider());
+ ecoreTypeTreeViewer.setComparator(new ViewerComparator() {
+ private final EcoreSwitch<Integer> _switch = new EcoreSwitch<Integer>() {
+
+ @Override
+ public Integer caseEClassifier(EClassifier object) {
+
+ return 2;
+ }
+
+ @Override
+ public Integer caseEPackage(EPackage object) {
+
+ return 1;
+ }
+ };
+
+ @Override
+ public int category(Object element) {
+ if (element instanceof EObject)
+ return _switch.doSwitch((EObject) element);
+ return 10;
+ }
+ });
+ ecoreTypeTreeViewer.addFilter(new ViewerFilter() {
+
+ @Override
+ public boolean select(Viewer viewer, Object parentElement, Object element) {
+ // TODO at present time, we don't support DataType as type for
+ // PatternParameter
+ return element instanceof EClass || element instanceof EPackage;
+ }
+ });
+ ecoreTypeTreeViewer.setContentProvider(new EcoreContentProvider());
+ ecoreTypeTreeViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+
+ public void selectionChanged(SelectionChangedEvent event) {
+ selectType();
+ }
+ });
+
+ ecoreTypeTreeViewer.addDoubleClickListener(new IDoubleClickListener() {
+
+ public void doubleClick(DoubleClickEvent event) {
+ IWizard wizard = getWizard();
+ wizard.performFinish();
+ IWizardContainer wizardContainer = wizard.getContainer();
+ if (wizardContainer instanceof WizardDialog) {
+ ((WizardDialog) wizardContainer).close();
+ }
+ }
+ });
+
+ Button button = new Button(compositeEcoreType, SWT.PUSH);
+ button.setText(Messages.ChooseTypePage_choose_model_button_title);
+ button.addListener(SWT.Selection, new Listener() {
+ public void handleEvent(Event event) {
+ selectType();
+ EcoreModelSelectionDialog chooseModelDialog = new EcoreModelSelectionDialog(compositeEcoreType.getShell(), editingDomain);
+ if (chooseModelDialog.open() == Window.OK) {
+ String returnUri = chooseModelDialog.getURIText();
+ searchTypeModel(returnUri);
+ ecoreTypeTreeViewer.expandToLevel(2);
+ }
+ }
+ });
+ }
+
+ private void selectType() {
+ ISelection selection = ecoreTypeTreeViewer.getSelection();
+ Object selectItem = ((IStructuredSelection) selection).getFirstElement();
+ String nsURI = ""; //$NON-NLS-1$
+ String typeName = ""; //$NON-NLS-1$
+ if (selectItem instanceof EPackage) {
+ nsURI = ((EPackage) selectItem).getNsURI();
+ typeName = ((EPackage) selectItem).eClass().getName();
+ } else if (selectItem instanceof EClassifier) {
+ EClassifier selectItem2 = (EClassifier) selectItem;
+ nsURI = getEPackageNsURI(selectItem2);
+ typeName = selectItem2.getName();
+ }
+ if (!("".equals(nsURI) && "".equals(typeName))) { //$NON-NLS-1$ //$NON-NLS-2$
+ chooseType = nsURI + "#//" + typeName; //$NON-NLS-1$
+ }
+
+ }
+
+ /**
+ * Get the content's ns_uri.
+ */
+ private String getEPackageNsURI(EObject eObject) {
+ EObject eContainer = ((EObject) eObject).eContainer();
+ if (eContainer instanceof EPackage) {
+ String nsURI = ((EPackage) eContainer).getNsURI();
+ return nsURI;
+ }
+ return getEPackageNsURI(eContainer);
+ }
+
+ protected void searchTypeModel(String returnUri) {
+ String[] uris = returnUri.split(" "); //$NON-NLS-1$
+ List<EObject> resources = new ArrayList<EObject>();
+ for (String uri : uris) {
+ int indexOf = (uri.toLowerCase()).indexOf(Messages.ChooseTypePage_ecore_file);
+ if (indexOf != -1) {
+ Resource resource = editingDomain.loadResource(uri);
+ if (resource != null)
+ resources.addAll(resource.getContents());
+ }
+ }
+ ecoreTypeTreeViewer.setInput(resources);
+ }
+
+ /**
+ * Drop any package or uri information of the type.
+ */
+ public static String getType(String type) {
+ if (type == null || type.length() == 0) //$NON-NLS-1$
+ return ""; //$NON-NLS-1$
+ int index = type.lastIndexOf("."); //$NON-NLS-1$
+ if (index != -1)
+ return type.substring(index + 1);
+ return type;
+ }
+
+ public String getType() {
+ return chooseType;
+ }
+
+ public JavaTypeSelectionDialog getJavaTypePage() {
+ return dialog;
+ }
+
+ public boolean isInCoreTab() {
+ return (tabFolder.getSelectionIndex() == 0);
+ }
+
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/wizards/pages/ParameterMatchingPage.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/wizards/pages/ParameterMatchingPage.java
new file mode 100644
index 0000000..0647809
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/editors/wizards/pages/ParameterMatchingPage.java
@@ -0,0 +1,455 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.editors.wizards.pages;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map.Entry;
+
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternCall;
+import org.eclipse.egf.model.pattern.PatternParameter;
+import org.eclipse.egf.model.pattern.impl.Paramerter2ParameterMapImpl;
+import org.eclipse.egf.pattern.ui.ImageShop;
+import org.eclipse.egf.pattern.ui.Messages;
+import org.eclipse.egf.pattern.ui.editors.providers.CommonListContentProvider;
+import org.eclipse.egf.pattern.ui.editors.providers.ParameterMatchingLibraryProvider;
+import org.eclipse.egf.pattern.ui.editors.providers.ParametersTableLabelProvider;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.EMap;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+
+/**
+ * @author XiaoRu Chen - Soyatec
+ *
+ */
+public class ParameterMatchingPage extends WizardPage {
+
+ private Pattern patternCaller;
+
+ private Pattern patternCallee;
+
+ private Label patternCalleeNameLabel;
+
+ private TableViewer calleeTableViewer;
+
+ private TableViewer matchingTableViewer;
+
+ private TableViewer callerTableViewer;
+
+ private Button createMatch;
+
+ private Button deleteMatch;
+
+ private Button editMatch;
+
+ private PatternCall call;
+
+ private TransactionalEditingDomain transactionalEditingDomain;
+
+ private List<RecordingCommand> matchingCommands;
+
+ public ParameterMatchingPage(ISelection selection, Pattern patternCaller, TransactionalEditingDomain transactionalEditingDomain) {
+ super(Messages.ParameterMatchingPage_title);
+ setTitle(Messages.ParameterMatchingPage_title);
+ setDescription(Messages.ParameterMatchingPage_label_text);
+
+ this.patternCaller = patternCaller;
+ this.transactionalEditingDomain = transactionalEditingDomain;
+ }
+
+ public void createControl(Composite parent) {
+ Composite dialogArea = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ dialogArea.setLayout(layout);
+
+ createParameterArea(dialogArea);
+ createMatchingArea(dialogArea);
+
+ setControl(dialogArea);
+ }
+
+ private void createParameterArea(Composite dialogArea) {
+ Composite parameterArea = createArea(dialogArea, true);
+
+ createCallerArea(parameterArea);
+ createCalleeArea(parameterArea);
+ createMatingButton(parameterArea);
+ }
+
+ private void createMatingButton(Composite parameterArea) {
+ createMatch = new Button(parameterArea, SWT.PUSH);
+ createMatch.setText(Messages.ParameterMatchingPage_button_create);
+
+ GridData gd = new GridData();
+ gd.widthHint = 200;
+ gd.horizontalSpan = 2;
+ gd.horizontalAlignment = SWT.CENTER;
+ gd.verticalIndent = 0;
+ createMatch.setLayoutData(gd);
+ createMatch.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ createMatching();
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+ }
+
+ private void createMatchingArea(Composite dialogArea) {
+ Composite parameterArea = createArea(dialogArea, false);
+
+ Label currenMatchingLabel = new Label(parameterArea, SWT.NONE);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ gd.horizontalIndent = 9;
+ currenMatchingLabel.setLayoutData(gd);
+ currenMatchingLabel.setText(Messages.ParameterMatchingPage_current_mathings_title);
+
+ Table table = new Table(parameterArea, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
+ gd = new GridData(GridData.FILL_BOTH);
+ gd.heightHint = 160;
+ gd.horizontalIndent = 7;
+ gd.verticalIndent = 0;
+ table.setLayoutData(gd);
+
+ TableColumn tableColumn = new TableColumn(table, SWT.NONE);
+ tableColumn.setWidth(420);
+ matchingTableViewer = new TableViewer(table);
+ matchingTableViewer.setLabelProvider(new ParameterMatchingLibraryProvider());
+ matchingTableViewer.setContentProvider(new CommonListContentProvider());
+ matchingTableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+
+ public void selectionChanged(SelectionChangedEvent event) {
+ checkEidtAndDeleteButtonEnable();
+ }
+
+ });
+ createMatchingAreaButtons(parameterArea);
+ }
+
+ private void createMatchingAreaButtons(Composite parameterArea) {
+ Composite buttonsArea = new Composite(parameterArea, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ buttonsArea.setLayout(layout);
+
+ deleteMatch = createButton(buttonsArea);
+ deleteMatch.setToolTipText(Messages.ParameterMatchingPage_button_delete);
+ deleteMatch.setText(""); //$NON-NLS-1$
+ deleteMatch.setImage(ImageShop.get(ImageShop.IMG_DELETE_OBJ));
+ deleteMatch.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ deleteMatching();
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ editMatch = createButton(buttonsArea);
+ editMatch.setToolTipText(Messages.ParameterMatchingPage_button_edit);
+ editMatch.setText(""); //$NON-NLS-1$
+ editMatch.setImage(ImageShop.get(ImageShop.IMG_EDIT_OBJ));
+ }
+
+ private Composite createArea(Composite composite, boolean makeColumnsEqualWidth) {
+ Composite container = new Composite(composite, SWT.NONE);
+ GridLayout layout = new GridLayout(2, makeColumnsEqualWidth);
+
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ gd.verticalIndent = 0;
+ container.setLayout(layout);
+ container.setLayoutData(gd);
+ return container;
+ }
+
+ private void createCallerArea(Composite dialogArea) {
+ Composite callerArea = createCallArea(dialogArea);
+ createPatternNameLabel(callerArea, patternCaller);
+ callerTableViewer = createParameterTableViewer(callerArea, patternCaller);
+ callerTableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+
+ public void selectionChanged(SelectionChangedEvent event) {
+ checkCreateButtonEnable();
+ }
+
+ });
+ }
+
+ private void createCalleeArea(Composite dialogArea) {
+ Composite calleeArea = createCallArea(dialogArea);
+ patternCalleeNameLabel = createPatternNameLabel(calleeArea, patternCallee);
+ calleeTableViewer = createParameterTableViewer(calleeArea, patternCallee);
+ calleeTableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+
+ public void selectionChanged(SelectionChangedEvent event) {
+ checkCreateButtonEnable();
+ }
+
+ });
+ }
+
+ private Label createPatternNameLabel(Composite container, Pattern pattern) {
+ Label patternNameLabel = new Label(container, SWT.NONE);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ patternNameLabel.setLayoutData(gd);
+ setPatternName(pattern, patternNameLabel); //$NON-NLS-1$ //$NON-NLS-2$
+ return patternNameLabel;
+ }
+
+ private TableViewer createParameterTableViewer(Composite container, Pattern pattern) {
+ Table listTable = new Table(container, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ gd.heightHint = listTable.getItemHeight();
+ listTable.setLayoutData(gd);
+
+ TableColumn tableColumn = new TableColumn(listTable, SWT.NONE);
+ tableColumn.setWidth(260);
+ TableViewer tableViewer = new TableViewer(listTable);
+ tableViewer.setLabelProvider(new ParametersTableLabelProvider());
+ tableViewer.setContentProvider(new CommonListContentProvider());
+
+ return tableViewer;
+ }
+
+ private Composite createCallArea(Composite container) {
+ Composite callArea = new Composite(container, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ callArea.setLayout(layout);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ callArea.setLayoutData(gd);
+ return callArea;
+ }
+
+ private Button createButton(Composite container) {
+ Button button = new Button(container, SWT.PUSH);
+ GridData gd = new GridData();
+ gd.widthHint = 60;
+ button.setLayoutData(gd);
+ return button;
+ }
+
+ private List<PatternParameter> getCallerTableInput(Pattern pattern) {
+ return pattern == null ? null : pattern.getParameters();
+ }
+
+ private List<PatternParameter> getCalleeTableInput(Pattern pattern) {
+ if (pattern == null) {
+ return null;
+ }
+ EList<PatternParameter> parameters = pattern.getParameters();
+ List<PatternParameter> availableParameters = new ArrayList<PatternParameter>();
+ EMap<PatternParameter, PatternParameter> parameterMatching = call.getParameterMatching();
+ for (PatternParameter parameter : parameters) {
+ if (isAvailableParameter(parameter, parameterMatching)) {
+ availableParameters.add(parameter);
+ }
+ }
+
+ return availableParameters;
+ }
+
+ /**
+ * Check whether the parameter is available.
+ */
+ private boolean isAvailableParameter(PatternParameter parameter, EMap<PatternParameter, PatternParameter> parameterMatching) {
+ for (int i = 0; i < parameterMatching.size(); i++) {
+ Entry<PatternParameter, PatternParameter> currentEntry = parameterMatching.get(i);
+ PatternParameter currentKey = currentEntry.getKey();
+ if (currentKey.equals(parameter)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ private void checkCreateButtonEnable() {
+ if ((getSelection(callerTableViewer) != null) && (getSelection(calleeTableViewer) != null)) {
+ createMatch.setEnabled(true);
+ } else {
+ createMatch.setEnabled(false);
+ }
+ }
+
+ private void checkEidtAndDeleteButtonEnable() {
+ if ((getSelection(matchingTableViewer) != null)) {
+ deleteMatch.setEnabled(true);
+ editMatch.setEnabled(true);
+ } else {
+ deleteMatch.setEnabled(false);
+ editMatch.setEnabled(false);
+ }
+ }
+
+ /**
+ * Return the selection of the tableViewer.
+ */
+ private Object getSelection(TableViewer tableViewer) {
+ int selectionIndex = tableViewer.getTable().getSelectionIndex();
+ if (selectionIndex != -1) {
+ return tableViewer.getElementAt(selectionIndex);
+ }
+ return null;
+ }
+
+ /**
+ * Create a new parameter matching.
+ */
+ private void createMatching() {
+ final PatternParameter callerParameter = (PatternParameter) getSelection(callerTableViewer);
+ final PatternParameter calleeParameter = (PatternParameter) getSelection(calleeTableViewer);
+ int selectIndex = calleeTableViewer.getTable().getSelectionIndex();
+ RecordingCommand cmd = new RecordingCommand(transactionalEditingDomain) {
+ protected void doExecute() {
+ call.getParameterMatching().put(calleeParameter, callerParameter);
+ }
+ };
+ transactionalEditingDomain.getCommandStack().execute(cmd);
+ matchingCommands.add(cmd);
+ refreshTables();
+ setSelection(calleeTableViewer, selectIndex);
+ }
+
+ /**
+ * Delete a new parameter matching.
+ */
+ private void deleteMatching() {
+ final Paramerter2ParameterMapImpl deleteItem = (Paramerter2ParameterMapImpl) getSelection(matchingTableViewer);
+ int selectIndex = matchingTableViewer.getTable().getSelectionIndex();
+ RecordingCommand cmd = new RecordingCommand(transactionalEditingDomain) {
+ protected void doExecute() {
+ call.getParameterMatching().remove(deleteItem);
+ }
+ };
+ transactionalEditingDomain.getCommandStack().execute(cmd);
+ matchingCommands.add(cmd);
+ refreshTables();
+ setSelection(matchingTableViewer, selectIndex);
+ }
+
+ private void refreshTables() {
+ matchingTableViewer.setInput(getMatchingList());
+ calleeTableViewer.setInput(getCalleeTableInput(patternCallee));
+ setMissingInformation();
+ }
+
+ /**
+ * Get the matchingTableViewer's input.
+ */
+ private EMap<PatternParameter, PatternParameter> getMatchingList() {
+ EMap<PatternParameter, PatternParameter> parameterMatching = null;
+ parameterMatching = call.getParameterMatching();
+ return parameterMatching;
+ }
+
+ /**
+ * Update the patterCallee table.
+ */
+ public void setVisible(boolean visible) {
+ if (visible) {
+ matchingCommands = new ArrayList<RecordingCommand>();
+ updatePatternCallee();
+ callerTableViewer.setInput(getCallerTableInput(patternCaller));
+ refreshTables();
+ checkCreateButtonEnable();
+ checkEidtAndDeleteButtonEnable();
+ }
+ super.setVisible(visible);
+ }
+
+ private String getPatternName(String name) {
+ return name + ((name == null || name.equals("")) ? "" : ":"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ }
+
+ /**
+ * Set the display pattern name label.
+ */
+ private void setPatternName(Pattern pattern, Label label) {
+ String patternName = pattern == null ? "" : pattern.getName(); //$NON-NLS-1$
+ label.setText(getPatternName(patternName));
+ }
+
+ /**
+ * Refresh the patternCallee area.
+ */
+ private void updatePatternCallee() {
+ setPatternName(patternCallee, patternCalleeNameLabel);
+ calleeTableViewer.setInput(getCallerTableInput(patternCallee));
+ }
+
+ /**
+ * Set new selection after refresh the tableViewr.
+ */
+ private void setSelection(TableViewer tableViewer, int oldIndex) {
+ int len = tableViewer.getTable().getItemCount();
+ if (len > 0) {
+ if (oldIndex == len) {
+ tableViewer.getTable().setSelection(oldIndex - 1);
+ } else if (oldIndex < len) {
+ tableViewer.getTable().setSelection(oldIndex);
+ }
+ }
+ checkCreateButtonEnable();
+ checkEidtAndDeleteButtonEnable();
+ }
+
+ /**
+ * If there is no available caller parameters or callee parameters to
+ * setup,show the information in the page.
+ */
+ private void setMissingInformation() {
+ String message = null;
+ if (callerTableViewer.getTable().getItemCount() == 0 || calleeTableViewer.getTable().getItemCount() == 0) {
+ message = Messages.ParameterMatchingPage_missing_information;
+ }
+ setMessage(message, INFORMATION);
+ }
+
+ public void setPatternCall(PatternCall call) {
+ this.call = call;
+ }
+
+ public PatternCall getPatternCall() {
+ return call;
+ }
+
+ public void setPatternCallee(Pattern patternCallee) {
+ this.patternCallee = patternCallee;
+ }
+
+ public List<RecordingCommand> getParameterMatchingCommands() {
+ return matchingCommands;
+ }
+}
diff --git a/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/extension/ExtensionUIHelper.java b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/extension/ExtensionUIHelper.java
new file mode 100644
index 0000000..e9a44ec
--- /dev/null
+++ b/org.eclipse.egf.pattern.ui/src/org/eclipse/egf/pattern/ui/extension/ExtensionUIHelper.java
@@ -0,0 +1,31 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ui.extension;
+
+import org.eclipse.egf.pattern.extension.PatternExtension;
+import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ *
+ * @author Thomas Guiu
+ *
+ */
+public class ExtensionUIHelper {
+ public static Image getImage(PatternExtension pe) {
+ return ExtendedImageRegistry.getInstance().getImage(pe.getImageURL());
+ }
+}
diff --git a/org.eclipse.egf.pattern/.classpath b/org.eclipse.egf.pattern/.classpath
new file mode 100644
index 0000000..2d1a430
--- /dev/null
+++ b/org.eclipse.egf.pattern/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.egf.pattern/.project b/org.eclipse.egf.pattern/.project
new file mode 100644
index 0000000..fad4a3d
--- /dev/null
+++ b/org.eclipse.egf.pattern/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.pattern</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.pattern/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egf.pattern/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..a62a984
--- /dev/null
+++ b/org.eclipse.egf.pattern/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:53:25 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.egf.pattern/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egf.pattern/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..2dd2e55
--- /dev/null
+++ b/org.eclipse.egf.pattern/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Fri Sep 11 13:58:46 CEST 2009
+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/org.eclipse.egf.pattern/META-INF/MANIFEST.MF b/org.eclipse.egf.pattern/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..44c5957
--- /dev/null
+++ b/org.eclipse.egf.pattern/META-INF/MANIFEST.MF
@@ -0,0 +1,31 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-ClassPath: .
+Bundle-SymbolicName: org.eclipse.egf.pattern;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-Activator: org.eclipse.egf.pattern.Activator
+Bundle-Localization: plugin
+Require-Bundle:
+ org.eclipse.core.runtime,
+ org.eclipse.egf.model;visibility:=reexport,
+ org.eclipse.jdt.core,
+ org.eclipse.egf.core;visibility:=reexport,
+ org.eclipse.emf.query,
+ org.eclipse.emf.transaction;visibility:=reexport
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package:
+ org.eclipse.egf.pattern,
+ org.eclipse.egf.pattern.collector,
+ org.eclipse.egf.pattern.common.java,
+ org.eclipse.egf.pattern.ecore,
+ org.eclipse.egf.pattern.engine,
+ org.eclipse.egf.pattern.execution,
+ org.eclipse.egf.pattern.extension,
+ org.eclipse.egf.pattern.query,
+ org.eclipse.egf.pattern.strategy,
+ org.eclipse.egf.pattern.strategy.modeldriven,
+ org.eclipse.egf.pattern.templates,
+ org.eclipse.egf.pattern.utils
+Bundle-Vendor: %providerName
diff --git a/org.eclipse.egf.pattern/about.html b/org.eclipse.egf.pattern/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/org.eclipse.egf.pattern/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/org.eclipse.egf.pattern/build.properties b/org.eclipse.egf.pattern/build.properties
new file mode 100644
index 0000000..3cb128c
--- /dev/null
+++ b/org.eclipse.egf.pattern/build.properties
@@ -0,0 +1,18 @@
+##
+# 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
+##
+source.. = src/
+output.. = bin/
+bin.includes = .,\
+ META-INF/,\
+ about.html,\
+ plugin.xml,\
+ plugin.properties
+src.includes = about.html
diff --git a/org.eclipse.egf.pattern/plugin.properties b/org.eclipse.egf.pattern/plugin.properties
new file mode 100644
index 0000000..aeb10c5
--- /dev/null
+++ b/org.eclipse.egf.pattern/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 Pattern (Incubation)
+providerName = Eclipse Modeling Project
diff --git a/org.eclipse.egf.pattern/plugin.xml b/org.eclipse.egf.pattern/plugin.xml
new file mode 100644
index 0000000..0e133ab
--- /dev/null
+++ b/org.eclipse.egf.pattern/plugin.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension-point id="org.eclipse.egf.pattern.extension" name="Pattern Extension" schema="schema/org.eclipse.egf.pattern.extension.exsd"/>
+ <extension-point id="org.eclipse.egf.query" name="Pattern Query" schema="schema/org.eclipse.egf.query.exsd"/>
+
+ <extension
+ point="org.eclipse.egf.query">
+ <query
+ id="org.eclipse.egf.pattern.basic.query"
+ name="Basic query"
+ class="org.eclipse.egf.pattern.query.BasicQueryDelegate">
+ </query>
+ <query
+ class="org.eclipse.egf.pattern.query.EObjectInjectedContextQuery"
+ id="org.eclipse.egf.pattern.query.EObjectInjectedContextQuery"
+ name="Injection query">
+ </query>
+ </extension>
+
+ <extension
+ point="org.eclipse.egf.core.platform.manager">
+ <manager
+ extension="org.eclipse.egf.query"
+ class="org.eclipse.egf.pattern.query.QueryFactory"/>
+ </extension>
+
+
+</plugin>
diff --git a/org.eclipse.egf.pattern/schema/org.eclipse.egf.pattern.extension.exsd b/org.eclipse.egf.pattern/schema/org.eclipse.egf.pattern.extension.exsd
new file mode 100644
index 0000000..93be14a
--- /dev/null
+++ b/org.eclipse.egf.pattern/schema/org.eclipse.egf.pattern.extension.exsd
@@ -0,0 +1,102 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.egf.pattern" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.egf.pattern" id="org.eclipse.egf.pattern.extension" name="Pattern Extension"/>
+ </appinfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="flavor"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="flavor">
+ <complexType>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn="org.eclipse.egf.pattern.extension.PatternExtension:"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/org.eclipse.egf.pattern/schema/org.eclipse.egf.query.exsd b/org.eclipse.egf.pattern/schema/org.eclipse.egf.query.exsd
new file mode 100644
index 0000000..6272f8d
--- /dev/null
+++ b/org.eclipse.egf.pattern/schema/org.eclipse.egf.query.exsd
@@ -0,0 +1,116 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.egf.pattern" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.egf.pattern" id="org.eclipse.egf.query" name="Pattern Query"/>
+ </appinfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="query" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="query">
+ <complexType>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.egf.pattern.query.IQuery"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/Activator.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/Activator.java
new file mode 100644
index 0000000..ca731ac
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/Activator.java
@@ -0,0 +1,82 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern;
+
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.egf.common.activator.EGFAbstractPlugin;
+import org.eclipse.egf.pattern.ecore.EPackageListener;
+import org.eclipse.egf.pattern.ecore.RegistryReader;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ *
+ * @author Guiu
+ */
+public class Activator extends EGFAbstractPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.egf.pattern";
+
+ // The shared instance
+ private static Activator plugin;
+
+ private final EPackageListener resourceListener = new EPackageListener();
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
+ * )
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ // set up ecore model registry with workspace models
+ new RegistryReader().load();
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceListener);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
+ * )
+ */
+ public void stop(BundleContext context) throws Exception {
+ ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceListener);
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/Messages.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/Messages.java
new file mode 100644
index 0000000..b16b1c0
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/Messages.java
@@ -0,0 +1,106 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class Messages extends NLS {
+
+ public static String translation_job_label;
+
+ // refactoring
+ public static String refactoring_error1;
+
+ // Initializer
+ public static String initializer_error1;
+ public static String initializer_error2;
+
+ // Extension
+ public static String extension_error1;
+ public static String extension_error2;
+ public static String extension_error3;
+
+ // classloader
+ public static String classloader_error1;
+ public static String classloader_error2;
+ public static String classloader_error3;
+ public static String classloader_error4;
+
+ // file helper
+ public static String fileHelper_error1;
+ public static String fileHelper_error2;
+ public static String fileHelper_error3;
+
+ // assembly
+ public static String assembly_error1;
+ public static String assembly_error2;
+ public static String assembly_error3;
+ public static String assembly_error4;
+ public static String assembly_error5;
+ public static String assembly_error6;
+ public static String assembly_error7;
+ public static String assembly_error8;
+ public static String assembly_error9;
+ public static String assembly_error10;
+
+ // builder
+ public static String PatternBuilding_Failed;
+ public static String PatternBuilding_warning;
+
+ // filename management
+ public static String PatternFilename_error1;
+ public static String PatternFilename_error2;
+ public static String PatternFilename_error3;
+
+ // query
+ public static String query_error1;
+ public static String query_error2;
+ public static String query_error3;
+ public static String query_error4;
+ public static String query_error5;
+ public static String query_error6;
+ public static String query_error7;
+ public static String query_error8;
+
+ // epackage registry
+ public static String registration_error2;
+ public static String registration_error1;
+
+ // strategies
+ public static String strategy_error3;
+ public static String strategy_error2;
+ public static String strategy_error1;
+ public static String strategy_error4;
+
+ public static String collect_error1;
+ public static String collect_error2;
+
+ public static String missing_callback_handler;
+
+ public static String engine_error1;
+ public static String call_execution_error1;
+ public static String model_driven_strategy_error1;
+
+ private static final String BUNDLE_NAME = "org.eclipse.egf.pattern.PatternMessages";//$NON-NLS-1$
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/PatternConstants.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/PatternConstants.java
new file mode 100644
index 0000000..25516f7
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/PatternConstants.java
@@ -0,0 +1,26 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern;
+
+/**
+ * @author Guiu
+ *
+ */
+public interface PatternConstants {
+
+ String PATTERN_UNIT_FILE_EXTENSION = "pt"; //$NON-NLS-1$
+
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/PatternMessages.properties b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/PatternMessages.properties
new file mode 100644
index 0000000..9ec64b0
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/PatternMessages.properties
@@ -0,0 +1,63 @@
+missing_callback_handler = There is no callback handler
+refactoring_error1=Can't update template
+translation_job_label = Pattern translations
+
+initializer_error1 = Path for method ''{0}'' is null
+initializer_error2 = Cannot get file for method ''{0}''
+
+extension_error1 = Cannot find extension for nature ''{0}''
+extension_error2 = Expected pattern nature is ''{0}'', got ''{1}''
+extension_error3 = Cannot compute icon url for the extension
+
+classloader_error1 = Cannot find class ''{0}''
+classloader_error2 = Cannot get output folder for project ''{0}''
+classloader_error3 = Cannot load type ''{0}'' with nsuri ''{1}''
+classloader_error4 = Cannot create engine since there is no bundleId for pattern ''{0}''
+
+fileHelper_error1 = Cannot get bundle ''{0}''
+fileHelper_error2 = Cannot get entry ''{0}'' from bundle ''{1}''
+fileHelper_error3 = The platformFactoryComponent is null
+
+assembly_error1 = unexpected type ''{0}''
+assembly_error2 = Cannot find method ''{0}''
+assembly_error3 = Cannot translate pattern ''{0}'' because ''{1}''
+assembly_error4 = Cannot find associated project in workspace.
+assembly_error5 = Cannot find header template file.
+assembly_error6 = The insertion index has not been computed.
+assembly_error7 = Cannot compute the literal value for type ''{0}''
+assembly_error8 = The orchestration of pattern ''{0}'' is empty
+assembly_error9 = The associated query is null for parameter ''{0}'' (ID: ''{1}'')
+assembly_error10 = There is no parameter matching available for pattern ''{0}''
+
+
+engine_error1 = pattern is null
+call_execution_error1 = Cannot find parameter ''{0}'' in pattern ''{1}''
+model_driven_strategy_error1=expecting exactly one parameter.
+
+PatternBuilding_Failed= Pattern building has failed.
+PatternBuilding_warning= Unexpected number of pattern to build.
+PatternFilename_error1 = Null value
+PatternFilename_error2 = Expecting at least 3 segments in filepath value ''{0}''
+PatternFilename_error3 = The segment has an unexpected format ''{0}'' (it should be ''{1}PATTERN_ID'')
+
+query_error1 = BasicQueryManager only supports EClass parameters
+query_error2 = The extension id for query manager is empty.
+query_error3 = Cannot load query manager extension ''{0}''
+query_error4 = Expecting exactly one query manager, got ''{0}''
+query_error5 = The query manager class is empty.
+query_error6 = Cannot find the query manager for ''{0}''
+query_error7 = Cannot load the query manager for ''{0}'' [class = ''{1}'']
+query_error8 = The domain is null
+
+registration_error2= Cannot register package ''{0}'' from project ''{1}''
+registration_error1= Error during initial registering of ecore models
+
+strategy_error1 = Don't how to deal with object ''{0}''
+strategy_error3 = The strategy parameter is null
+strategy_error2 = Wrong type for the strategy parameter (expecting ''{0}'' got ''{1}'')
+strategy_error4 = The pattern ''{0}'' needs exactly one parameter.
+
+collect_error1 = Cannot collect patterns from resource ''{0}''
+collect_error2 = Cannot collect pattern libraries from resource ''{0}''
+
+
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/PatternPreferences.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/PatternPreferences.java
new file mode 100644
index 0000000..7a1c02b
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/PatternPreferences.java
@@ -0,0 +1,31 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern;
+
+/**
+ * @author Guiu
+ *
+ */
+public class PatternPreferences {
+
+ public static String getGenerationFolderName() {
+ return "generated";
+ }
+
+ public static String getTemplatesFolderName() {
+ return "templates";
+ }
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/collector/Collector.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/collector/Collector.java
new file mode 100644
index 0000000..6cd5bff
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/collector/Collector.java
@@ -0,0 +1,110 @@
+package org.eclipse.egf.pattern.collector;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.Viewpoint;
+import org.eclipse.egf.model.fcore.ViewpointContainer;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternElement;
+import org.eclipse.egf.model.pattern.PatternLibrary;
+import org.eclipse.egf.model.pattern.PatternPackage;
+import org.eclipse.egf.model.pattern.PatternViewpoint;
+import org.eclipse.emf.ecore.EObject;
+
+public abstract class Collector<E extends PatternElement> {
+
+ protected Collector() {
+ super();
+ }
+
+ protected final void doCollect(EObject source, final Set<E> result, final Set<String> ids) {
+ if (FcorePackage.eINSTANCE.equals(source.eClass().getEPackage())) {
+ switch (source.eClass().getClassifierID()) {
+ case FcorePackage.FACTORY_COMPONENT:
+ ViewpointContainer viewpointContainer = ((FactoryComponent) source).getViewpointContainer();
+ if (viewpointContainer != null) {
+ for (Viewpoint viewpoint : viewpointContainer.getViewpoints())
+ doCollect(viewpoint, result, ids);
+ }
+ return;
+ }
+ } else if (PatternPackage.eINSTANCE.equals(source.eClass().getEPackage())) {
+ switch (source.eClass().getClassifierID()) {
+ case PatternPackage.PATTERN_VIEWPOINT:
+ casePatternViewpoint((PatternViewpoint) source, result, ids);
+ return;
+ case PatternPackage.PATTERN_LIBRARY:
+ casePatternLibrary((PatternLibrary) source, result, ids);
+ return;
+ case PatternPackage.PATTERN:
+ casePattern((Pattern) source, result, ids);
+ return;
+ }
+ }
+ }
+
+ protected void casePattern(Pattern source, final Set<E> result, final Set<String> ids) {
+ }
+
+ protected void casePatternLibrary(PatternLibrary source, final Set<E> result, final Set<String> ids) {
+ for (PatternElement elem : ((PatternLibrary) source).getElements())
+ doCollect(elem, result, ids);
+ }
+
+ protected void casePatternViewpoint(PatternViewpoint source, final Set<E> result, final Set<String> ids) {
+ for (PatternLibrary lib : source.getLibraries())
+ doCollect(lib, result, ids);
+ return;
+ }
+
+ public void collect(EObject source, final Set<E> result) {
+ collect(source, result, EMPTY_ID_SET);
+ }
+
+ public void collect(EObject source, final Set<E> result, final Set<String> ids) {
+ if (ids == null)
+ throw new IllegalArgumentException();
+ if (result == null)
+ throw new IllegalArgumentException();
+ if (source == null)
+ throw new IllegalArgumentException();
+ doCollect(source, result, ids);
+ }
+
+ public void collect(List<EObject> source, final Set<E> result) {
+ collect(source, result, EMPTY_ID_SET);
+ }
+
+ public void collect(List<EObject> source, final Set<E> result, final Set<String> ids) {
+ if (ids == null)
+ throw new IllegalArgumentException();
+ if (result == null)
+ throw new IllegalArgumentException();
+ if (source == null)
+ throw new IllegalArgumentException();
+ for (EObject obj : source)
+ collect(obj, result, ids);
+ }
+
+ public void collect(EObject[] source, final Set<E> result) {
+ collect(source, result, EMPTY_ID_SET);
+ }
+
+ public void collect(EObject[] source, final Set<E> result, final Set<String> ids) {
+ if (ids == null)
+ throw new IllegalArgumentException();
+ if (result == null)
+ throw new IllegalArgumentException();
+ if (source == null)
+ throw new IllegalArgumentException();
+ for (EObject obj : source)
+ collect(obj, result, ids);
+ }
+
+ public static final Set<String> EMPTY_ID_SET = new HashSet<String>();
+
+}
\ No newline at end of file
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/collector/PatternCollector.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/collector/PatternCollector.java
new file mode 100644
index 0000000..b223dcf
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/collector/PatternCollector.java
@@ -0,0 +1,43 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.collector;
+
+import java.util.Set;
+
+import org.eclipse.egf.model.pattern.Pattern;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class PatternCollector extends Collector<Pattern> {
+
+ public static final PatternCollector INSTANCE = new PatternCollector();
+
+ @Override
+ protected void casePattern(Pattern source, Set<Pattern> result, Set<String> ids) {
+ final Pattern pattern = (Pattern) source;
+ final String id = pattern.getID();
+ if (ids == null || ids.isEmpty() || (id != null && ids.contains(id)))
+ result.add(pattern);
+ }
+
+ private PatternCollector() {
+ super();
+
+ }
+
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/collector/PatternElementCollector.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/collector/PatternElementCollector.java
new file mode 100644
index 0000000..5664d12
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/collector/PatternElementCollector.java
@@ -0,0 +1,51 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.collector;
+
+import java.util.Set;
+
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternElement;
+import org.eclipse.egf.model.pattern.PatternLibrary;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class PatternElementCollector extends Collector<PatternElement> {
+
+ public static final PatternElementCollector INSTANCE = new PatternElementCollector();
+
+ @Override
+ protected void casePatternLibrary(PatternLibrary lib, Set<PatternElement> result, Set<String> ids) {
+ final String id = lib.getID();
+ if (ids == null || ids.isEmpty() || (id != null && ids.contains(id)))
+ result.add(lib);
+ super.casePatternLibrary(lib, result, ids);
+ }
+
+ protected void casePattern(Pattern source, Set<PatternElement> result, Set<String> ids) {
+ final Pattern pattern = (Pattern) source;
+ final String id = pattern.getID();
+ if (ids == null || ids.isEmpty() || (id != null && ids.contains(id)))
+ result.add(pattern);
+ }
+
+ private PatternElementCollector() {
+ super();
+ }
+
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/collector/PatternLibraryCollector.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/collector/PatternLibraryCollector.java
new file mode 100644
index 0000000..e325b44
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/collector/PatternLibraryCollector.java
@@ -0,0 +1,42 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.collector;
+
+import java.util.Set;
+
+import org.eclipse.egf.model.pattern.PatternLibrary;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class PatternLibraryCollector extends Collector<PatternLibrary> {
+
+ public static final PatternLibraryCollector INSTANCE = new PatternLibraryCollector();
+
+ @Override
+ protected void casePatternLibrary(PatternLibrary lib, Set<PatternLibrary> result, Set<String> ids) {
+ final String id = lib.getID();
+ if (ids == null || ids.isEmpty() || (id != null && ids.contains(id)))
+ result.add(lib);
+ super.casePatternLibrary(lib, result, ids);
+ }
+
+ private PatternLibraryCollector() {
+ super();
+ }
+
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/common/java/AbstractJavaAssemblyContentProvider.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/common/java/AbstractJavaAssemblyContentProvider.java
new file mode 100644
index 0000000..a3f954a
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/common/java/AbstractJavaAssemblyContentProvider.java
@@ -0,0 +1,114 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.common.java;
+
+import java.util.Map.Entry;
+
+import org.eclipse.egf.common.constant.EGFCommonConstants;
+import org.eclipse.egf.model.pattern.BackCall;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternCall;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.model.pattern.PatternInjectedCall;
+import org.eclipse.egf.model.pattern.PatternParameter;
+import org.eclipse.egf.model.pattern.SuperCall;
+import org.eclipse.egf.pattern.Messages;
+import org.eclipse.egf.pattern.engine.AssemblyContentProvider;
+import org.eclipse.egf.pattern.engine.AssemblyHelper;
+import org.eclipse.egf.pattern.engine.ParameterMatcher;
+import org.eclipse.egf.pattern.engine.PatternHelper;
+import org.eclipse.egf.pattern.utils.JavaMethodGenerationHelper;
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public abstract class AbstractJavaAssemblyContentProvider extends AssemblyContentProvider {
+
+ protected final JavaMethodGenerationHelper javaMethodHelper;
+
+ public AbstractJavaAssemblyContentProvider(Pattern pattern, JavaMethodGenerationHelper helper) {
+ super(pattern);
+ this.javaMethodHelper = helper;
+ }
+
+ @Override
+ protected void call(BackCall object) throws PatternException {
+ content.append("{").append(EGFCommonConstants.LINE_SEPARATOR);
+ content.append("final Map<String, Object> parameters = new HashMap<String, Object>();").append(EGFCommonConstants.LINE_SEPARATOR);
+ content.append("index = ictx.getBuffer().length();").append(EGFCommonConstants.LINE_SEPARATOR);
+ content.append("ictx.getExecutionBuffer().append(ictx.getBuffer());").append(EGFCommonConstants.LINE_SEPARATOR);
+
+ EList<PatternParameter> allParameters = pattern.getAllParameters();
+ for (org.eclipse.egf.model.pattern.PatternParameter parameter : allParameters) {
+ String name = parameter.getName();
+ content.append("parameters.put(\"").append(name).append("\", this.").append(name).append(");").append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+ content.append("CallbackContext ctx_callback = new CallbackContext(ictx);").append(EGFCommonConstants.LINE_SEPARATOR);
+
+ content.append("CallHelper.callBack(ctx_callback, parameters);").append(EGFCommonConstants.LINE_SEPARATOR);
+ content.append("}").append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+
+ @Override
+ protected void call(SuperCall call) throws PatternException {
+ if (call.getPattern().getSuperPattern() == null)
+ return;
+ content.append("super.").append(AssemblyHelper.ORCHESTRATION_METHOD).append("(new SuperOrchestrationContext(ictx));").append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+
+ @Override
+ protected void call(PatternInjectedCall call) throws PatternException {
+ Pattern pattern = call.getCalled();
+ String ctxName = "ctx_" + PatternHelper.generateID();
+ content.append("ExecutionContext ").append(ctxName).append(" = new ExecutionContext(ictx);").append(EGFCommonConstants.LINE_SEPARATOR);
+ content.append(ctxName).append(".setValue(").append("PatternContext.INJECTED_CONTEXT, ").append(call.getContext().getName()).append(");").append(EGFCommonConstants.LINE_SEPARATOR);
+ content.append("CallHelper.execute(\"").append(pattern.getID()).append("\", ").append(ctxName).append(");").append(EGFCommonConstants.LINE_SEPARATOR).append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+
+ @Override
+ protected void call(PatternCall call) throws PatternException {
+ Pattern pattern = call.getCalled();
+
+ content.append("{").append(EGFCommonConstants.LINE_SEPARATOR);
+ content.append("final Map<String, Object> parameters = new HashMap<String, Object>();").append(EGFCommonConstants.LINE_SEPARATOR);
+ if (call.getParameterMatching().isEmpty()) {
+ // try to match parameters
+ ParameterMatcher matcher = ParameterMatcher.create(call.getPattern(), pattern);
+ if (!matcher.matches())
+ throw new PatternException(Messages.bind(Messages.assembly_error10, call.getPattern().getName()));
+ for (PatternParameter key : matcher.getMatching().keySet()) {
+ content.append("parameters.put(\"").append(key.getName()).append("\", this.").append(matcher.getMatching().get(key).getName()).append(");").append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+ } else {
+ for (Entry<PatternParameter, PatternParameter> binding : call.getParameterMatching()) {
+ content.append("parameters.put(\"").append(binding.getKey().getName()).append("\", this.").append(binding.getValue().getName()).append(");").append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+ }
+ String ctxName = "ctx_" + PatternHelper.generateID();
+ content.append("ExecutionContext ").append(ctxName).append(" = new ExecutionContext(ictx);").append(EGFCommonConstants.LINE_SEPARATOR);
+
+ content.append("CallHelper.executeWithInjection(\"").append(pattern.getID()).append("\", ").append(ctxName).append(", parameters);").append(EGFCommonConstants.LINE_SEPARATOR);
+ content.append("}").append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+
+ public void setContent(StringBuilder content) {
+ super.setContent(content);
+ javaMethodHelper.setContent(content);
+ }
+
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/common/java/AbstractJavaEngine.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/common/java/AbstractJavaEngine.java
new file mode 100644
index 0000000..ebfddff
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/common/java/AbstractJavaEngine.java
@@ -0,0 +1,130 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.common.java;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternContext;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.model.pattern.PatternExecutionReporter;
+import org.eclipse.egf.model.pattern.PatternParameter;
+import org.eclipse.egf.pattern.Messages;
+import org.eclipse.egf.pattern.PatternPreferences;
+import org.eclipse.egf.pattern.engine.AssemblyHelper;
+import org.eclipse.egf.pattern.engine.PatternEngine;
+import org.eclipse.egf.pattern.execution.ConsoleReporter;
+import org.eclipse.egf.pattern.execution.InternalPatternContext;
+import org.eclipse.egf.pattern.utils.JavaMethodGenerationHelper;
+import org.eclipse.egf.pattern.utils.ParameterTypeHelper;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public abstract class AbstractJavaEngine extends PatternEngine {
+
+ public AbstractJavaEngine(Pattern pattern) throws PatternException {
+ super(pattern);
+ }
+
+ @Override
+ public final void executeWithInjection(PatternContext context, Map<PatternParameter, Object> parameters) throws PatternException {
+ setupExecutionReporter((InternalPatternContext) context);
+ doExecute((InternalPatternContext) context, AssemblyHelper.ORCHESTRATION_METHOD, parameters);
+ }
+
+ @Override
+ public final void execute(PatternContext context) throws PatternException {
+
+ setupExecutionReporter((InternalPatternContext) context);
+ doExecute((InternalPatternContext) context, AssemblyHelper.GENERATE_METHOD, null);
+ }
+
+ private void doExecute(InternalPatternContext context, String methodName, Map<PatternParameter, Object> parameters) throws PatternException {
+ try {
+ Class<?> templateClass = loadTemplateClass(context, getPatternClassname());
+ Object template = templateClass.newInstance();
+ Class<?>[] parameterClasses = new Class<?>[1];
+ Object[] parameterValues = new Object[] { context };
+ if (AssemblyHelper.GENERATE_METHOD.equals(methodName)) {
+ parameterClasses[0] = Object.class;
+ } else if (AssemblyHelper.ORCHESTRATION_METHOD.equals(methodName)) {
+ parameterClasses[0] = PatternContext.class;
+ // setting up the state of the pattern
+ Class<?>[] setterClasses = new Class<?>[1];
+ Object[] setterValues = new Object[1];
+ for (Map.Entry<PatternParameter, Object> entry : parameters.entrySet()) {
+ String setterMethod = JavaMethodGenerationHelper.getSetterMethod(entry.getKey());
+ String type = ParameterTypeHelper.INSTANCE.getTypeLiteral(entry.getKey().getType());
+ setterClasses[0] = loadTemplateClass(context, type);
+ setterValues[0] = entry.getValue();
+ Method method = templateClass.getMethod(setterMethod, setterClasses);
+ method.invoke(template, setterValues);
+ }
+ } else
+ throw new IllegalStateException();
+
+ // finally execute the pattern call
+ Method method = templateClass.getMethod(methodName, parameterClasses);
+ // the pattern is executed but we don't care about the result.
+ method.invoke(template, parameterValues);
+ } catch (InvocationTargetException e) {
+ throw new PatternException(e.getCause());
+ } catch (PatternException e) {
+ throw e;
+ } catch (Exception e) {
+ throw new PatternException(e);
+ }
+
+ }
+
+ protected abstract String getPatternClassname() throws PatternException;
+
+ private void setupExecutionReporter(InternalPatternContext context) throws PatternException {
+ if (context.hasReporter())
+ return;
+ PatternExecutionReporter reporter = (PatternExecutionReporter) context.getValue(PatternContext.PATTERN_REPORTER);
+ if (reporter == null)
+ reporter = new ConsoleReporter();
+ context.setReporter(reporter);
+ }
+
+ protected IPath computeFilePath(String classname) {
+ if (classname == null || "".equals(classname))
+ throw new IllegalArgumentException();
+
+ IPath result = new Path(PatternPreferences.getGenerationFolderName());
+ String[] names = classname.split("\\.");
+ for (String name : names) {
+ result = result.append(name);
+ }
+ result = result.addFileExtension("java");
+ return result;
+ }
+
+ protected Class<?> loadTemplateClass(InternalPatternContext context, String type) throws PatternException, ClassNotFoundException {
+ if (type == null)
+ throw new PatternException(Messages.assembly_error1);
+ Class<?> templateClass = context.getBundle(getBundleId()).loadClass(type);
+ return templateClass;
+ }
+
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/common/java/BaseJavaPatternInitializer.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/common/java/BaseJavaPatternInitializer.java
new file mode 100644
index 0000000..7269d8c
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/common/java/BaseJavaPatternInitializer.java
@@ -0,0 +1,35 @@
+package org.eclipse.egf.pattern.common.java;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.pattern.engine.PatternHelper;
+import org.eclipse.egf.pattern.extension.TemplateInitializer;
+import org.eclipse.egf.pattern.templates.TemplateEngine;
+
+public abstract class BaseJavaPatternInitializer extends TemplateInitializer {
+
+ private static final String CLASS_KEY = "CLASS";
+ private static final String PACKAGE_KEY = "PACKAGE";
+ private Map<String, String> ctx;
+
+ public BaseJavaPatternInitializer(IProject project, Pattern pattern, TemplateEngine engine) {
+ super(project, pattern, engine);
+ }
+
+ @Override
+ protected Map<String, String> createContext() {
+ if (ctx != null)
+ return ctx;
+ ctx = new HashMap<String, String>();
+ ctx.put(CLASS_KEY, PatternHelper.dropNonWordCharacter(getPattern().getName()));
+ String fullLibraryName = PatternHelper.getFullLibraryName(getPattern());
+ if (fullLibraryName == null || "".equals(fullLibraryName))
+ fullLibraryName = "default_package";
+ ctx.put(PACKAGE_KEY, fullLibraryName);
+ return ctx;
+ }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/ecore/EPackageHelper.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/ecore/EPackageHelper.java
new file mode 100644
index 0000000..fee1763
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/ecore/EPackageHelper.java
@@ -0,0 +1,175 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ecore;
+
+import java.lang.reflect.Field;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.egf.core.helper.ResourceHelper;
+import org.eclipse.egf.pattern.Messages;
+import org.eclipse.egf.pattern.engine.ProjectClassLoaderHelper;
+import org.eclipse.emf.codegen.ecore.genmodel.GenModel;
+import org.eclipse.emf.codegen.ecore.genmodel.GenPackage;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EPackageRegistryImpl;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+
+/**
+ * The purpose is to handle ecore models from the workspace as well as runtime
+ * ones.
+ *
+ * TODO Une fois terminée, cette classe devrait pltot se trouver dans core ou
+ * platform <br>
+ * TODO revoir l'utilisation de ProjectClassLoaderHelper <br>
+ *
+ * @author Thomas Guiu
+ *
+ */
+public class EPackageHelper {
+ public static final String INSTANCE_FIELD_NAME = "eINSTANCE";
+
+ public static final EPackage.Registry REGISTRY = new EPackageRegistryImpl(EPackage.Registry.INSTANCE);
+ private static final Map<String, String> nsuri2basePackage = new HashMap<String, String>();
+
+ private static EPackage getTopEPackage(EPackage ePackage) {
+ if (ePackage.getESuperPackage() != null)
+ return getTopEPackage(ePackage.getESuperPackage());
+ return ePackage;
+ }
+
+ public static String getBasePackage(EPackage ePackage) {
+ String name = nsuri2basePackage.get(ePackage.getNsURI());
+ if (name != null)
+ return name;
+ String nsUri = getTopEPackage(ePackage).getNsURI();
+ URI uri = EcorePlugin.getEPackageNsURIToGenModelLocationMap().get(nsUri);
+ Resource res = loadResource(uri);
+ for (EObject obj : res.getContents()) {
+ if (obj instanceof GenModel) {
+ GenModel genModel = (GenModel) obj;
+ for (GenPackage gPack : genModel.getAllGenPackagesWithClassifiers()) {
+ EPackage ecorePackage = gPack.getEcorePackage();
+ if (ePackage.getName().equals(ecorePackage.getName()) && ePackage.getNsPrefix().equals(ecorePackage.getNsPrefix()) && ePackage.getNsURI().equals(ecorePackage.getNsURI())) {
+ String basePackageName = gPack.getInterfacePackageName();
+ nsuri2basePackage.put(ePackage.getNsURI(), basePackageName);
+ return basePackageName;
+ }
+ }
+ }
+ }
+
+ return null;
+ }
+
+ public static void unregisterPackage(IProject project, String classname) throws RegistrationException {
+ try {
+ Class<?> loadClass = ProjectClassLoaderHelper.getProjectClassLoader(project).loadClass(classname);
+ Field declaredField = loadClass.getDeclaredField(INSTANCE_FIELD_NAME);
+
+ EPackage ePackage = (EPackage) declaredField.get(null);
+ String nsURI = ePackage.getNsURI();
+ removePackage2registry(ePackage);
+ nsuri2basePackage.remove(nsURI);
+ } catch (Exception e) {
+ throw new RegistrationException(Messages.bind(Messages.registration_error2, classname, project.getName()), e);
+ }
+
+ }
+
+ /**
+ * This method will be used by the workspace resource listener
+ */
+ public static void registerPackage(IProject project, String classname) throws RegistrationException {
+ try {
+ Class<?> loadClass = ProjectClassLoaderHelper.getProjectClassLoader(project).loadClass(classname);
+ Field declaredField = loadClass.getDeclaredField(INSTANCE_FIELD_NAME);
+
+ EPackage ePackage = (EPackage) declaredField.get(null);
+ String nsURI = ePackage.getNsURI();
+
+ addPackage2registry(ePackage);
+
+ // computing basePackage
+ int index = classname.lastIndexOf(".");
+ if (index == -1)
+ throw new IllegalStateException();
+ if (index == 0)
+ nsuri2basePackage.put(nsURI, "");
+ else
+ // to remove the last dot
+ nsuri2basePackage.put(nsURI, classname.substring(0, index));
+ } catch (Exception e) {
+ throw new RegistrationException(Messages.bind(Messages.registration_error2, classname, project.getName()), e);
+ }
+ }
+
+ private static void addPackage2registry(EPackage ePackage) {
+ String nsURI = ePackage.getNsURI();
+ REGISTRY.put(nsURI, new Descriptor(ePackage));
+ for (EPackage child : ePackage.getESubpackages())
+ addPackage2registry(child);
+ }
+
+ private static void removePackage2registry(EPackage ePackage) {
+ String nsURI = ePackage.getNsURI();
+ REGISTRY.remove(nsURI);
+ for (EPackage child : ePackage.getESubpackages())
+ removePackage2registry(child);
+ }
+
+ public static class RegistrationException extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ private RegistrationException(String message, Throwable cause) {
+ super(message, cause);
+ }
+ }
+
+ private static Resource loadResource(URI uri) {
+ // TODO it may be interesting to keep loaded resources for future
+ // uses ... however, workspace resources may change.
+ ResourceSetImpl set = new ResourceSetImpl();
+ Resource res = ResourceHelper.loadResource(set, uri);
+ return res;
+ }
+
+ private static class Descriptor implements EPackage.Descriptor {
+ private EPackage epackage;
+
+ public Descriptor(EPackage ePackage) {
+ super();
+ this.epackage = ePackage;
+ }
+
+ public EFactory getEFactory() {
+
+ return epackage.getEFactoryInstance();
+ }
+
+ public EPackage getEPackage() {
+
+ return epackage;
+ }
+
+ }
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/ecore/EPackageListener.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/ecore/EPackageListener.java
new file mode 100644
index 0000000..99c1421
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/ecore/EPackageListener.java
@@ -0,0 +1,84 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ecore;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceDeltaVisitor;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.egf.pattern.Activator;
+import org.eclipse.egf.pattern.ecore.EPackageHelper.RegistrationException;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaCore;
+
+/**
+ * TODO: fix issue when a XXXPackage class is removed.
+ *
+ * @author Thomas Guiu
+ *
+ */
+public class EPackageListener implements IResourceChangeListener {
+
+ private static final String RESOURCE_SUFFIX = "Package.java";
+
+ private final class ResourceDeltaVisitor implements IResourceDeltaVisitor {
+ public boolean visit(IResourceDelta delta) throws CoreException {
+ IResource resource = delta.getResource();
+ if (resource.getType() == IResource.FILE && resource.getName().endsWith(RESOURCE_SUFFIX)) {
+ IProject project = resource.getProject();
+ ICompilationUnit unit = (ICompilationUnit) JavaCore.create(resource);
+ IType type = unit.findPrimaryType();
+ if (type == null || !type.getField(EPackageHelper.INSTANCE_FIELD_NAME).exists())
+ return false;
+
+ String fullyQualifiedName = type.getFullyQualifiedName();
+ try {
+ switch (delta.getKind()) {
+ case IResourceDelta.ADDED:
+ case IResourceDelta.ADDED_PHANTOM:
+ case IResourceDelta.CHANGED:
+ EPackageHelper.registerPackage(project, fullyQualifiedName);
+ break;
+ case IResourceDelta.REMOVED:
+ case IResourceDelta.REMOVED_PHANTOM:
+ EPackageHelper.unregisterPackage(project, fullyQualifiedName);
+ break;
+ }
+ } catch (RegistrationException e) {
+ Activator.getDefault().logWarning(e);
+ }
+ return false;
+ }
+ return true;
+ }
+ }
+
+ public void resourceChanged(IResourceChangeEvent event) {
+ IResourceDelta delta = event.getDelta();
+ if (delta == null)
+ return;
+ try {
+ delta.accept(new ResourceDeltaVisitor());
+ } catch (CoreException e) {
+ Activator.getDefault().logWarning(e);
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/ecore/RegistryReader.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/ecore/RegistryReader.java
new file mode 100644
index 0000000..3dbedd4
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/ecore/RegistryReader.java
@@ -0,0 +1,95 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.ecore;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.egf.pattern.Activator;
+import org.eclipse.egf.pattern.Messages;
+import org.eclipse.egf.pattern.ecore.EPackageHelper.RegistrationException;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.search.IJavaSearchConstants;
+import org.eclipse.jdt.core.search.IJavaSearchScope;
+import org.eclipse.jdt.core.search.SearchEngine;
+import org.eclipse.jdt.core.search.SearchMatch;
+import org.eclipse.jdt.core.search.SearchParticipant;
+import org.eclipse.jdt.core.search.SearchPattern;
+import org.eclipse.jdt.core.search.SearchRequestor;
+import org.eclipse.jdt.core.search.TypeReferenceMatch;
+import org.eclipse.jdt.internal.core.search.JavaSearchParticipant;
+
+/**
+ * This class aims at filling the ecore model registry with model from workspace
+ * projects.
+ *
+ * @author Thomas Guiu
+ *
+ */
+public class RegistryReader {
+ public void load() {
+ List<IJavaProject> projects = new ArrayList<IJavaProject>();
+ for (IProject project : ResourcesPlugin.getWorkspace().getRoot().getProjects()) {
+ try {
+ if (project.isAccessible() && project.hasNature(JavaCore.NATURE_ID)) {
+ projects.add(JavaCore.create(project));
+ }
+ } catch (CoreException e) {
+ Activator.getDefault().logError(e);
+ }
+ }
+ if (projects.isEmpty())
+ return;
+ try {
+ IType ePackageType = null;
+ for (IJavaProject javaProject : projects) {
+ ePackageType = javaProject.findType("org.eclipse.emf.ecore.EPackage"); //$NON-NLS-1$
+ if (ePackageType != null) {
+ break;
+ }
+ }
+ if (ePackageType == null) {
+ return;
+ }
+ IJavaSearchScope scope = SearchEngine.createJavaSearchScope(projects.toArray(new IJavaProject[projects.size()]), IJavaSearchScope.SOURCES | IJavaSearchScope.APPLICATION_LIBRARIES | IJavaSearchScope.REFERENCED_PROJECTS | IJavaSearchScope.REFERENCED_PROJECTS);
+ SearchPattern pattern = SearchPattern.createPattern(ePackageType, IJavaSearchConstants.IMPLEMENTORS);
+ SearchRequestor requestor = new SearchRequestor() {
+
+ @Override
+ public void acceptSearchMatch(SearchMatch match) throws CoreException {
+ if (match instanceof TypeReferenceMatch) {
+ TypeReferenceMatch refMatch = (TypeReferenceMatch) match;
+ IType type = (IType) refMatch.getElement();
+ try {
+ EPackageHelper.registerPackage(type.getJavaProject().getProject(), type.getFullyQualifiedName());
+ } catch (RegistrationException e) {
+ Activator.getDefault().logError(Messages.registration_error1, e);
+ }
+ }
+ }
+ };
+ new SearchEngine().search(pattern, new SearchParticipant[] { new JavaSearchParticipant() }, scope, requestor, null);
+ } catch (Exception e) {
+ Activator.getDefault().logError(Messages.registration_error1, e);
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/engine/AssemblyContentHelper.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/engine/AssemblyContentHelper.java
new file mode 100644
index 0000000..b62e230
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/engine/AssemblyContentHelper.java
@@ -0,0 +1,58 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.engine;
+
+import org.eclipse.egf.model.pattern.Call;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.model.pattern.PatternMethod;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class AssemblyContentHelper {
+ private AssemblyContentProvider provider;
+
+ public AssemblyContentHelper(AssemblyContentProvider provider) {
+ super();
+ this.provider = provider;
+ }
+
+ public void addContent(Call call) throws PatternException {
+ try {
+ provider.doSwitch(call);
+ } catch (AssemblyContentProvider.WrappedException e) {
+ Throwable cause = e.getCause();
+ if (cause instanceof PatternException)
+ throw (PatternException) cause;
+ throw new PatternException(cause);
+ }
+
+ }
+
+ public String getMethodContent(PatternMethod object) throws PatternException {
+ return provider.getMethodContent(object);
+ }
+
+ public AssemblyContentProvider getProvider() {
+ return provider;
+ }
+
+ public void addMethodBodies() throws PatternException {
+ provider.addMethodBodies();
+ }
+
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/engine/AssemblyContentProvider.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/engine/AssemblyContentProvider.java
new file mode 100644
index 0000000..b155756
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/engine/AssemblyContentProvider.java
@@ -0,0 +1,152 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.engine;
+
+import java.io.IOException;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.egf.model.pattern.BackCall;
+import org.eclipse.egf.model.pattern.MethodCall;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternCall;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.model.pattern.PatternInjectedCall;
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.model.pattern.SuperCall;
+import org.eclipse.egf.model.pattern.util.PatternSwitch;
+import org.eclipse.egf.pattern.Messages;
+import org.eclipse.egf.pattern.utils.FileHelper;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public abstract class AssemblyContentProvider extends PatternSwitch<String> {
+
+ protected static final String OK = "ok";
+
+ protected final Pattern pattern;
+ protected StringBuilder content;
+
+ public AssemblyContentProvider(Pattern pattern) {
+ super();
+ this.pattern = pattern;
+ }
+
+ protected abstract void call(MethodCall object) throws PatternException;
+
+ protected abstract void call(PatternCall object) throws PatternException;
+
+ protected abstract void call(BackCall object) throws PatternException;
+
+ protected abstract void call(SuperCall object) throws PatternException;
+
+ protected abstract void addMethodBodies() throws PatternException;
+
+ /**
+ * This method handles pattern calls.<br>
+ * We must provide a context so the called pattern can perform a query to
+ * fill its paremeters.
+ */
+ protected abstract void call(PatternInjectedCall call) throws PatternException;
+
+ @Override
+ public String caseMethodCall(MethodCall object) {
+ try {
+ // PatternMethod called = object.getCalled();
+ // // this statement is used to look up for overridden methods.
+ // called = pattern.getMethod(called.getName());
+ // return getMethodContent(called);
+ call(object);
+ return OK;
+ } catch (PatternException e) {
+ throw new WrappedException(e);
+ }
+ }
+
+ @Override
+ public String casePatternInjectedCall(PatternInjectedCall object) {
+ try {
+ call(object);
+ } catch (PatternException e) {
+ throw new WrappedException(e);
+ }
+ return OK;
+ }
+
+ @Override
+ public String caseBackCall(BackCall object) {
+ try {
+ call(object);
+ } catch (PatternException e) {
+ throw new WrappedException(e);
+ }
+ return OK;
+ }
+
+ @Override
+ public String casePatternCall(PatternCall object) {
+ try {
+ call(object);
+ } catch (PatternException e) {
+ throw new WrappedException(e);
+ }
+ return OK;
+ }
+
+ @Override
+ public String caseSuperCall(SuperCall object) {
+ try {
+ call(object);
+ } catch (PatternException e) {
+ throw new WrappedException(e);
+ }
+ return OK;
+ }
+
+ @Override
+ public String defaultCase(EObject object) {
+
+ throw new IllegalStateException(Messages.bind(Messages.assembly_error1, object.eClass().getName()));
+ }
+
+ protected String getMethodContent(PatternMethod object) throws PatternException {
+ URI uri = object.getPatternFilePath();
+ try {
+ return FileHelper.getContent(PatternHelper.getPlatformFcore(object.getPattern()), uri);
+ } catch (CoreException e) {
+ throw new PatternException(e);
+ } catch (IOException e) {
+ throw new PatternException(e);
+ }
+ }
+
+ public void setContent(StringBuilder content) {
+ this.content = content;
+ }
+
+ static class WrappedException extends RuntimeException {
+
+ public WrappedException(Throwable cause) {
+ super(cause);
+
+ }
+
+ }
+
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/engine/AssemblyHelper.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/engine/AssemblyHelper.java
new file mode 100644
index 0000000..117ac4b
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/engine/AssemblyHelper.java
@@ -0,0 +1,100 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.engine;
+
+import org.eclipse.egf.common.constant.EGFCommonConstants;
+import org.eclipse.egf.model.pattern.Call;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.pattern.Messages;
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public abstract class AssemblyHelper {
+
+ protected final Pattern pattern;
+ protected final StringBuilder content = new StringBuilder(1000);
+ protected int orchestrationIndex;
+ protected final AssemblyContentHelper contentHelper;
+
+ public AssemblyHelper(Pattern pattern, AssemblyContentProvider contentProvider) {
+ super();
+ this.pattern = pattern;
+ this.contentHelper = new AssemblyContentHelper(contentProvider);
+ contentProvider.setContent(content);
+ }
+
+ public String visit() throws PatternException {
+ orchestrationIndex = -1;
+ addHeader();
+ addVariableInitialization();
+ beginOrchestration();
+ if (orchestrationIndex == -1)
+ throw new PatternException(Messages.assembly_error6);
+ visitOrchestration();
+ endOrchestration();
+ addMethodBodies();
+ addFooter();
+ return content.toString();
+ }
+
+ protected void addFooter() throws PatternException {
+ String read = contentHelper.getMethodContent(pattern.getFooterMethod());
+ if (read != null)
+ content.append(read).append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+
+ protected void addHeader() throws PatternException {
+ String read = contentHelper.getMethodContent(pattern.getHeaderMethod());
+ if (read != null)
+ content.append(read).append(EGFCommonConstants.LINE_SEPARATOR);
+ }
+
+ protected void addMethodBodies() throws PatternException {
+ contentHelper.addMethodBodies();
+ }
+
+ /**
+ * This method may code to handle parameter at the orchestrationIndex and at
+ * the current index. The inserted code is mainly a kind of loop containing
+ * the pattern body over the result of the query.
+ */
+ protected void endOrchestration() throws PatternException {
+ }
+
+ protected void beginOrchestration() throws PatternException {
+ orchestrationIndex = content.length();
+ }
+
+ protected abstract void addVariableInitialization() throws PatternException;
+
+ protected void visitOrchestration() throws PatternException {
+ EList<Call> orchestration = pattern.getOrchestration();
+ if (orchestration.isEmpty())
+ return;
+
+ for (Call element : orchestration) {
+ contentHelper.addContent(element);
+ }
+ }
+
+ public static final String GENERATE_METHOD = "generate";
+ public static final String ORCHESTRATION_METHOD = "orchestration";
+
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/engine/ParameterMatcher.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/engine/ParameterMatcher.java
new file mode 100644
index 0000000..498f2b3
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/engine/ParameterMatcher.java
@@ -0,0 +1,89 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.engine;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternParameter;
+
+/**
+ * This class aims at matching parameters between 2 patterns. This matching
+ * could be used as implicit matching when a pattern calls another one.<br>
+ *
+ * For each parameter of the target pattern, we will look for exactly one
+ * parameter from the source pattern who is assignable.
+ *
+ *
+ * @author Thomas Guiu
+ *
+ */
+public class ParameterMatcher {
+ private final Pattern called;
+ private final Pattern caller;
+ private Map<PatternParameter, PatternParameter> matching;
+
+ public boolean matches() {
+ if (matching == null) {
+ matching = new HashMap<PatternParameter, PatternParameter>();
+
+ PatternParameter match = null;
+ for (PatternParameter sParam : called.getAllParameters()) {
+ String type = sParam.getType();
+
+ for (PatternParameter tParam : caller.getAllParameters()) {
+ if (type.equals(tParam.getType())) {
+ if (match == null)
+ match = tParam;
+ else {
+ matching.clear();
+ return false;
+ }
+ }
+ }
+ if (match == null) {
+ matching.clear();
+ return false;
+ }
+ matching.put(sParam, match);
+ match = null;
+ }
+ }
+ if (called.getAllParameters().isEmpty() && caller.getAllParameters().isEmpty())
+ return true;
+ return !matching.isEmpty();
+ }
+
+ public Map<PatternParameter, PatternParameter> getMatching() {
+ if (matching == null)
+ throw new IllegalStateException();
+ return matching;
+ }
+
+ private ParameterMatcher(Pattern caller, Pattern called) {
+ this.called = called;
+ this.caller = caller;
+ }
+
+ public static boolean matches(Pattern caller, Pattern called) {
+ return create(called, caller).matches();
+ }
+
+ public static ParameterMatcher create(Pattern caller, Pattern called) {
+ return new ParameterMatcher(caller, called);
+ }
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/engine/PatternEngine.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/engine/PatternEngine.java
new file mode 100644
index 0000000..d524ae6
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/engine/PatternEngine.java
@@ -0,0 +1,57 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.engine;
+
+import java.util.Map;
+
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternContext;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.model.pattern.PatternParameter;
+import org.eclipse.egf.pattern.Messages;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public abstract class PatternEngine {
+
+ private final Pattern pattern;
+ private final String bundleId;
+
+ public PatternEngine(Pattern pattern) throws PatternException {
+ if (pattern == null)
+ throw new PatternException(Messages.engine_error1);
+ this.pattern = pattern;
+ bundleId = PatternHelper.getPlatformFcore(pattern).getPlatformBundle().getBundleId();
+ if (bundleId == null)
+ throw new PatternException(Messages.classloader_error4);
+ }
+
+ public abstract void executeWithInjection(PatternContext context, Map<PatternParameter, Object> parameters) throws PatternException;
+
+ public abstract void execute(PatternContext context) throws PatternException;
+
+ public abstract void translate() throws PatternException;
+
+ protected Pattern getPattern() {
+ return pattern;
+ }
+
+ protected String getBundleId() {
+ return bundleId;
+ }
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/engine/PatternHelper.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/engine/PatternHelper.java
new file mode 100644
index 0000000..a622bba
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/engine/PatternHelper.java
@@ -0,0 +1,291 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.engine;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.egf.common.constant.EGFCommonConstants;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.core.fcore.IPlatformFcore;
+import org.eclipse.egf.model.fcore.NamedModelElement;
+import org.eclipse.egf.model.fcore.Viewpoint;
+import org.eclipse.egf.model.fcore.ViewpointContainer;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternElement;
+import org.eclipse.egf.model.pattern.PatternLibrary;
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.pattern.Messages;
+import org.eclipse.egf.pattern.PatternConstants;
+import org.eclipse.egf.pattern.PatternPreferences;
+import org.eclipse.egf.pattern.collector.PatternCollector;
+import org.eclipse.egf.pattern.collector.PatternElementCollector;
+import org.eclipse.egf.pattern.collector.PatternLibraryCollector;
+import org.eclipse.egf.pattern.extension.PatternFactory;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class PatternHelper {
+
+ private final ResourceSet resourceSet;
+
+ /**
+ * This method returns a string from the libraries who contain the pattern.
+ * For example: myLib.mySubLib
+ */
+ public static String getFullLibraryName(Pattern pattern) {
+ List<PatternLibrary> libs = new ArrayList<PatternLibrary>();
+ PatternLibrary lib = pattern.getContainer();
+ while (lib != null) {
+ libs.add(lib);
+ lib = lib.getContainer();
+ }
+ if (libs.isEmpty())
+ return EGFCommonConstants.EMPTY_STRING;
+ if (libs.size() == 1)
+ return libs.get(0).getName();
+ StringBuffer buf = new StringBuffer();
+ for (PatternLibrary mylib : libs) {
+ buf.append(mylib.getName()).append('.');
+ }
+ return buf.deleteCharAt(buf.length() - 1).toString();
+ }
+
+ public static IPlatformFcore getPlatformFcore(PatternElement pattern) {
+ return EGFCorePlugin.getPlatformFcore(pattern.eResource());
+ }
+
+ public static String getFactoryConponentName(PatternElement element) {
+ PatternElement container = element.getContainer() == null ? element : element.getContainer();
+ while (container.getContainer() != null)
+ container = container.getContainer();
+ // TODO: update the model so that the library knows about its viewpoint
+ Viewpoint vp = (Viewpoint) container.eContainer();
+ ViewpointContainer vpc = vp.getViewpointContainer();
+
+ return vpc.getFactoryComponent().getName();
+ }
+
+ /**
+ * Return the IProject object who contains the pattern.
+ *
+ * @return null if the FC is deployed in the runtime environment.
+ */
+ public static IProject getProject(Pattern pattern) {
+ IPlatformFcore fcore = getPlatformFcore(pattern);
+ return fcore.getPlatformBundle().getProject();
+ }
+
+ // TODO quick implementation ...
+ public Pattern getPattern(String id) {
+ for (Pattern p : getAllPatterns())
+ if (p.getID().equals(id))
+ return p;
+ return null;
+ }
+
+ public Set<Pattern> getPatterns(URI uri) {
+ Set<Pattern> result = new HashSet<Pattern>();
+ collectPatterns(uri, PatternCollector.EMPTY_ID_SET, result);
+ return result;
+ }
+
+ public Map<String, PatternElement> getPatternElements(Set<String> ids) {
+ Set<PatternElement> result = new HashSet<PatternElement>(200);
+ IPlatformFcore[] platformFcores = EGFCorePlugin.getPlatformFcores();
+ for (IPlatformFcore platformFcore : platformFcores) {
+ URI uri = platformFcore.getURI();
+ try {
+ Resource res = resourceSet.getResource(uri, true);
+ PatternElementCollector.INSTANCE.collect(res.getContents(), result, ids);
+ } catch (Exception e) {
+ org.eclipse.egf.pattern.Activator.getDefault().logError(Messages.bind(Messages.collect_error2, uri.toString()), e);
+ }
+ }
+ Map<String, PatternElement> map = new HashMap<String, PatternElement>(200);
+ for (PatternElement pe : result) {
+ map.put(pe.getID(), pe);
+ }
+ return map;
+ }
+
+ /**
+ * Reads FC models from the given project and return the patterns with the
+ * given ids if any. If the ids set is null all patterns are returned.
+ */
+ public Set<Pattern> getPatterns(IProject project, Set<String> ids) {
+ if (ids == null)
+ ids = new HashSet<String>();
+ Set<Pattern> result = new HashSet<Pattern>();
+ IPlatformFcore[] platformFcores = EGFCorePlugin.getPlatformFcores(project);
+ for (IPlatformFcore platformFcore : platformFcores) {
+ collectPatterns(platformFcore.getURI(), ids, result);
+ }
+ return result;
+ }
+
+ /**
+ * Reads all FC models and return the patterns.
+ */
+ public Set<Pattern> getAllPatterns() {
+ Set<Pattern> result = new HashSet<Pattern>(200);
+ IPlatformFcore[] platformFcores = EGFCorePlugin.getPlatformFcores();
+ for (IPlatformFcore platformFcore : platformFcores) {
+ URI uri = platformFcore.getURI();
+ try {
+ collectPatterns(uri, PatternCollector.EMPTY_ID_SET, result);
+ } catch (Exception e) {
+ org.eclipse.egf.pattern.Activator.getDefault().logError(Messages.bind(Messages.collect_error1, uri.toString()), e);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Reads all FC models and return the pattern libraries.
+ */
+ public Set<PatternLibrary> getAllLibraries() {
+ Set<PatternLibrary> result = new HashSet<PatternLibrary>(200);
+ IPlatformFcore[] platformFcores = EGFCorePlugin.getPlatformFcores();
+ for (IPlatformFcore platformFcore : platformFcores) {
+ URI uri = platformFcore.getURI();
+ try {
+ Resource res = resourceSet.getResource(uri, true);
+ PatternLibraryCollector.INSTANCE.collect(res.getContents(), result, PatternCollector.EMPTY_ID_SET);
+ } catch (Exception e) {
+ org.eclipse.egf.pattern.Activator.getDefault().logError(Messages.bind(Messages.collect_error2, uri.toString()), e);
+ }
+ }
+ return result;
+ }
+
+ private void collectPatterns(URI uri, Set<String> ids, Set<Pattern> collector) {
+ Resource res = resourceSet.getResource(uri, true);
+ PatternCollector.INSTANCE.collect(res.getContents(), collector, ids);
+ }
+
+ public static String generateID() {
+ return EcoreUtil.generateUUID().replaceAll("\\W", "");
+ }
+
+ public static String dropNonWordCharacter(String value) {
+ return value.replaceAll("\\W", "");
+ }
+
+ public static String uniqueName(NamedModelElement parameter) {
+ return parameter.getName().replaceAll("\\W", "") + "_" + parameter.getID().replaceAll("\\W", "");
+ }
+
+ public static String localizeName(org.eclipse.egf.model.pattern.PatternParameter parameter) {
+ return parameter.getName() + "Parameter";
+ }
+
+ public static List<PatternMethod> getUserMethods(Pattern pattern) {
+ ArrayList<PatternMethod> result = new ArrayList<PatternMethod>();
+ for (PatternMethod m : pattern.getMethods()) {
+ String name = m.getName();
+ if (name.equals(PatternFactory.INIT_METHOD_NAME) || name.equals(PatternFactory.HEADER_METHOD_NAME) || name.equals(PatternFactory.FOOTER_METHOD_NAME) || name.equals(PatternFactory.PRECONDITION_METHOD_NAME))
+ continue;
+ result.add(m);
+
+ }
+ return result;
+ }
+
+ public void clear() {
+ for (Resource res : resourceSet.getResources())
+ res.unload();
+ resourceSet.getResources().clear();
+ }
+
+ private PatternHelper(TransactionalEditingDomain domain) {
+ this(domain.getResourceSet());
+ }
+
+ private PatternHelper(ResourceSet resourceSet) {
+ this.resourceSet = resourceSet;
+ }
+
+ public static final PatternHelper TRANSACTIONNAL_COLLECTOR = new PatternHelper(TransactionalEditingDomain.Registry.INSTANCE.getEditingDomain(EGFCorePlugin.EDITING_DOMAIN_ID));
+
+ public static final PatternHelper createCollector() {
+ ResourceSetImpl set = new ResourceSetImpl();
+ // Clear the previous URIConverter content
+ set.getURIConverter().getURIMap().clear();
+ // Assign a fresh platform aware URIConverter
+ set.getURIConverter().getURIMap().putAll(EGFCorePlugin.computePlatformURIMap());
+
+ return new PatternHelper(set);
+ }
+
+ public static class FilenameFormatException extends Exception {
+
+ private static final long serialVersionUID = 1L;
+
+ private FilenameFormatException(String message) {
+ super(message);
+
+ }
+
+ }
+
+ /**
+ * This class manage the relationship between pt file paths and patterns.
+ *
+ * @author Thomas Guiu
+ *
+ */
+
+ public static class Filename {
+ private static final String PATTERN_TOKEN = "pattern.";
+ private static final String METHOD_TOKEN = "method.";
+
+ public static URI computeFileURI(PatternMethod method) {
+ return URI.createFileURI(PatternPreferences.getTemplatesFolderName() + EGFCommonConstants.SLASH_CHARACTER + PATTERN_TOKEN + method.getPattern().getID() + EGFCommonConstants.SLASH_CHARACTER + METHOD_TOKEN + method.getID() + EGFCommonConstants.DOT_CHARACTER + PatternConstants.PATTERN_UNIT_FILE_EXTENSION);
+ }
+
+ public static String extractPatternId(IPath patternMethodPath) throws FilenameFormatException {
+ if (patternMethodPath == null)
+ throw new FilenameFormatException(Messages.PatternFilename_error1);
+
+ int segmentCount = patternMethodPath.segmentCount();
+ if (segmentCount < 3)
+ throw new FilenameFormatException(Messages.bind(Messages.PatternFilename_error2, patternMethodPath));
+ String segment = patternMethodPath.segment(segmentCount - 2);
+ if (segment == null || "".equals(segment) || !segment.startsWith(PATTERN_TOKEN) || PATTERN_TOKEN.length() == segment.length())
+ throw new FilenameFormatException(Messages.bind(Messages.PatternFilename_error3, segment, PATTERN_TOKEN));
+ return segment.substring(PATTERN_TOKEN.length());
+ }
+
+ private Filename() {
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/engine/PatternIDHelper.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/engine/PatternIDHelper.java
new file mode 100644
index 0000000..06bff0f
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/engine/PatternIDHelper.java
@@ -0,0 +1,47 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.engine;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * TODO drop this class and introduce a new type for contracts
+ *
+ * @author Thomas Guiu
+ *
+ */
+public class PatternIDHelper {
+
+ public static String merge(List<String> ids) {
+ if (ids.isEmpty())
+ return "";
+ StringBuilder builder = new StringBuilder(400);
+ for (String id : ids)
+ builder.append(",").append(id);
+
+ return builder.substring(1);
+ }
+
+ public static List<String> split(String value) {
+ String[] split = value.split(",");
+ List<String> result = new ArrayList<String>(split.length);
+ for (String token : split)
+ result.add(token.trim());
+ return result;
+ }
+
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/engine/ProjectClassLoaderHelper.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/engine/ProjectClassLoaderHelper.java
new file mode 100644
index 0000000..d980276
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/engine/ProjectClassLoaderHelper.java
@@ -0,0 +1,64 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.engine;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.egf.common.constant.EGFCommonConstants;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+
+/**
+ * This helper manages a classloader per project in the workspace.
+ *
+ * @author Thomas Guiu
+ *
+ */
+public class ProjectClassLoaderHelper {
+ private final static Map<String, ClassLoader> classLoaders = new HashMap<String, ClassLoader>();
+
+ public static ClassLoader getProjectClassLoader(IProject project) throws MalformedURLException, JavaModelException {
+ String name = project.getName();
+ ClassLoader classLoader = classLoaders.get(name);
+ if (classLoader == null) {
+ classLoader = new URLClassLoader(new URL[] { asURL(project) }, ProjectClassLoaderHelper.class.getClassLoader());
+ classLoaders.put(name, classLoader);
+ }
+ return classLoader;
+ }
+
+ private static URL asURL(IProject project) throws MalformedURLException, JavaModelException {
+ IJavaProject javaProject = JavaCore.create(project);
+
+ IPath outputLocation = javaProject.getOutputLocation();
+ IFolder folder = project.getFolder(outputLocation.removeFirstSegments(1));
+ return new URL("file", null, folder.getLocation().toOSString() + EGFCommonConstants.SLASH_CHARACTER);
+ }
+
+ private ProjectClassLoaderHelper() {
+ super();
+
+ }
+
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/engine/TranslationHelper.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/engine/TranslationHelper.java
new file mode 100644
index 0000000..321dc00
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/engine/TranslationHelper.java
@@ -0,0 +1,90 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.engine;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.egf.model.pattern.AbstractPatternCall;
+import org.eclipse.egf.model.pattern.Call;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.pattern.Activator;
+import org.eclipse.egf.pattern.Messages;
+import org.eclipse.egf.pattern.extension.ExtensionHelper;
+import org.eclipse.egf.pattern.extension.PatternExtension;
+import org.eclipse.egf.pattern.extension.ExtensionHelper.MissingExtensionException;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class TranslationHelper {
+
+ public void translate(final Set<Pattern> patterns) throws PatternException {
+ if (patterns.isEmpty())
+ return;
+ translate(getOrderedList(patterns));
+ }
+
+ public void translate(final List<Pattern> patterns) throws PatternException {
+ if (patterns.isEmpty())
+ return;
+ try {
+ for (Pattern p : patterns) {
+ PatternExtension extension = ExtensionHelper.getExtension(p.getNature());
+ String reason = extension.canTranslate(p);
+ if (reason == null)
+ extension.createEngine(p).translate();
+ else
+ Activator.getDefault().logWarning(Messages.bind(Messages.assembly_error3, p.getName(), reason));
+ }
+ } catch (MissingExtensionException e) {
+ throw new PatternException(e);
+ }
+ }
+
+ private List<Pattern> getOrderedList(Set<Pattern> patterns) {
+ List<Pattern> result = new ArrayList<Pattern>(patterns.size());
+ Set<Pattern> visited = new HashSet<Pattern>(100);
+ for (Pattern p : patterns) {
+ addRequirements(p, result, patterns, visited);
+ }
+ visited.clear();
+ return result;
+ }
+
+ private void addRequirements(Pattern pattern, List<Pattern> result, Set<Pattern> allPatterns, Set<Pattern> visited) {
+ if (visited.contains(pattern))
+ return;
+ visited.add(pattern);
+
+ Pattern superPattern = pattern.getSuperPattern();
+ if (superPattern != null)
+ addRequirements(superPattern, result, allPatterns, visited);
+
+ // list dependencies
+ for (Call call : pattern.getOrchestration()) {
+ if (call instanceof AbstractPatternCall) {
+ addRequirements(((AbstractPatternCall) call).getCalled(), result, allPatterns, visited);
+ }
+ }
+ if (allPatterns.contains(pattern))
+ result.add(pattern);
+ }
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/execution/CallHelper.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/execution/CallHelper.java
new file mode 100644
index 0000000..50ebb89
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/execution/CallHelper.java
@@ -0,0 +1,80 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.execution;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.egf.model.pattern.CallBackHandler;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternContext;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.model.pattern.PatternParameter;
+import org.eclipse.egf.pattern.Activator;
+import org.eclipse.egf.pattern.Messages;
+import org.eclipse.egf.pattern.engine.PatternHelper;
+import org.eclipse.egf.pattern.extension.ExtensionHelper;
+import org.eclipse.egf.pattern.extension.PatternExtension;
+import org.eclipse.egf.pattern.extension.ExtensionHelper.MissingExtensionException;
+
+/**
+ * This is an helper class to ease translation of patterns.
+ *
+ * @author Thomas Guiu
+ *
+ */
+public class CallHelper {
+
+ public static void execute(String patternId, PatternContext ctx) throws MissingExtensionException, PatternException {
+ PatternHelper createCollector = PatternHelper.createCollector();
+ Pattern pattern = createCollector.getPattern(patternId);
+ PatternExtension extension = ExtensionHelper.getExtension(pattern.getNature());
+ String reason = extension.canExecute(pattern);
+ if (reason != null)
+ throw new PatternException(reason);
+ extension.createEngine(pattern).execute(ctx);
+ }
+
+ public static void executeWithInjection(String patternId, PatternContext ctx, Map<String, Object> name2parameterValue) throws MissingExtensionException, PatternException {
+ PatternHelper createCollector = PatternHelper.createCollector();
+ Pattern pattern = createCollector.getPattern(patternId);
+ PatternExtension extension = ExtensionHelper.getExtension(pattern.getNature());
+ String reason = extension.canExecute(pattern);
+ if (reason != null)
+ throw new PatternException(reason);
+ Map<PatternParameter, Object> parameters = new HashMap<PatternParameter, Object>();
+ for (Map.Entry<String, Object> entry : name2parameterValue.entrySet()) {
+ PatternParameter parameter = pattern.getParameter(entry.getKey());
+ if (parameter == null)
+ throw new PatternException(Messages.bind(Messages.call_execution_error1, entry.getKey(), pattern.getName()));
+ parameters.put(parameter, entry.getValue());
+ }
+ extension.createEngine(pattern).executeWithInjection(ctx, parameters);
+ }
+
+ public static void callBack(PatternContext ctx, Map<String, Object> parameters) throws MissingExtensionException, PatternException {
+ CallBackHandler handler = (CallBackHandler) ctx.getValue(PatternContext.CALL_BACK_HANDLER);
+ if (handler == null)
+ Activator.getDefault().logWarning(Messages.missing_callback_handler);
+ handler.handleCall(ctx, parameters);
+ }
+
+ private CallHelper() {
+ super();
+
+ }
+
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/execution/CallbackContext.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/execution/CallbackContext.java
new file mode 100644
index 0000000..9cf7381
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/execution/CallbackContext.java
@@ -0,0 +1,74 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.execution;
+
+import java.util.Map;
+
+import org.eclipse.egf.model.pattern.PatternContext;
+import org.eclipse.egf.model.pattern.PatternExecutionReporter;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class CallbackContext extends DefaultInternalPatternContext {
+
+ private final CallbackReporter reporter = new CallbackReporter();
+ private final StringBuffer buffer = new StringBuffer(2000);
+
+ public CallbackContext(InternalPatternContext parent) {
+ super((InternalPatternContext) parent);
+
+ }
+
+ @Override
+ public StringBuffer getBuffer() {
+ return buffer;
+ }
+
+ public PatternExecutionReporter getReporter() {
+ return reporter;
+ }
+
+ public boolean hasReporter() {
+ return true;
+ }
+
+ public void setReporter(PatternExecutionReporter reporter) {
+ throw new UnsupportedOperationException("unexpected");
+ }
+
+ public boolean useReporter() {
+
+ return true;
+ }
+
+ private InternalPatternContext getParent() {
+ return (InternalPatternContext) parent;
+ }
+
+ private class CallbackReporter implements PatternExecutionReporter {
+
+ public void executionFinished(String output, PatternContext context) {
+ throw new UnsupportedOperationException("unexpected");
+ }
+
+ public void loopFinished(String output, PatternContext context, Map<String, Object> parameterValues) {
+ getParent().getReporter().loopFinished(output, context, parameterValues);
+ }
+
+ }
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/execution/ConsoleReporter.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/execution/ConsoleReporter.java
new file mode 100644
index 0000000..03b18bb
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/execution/ConsoleReporter.java
@@ -0,0 +1,40 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.execution;
+
+import java.util.Map;
+
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.model.pattern.PatternContext;
+import org.eclipse.egf.model.pattern.PatternExecutionReporter;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class ConsoleReporter implements PatternExecutionReporter {
+
+ public void executionFinished(String output, PatternContext context) {
+ System.out.println(output);
+ EGFCorePlugin.getDefault().logInfo(output);
+ }
+
+ public void loopFinished(String output, PatternContext context, Map<String, Object> parameterValues) {
+ System.out.println(output);
+ EGFCorePlugin.getDefault().logInfo(output);
+ }
+
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/execution/DefaultInternalPatternContext.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/execution/DefaultInternalPatternContext.java
new file mode 100644
index 0000000..71dd0a9
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/execution/DefaultInternalPatternContext.java
@@ -0,0 +1,59 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.execution;
+
+import org.eclipse.egf.model.pattern.BundleAccessor;
+import org.eclipse.egf.model.pattern.PatternContext;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public abstract class DefaultInternalPatternContext extends DefaultPatternContext implements InternalPatternContext {
+
+ protected StringBuffer loopBuffer;
+ protected StringBuffer executionBuffer;
+
+ public DefaultInternalPatternContext(BundleAccessor accessor) {
+ super(accessor);
+ loopBuffer = new StringBuffer(2000);
+ executionBuffer = new StringBuffer(2000);
+ }
+
+ public DefaultInternalPatternContext(InternalPatternContext parent) {
+ super((PatternContext) parent);
+ }
+
+ public StringBuffer getBuffer() {
+ if (parent != null)
+ return ((InternalPatternContext) parent).getBuffer();
+ if (loopBuffer == null)
+ throw new IllegalStateException();
+ return loopBuffer;
+ }
+
+ public StringBuffer getExecutionBuffer() {
+ if (parent != null)
+ return ((InternalPatternContext) parent).getExecutionBuffer();
+ if (executionBuffer == null)
+ throw new IllegalStateException();
+ return executionBuffer;
+ }
+
+ public void clearBuffer() {
+ getBuffer().setLength(0);
+ }
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/execution/DefaultPatternContext.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/execution/DefaultPatternContext.java
new file mode 100644
index 0000000..44cf0c2
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/execution/DefaultPatternContext.java
@@ -0,0 +1,67 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.execution;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.egf.model.pattern.BundleAccessor;
+import org.eclipse.egf.model.pattern.PatternContext;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class DefaultPatternContext implements PatternContext {
+ protected PatternContext parent;
+ private final Map<String, Object> data = new HashMap<String, Object>();
+ private final BundleAccessor accessor;
+
+ public DefaultPatternContext(BundleAccessor accessor) {
+ if (accessor == null)
+ throw new IllegalArgumentException();
+ this.accessor = accessor;
+ }
+
+ public DefaultPatternContext(PatternContext parent) {
+ this((BundleAccessor) parent);
+ this.parent = parent;
+ }
+
+ public void setValue(String name, Object value) {
+ if (name == null)
+ throw new IllegalArgumentException();
+ data.put(name, value);
+ // TODO how to deal with parent ctx ?
+
+ }
+
+ public Object getValue(String name) {
+ if (name == null)
+ throw new IllegalArgumentException();
+ if (data.containsKey(name))
+ return data.get(name);
+ return parent == null ? null : parent.getValue(name);
+ }
+
+ public Bundle getBundle(String id) throws PatternException {
+
+ return accessor.getBundle(id);
+ }
+
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/execution/EclipseFileReporter.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/execution/EclipseFileReporter.java
new file mode 100644
index 0000000..4117c1c
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/execution/EclipseFileReporter.java
@@ -0,0 +1,98 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.execution;
+
+import java.io.ByteArrayInputStream;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.egf.model.pattern.PatternExecutionReporter;
+import org.eclipse.egf.pattern.Activator;
+import org.eclipse.emf.common.util.URI;
+
+/**
+ * @author Matthieu Helleboid
+ *
+ */
+public abstract class EclipseFileReporter implements PatternExecutionReporter {
+
+ protected void writeOutput(String output, URI targetDirectoryURI, URI targetFileURI) {
+ String targetDirectory = targetDirectoryURI.toString();
+ String targetFile = targetFileURI.toString();
+
+ writeOutput(output, targetDirectory, targetFile);
+ }
+
+ protected void writeOutput(String output, String targetDirectory, String targetFile) {
+ NullProgressMonitor monitor = new NullProgressMonitor();
+
+ try {
+ ensureContainerExists(targetDirectory, monitor);
+
+ IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(targetFile));
+ if (file.exists())
+ file.delete(true, monitor);
+ file.create(new ByteArrayInputStream(output.getBytes()), true, monitor);
+ } catch (Exception exception) {
+ Activator.getDefault().logError(exception);
+ }
+ }
+
+ /**
+ * see AbstractGeneratorAdapter.EclipseHelper
+ *
+ * @param monitor
+ * @throws CoreException
+ */
+ protected static boolean ensureContainerExists(String workspacePath, NullProgressMonitor monitor) throws CoreException {
+ IPath path = new Path(workspacePath);
+ IContainer container = null;
+
+ if (path.isAbsolute()) {
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ IProject project = workspace.getRoot().getProject(path.segment(0));
+ if (!project.exists()) {
+ project.create(monitor);
+ }
+
+ if (project.exists()) {
+ if (!project.isOpen()) {
+ project.open(monitor);
+ }
+
+ container = project;
+ for (int i = 1, length = path.segmentCount(); i < length; i++) {
+ IFolder folder = container.getFolder(new Path(path.segment(i)));
+ if (!folder.exists()) {
+ folder.create(false, true, monitor);
+ }
+ container = folder;
+ }
+ }
+ }
+
+ return container != null && container.getFullPath().equals(path);
+ }
+
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/execution/ExecutionContext.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/execution/ExecutionContext.java
new file mode 100644
index 0000000..6a4eaa8
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/execution/ExecutionContext.java
@@ -0,0 +1,58 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.execution;
+
+import org.eclipse.egf.model.pattern.BundleAccessor;
+import org.eclipse.egf.model.pattern.PatternExecutionReporter;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class ExecutionContext extends DefaultInternalPatternContext {
+
+ private PatternExecutionReporter reporter;
+
+ public ExecutionContext(BundleAccessor accessor) {
+ super(accessor);
+ }
+
+ public ExecutionContext(InternalPatternContext parent) {
+ super((InternalPatternContext) parent);
+ }
+
+ public void setReporter(PatternExecutionReporter reporter) {
+ this.reporter = reporter;
+ }
+
+ public boolean hasReporter() {
+ return reporter != null;
+ }
+
+ public boolean useReporter() {
+ return parent == null;
+ }
+
+ public PatternExecutionReporter getReporter() {
+ if (reporter == null) {
+ // no need for a chain of command
+ // if (parent == null)
+ throw new IllegalStateException();
+ }
+ return reporter;
+ }
+
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/execution/InternalPatternContext.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/execution/InternalPatternContext.java
new file mode 100644
index 0000000..c27652b
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/execution/InternalPatternContext.java
@@ -0,0 +1,42 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.execution;
+
+import org.eclipse.egf.model.pattern.BundleAccessor;
+import org.eclipse.egf.model.pattern.PatternContext;
+import org.eclipse.egf.model.pattern.PatternExecutionReporter;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public interface InternalPatternContext extends PatternContext, BundleAccessor {
+
+ StringBuffer getBuffer();
+
+ StringBuffer getExecutionBuffer();
+
+ void clearBuffer();
+
+ void setReporter(PatternExecutionReporter reporter);
+
+ boolean hasReporter();
+
+ boolean useReporter();
+
+ PatternExecutionReporter getReporter();
+
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/execution/QueryHelper.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/execution/QueryHelper.java
new file mode 100644
index 0000000..5493d0c
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/execution/QueryHelper.java
@@ -0,0 +1,48 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.execution;
+
+import org.eclipse.egf.model.pattern.BundleAccessor;
+import org.eclipse.egf.pattern.Activator;
+import org.eclipse.egf.pattern.query.QueryKind;
+import org.eclipse.egf.pattern.query.IQuery;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class QueryHelper {
+ public static IQuery load(BundleAccessor accessor, String queryId) {
+ try {
+ QueryKind queryKind = IQuery.INSTANCE.getQueryKind(queryId);
+ Bundle bundle = accessor.getBundle(queryKind.getPlatformBundle().getBundleId());
+ Class loadClass = bundle.loadClass(IQuery.INSTANCE.getQueryClassName(queryId));
+ return (IQuery) loadClass.newInstance();
+ } catch (Exception e) {
+ Activator.getDefault().logError(e);
+ throw new QueryException(e);
+ }
+ }
+
+ static class QueryException extends RuntimeException {
+ private static final long serialVersionUID = 1L;
+
+ public QueryException(Exception e) {
+ super(e);
+ }
+ }
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/execution/SuperOrchestrationContext.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/execution/SuperOrchestrationContext.java
new file mode 100644
index 0000000..bf170e7
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/execution/SuperOrchestrationContext.java
@@ -0,0 +1,76 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.execution;
+
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.model.pattern.PatternExecutionReporter;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class SuperOrchestrationContext implements InternalPatternContext {
+
+ private final InternalPatternContext delegate;
+
+ public SuperOrchestrationContext(InternalPatternContext delegate) {
+ super();
+ this.delegate = delegate;
+ if (delegate == null)
+ throw new IllegalArgumentException();
+ }
+
+ public StringBuffer getBuffer() {
+ return delegate.getBuffer();
+ }
+
+ public Bundle getBundle(String id) throws PatternException {
+ return delegate.getBundle(id);
+ }
+
+ public PatternExecutionReporter getReporter() {
+ return delegate.getReporter();
+ }
+
+ public Object getValue(String name) {
+ return delegate.getValue(name);
+ }
+
+ public boolean hasReporter() {
+ return delegate.hasReporter();
+ }
+
+ public void setReporter(PatternExecutionReporter reporter) {
+ delegate.setReporter(reporter);
+ }
+
+ public void setValue(String name, Object value) {
+ delegate.setValue(name, value);
+ }
+
+ public boolean useReporter() {
+ return false;
+ }
+
+ public void clearBuffer() {
+ delegate.clearBuffer();
+ }
+
+ public StringBuffer getExecutionBuffer() {
+ return delegate.getExecutionBuffer();
+ }
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/extension/BasePatternInitializer.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/extension/BasePatternInitializer.java
new file mode 100644
index 0000000..8cff9d6
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/extension/BasePatternInitializer.java
@@ -0,0 +1,155 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.extension;
+
+import java.io.File;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.pattern.Messages;
+import org.eclipse.egf.pattern.utils.FileHelper;
+import org.eclipse.emf.common.util.URI;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public abstract class BasePatternInitializer implements PatternInitializer {
+
+ private final IProject project;
+ private final Pattern pattern;
+
+ public BasePatternInitializer(IProject project, Pattern pattern) {
+ this.project = project;
+ this.pattern = pattern;
+ }
+
+ public void initContent() throws PatternException {
+ for (PatternMethod method : pattern.getMethods()) {
+ IFile outputFile = getFile(method);
+ createFileContent(outputFile, method);
+ }
+ }
+
+ public void updateContent() throws PatternException {
+ for (PatternMethod method : pattern.getMethods()) {
+ String methodName = method.getName();
+ if (PatternFactory.HEADER_METHOD_NAME.equals(methodName) || PatternFactory.FOOTER_METHOD_NAME.equals(methodName)) {
+ IFile outputFile = getFile(method);
+ if (outputFile.exists()) {
+ copeyToHistoryFolder(outputFile);
+ }
+ createFileContent(outputFile, method);
+ }
+ }
+ }
+
+ private void createFileContent(IFile outputFile, PatternMethod method) throws PatternException {
+ String content = null;
+ if (method == pattern.getHeaderMethod())
+ content = getHeaderContent(method);
+ else if (method == pattern.getFooterMethod())
+ content = getFooterContent(method);
+ else if (method == pattern.getInitMethod())
+ content = getInitContent(method);
+ else
+ content = getDefaultContent(method);
+ try {
+ FileHelper.setContent(outputFile, content == null ? "" : content);
+ } catch (CoreException e) {
+ throw new PatternException(e);
+
+ }
+ }
+
+ private void copeyToHistoryFolder(IFile outputFile) {
+ String location = outputFile.getLocation().toString();
+ int locationIndex = location.lastIndexOf("/");
+ String historyLocation = location.substring(0, locationIndex) + "/_bak/";
+
+ // Find the file folder of history files, if not exist, create one,
+ // otherwise, delete all the files in it.
+ File historyFileFolder = new File(historyLocation);
+ String fileName = outputFile.getName();
+ if (!historyFileFolder.exists()) {
+ historyFileFolder.mkdir();
+ } else {
+ deleteFile(historyLocation, fileName);
+ }
+
+ String fullPath = outputFile.getFullPath().toString();
+ int fullPathIndex = fullPath.lastIndexOf("/");
+ String historyFilePath = fullPath.substring(0, fullPathIndex) + "/_bak/" + fileName;
+
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ try {
+ root.refreshLocal(IResource.DEPTH_INFINITE, null);
+ IPath path = new Path(historyFilePath);
+ outputFile.copy(path, true, null);
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ }
+
+ private void deleteFile(String location, String fileName) {
+ File file = new File(location + fileName);
+ if (file.exists()) {
+ file.delete();
+ }
+ }
+
+ protected abstract String getHeaderContent(PatternMethod method) throws PatternException;
+
+ protected abstract String getFooterContent(PatternMethod method) throws PatternException;
+
+ protected abstract String getInitContent(PatternMethod method) throws PatternException;
+
+ protected abstract String getDefaultContent(PatternMethod method) throws PatternException;
+
+ /**
+ * @param project
+ * @param method
+ * @return
+ */
+ public IFile getFile(PatternMethod method) {
+ URI patternFilePath = method.getPatternFilePath();
+ if (patternFilePath == null)
+ throw new IllegalStateException(Messages.bind(Messages.initializer_error1, method.getName()));
+
+ IFile file = project.getFile(patternFilePath.toFileString());
+ if (file == null)
+ throw new IllegalStateException(Messages.bind(Messages.initializer_error2, method.getName()));
+ return file;
+ }
+
+ public IProject getProject() {
+ return project;
+ }
+
+ public Pattern getPattern() {
+ return pattern;
+ }
+
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/extension/ExtensionHelper.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/extension/ExtensionHelper.java
new file mode 100644
index 0000000..f3125d8
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/extension/ExtensionHelper.java
@@ -0,0 +1,82 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.extension;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.egf.model.pattern.PatternNature;
+import org.eclipse.egf.pattern.Activator;
+import org.eclipse.egf.pattern.Messages;
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * TODO for each call the extension point is read ...
+ *
+ * @author Guiu
+ *
+ */
+public class ExtensionHelper {
+
+ public static Map<String, PatternExtension> getExtensions() {
+
+ Map<String, PatternExtension> result = new HashMap<String, PatternExtension>();
+ for (IConfigurationElement element : Platform.getExtensionRegistry().getConfigurationElementsFor(PatternExtension.EXTENSION_ID)) {
+ try {
+ PatternExtension pe = (PatternExtension) element.createExecutableExtension("class");
+ result.put(getName(pe.getNature()), pe);
+ } catch (CoreException e) {
+ Activator.getDefault().logError(e);
+ }
+ }
+ return result;
+ }
+
+ public static PatternNature createNature(String name) {
+ PatternExtension patternExtension = getExtensions().get(name);
+ if (patternExtension == null)
+ throw new IllegalStateException();
+ EClass eClass = patternExtension.getNature().eClass();
+ return (PatternNature) eClass.getEPackage().getEFactoryInstance().create(eClass);
+ }
+
+ public static PatternExtension getExtension(PatternNature nature) throws MissingExtensionException {
+ Map<String, PatternExtension> extensions = getExtensions();
+ PatternExtension patternExtension = extensions.get(getName(nature));
+ if (patternExtension == null)
+ throw new MissingExtensionException(Messages.bind(Messages.extension_error1, getName(nature)));
+ return patternExtension;
+
+ }
+
+ public static String getName(PatternNature nature) {
+ return nature.eClass().getName();
+ }
+
+ public static class MissingExtensionException extends Exception {
+
+ private static final long serialVersionUID = 8310777379305723688L;
+
+ private MissingExtensionException(String message) {
+ super(message);
+
+ }
+
+ }
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/extension/PatternExtension.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/extension/PatternExtension.java
new file mode 100644
index 0000000..4113f62
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/extension/PatternExtension.java
@@ -0,0 +1,105 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.extension;
+
+import java.net.URL;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.model.pattern.PatternNature;
+import org.eclipse.egf.pattern.Messages;
+import org.eclipse.egf.pattern.engine.PatternEngine;
+import org.eclipse.egf.pattern.engine.PatternHelper;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public abstract class PatternExtension {
+
+ public static final String EXTENSION_ID = "org.eclipse.egf.pattern.extension";
+
+ public abstract PatternNature getNature();
+
+ public abstract PatternFactory getFactory();
+
+ protected abstract AdapterFactory getAdapterFactory();
+
+ protected abstract PatternEngine doCreateRunner(Pattern pattern) throws PatternException;
+
+ public PatternEngine createEngine(Pattern pattern) throws PatternException {
+ if (!matchNature(pattern))
+ throw new PatternException(Messages.bind(Messages.extension_error2, getNature().eClass().getName(), pattern.getNature().eClass().getName()));
+ return doCreateRunner(pattern);
+ }
+
+ protected abstract PatternInitializer doCreateInitializer(IProject project, Pattern pattern);
+
+ public PatternInitializer createInitializer(IProject project, Pattern pattern) throws PatternException {
+ if (!matchNature(pattern))
+ throw new PatternException(Messages.bind(Messages.extension_error2, getNature().eClass().getName(), pattern.getNature().eClass().getName()));
+ return doCreateInitializer(project, pattern);
+ }
+
+ public boolean matchNature(Pattern pattern) {
+ if (pattern == null || pattern.getNature() == null)
+ throw new IllegalArgumentException();
+ if (getNature() == null)
+ throw new IllegalStateException();
+
+ return getNature().eClass().equals(pattern.getNature().eClass());
+ }
+
+ public final URL getImageURL() {
+ IItemLabelProvider itemLabelProvider = (IItemLabelProvider) getAdapterFactory().adapt(getNature(), IItemLabelProvider.class);
+ return (URL) itemLabelProvider.getImage(getNature());
+ }
+
+ /**
+ * Tells if the pattern can be translated.
+ *
+ * @return the reason who prevents the translation or null if there is no
+ * problem
+ */
+ public String canTranslate(Pattern pattern) {
+ IProject project = PatternHelper.getProject(pattern);
+ if (project == null)
+ return Messages.assembly_error4;
+ IFile file = project.getFile(pattern.getHeaderMethod().getPatternFilePath().path());
+ if (!file.exists())
+ return Messages.assembly_error5;
+ return null; // no problem
+ }
+
+ /**
+ * Tells if the pattern can be executed.
+ *
+ * @return the reason who prevents the execution or null if there is no
+ * problem
+ */
+ public String canExecute(Pattern pattern) {
+ // todo it should be in a validation rule...
+
+ return null; // no problem
+ }
+
+ public abstract RefactoringManager getRefactoringManager();
+
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/extension/PatternFactory.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/extension/PatternFactory.java
new file mode 100644
index 0000000..7cef34d
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/extension/PatternFactory.java
@@ -0,0 +1,506 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.extension;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.egf.model.pattern.BasicQuery;
+import org.eclipse.egf.model.pattern.MethodCall;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternCall;
+import org.eclipse.egf.model.pattern.PatternElement;
+import org.eclipse.egf.model.pattern.PatternInjectedCall;
+import org.eclipse.egf.model.pattern.PatternLibrary;
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.model.pattern.PatternParameter;
+import org.eclipse.egf.model.pattern.PatternVariable;
+import org.eclipse.egf.model.pattern.Query;
+import org.eclipse.egf.model.pattern.SuperCall;
+import org.eclipse.egf.pattern.engine.PatternHelper;
+import org.eclipse.emf.common.util.BasicEList;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.URI;
+
+/**
+ * @author Guiu
+ *
+ */
+public abstract class PatternFactory {
+
+ public static final String INIT_METHOD_NAME = "init";
+ public static final String HEADER_METHOD_NAME = "header";
+ public static final String FOOTER_METHOD_NAME = "footer";
+ public static final String PRECONDITION_METHOD_NAME = "preCondition";
+ public static final String BODY_METHOD_NAME = "body";
+
+ public void createDebugPatternUC5(PatternLibrary lib) {
+ Pattern p1 = createPattern(lib, "Pattern UN");
+
+ PatternVariable var1 = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternVariable();
+ var1.setName("myVar");
+ var1.setType("String");
+ p1.getVariables().add(var1);
+
+ PatternMethod method1 = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternMethod();
+ method1.setName("My_Method_1");
+ p1.getMethods().add(method1);
+ method1.setPatternFilePath(createURI(method1));
+ }
+
+ public void createDebugPatternUC4(PatternLibrary lib) {
+ Pattern parentPattern = createPattern(lib, "Pattern UN");
+ Pattern childPattern = createPattern(lib, "Pattern DEUX");
+
+ PatternVariable var1 = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternVariable();
+ var1.setName("myVar");
+ var1.setType("String");
+ parentPattern.getVariables().add(var1);
+ PatternInjectedCall patternCall = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternInjectedCall();
+ patternCall.setContext(var1);
+ patternCall.setCalled(childPattern);
+
+ childPattern.getVariables().add(var1);
+
+ }
+
+ public void createDebugPatternUC3(PatternLibrary lib) {
+ Pattern p1 = createPattern(lib, "Pattern Called");
+ Pattern p2 = createPattern(lib, "Pattern Parent");
+ Pattern p3 = createPattern(lib, "Pattern Child");
+
+ p1.setSuperPattern(p2);
+
+ // set up P1
+ PatternParameter param1 = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternParameter();
+ param1.setName("myCalledParam");
+ param1.setType("http://www.eclipse.org/emf/2002/Ecore#//EClass");
+ param1.setQuery(createBasicQuery());
+ p1.getParameters().add(param1);
+
+ // set up P2
+ PatternParameter param2 = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternParameter();
+ param2.setName("myChildParam");
+ param2.setType("http://www.eclipse.org/emf/2002/Ecore#//EClass");
+ param2.setQuery(createBasicQuery());
+ p2.getParameters().add(param2);
+
+ // set up P3
+ PatternCall patternCall = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternCall();
+ patternCall.setCalled(p1);
+ patternCall.getParameterMatching().put(param1, param2);
+ p3.getOrchestration().add(patternCall);
+ }
+
+ public void createDebugPattern15(PatternLibrary lib) {
+ Pattern p1 = createPattern(lib, "Pattern GrandParent");
+ Pattern p2 = createPattern(lib, "Pattern Parent");
+ Pattern p3 = createPattern(lib, "Pattern Child");
+
+ p2.setSuperPattern(p1);
+ p3.setSuperPattern(p2);
+
+ // set up P1
+ PatternParameter param1 = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternParameter();
+ param1.setName("myGrandParentParam");
+ param1.setType("http://www.eclipse.org/emf/2002/Ecore#//EClass");
+ param1.setQuery(createBasicQuery());
+ p1.getParameters().add(param1);
+
+ // set up P2
+ p2.getOrchestration().clear();
+
+ // set up P3
+ p3.getOrchestration().clear();
+ }
+
+ public void createDebugPattern14(PatternLibrary lib) {
+ Pattern p1 = createPattern(lib, "Pattern GrandParent");
+ Pattern p2 = createPattern(lib, "Pattern Parent");
+ Pattern p3 = createPattern(lib, "Pattern Child");
+
+ p2.setSuperPattern(p1);
+ p3.setSuperPattern(p2);
+
+ // set up P1
+ PatternMethod method1 = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternMethod();
+ method1.setName("test1");
+ p1.getMethods().add(method1);
+ method1.setPatternFilePath(createURI(method1));
+ PatternMethod method2 = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternMethod();
+ method2.setName("test2");
+ p1.getMethods().add(method2);
+ method2.setPatternFilePath(createURI(method2));
+
+ MethodCall methodCall1 = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createMethodCall();
+ methodCall1.setCalled(method1);
+ p1.getOrchestration().add(methodCall1);
+ MethodCall methodCall2 = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createMethodCall();
+ methodCall2.setCalled(method2);
+ p1.getOrchestration().add(methodCall2);
+
+ // set up P2
+ method1 = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternMethod();
+ method1.setName("test1");
+ p2.getMethods().add(method1);
+ method1.setPatternFilePath(createURI(method1));
+
+ p2.getOrchestration().clear();
+
+ // set up P3
+ method1 = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternMethod();
+ method1.setName("test2");
+ p3.getMethods().add(method1);
+ method1.setPatternFilePath(createURI(method1));
+
+ p3.getOrchestration().clear();
+ }
+
+ public void createDebugPattern13(PatternLibrary lib) {
+ Pattern p1 = createPattern(lib, "Pattern UN");
+ Pattern p2 = createPattern(lib, "Pattern DEUX");
+ Pattern p3 = createPattern(lib, "Pattern TROIS");
+
+ p2.setSuperPattern(p1);
+ p3.setSuperPattern(p1);
+
+ PatternMethod method1 = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternMethod();
+ method1.setName("run1");
+ p1.getMethods().add(method1);
+ method1.setPatternFilePath(createURI(method1));
+
+ MethodCall methodCall1 = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createMethodCall();
+ methodCall1.setCalled(method1);
+ p1.getOrchestration().add(methodCall1);
+
+ // P2 overrides method run1
+ method1 = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternMethod();
+ method1.setName("run1");
+ p2.getMethods().add(method1);
+ method1.setPatternFilePath(createURI(method1));
+ p2.getOrchestration().clear();
+
+ // P3 overrides the orchestration
+ p3.getOrchestration().clear();
+ // TODO... need to add a superPatternCall
+ }
+
+ public void createDebugPattern12(PatternLibrary lib) {
+ Pattern p1 = createPattern(lib, "Pattern UN");
+ Pattern p2 = createPattern(lib, "Pattern DEUX");
+ Pattern p3 = createPattern(lib, "Pattern TROIS");
+
+ PatternMethod method1 = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternMethod();
+ method1.setName("run1");
+ p1.getMethods().add(method1);
+ method1.setPatternFilePath(createURI(method1));
+
+ MethodCall methodCall1 = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createMethodCall();
+ methodCall1.setCalled(method1);
+ p1.getOrchestration().add(methodCall1);
+
+ p2.setSuperPattern(p1);
+ p3.setSuperPattern(p2);
+ }
+
+ public void createDebugPattern11(PatternLibrary lib) {
+ Pattern p1 = createPattern(lib, "Pattern UN");
+ Pattern p2 = createPattern(lib, "Pattern DEUX");
+ Pattern p3 = createPattern(lib, "Pattern TROIS");
+
+ PatternLibrary subLib = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternLibrary();
+ subLib.setName("subLib");
+ lib.getElements().add(subLib);
+
+ Pattern sp1 = createPattern(subLib, "Sub UN");
+ Pattern sp2 = createPattern(subLib, "Sub DEUX");
+ Pattern sp3 = createPattern(subLib, "Sub TROIS");
+
+ EList<PatternElement> rule1 = new BasicEList<PatternElement>();
+ rule1.add(subLib);
+ rule1.add(p1);
+ rule1.add(p2);
+ // make sure the list is ok before putting it into the map
+ lib.getFilters().put("rule1", rule1);
+
+ EList<PatternElement> srule1 = new BasicEList<PatternElement>();
+ srule1.add(sp2);
+ srule1.add(sp1);
+ subLib.getFilters().put("rule12", srule1);
+
+ }
+
+ public void createDebugPattern9(PatternLibrary lib) {
+ Pattern p1 = createPattern(lib, "Pattern UN");
+ Pattern p2 = createPattern(lib, "Pattern DEUX");
+ Pattern p3 = createPattern(lib, "Pattern TROIS");
+
+ PatternLibrary subLib = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternLibrary();
+ subLib.setName("subLib");
+ lib.getElements().add(subLib);
+
+ Pattern sp1 = createPattern(subLib, "Sub UN");
+ Pattern sp2 = createPattern(subLib, "Sub DEUX");
+ Pattern sp3 = createPattern(subLib, "Sub TROIS");
+
+ }
+
+ public List<Pattern> createDebugPatternUC2(PatternLibrary lib) {
+ List<Pattern> result = new ArrayList<Pattern>();
+ Pattern p1 = createPattern(lib, "Pattern UN");
+ Pattern p2 = createPattern(lib, "Pattern DEUX");
+ Pattern p3 = createPattern(lib, "Pattern TROIS");
+
+ PatternCall patternCall = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternCall();
+ patternCall.setCalled(p2);
+ p1.getOrchestration().add(patternCall);
+
+ patternCall = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternCall();
+ patternCall.setCalled(p3);
+ p2.getOrchestration().add(patternCall);
+
+ result.add(p3);
+ result.add(p1);
+ result.add(p2);
+ return result;
+ }
+
+ public List<Pattern> createDebugPattern7(PatternLibrary lib) {
+ List<Pattern> result = new ArrayList<Pattern>();
+ Pattern parentPattern = createPattern(lib, "ParentPattern");
+ Pattern childPattern = createPattern(lib, "ChildPattern");
+
+ PatternVariable var1 = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternVariable();
+ var1.setName("myVar");
+ var1.setType("String");
+ parentPattern.getVariables().add(var1);
+
+ PatternParameter param1 = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternParameter();
+ param1.setName("myParam");
+ param1.setType("http://www.eclipse.org/emf/2002/Ecore#//EClass");
+ param1.setQuery(createBasicQuery());
+ childPattern.getParameters().add(param1);
+
+ PatternInjectedCall iCall = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternInjectedCall();
+ iCall.setContext(var1);
+ iCall.setCalled(childPattern);
+ // iCall.setPattern(parentPattern);
+ parentPattern.getOrchestration().add(iCall);
+
+ // PatternCall call =
+ // org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternCall();
+ // call.setCalled(childPattern);
+ // call.setPattern(parentPattern);
+
+ result.add(parentPattern);
+ result.add(childPattern);
+ return result;
+ }
+
+ public List<Pattern> createDebugPattern6(PatternLibrary lib) {
+ List<Pattern> result = new ArrayList<Pattern>();
+ Pattern createPattern = createPattern(lib, "MyPattern");
+ PatternParameter param1 = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternParameter();
+ param1.setName("myParam");
+ param1.setType("http://www.eclipse.org/emf/2002/Ecore#//EClass");
+ param1.setQuery(createBasicQuery());
+ createPattern.getParameters().add(param1);
+ result.add(createPattern);
+ return result;
+ }
+
+ private Query createBasicQuery() {
+ BasicQuery createBasicQuery = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createBasicQuery();
+ createBasicQuery.setExtensionId("org.eclipse.egf.pattern.basic.query");
+ return createBasicQuery;
+ }
+
+ public Pattern createDebugPattern1(PatternLibrary lib) {
+ Pattern createPattern = createPattern(lib, "MyPattern");
+ return createPattern;
+ }
+
+ public List<Pattern> createDebugPattern3(PatternLibrary lib) {
+ List<Pattern> result = new ArrayList<Pattern>();
+ Pattern parent = createPattern(lib, "parent");
+ Pattern child = createPattern(lib, "child");
+ PatternCall patternCall = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternCall();
+ patternCall.setCalled(child);
+ parent.getOrchestration().add(patternCall);
+ result.add(parent);
+ result.add(child);
+
+ return result;
+
+ }
+
+ public List<Pattern> createDebugPatternUC1(PatternLibrary lib) {
+ List<Pattern> result = new ArrayList<Pattern>();
+ Pattern parent = createPattern(lib, "parent");
+ Pattern child = createPattern(lib, "child");
+ PatternParameter param1 = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternParameter();
+ param1.setName("parentP1");
+ param1.setType("http://www.eclipse.org/emf/2002/Ecore#//EClass");
+ parent.getParameters().add(param1);
+ PatternParameter param12 = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternParameter();
+ param12.setName("parentP2");
+ param12.setType("http://www.eclipse.org/emf/2002/Ecore#//EClass");
+ parent.getParameters().add(param12);
+
+ PatternParameter param2 = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternParameter();
+ param2.setName("childP");
+ param2.setType("http://www.eclipse.org/emf/2002/Ecore#//EClass");
+ child.getParameters().add(param2);
+ PatternCall patternCall = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternCall();
+ patternCall.getParameterMatching().put(param2, param12);
+ patternCall.setCalled(child);
+
+ parent.getOrchestration().add(patternCall);
+ result.add(parent);
+ result.add(child);
+
+ return result;
+ }
+
+ public List<Pattern> createDebugPattern4(PatternLibrary lib) {
+ List<Pattern> result = new ArrayList<Pattern>();
+ Pattern parent = createPattern(lib, "parent");
+ PatternParameter param1 = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternParameter();
+ param1.setName("parentP");
+ param1.setType("http://www.eclipse.org/emf/2002/Ecore#//EClass");
+ parent.getParameters().add(param1);
+
+ Pattern child = createPattern(lib, "child");
+ PatternParameter param2 = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternParameter();
+ param2.setName("childP");
+ param2.setType("http://www.eclipse.org/emf/2002/Ecore#//EClass");
+ child.getParameters().add(param2);
+ PatternCall patternCall = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternCall();
+ patternCall.setCalled(child);
+
+ parent.getOrchestration().add(patternCall);
+ result.add(parent);
+ result.add(child);
+
+ return result;
+ }
+
+ public Pattern createPattern(PatternLibrary lib, String patternName) {
+ Pattern pattern = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPattern();
+ pattern.setName(patternName);
+ if (lib != null)
+ lib.getElements().add(pattern);
+ // checkId(pattern);
+ addNature(pattern);
+
+ /*
+ * PatternVariable var1 =
+ * org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE
+ * .createPatternVariable();
+ * checkId(var1);
+ * var1.setName("var1");
+ * var1.setType("String");
+ * pattern.getVariables().add(var1);
+ * PatternVariable var2 =
+ * org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE
+ * .createPatternVariable();
+ * checkId(var2);
+ * var2.setName("var2");
+ * var2.setType("java.util.List");
+ * pattern.getVariables().add(var2);
+ */
+ // 1 - create default content
+ PatternMethod headerMethod = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternMethod();
+ pattern.getMethods().add(headerMethod);
+ pattern.setHeaderMethod(headerMethod);
+ initHeader(headerMethod);
+
+ PatternMethod initMethod = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternMethod();
+ pattern.getMethods().add(initMethod);
+ pattern.setInitMethod(initMethod);
+ initIinit(initMethod);
+
+ PatternMethod bodyMethod = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternMethod();
+ pattern.getMethods().add(bodyMethod);
+ initBody(bodyMethod);
+
+ PatternMethod footerMethod = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createPatternMethod();
+ pattern.getMethods().add(footerMethod);
+ pattern.setFooterMethod(footerMethod);
+ initFooter(footerMethod);
+
+ // 2 - set up default orchestration
+ SuperCall superCall = org.eclipse.egf.model.pattern.PatternFactory.eINSTANCE.createSuperCall();
+ pattern.getOrchestration().add(superCall);
+ return pattern;
+ }
+
+ /**
+ * @param footerMethod
+ */
+ protected void initFooter(PatternMethod method) {
+ method.setName(FOOTER_METHOD_NAME);
+ method.setPatternFilePath(createURI(method));
+ initFooterContent(method); // TODO use simple String.replace()
+ }
+
+ /**
+ * @param method
+ */
+ private void initFooterContent(PatternMethod method) {
+ // read template
+ // get Map of name-values
+ // replace
+ // write result to method.getPatternFilePath (là je vais avoir besoin du
+ // nom du projet :( )
+ }
+
+ /**
+ * @param bodyMethod
+ */
+ protected void initBody(PatternMethod method) {
+ method.setName(BODY_METHOD_NAME);
+ method.setPatternFilePath(createURI(method));
+ }
+
+ /**
+ * @param headerMethod
+ */
+ protected void initHeader(PatternMethod method) {
+ method.setName(HEADER_METHOD_NAME);
+ method.setPatternFilePath(createURI(method));
+ }
+
+ /**
+ * @param headerMethod
+ */
+ protected void initIinit(PatternMethod method) {
+ method.setName(INIT_METHOD_NAME);
+ method.setPatternFilePath(createURI(method));
+ }
+
+ protected URI createURI(PatternMethod method) {
+ if (method.getID() == null)
+ return null;
+ return PatternHelper.Filename.computeFileURI(method);
+ }
+
+ /**
+ * @param pattern
+ */
+ protected abstract void addNature(Pattern pattern);
+
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/extension/PatternInitializer.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/extension/PatternInitializer.java
new file mode 100644
index 0000000..496dbb2
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/extension/PatternInitializer.java
@@ -0,0 +1,29 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.extension;
+
+import org.eclipse.egf.model.pattern.PatternException;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public interface PatternInitializer {
+
+ public void initContent() throws PatternException;
+
+ public void updateContent() throws PatternException;
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/extension/RefactoringManager.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/extension/RefactoringManager.java
new file mode 100644
index 0000000..f05bebf
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/extension/RefactoringManager.java
@@ -0,0 +1,30 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.extension;
+
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.model.pattern.PatternLibrary;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public interface RefactoringManager {
+ void renamePattern(Pattern pattern, String oldName, String newName) throws PatternException;
+
+ void renameLibrary(PatternLibrary lib, String oldName, String newName) throws PatternException;
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/extension/TemplateInitializer.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/extension/TemplateInitializer.java
new file mode 100644
index 0000000..07a2c47
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/extension/TemplateInitializer.java
@@ -0,0 +1,73 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.extension;
+
+import java.io.IOException;
+import java.util.Map;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.pattern.templates.TemplateEngine;
+
+/**
+ * @author Guiu
+ *
+ */
+public abstract class TemplateInitializer extends BasePatternInitializer {
+
+ private final TemplateEngine engine;
+
+ public TemplateInitializer(IProject project, Pattern pattern, TemplateEngine engine) {
+ super(project, pattern);
+ this.engine = engine;
+ }
+
+ @Override
+ protected String getDefaultContent(PatternMethod method) throws PatternException {
+ return runEngine(TemplateEngine.Templates.DEFAULT);
+ }
+
+ @Override
+ protected final String getFooterContent(PatternMethod method) throws PatternException {
+ return runEngine(TemplateEngine.Templates.FOOTER);
+ }
+
+ @Override
+ protected final String getHeaderContent(PatternMethod method) throws PatternException {
+ return runEngine(TemplateEngine.Templates.HEADER);
+ }
+
+ @Override
+ protected final String getInitContent(PatternMethod method) throws PatternException {
+ return runEngine(TemplateEngine.Templates.INIT);
+ }
+
+ private String runEngine(TemplateEngine.Templates template) throws PatternException {
+ try {
+ return engine.process(template, createContext());
+ } catch (CoreException e) {
+ throw new PatternException(e);
+ } catch (IOException e) {
+ throw new PatternException(e);
+ }
+ }
+
+ protected abstract Map<String, String> createContext();
+
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/query/BasicQueryDelegate.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/query/BasicQueryDelegate.java
new file mode 100644
index 0000000..a5d3551
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/query/BasicQueryDelegate.java
@@ -0,0 +1,82 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.query;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.egf.model.pattern.PatternContext;
+import org.eclipse.egf.pattern.Messages;
+import org.eclipse.egf.pattern.utils.ParameterTypeHelper;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.query.conditions.eobjects.EObjectTypeRelationCondition;
+import org.eclipse.emf.query.conditions.eobjects.TypeRelation;
+import org.eclipse.emf.query.statements.FROM;
+import org.eclipse.emf.query.statements.IQueryResult;
+import org.eclipse.emf.query.statements.SELECT;
+import org.eclipse.emf.query.statements.WHERE;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class BasicQueryDelegate implements IQuery {
+
+ public List<Object> execute(ParameterDescription parameter, Map<String, String> queryCtx, PatternContext context) {
+ String type = parameter.getType();
+ Object loadClass = ParameterTypeHelper.INSTANCE.loadClass(type);
+ if (!(loadClass instanceof EClass))
+ throw new IllegalStateException(Messages.query_error1);
+
+ Collection<EObject> domain = getDomain(context);
+ if (domain == null)
+ throw new IllegalStateException(Messages.query_error8);
+
+ MAINTAIN_ORDER_SELECT query = new MAINTAIN_ORDER_SELECT(new FROM(domain), new WHERE(new EObjectTypeRelationCondition((EClass) loadClass, TypeRelation.SAMETYPE_OR_SUBTYPE_LITERAL)));
+ IQueryResult result = query.execute();
+ if (result.getException() != null)
+ throw new IllegalStateException(result.getException());
+ return query.getOrderedObjects();
+ }
+
+ @SuppressWarnings("unchecked")
+ protected Collection<EObject> getDomain(PatternContext context) {
+ return (Collection<EObject>) context.getValue(PatternContext.DOMAIN_OBJECTS);
+ }
+
+ protected static class MAINTAIN_ORDER_SELECT extends SELECT {
+
+ private List<Object> result = new ArrayList<Object>();
+
+ public MAINTAIN_ORDER_SELECT(FROM from, WHERE where) {
+ super(from, where);
+ }
+
+ @Override
+ protected void addEObject(EObject eObject) {
+ if (!result.contains(eObject))
+ result.add(eObject);
+ super.addEObject(eObject);
+ }
+
+ public List<Object> getOrderedObjects() {
+ return result;
+ }
+ }
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/query/EObjectInjectedContextQuery.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/query/EObjectInjectedContextQuery.java
new file mode 100644
index 0000000..dc2edfc
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/query/EObjectInjectedContextQuery.java
@@ -0,0 +1,37 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.query;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.egf.model.pattern.PatternContext;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * @author Matthieu Helleboid
+ *
+ */
+public class EObjectInjectedContextQuery extends BasicQueryDelegate implements IQuery {
+
+ @Override
+ protected Collection<EObject> getDomain(PatternContext context) {
+ ArrayList<EObject> arrayList = new ArrayList<EObject>();
+ arrayList.add((EObject) context.getValue(PatternContext.INJECTED_CONTEXT));
+ return arrayList;
+ }
+
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/query/IQuery.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/query/IQuery.java
new file mode 100644
index 0000000..960b3a5
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/query/IQuery.java
@@ -0,0 +1,111 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.query;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.egf.core.platform.EGFPlatformPlugin;
+import org.eclipse.egf.model.pattern.PatternContext;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.pattern.Messages;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public interface IQuery {
+
+ List<Object> execute(ParameterDescription parameter, Map<String, String> queryCtx, PatternContext context);
+
+ Helper INSTANCE = new Helper();
+
+ public class ParameterDescription {
+ private String name;
+ private String type;
+
+ public ParameterDescription(String name, String type) {
+ super();
+ this.name = name;
+ this.type = type;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ }
+
+ public class Helper {
+
+ public IQuery loadQuery(String id) {
+ QueryKind queryKind = getQueryKind(id);
+ if (queryKind == null)
+ throw new IllegalStateException(Messages.query_error6);
+ // queryKind.getPlatformBundle().
+
+ return null;
+ }
+
+ public QueryKind getQueryKindByName(String name) {
+ for (QueryKind queryKind : getAvailableQueries()) {
+ if (name.equals(queryKind.getName())) {
+ return queryKind;
+ }
+ }
+ return null;
+ }
+
+ public QueryKind getQueryKind(String id) {
+ for (QueryKind queryKind : getAvailableQueries()) {
+ if (id.equals(queryKind.getId())) {
+ return queryKind;
+ }
+ }
+ return null;
+ }
+
+ public List<QueryKind> getAvailableQueries() {
+ List<QueryKind> queries = new ArrayList<QueryKind>(50);
+ for (QueryKind kind : EGFPlatformPlugin.getPlatformManager().getPlatformExtensionPoints(QueryKind.class)) {
+ queries.add(kind);
+ }
+ return queries;
+ }
+
+ public String getQueryClassName(String queryID) throws PatternException {
+ if (queryID == null || "".equals(queryID))
+ throw new PatternException(Messages.query_error2);
+ for (QueryKind kind : EGFPlatformPlugin.getPlatformManager().getPlatformExtensionPoints(QueryKind.class)) {
+ if (queryID.equals(kind.getId())) {
+ if (kind.getClassName() == null || "".equals(kind.getClassName()))
+ throw new PatternException(Messages.query_error5);
+ return kind.getClassName();
+ }
+ }
+ throw new PatternException(Messages.bind(Messages.query_error3, queryID));
+ }
+
+ private Helper() {
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/query/QueryFactory.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/query/QueryFactory.java
new file mode 100644
index 0000000..324c6f8
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/query/QueryFactory.java
@@ -0,0 +1,64 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.query;
+
+import org.eclipse.egf.core.platform.pde.IPlatformBundle;
+import org.eclipse.egf.core.platform.pde.IPlatformExtensionPointFactory;
+import org.eclipse.egf.core.platform.pde.PlatformExtensionPointURI;
+import org.eclipse.pde.core.plugin.IPluginAttribute;
+import org.eclipse.pde.core.plugin.IPluginElement;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class QueryFactory implements IPlatformExtensionPointFactory<QueryKind> {
+
+ private static final String ID_ATTR = "id";
+ private static final String CLASS_ATTR = "class";
+ private static final String NAME_ATTR = "name";
+
+ public QueryKind createExtensionPoint(IPlatformBundle platformBundle, IPluginElement pluginElement) {
+
+ IPluginAttribute idAttr = pluginElement.getAttribute(ID_ATTR);
+ IPluginAttribute classAttr = pluginElement.getAttribute(CLASS_ATTR);
+ IPluginAttribute nameAttr = pluginElement.getAttribute(NAME_ATTR);
+ return new QueryKindImpl(platformBundle, pluginElement, idAttr.getValue(), classAttr.getValue(), nameAttr.getValue());
+ }
+
+ private static class QueryKindImpl extends PlatformExtensionPointURI implements QueryKind {
+
+ private final String className;
+ private final String name;
+
+ public QueryKindImpl(IPlatformBundle bundle, IPluginElement element, String id, String className, String name) {
+ super(bundle, element, id);
+ this.className = className;
+ this.name = name;
+ }
+
+ public String getClassName() {
+
+ return className;
+ }
+
+ public String getName() {
+
+ return name;
+ }
+
+ }
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/query/QueryKind.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/query/QueryKind.java
new file mode 100644
index 0000000..b85943e
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/query/QueryKind.java
@@ -0,0 +1,28 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.query;
+
+import org.eclipse.egf.core.platform.pde.IPlatformExtensionPointURI;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public interface QueryKind extends IPlatformExtensionPointURI {
+ String getClassName();
+
+ String getName();
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/strategy/AbstractPatternStrategy.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/strategy/AbstractPatternStrategy.java
new file mode 100644
index 0000000..342a5b8
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/strategy/AbstractPatternStrategy.java
@@ -0,0 +1,44 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.strategy;
+
+import java.util.Collection;
+
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternContext;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.pattern.extension.ExtensionHelper;
+import org.eclipse.egf.pattern.extension.PatternExtension;
+import org.eclipse.egf.pattern.extension.ExtensionHelper.MissingExtensionException;
+
+/**
+ *
+ * @author Thomas Guiu
+ *
+ */
+public abstract class AbstractPatternStrategy extends AbstractStrategy {
+
+ protected void doExecute(Collection<Pattern> patterns, PatternContext context) throws MissingExtensionException, PatternException {
+ for (Pattern pattern : patterns) {
+ PatternExtension extension = ExtensionHelper.getExtension(pattern.getNature());
+ String canExecute = extension.canExecute(pattern);
+ if (canExecute != null)
+ throw new PatternException(canExecute);
+ extension.createEngine(pattern).execute(context);
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/strategy/AbstractStrategy.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/strategy/AbstractStrategy.java
new file mode 100644
index 0000000..eb87d54
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/strategy/AbstractStrategy.java
@@ -0,0 +1,33 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.strategy;
+
+import java.util.List;
+
+import org.eclipse.egf.model.pattern.PatternElement;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public abstract class AbstractStrategy implements Strategy {
+
+ protected PatternElement[] patternElements;
+
+ public void setPatternElements(List<PatternElement> patterns) {
+ this.patternElements = (PatternElement[]) patterns.toArray(new PatternElement[patterns.size()]);
+ }
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/strategy/DefaultStrategy.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/strategy/DefaultStrategy.java
new file mode 100644
index 0000000..48f3976
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/strategy/DefaultStrategy.java
@@ -0,0 +1,41 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.strategy;
+
+import java.util.LinkedHashSet;
+
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternContext;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.pattern.collector.PatternCollector;
+import org.eclipse.egf.pattern.extension.ExtensionHelper.MissingExtensionException;
+
+/**
+ * Pattern are executed in the given order. Pattern libraries are substituted by
+ * their contents.
+ *
+ * @author Thomas Guiu
+ *
+ */
+public class DefaultStrategy extends AbstractPatternStrategy {
+
+ public void execute(PatternContext context, Object parameter) throws PatternException, MissingExtensionException {
+ LinkedHashSet<Pattern> result = new LinkedHashSet<Pattern>();
+ // to replace libraries by their contents
+ PatternCollector.INSTANCE.collect(patternElements, result);
+ doExecute(result, context);
+ }
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/strategy/FilterStrategy.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/strategy/FilterStrategy.java
new file mode 100644
index 0000000..3c214be
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/strategy/FilterStrategy.java
@@ -0,0 +1,94 @@
+package org.eclipse.egf.pattern.strategy;
+
+import java.util.ArrayList;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternContext;
+import org.eclipse.egf.model.pattern.PatternElement;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.model.pattern.PatternLibrary;
+import org.eclipse.egf.model.pattern.util.PatternSwitch;
+import org.eclipse.egf.pattern.Messages;
+import org.eclipse.egf.pattern.extension.ExtensionHelper.MissingExtensionException;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ *
+ * This base class gathers code to compute the Pattern list from the given
+ * PatternElement objects prior to execution.
+ *
+ *
+ * @author Thomas Guiu
+ *
+ */
+
+public class FilterStrategy extends AbstractPatternStrategy {
+
+ private static final String OK = "ok";
+
+ private final class FilterSwitch extends PatternSwitch<String> {
+ private final String filter;
+ private final Set<Pattern> result;
+
+ private FilterSwitch(String filter, Set<Pattern> result) {
+ this.filter = filter;
+ this.result = result;
+ }
+
+ @Override
+ public String casePattern(Pattern object) {
+ result.add(object);
+ return OK;
+ }
+
+ @Override
+ public String casePatternLibrary(PatternLibrary object) {
+ EList<PatternElement> list = object.getFilters().get(filter);
+ if (list != null) {
+ for (PatternElement elem : list) {
+ String error = doSwitch(elem);
+ if (error != null && !OK.equals(error))
+ return error;
+ }
+ }
+ return OK;
+ }
+
+ public String defaultCase(EObject object) {
+ return Messages.bind(Messages.strategy_error1, object);
+ }
+ }
+
+ public void execute(PatternContext context, Object parameter) throws PatternException, MissingExtensionException {
+ if (parameter == null)
+ throw new PatternException(Messages.strategy_error3);
+ if (!(parameter instanceof String))
+ throw new PatternException(Messages.bind(Messages.strategy_error2, "String", parameter.getClass().getName()));
+
+ String filter = (String) parameter;
+ List<Pattern> patterns = getPatterns(filter);
+ doExecute(patterns, context);
+ }
+
+ /**
+ * This methods returns a list of the elements from patternElements field.
+ * The order is computed by using registered scheduling rules. If the rule
+ * can't be found the natural ordering is used.
+ */
+ protected List<Pattern> getPatterns(final String filter) throws PatternException {
+ final Set<Pattern> result = new LinkedHashSet<Pattern>(patternElements.length * 2);
+ PatternSwitch<String> switch_ = new FilterSwitch(filter, result);
+ for (PatternElement elem : patternElements) {
+ String error = switch_.doSwitch(elem);
+ if (error != null && !OK.equals(error))
+ throw new PatternException(error);
+ }
+
+ return new ArrayList<Pattern>(result);
+ }
+
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/strategy/Strategy.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/strategy/Strategy.java
new file mode 100644
index 0000000..d5201c8
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/strategy/Strategy.java
@@ -0,0 +1,24 @@
+package org.eclipse.egf.pattern.strategy;
+
+import java.util.List;
+
+import org.eclipse.egf.model.pattern.PatternContext;
+import org.eclipse.egf.model.pattern.PatternElement;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.pattern.extension.ExtensionHelper.MissingExtensionException;
+
+/**
+ * A strategy is responsible for managing the executing a set of
+ * Pattern objects.
+ *
+ * @author Thomas Guiu
+ *
+ */
+
+public interface Strategy {
+
+ public void setPatternElements(List<PatternElement> patterns);
+
+ public void execute(PatternContext context, Object parameter) throws PatternException, MissingExtensionException;
+
+}
\ No newline at end of file
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/strategy/modeldriven/DefaultDomainVisitor.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/strategy/modeldriven/DefaultDomainVisitor.java
new file mode 100644
index 0000000..adb7c44
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/strategy/modeldriven/DefaultDomainVisitor.java
@@ -0,0 +1,98 @@
+package org.eclipse.egf.pattern.strategy.modeldriven;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.egf.model.pattern.DomainVisitor;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternContext;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.model.pattern.PatternParameter;
+import org.eclipse.egf.pattern.Messages;
+import org.eclipse.egf.pattern.extension.ExtensionHelper;
+import org.eclipse.egf.pattern.extension.PatternExtension;
+import org.eclipse.egf.pattern.extension.ExtensionHelper.MissingExtensionException;
+import org.eclipse.egf.pattern.utils.NsURIHelper;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+
+public abstract class DefaultDomainVisitor implements DomainVisitor {
+
+ private final Map<String, List<Pattern>> type2patterns = new HashMap<String, List<Pattern>>(100);
+ private final Set<Object> visited = new HashSet<Object>();
+
+ public void setPatterns(Set<Pattern> patterns) throws PatternException {
+ for (Pattern p : patterns) {
+ EList<PatternParameter> parameters = p.getAllParameters();
+ if (parameters.size() != 1)
+ throw new PatternException(Messages.bind(Messages.strategy_error4, p.getName()));
+ registerPattern(p, parameters.get(0));
+ }
+ }
+
+ private void registerPattern(Pattern p, PatternParameter patternParameter) {
+ String type = patternParameter.getType();
+ List<Pattern> patterns = type2patterns.get(type);
+ if (patterns == null)
+ type2patterns.put(type, patterns = new ArrayList<Pattern>());
+ patterns.add(p);
+ }
+
+ protected List<Pattern> findPatterns(Object model) {
+ List<Pattern> result = null;
+ if (model instanceof EObject) {
+ String fullName = NsURIHelper.getFullName((EObject) model);
+ result = type2patterns.get(fullName);
+ } else
+ throw new UnsupportedOperationException();
+ return result;
+ }
+
+ public void visit(PatternContext context, Object model) throws PatternException {
+ for (Object obj : getChildren(model)) {
+ if (!visited.contains(obj))
+ doProcess(context, obj);
+ visit(context, obj);
+ }
+ }
+
+ protected void doProcess(PatternContext context, Object model) throws PatternException {
+ visited.add(model);
+ List<Pattern> foundPattern = findPatterns(model);
+ if (foundPattern == null || foundPattern.isEmpty())
+ return;
+ // TODO add filtering of patterns depending on pattern's preconditions
+ executeWithInjection(foundPattern, context, model);
+ }
+
+ protected void executeWithInjection(Collection<Pattern> patterns, PatternContext context, Object model) throws PatternException {
+ for (Pattern pattern : patterns) {
+ try {
+ Map<PatternParameter, Object> parameters = new HashMap<PatternParameter, Object>();
+ parameters.put(pattern.getAllParameters().get(0), model);
+ PatternExtension extension = ExtensionHelper.getExtension(pattern.getNature());
+ String canExecute = extension.canExecute(pattern);
+ if (canExecute != null)
+ throw new PatternException(canExecute);
+ extension.createEngine(pattern).executeWithInjection(context, parameters);
+ } catch (MissingExtensionException e) {
+ throw new PatternException(e);
+ }
+ }
+ }
+
+ public void dispose() {
+ visited.clear();
+ for (String key : type2patterns.keySet()) {
+ type2patterns.get(key).clear();
+ }
+ type2patterns.clear();
+
+ }
+
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/strategy/modeldriven/EmfModelVisitor.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/strategy/modeldriven/EmfModelVisitor.java
new file mode 100644
index 0000000..2915499
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/strategy/modeldriven/EmfModelVisitor.java
@@ -0,0 +1,43 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.strategy.modeldriven;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * TODO: improve pattern selection: At present time, the selection is done via
+ * type matching. We can imagine a custom matching policy (for example a pattern
+ * can apply if and only if the model element is named 'toto')
+ *
+ * @author Thomas Guiu
+ *
+ */
+public class EmfModelVisitor extends DefaultDomainVisitor {
+ private static final List<Object> EMPTY_LIST = new ArrayList<Object>();
+
+ public List<?> getChildren(Object model) {
+ // a implementer par les users en fct du model
+ if (model instanceof EObject)
+ return ((EObject) model).eContents();
+ if (model instanceof List<?>)
+ return (List<?>)model;
+ return EMPTY_LIST;
+ }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/strategy/modeldriven/ModelDrivenCallBackHandler.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/strategy/modeldriven/ModelDrivenCallBackHandler.java
new file mode 100644
index 0000000..e1a3a10
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/strategy/modeldriven/ModelDrivenCallBackHandler.java
@@ -0,0 +1,39 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.strategy.modeldriven;
+
+import java.util.Map;
+
+import org.eclipse.egf.model.pattern.CallBackHandler;
+import org.eclipse.egf.model.pattern.DomainVisitor;
+import org.eclipse.egf.model.pattern.PatternContext;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.pattern.Messages;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class ModelDrivenCallBackHandler implements CallBackHandler {
+ public void handleCall(PatternContext ctx, Map<String, Object> parameters) throws PatternException {
+ if (parameters.size() != 1)
+ throw new IllegalStateException(Messages.model_driven_strategy_error1);
+
+ DomainVisitor visitor = (DomainVisitor) ctx.getValue(PatternContext.MODEL_DRIVEN_DOMAIN_VISITOR);
+ if (visitor != null)
+ visitor.visit(ctx, parameters.values().iterator().next());
+ }
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/strategy/modeldriven/ModelDrivenStrategy.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/strategy/modeldriven/ModelDrivenStrategy.java
new file mode 100644
index 0000000..b6f8492
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/strategy/modeldriven/ModelDrivenStrategy.java
@@ -0,0 +1,51 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.strategy.modeldriven;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.egf.model.pattern.DomainVisitor;
+import org.eclipse.egf.model.pattern.Pattern;
+import org.eclipse.egf.model.pattern.PatternContext;
+import org.eclipse.egf.model.pattern.PatternException;
+import org.eclipse.egf.pattern.collector.PatternCollector;
+import org.eclipse.egf.pattern.extension.ExtensionHelper.MissingExtensionException;
+import org.eclipse.egf.pattern.strategy.AbstractStrategy;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class ModelDrivenStrategy extends AbstractStrategy {
+
+ public void execute(PatternContext context, Object parameter) throws PatternException, MissingExtensionException {
+ Set<Pattern> result = new HashSet<Pattern>(100);
+ PatternCollector.INSTANCE.collect(patternElements, result);
+
+ List<Object> model = (List<Object>) context.getValue(PatternContext.DOMAIN_OBJECTS);
+
+ final DomainVisitor visitor = (DomainVisitor) context.getValue(PatternContext.MODEL_DRIVEN_DOMAIN_VISITOR);
+ visitor.setPatterns(result);
+ try {
+ visitor.visit(context, model);
+ } finally {
+ visitor.dispose();
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/templates/SimpleEngine.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/templates/SimpleEngine.java
new file mode 100644
index 0000000..a564c39
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/templates/SimpleEngine.java
@@ -0,0 +1,51 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.templates;
+
+import java.io.IOException;
+import java.util.Map;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.egf.pattern.PatternPreferences;
+import org.eclipse.egf.pattern.utils.FileHelper;
+
+/**
+ * This is a quick 'template engine' used for initialization of the contents of
+ * new pattern methods.
+ *
+ * @author Guiu
+ *
+ */
+public class SimpleEngine extends TemplateEngine {
+
+ public SimpleEngine(String pluginId, IProject project, String templateFileExtension) {
+ super(pluginId, project, templateFileExtension);
+ }
+
+ public String process(Templates template, Map<String, String> context) throws CoreException, IOException {
+ IPath path = new Path(PatternPreferences.getTemplatesFolderName()).append(template.getTemplateName()).addFileExtension(getExtension());
+ String content = FileHelper.getContent(getPluginId(), getProject(), path);
+ if (content == null)
+ return null;
+ for (String key : context.keySet()) {
+ content = content.replaceAll(key, context.get(key));
+ }
+ return content;
+ }
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/templates/TemplateEngine.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/templates/TemplateEngine.java
new file mode 100644
index 0000000..5fe2088
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/templates/TemplateEngine.java
@@ -0,0 +1,69 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.templates;
+
+import java.io.IOException;
+import java.util.Map;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ * @author Guiu
+ *
+ */
+public abstract class TemplateEngine {
+
+ private final IProject project;
+ private final String pluginId;
+ private final String extension;
+
+ public TemplateEngine(String pluginId, IProject project, String templateFileExtension) {
+ this.pluginId = pluginId;
+ this.project = project;
+ extension = templateFileExtension;
+ }
+
+ public abstract String process(Templates template, Map<String, String> context) throws CoreException, IOException;
+
+ public IProject getProject() {
+ return project;
+ }
+
+ public String getPluginId() {
+ return pluginId;
+ }
+
+ public String getExtension() {
+ return extension;
+ }
+
+ public static enum Templates {
+
+ HEADER("header"), FOOTER("footer"), INIT("init"), DEFAULT("default");
+
+ private final String templateName;
+
+ private Templates(String name) {
+ templateName = name;
+ }
+
+ public String getTemplateName() {
+ return templateName;
+ }
+
+ }
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/utils/FileHelper.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/utils/FileHelper.java
new file mode 100644
index 0000000..0b34a04
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/utils/FileHelper.java
@@ -0,0 +1,135 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.utils;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.egf.common.constant.EGFCommonConstants;
+import org.eclipse.egf.core.fcore.IPlatformFcore;
+import org.eclipse.egf.pattern.Messages;
+import org.eclipse.emf.common.util.URI;
+import org.osgi.framework.Bundle;
+
+/**
+ *
+ * @author Thomas Guiu
+ *
+ */
+public class FileHelper {
+
+ public static void setContent(IFile file, String source) throws CoreException {
+ setContent(file, new ByteArrayInputStream(source.getBytes()));
+ }
+
+ private static void setContent(IFile file, InputStream source) throws CoreException {
+ if (file.exists())
+ file.setContents(source, true, true, null);
+ else {
+ createParentfolders(file.getProject(), file.getProjectRelativePath().removeLastSegments(1));
+ file.create(source, true, null);
+ }
+ }
+
+ private static void createParentfolders(IProject project, IPath folderPath) throws CoreException {
+ if (folderPath.isEmpty())
+ return;
+ IFolder folder = project.getFolder(folderPath);
+ if (folder == null)
+ throw new IllegalStateException();
+ if (!folder.exists()) {
+ createParentfolders(project, folderPath.removeLastSegments(1));
+ folder.create(true, true, null);
+ }
+ }
+
+ /**
+ * This method tries to read a file from the project and then from the
+ * plugins.
+ *
+ */
+ public static String getContent(String pluginId, IProject project, IPath templatePath) throws CoreException, IOException {
+ IFile file = project.getFile(templatePath);
+ if (file == null)
+ throw new IllegalStateException();
+ if (file.exists())
+ return getFileContent(file);
+
+ Bundle bundle = Platform.getBundle(pluginId);
+ if (bundle == null)
+ throw new IllegalArgumentException(Messages.bind(Messages.fileHelper_error1, pluginId));
+
+ URL entry = bundle.getEntry(templatePath.toPortableString());
+ if (entry == null)
+ throw new IllegalStateException(Messages.bind(Messages.fileHelper_error2, templatePath.toPortableString(), pluginId));
+
+ return getContent(entry.openStream());
+ }
+
+ /**
+ * Reads a file from a plugin who lives in the workspace or RT. If the file
+ * doesn't exist an empty string is returned.
+ *
+ */
+ public static String getContent(IPlatformFcore component, URI uri) throws CoreException, IOException {
+ if (component == null)
+ throw new IllegalArgumentException(Messages.fileHelper_error3);
+ IProject project = component.getPlatformBundle().getProject();
+ if (project != null) {
+ IFile file = project.getFile(uri.path());
+ if (file == null)
+ throw new IllegalStateException();
+ if (!file.exists())
+ return EGFCommonConstants.EMPTY_STRING;
+ return getFileContent(file);
+ }
+
+ Bundle bundle = component.getPlatformBundle().getBundle();
+ if (bundle == null)
+ throw new IllegalArgumentException(Messages.bind(Messages.fileHelper_error1, component.getPlatformBundle().getBundleId()));
+ URL entry = bundle.getEntry(uri.path());
+ if (entry == null)
+ throw new IllegalStateException(Messages.bind(Messages.fileHelper_error2, uri.toString(), component.getPlatformBundle().getBundleId()));
+
+ return getContent(entry.openStream());
+
+ }
+
+ public static String getFileContent(IFile file) throws CoreException, IOException {
+ return getContent(file.getContents());
+ }
+
+ private static String getContent(InputStream contents) throws CoreException, IOException {
+ byte[] buf = null;
+ try {
+ buf = new byte[contents.available()];
+ contents.read(buf);
+ } finally {
+ if (contents != null)
+ contents.close();
+ }
+ return new String(buf);
+ }
+
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/utils/JavaMethodGenerationHelper.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/utils/JavaMethodGenerationHelper.java
new file mode 100644
index 0000000..2a9b442
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/utils/JavaMethodGenerationHelper.java
@@ -0,0 +1,50 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.utils;
+
+import org.eclipse.egf.model.pattern.PatternMethod;
+import org.eclipse.egf.model.pattern.PatternParameter;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class JavaMethodGenerationHelper {
+
+ private final String bufferName;
+ private StringBuilder content;
+
+ public JavaMethodGenerationHelper(String bufferName) {
+ this.bufferName = bufferName;
+ }
+
+ public void addCallStatement(PatternMethod called) {
+ content.append("method_").append(called.getName()).append("(ictx.getBuffer(), ictx);");
+ }
+
+ public void addSignature(PatternMethod called) {
+ content.append("protected void method_").append(called.getName()).append("(final StringBuffer ").append(bufferName).append(", final PatternContext ctx)throws Exception ");
+ }
+
+ public void setContent(StringBuilder content) {
+ this.content = content;
+ }
+
+ public static String getSetterMethod(PatternParameter param) {
+ String name = param.getName();
+ return "set_" + name;
+ }
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/utils/NsURIHelper.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/utils/NsURIHelper.java
new file mode 100644
index 0000000..8b90742
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/utils/NsURIHelper.java
@@ -0,0 +1,37 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.utils;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ *
+ * @author Thomas Guiu
+ *
+ */
+public class NsURIHelper {
+ public static String getFullName(EObject obj) {
+ String nsURI = null;
+ String typeName = null;
+ EClass eClass = obj.eClass();
+ nsURI = eClass.getEPackage().getNsURI();
+ typeName = eClass.getName();
+ if (nsURI == null || typeName == null)
+ return null;
+ return nsURI + "#//" + typeName;
+ }
+}
diff --git a/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/utils/ParameterTypeHelper.java b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/utils/ParameterTypeHelper.java
new file mode 100644
index 0000000..207d605
--- /dev/null
+++ b/org.eclipse.egf.pattern/src/org/eclipse/egf/pattern/utils/ParameterTypeHelper.java
@@ -0,0 +1,101 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.pattern.utils;
+
+import org.eclipse.egf.pattern.Messages;
+import org.eclipse.egf.pattern.ecore.EPackageHelper;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+
+/**
+ *
+ * @author Thomas Guiu
+ *
+ */
+public class ParameterTypeHelper {
+ public static final ParameterTypeHelper INSTANCE = new ParameterTypeHelper();
+
+ /**
+ * Compute the literal value associated to the given type.<br/>
+ * It can be a java classname or an uri to an EObject.
+ *
+ *
+ */
+ public String getTypeLiteral(String type) {
+ if (type == null || "".equals(type))
+ throw new IllegalArgumentException();
+ int index = type.indexOf('#');
+ if (index == -1)
+ return type;
+ EPackage ePackage = getEPackage(type, index);
+ String nsURI = ePackage.getNsURI();
+ String basePackage = EPackageHelper.getBasePackage(ePackage);
+ if (basePackage == null)
+ throw new IllegalStateException(Messages.bind(Messages.assembly_error7, type));
+
+ if ("".equals(basePackage))
+ return ePackage.getName() + "." + getClassName(type, index);
+ return basePackage + "." + getClassName(type, index);
+ }
+
+ /**
+ * load the type described in the string parameter.<br/>
+ * It can be a java classname or an uri to an EObject.
+ */
+ public Object loadClass(String type) {
+ if (type == null || "".equals(type))
+ throw new IllegalArgumentException();
+ int index = type.indexOf('#');
+ if (index > 0) {
+ return loadEClass(type, index);
+ }
+ try {
+ return getClass().getClassLoader().loadClass(type);
+ } catch (ClassNotFoundException e) {
+ throw new IllegalStateException(e);
+ }
+ }
+
+ private EClass loadEClass(String type, int index) {
+ String nsuri = getNsURI(type, index);
+ String className = getClassName(type, index);
+
+ EPackage ePackage = getEPackage(type, index);
+ EClass eClassifier = (EClass) ePackage.getEClassifier(className);
+ if (eClassifier == null)
+ throw new IllegalStateException(Messages.bind(Messages.classloader_error3, className, nsuri));
+ return eClassifier;
+ }
+
+ private EPackage getEPackage(String type, int index) {
+ return EPackageHelper.REGISTRY.getEPackage(getNsURI(type, index));
+ }
+
+ private String getNsURI(String type, int index) {
+ return type.substring(0, index);
+ }
+
+ private String getClassName(String type, int index) {
+ String className = type.substring(index + 1);
+ if (className.startsWith("//"))
+ return className.substring(2);
+ return className;
+ }
+
+ private ParameterTypeHelper() {
+ }
+
+}
diff --git a/org.eclipse.egf.producer.ui/.classpath b/org.eclipse.egf.producer.ui/.classpath
new file mode 100644
index 0000000..2d1a430
--- /dev/null
+++ b/org.eclipse.egf.producer.ui/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.egf.producer.ui/.options b/org.eclipse.egf.producer.ui/.options
new file mode 100644
index 0000000..49a9951
--- /dev/null
+++ b/org.eclipse.egf.producer.ui/.options
@@ -0,0 +1,2 @@
+# Prints debug information
+org.eclipse.egf.producer.ui/debug=true
diff --git a/org.eclipse.egf.producer.ui/.project b/org.eclipse.egf.producer.ui/.project
new file mode 100644
index 0000000..dac4920
--- /dev/null
+++ b/org.eclipse.egf.producer.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.producer.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.producer.ui/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egf.producer.ui/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..b5bbc46
--- /dev/null
+++ b/org.eclipse.egf.producer.ui/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:54:59 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.egf.producer.ui/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egf.producer.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..012e9a8
--- /dev/null
+++ b/org.eclipse.egf.producer.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Tue Nov 03 17:30:38 CET 2009
+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/org.eclipse.egf.producer.ui/META-INF/MANIFEST.MF b/org.eclipse.egf.producer.ui/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..2645dc3
--- /dev/null
+++ b/org.eclipse.egf.producer.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.producer.ui;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.egf.producer.ui.EGFProducerUIPlugin
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle:
+ org.eclipse.ui.workbench,
+ org.eclipse.core.expressions,
+ org.eclipse.egf.core.ui,
+ org.eclipse.egf.producer,
+ org.eclipse.emf.edit,
+ org.eclipse.egf.model.fprod.edit,
+ org.eclipse.egf.model.editor
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.egf.producer.ui/about.html b/org.eclipse.egf.producer.ui/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/org.eclipse.egf.producer.ui/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/org.eclipse.egf.producer.ui/build.properties b/org.eclipse.egf.producer.ui/build.properties
new file mode 100644
index 0000000..36be418
--- /dev/null
+++ b/org.eclipse.egf.producer.ui/build.properties
@@ -0,0 +1,20 @@
+##
+# 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
+##
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ icons/,\
+ .,\
+ .options,\
+ about.html,\
+ plugin.xml,\
+ plugin.properties
+src.includes = about.html
diff --git a/org.eclipse.egf.producer.ui/icons/full/elcl16/runactivity.gif b/org.eclipse.egf.producer.ui/icons/full/elcl16/runactivity.gif
new file mode 100644
index 0000000..78b3797
--- /dev/null
+++ b/org.eclipse.egf.producer.ui/icons/full/elcl16/runactivity.gif
Binary files differ
diff --git a/org.eclipse.egf.producer.ui/plugin.properties b/org.eclipse.egf.producer.ui/plugin.properties
new file mode 100644
index 0000000..f5a8fdd
--- /dev/null
+++ b/org.eclipse.egf.producer.ui/plugin.properties
@@ -0,0 +1,24 @@
+##
+# 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 Producer UI (Incubation)
+providerName=Eclipse Modeling Project
+
+EGFRunActionSet_label= EGF Run
+EGFRunActionSet_description= EGF Run Action Set
+
+RunActivityAction_label=Run &EGF Activity...
+RunActivityAction_tooltip=Run an EGF Activity
+
+ActionDefinition_runActivity_name = Run EGF Activity
+ActionDefinition_runActivity_description= Run an EGF Activity in the Workbench
+
+activityContractMandatory_Label=Mandatory ActivityContract Decorator
diff --git a/org.eclipse.egf.producer.ui/plugin.xml b/org.eclipse.egf.producer.ui/plugin.xml
new file mode 100644
index 0000000..548b2b1
--- /dev/null
+++ b/org.eclipse.egf.producer.ui/plugin.xml
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+
+<!--
+
+ 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>
+
+ <!-- ================================================================================= -->
+ <!-- popupMenus -->
+ <!-- ================================================================================= -->
+
+ <extension
+ point="org.eclipse.ui.popupMenus"
+ >
+
+ <objectContribution
+ id="org.eclipse.egf.producer.ui.activity.contribution"
+ objectClass="org.eclipse.egf.model.fcore.Activity"
+ >
+
+ <action
+ class="org.eclipse.egf.producer.ui.internal.actions.RunActivityAction"
+ icon="$nl$/icons/full/elcl16/runactivity.gif"
+ id="org.eclipse.egf.model.producer.ui.activity.contribution.action.run.activity"
+ label="%RunActivityAction_label"
+ enablesFor="1"
+ menubarPath="additions"
+ tooltip="%RunActivityAction_tooltip"
+ />
+
+ </objectContribution>
+
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.popupMenus"
+ >
+
+ <objectContribution
+ id="org.eclipse.egf.producer.ui.activity.contribution"
+ objectClass="org.eclipse.core.resources.IFile"
+ nameFilter="*.fcore"
+ >
+
+ <action
+ class="org.eclipse.egf.producer.ui.internal.actions.RunActivityAction"
+ icon="$nl$/icons/full/elcl16/runactivity.gif"
+ id="org.eclipse.egf.producer.ui.activity.contribution.action.run.activity"
+ label="%RunActivityAction_label"
+ enablesFor="1"
+ menubarPath="additions"
+ tooltip="%RunActivityAction_tooltip"
+ />
+
+ </objectContribution>
+
+ </extension>
+
+ <!-- ================================================================================= -->
+ <!-- decorators -->
+ <!-- ================================================================================= -->
+
+ <extension
+ point="org.eclipse.ui.decorators"
+ >
+ <decorator
+ class="org.eclipse.egf.producer.ui.decorators.MandatoryLabelDecorator"
+ id="org.eclipse.egf.producer.ui.decorators.mandatorylabeldecorator"
+ label="%activityContractMandatory_Label"
+ lightweight="true"
+ location="TOP_LEFT"
+ state="true"
+ >
+ <enablement>
+ <objectClass
+ name="org.eclipse.egf.model.fcore.Contract"
+ />
+ </enablement>
+ </decorator>
+ </extension>
+
+ <!-- ================================================================================= -->
+ <!-- ActionSets -->
+ <!-- ================================================================================= -->
+
+ <extension
+ point="org.eclipse.ui.actionSets"
+ >
+
+ <actionSet
+ label="%EGFRunActionSet_label"
+ description="%EGFRunActionSet_description"
+ visible="true"
+ id="org.eclipse.egf.producer.ui.run.actionSet"
+ >
+
+ <action
+ id="org.eclipse.egf.producer.ui.run.actionSet.global.activity.action"
+ toolbarPath="org.eclipse.debug.ui.launchActionSet/debug"
+ class="org.eclipse.egf.producer.ui.internal.actions.GlobalRunActivityAction"
+ definitionId="org.eclipse.egf.producer.ui.run.actionSet.global.activity.action.definition"
+ icon="$nl$/icons/full/elcl16/runactivity.gif"
+ label="%RunActivityAction_label"
+ menubarPath="org.eclipse.ui.run/runGroup"
+ tooltip="%RunActivityAction_tooltip"
+ />
+
+ </actionSet>
+
+ </extension>
+
+ <!-- ================================================================================= -->
+ <!-- Command Run -->
+ <!-- ================================================================================= -->
+
+ <extension
+ point="org.eclipse.ui.commands"
+ >
+
+ <command
+ name="%ActionDefinition_runActivity_name"
+ description="%ActionDefinition_runActivity_description"
+ categoryId="org.eclipse.debug.ui.category.run"
+ id="org.eclipse.egf.producer.ui.run.actionSet.global.activity.action.definition"
+ />
+
+ </extension>
+
+ <!-- ================================================================================= -->
+ <!-- Bindings -->
+ <!-- ================================================================================= -->
+
+ <extension
+ point="org.eclipse.ui.bindings"
+ >
+
+ <!-- ================================================================================= -->
+ <!-- win32: M1=CTRL, M2=SHIFT, M3=ALT, M4=- -->
+ <!-- carbon: M1=COMMAND, M2=SHIFT, M3=ALT, M4=CTRL -->
+ <!-- ================================================================================= -->
+
+ <!-- ================================================================================= -->
+ <!-- Key Run -->
+ <!-- ================================================================================= -->
+
+ <key
+ sequence="M1+M3+B"
+ commandId="org.eclipse.egf.producer.ui.run.actionSet.global.activity.action.definition"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ />
+
+ </extension>
+
+</plugin>
diff --git a/org.eclipse.egf.producer.ui/src/org/eclipse/egf/producer/ui/EGFProducerUIPlugin.java b/org.eclipse.egf.producer.ui/src/org/eclipse/egf/producer/ui/EGFProducerUIPlugin.java
new file mode 100644
index 0000000..85ab56a
--- /dev/null
+++ b/org.eclipse.egf.producer.ui/src/org/eclipse/egf/producer/ui/EGFProducerUIPlugin.java
@@ -0,0 +1,78 @@
+package org.eclipse.egf.producer.ui;
+
+import org.eclipse.egf.common.ui.activator.EGFAbstractUIPlugin;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class EGFProducerUIPlugin extends EGFAbstractUIPlugin {
+
+ // The shared instance
+ private static EGFProducerUIPlugin __plugin;
+
+ /**
+ *
+ * Returns the currently active window for this workbench (if any). Returns
+ * <code>null</code> if there is no active workbench window. Returns
+ * <code>null</code> if called from a non-UI thread.
+ *
+ * @return the active workbench window, or <code>null</code> if there is
+ * no active workbench window or if called from a non-UI thread
+ */
+ public static IWorkbenchWindow getActiveWorkbenchWindow() {
+ return getDefault().getWorkbench().getActiveWorkbenchWindow();
+ }
+
+ /**
+ * Returns the currently active shell for this workbench (if any).
+ *
+ * @return the active workbench shell.
+ */
+ public static Shell getActiveWorkbenchShell() {
+ IWorkbenchWindow window = getActiveWorkbenchWindow();
+ if (window == null) {
+ IWorkbenchWindow[] windows = getDefault().getWorkbench().getWorkbenchWindows();
+ if (windows.length > 0) {
+ return windows[0].getShell();
+ }
+ } else {
+ return window.getShell();
+ }
+ return null;
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ __plugin = this;
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ __plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static EGFProducerUIPlugin getDefault() {
+ return __plugin;
+ }
+
+}
diff --git a/org.eclipse.egf.producer.ui/src/org/eclipse/egf/producer/ui/decorators/MandatoryLabelDecorator.java b/org.eclipse.egf.producer.ui/src/org/eclipse/egf/producer/ui/decorators/MandatoryLabelDecorator.java
new file mode 100644
index 0000000..b56aa0c
--- /dev/null
+++ b/org.eclipse.egf.producer.ui/src/org/eclipse/egf/producer/ui/decorators/MandatoryLabelDecorator.java
@@ -0,0 +1,84 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.producer.ui.decorators;
+
+import org.eclipse.egf.core.ui.EGFCoreUIPlugin;
+import org.eclipse.egf.core.ui.IEGFCoreUIImages;
+import org.eclipse.egf.model.fcore.Contract;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IDecoration;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ILightweightLabelDecorator;
+
+/**
+ * Decorate ActivityContract with an overlay to enlight mandatory contract.
+ *
+ * @author Xavier Maysonnave
+ */
+public class MandatoryLabelDecorator implements ILightweightLabelDecorator {
+
+ private ImageDescriptor _mandatoryImage;
+
+ /**
+ * @see org.eclipse.jface.viewers.ILightweightLabelDecorator#decorate(java.lang.Object,
+ * org.eclipse.jface.viewers.IDecoration)
+ */
+ public void decorate(Object element, IDecoration decoration) {
+ if (element instanceof Contract) {
+ Contract contract = (Contract) element;
+ if (contract.isMandatory()) {
+ decoration.addOverlay(getMandatoryImage());
+ }
+ }
+ }
+
+ /**
+ * Return the image for the decoration that should be used to cue the user that a field is
+ * required.
+ *
+ * @return a not null image.
+ */
+ private ImageDescriptor getMandatoryImage() {
+ if (_mandatoryImage == null) {
+ _mandatoryImage = EGFCoreUIPlugin.getDefault().getImageDescriptor(IEGFCoreUIImages.IMG_MANDATORY);
+ }
+ return _mandatoryImage;
+ }
+
+ /**
+ * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
+ */
+ public void addListener(ILabelProviderListener listener_p) {
+ // Do nothing.
+ }
+
+ /**
+ * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
+ */
+ public void dispose() {
+ _mandatoryImage = null;
+ }
+
+ /**
+ * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object,
+ * java.lang.String)
+ */
+ public boolean isLabelProperty(Object element_p, String property_p) {
+ return false;
+ }
+
+ /**
+ * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
+ */
+ public void removeListener(ILabelProviderListener listener_p) {
+ // Do nothing.
+ }
+}
diff --git a/org.eclipse.egf.producer.ui/src/org/eclipse/egf/producer/ui/internal/actions/GlobalRunActivityAction.java b/org.eclipse.egf.producer.ui/src/org/eclipse/egf/producer/ui/internal/actions/GlobalRunActivityAction.java
new file mode 100644
index 0000000..962259e
--- /dev/null
+++ b/org.eclipse.egf.producer.ui/src/org/eclipse/egf/producer/ui/internal/actions/GlobalRunActivityAction.java
@@ -0,0 +1,298 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.egf.producer.ui.internal.actions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.resources.WorkspaceJob;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.egf.common.helper.EMFHelper;
+import org.eclipse.egf.common.l10n.EGFCommonMessages;
+import org.eclipse.egf.common.ui.helper.ThrowableHandler;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.core.l10n.EGFCoreMessages;
+import org.eclipse.egf.core.preferences.IEGFModelConstants;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.core.ui.EGFCoreUIPlugin;
+import org.eclipse.egf.core.ui.diagnostic.EGFValidator;
+import org.eclipse.egf.model.editor.dialogs.ActivitySelectionDialog;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.producer.EGFProducerPlugin;
+import org.eclipse.egf.producer.l10n.ProducerMessages;
+import org.eclipse.egf.producer.manager.ActivityManagerProducer;
+import org.eclipse.egf.producer.manager.IActivityManager;
+import org.eclipse.egf.producer.ui.EGFProducerUIPlugin;
+import org.eclipse.egf.producer.ui.internal.dialogs.ActivityValidationSelectionDialog;
+import org.eclipse.egf.producer.ui.internal.ui.ProducerUIImages;
+import org.eclipse.egf.producer.ui.l10n.ProducerUIMessages;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialogWithToggle;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.ui.IActionDelegate2;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.eclipse.ui.progress.IProgressConstants;
+
+public class GlobalRunActivityAction extends Action implements IWorkbenchWindowActionDelegate, IActionDelegate2 {
+
+ /**
+ * Activities to validate (if any)
+ */
+ private List<Activity> _validates = null;
+
+ public GlobalRunActivityAction() {
+ super();
+ setText(ProducerUIMessages.GlobalRunActivityAction_label);
+ setDescription(ProducerUIMessages.GlobalRunActivityAction_description);
+ setToolTipText(ProducerUIMessages.GlobalRunActivityAction_tooltip);
+ setImageDescriptor(ProducerUIImages.EGF_RUN_ACTIVITY);
+ }
+
+ @Override
+ public void run() {
+ runWithEvent(null);
+ }
+
+ @Override
+ public void runWithEvent(Event event) {
+
+ _validates = null;
+
+ // 1 - Activity Selection
+ ActivitySelectionDialog activityDialog = new ActivitySelectionDialog(EGFProducerUIPlugin.getActiveWorkbenchShell(), false);
+ activityDialog.setTitle(ProducerUIMessages.GlobalRunActivityAction_dialogTitle);
+ int result = activityDialog.open();
+ if (result != IDialogConstants.OK_ID) {
+ return;
+ }
+ final Object[] selection = activityDialog.getResult();
+ if (selection == null || selection.length != 1) {
+ return;
+ }
+
+ final Activity[] activity = new Activity[] { (Activity) selection[0] };
+ Throwable throwable = null;
+ final IActivityManager<?>[] activityManager = new IActivityManager[1];
+ final int[] ticks = new int[1];
+
+ // 2 - Locate a Manager Producer
+ try {
+ ActivityManagerProducer<Activity> producer = null;
+ try {
+ producer = EGFProducerPlugin.getActivityManagerProducer(activity[0]);
+ } catch (Throwable t) {
+ throw new InvocationException(t);
+ }
+ // Create a Manager
+ activityManager[0] = producer.createActivityManager(activity[0]);
+ } catch (Throwable t) {
+ throwable = t;
+ }
+
+ // 3 - Validation
+ if (throwable == null) {
+ try {
+ IPreferenceStore store = EGFCoreUIPlugin.getDefault().getPreferenceStore();
+ String validate = store.getString(IEGFModelConstants.VALIDATE_MODEL_INSTANCES_BEFORE_LAUNCH);
+ List<Activity> activities = activityManager[0].getActivities();
+ int status = showValidateDialog(activities, validate.equals(MessageDialogWithToggle.NEVER) == false, validate.equals(MessageDialogWithToggle.PROMPT));
+ if (status != IDialogConstants.OK_ID) {
+ return;
+ }
+ if (_validates != null && _validates.size() != 0) {
+ EGFValidator validator = new EGFValidator(_validates);
+ Diagnostic validationDiag = validator.validate();
+ // Stop when an error is found
+ if (validationDiag.getSeverity() == Diagnostic.ERROR) {
+ return;
+ }
+ }
+ } catch (InvocationException ie) {
+ throwable = ie;
+ }
+ }
+
+ // 4 - PreInvoke Validation
+ if (throwable == null) {
+ try {
+ // Initialize Context
+ activityManager[0].initializeContext();
+ // Check if activity could be invoked
+ final Diagnostic preInvokeDiag = activityManager[0].canInvoke();
+ if (preInvokeDiag.getSeverity() != Diagnostic.OK) {
+ if (EGFProducerUIPlugin.getWorkbenchDisplay() != null) {
+ EGFProducerUIPlugin.getWorkbenchDisplay().asyncExec(new Runnable() {
+ public void run() {
+ EGFValidator.handleDiagnostic(ProducerUIMessages.ActivityValidationSelectionDialog_Title, ProducerUIMessages._UI_PreInvokeProblems_message, preInvokeDiag);
+ }
+ });
+ }
+ if (preInvokeDiag.getSeverity() == Diagnostic.ERROR) {
+ return;
+ }
+ }
+ } catch (InvocationException ie) {
+ throwable = ie;
+ }
+ }
+
+ // 5 - Count Ticks
+ if (throwable == null) {
+ try {
+ ticks[0] = activityManager[0].getSteps();
+ } catch (Throwable t) {
+ throwable = t;
+ }
+ }
+
+ // 6 - Run activity
+ if (throwable == null) {
+
+ WorkspaceJob activityJob = new WorkspaceJob(ProducerUIMessages.GlobalRunActivityAction_label) {
+
+ @Override
+ public boolean belongsTo(Object family) {
+ return EGFCorePlugin.FAMILY_MANUAL_BUILD.equals(family);
+ }
+
+ @Override
+ public IStatus runInWorkspace(IProgressMonitor innerMonitor) throws CoreException {
+ // Invoke
+ SubMonitor subMonitor = SubMonitor.convert(innerMonitor, NLS.bind(EGFCoreMessages.Production_Invoke, EMFHelper.getText(activityManager[0].getElement())), (1000 * ticks[0]));
+ try {
+ try {
+ if (EGFProducerUIPlugin.getDefault().isDebugging()) {
+ if (ticks[0] == 1) {
+ EGFProducerUIPlugin.getDefault().logInfo(NLS.bind(ProducerMessages.Activity_Invocation, EMFHelper.getText(activity[0])));
+ } else {
+ EGFProducerUIPlugin.getDefault().logInfo(NLS.bind(ProducerMessages.Activity_Invocations, EMFHelper.getText(activity[0]), ticks[0]));
+ }
+ }
+ final Diagnostic diagnostic = activityManager[0].invoke(subMonitor.newChild(1000 * ticks[0], SubMonitor.SUPPRESS_NONE));
+ if (subMonitor.isCanceled()) {
+ throw new OperationCanceledException();
+ }
+ // PostInvoke Validation
+ if (diagnostic != null && diagnostic.getSeverity() != Diagnostic.OK) {
+ if (EGFProducerUIPlugin.getWorkbenchDisplay() != null) {
+ EGFProducerUIPlugin.getWorkbenchDisplay().asyncExec(new Runnable() {
+ public void run() {
+ EGFValidator.handleDiagnostic(ProducerUIMessages.ActivityValidationSelectionDialog_Title, ProducerUIMessages._UI_PostInvokeProblems_message, diagnostic);
+ }
+ });
+ }
+ }
+ } catch (InvocationException ie) {
+ if (ie.getCause() != null && ie.getCause() instanceof CoreException) {
+ throw (CoreException) ie.getCause();
+ }
+ ThrowableHandler.handleThrowable(EGFProducerUIPlugin.getDefault().getPluginID(), ie);
+ } catch (Throwable t) {
+ throw new CoreException(EGFProducerUIPlugin.getDefault().newStatus(IStatus.ERROR, EGFCommonMessages.Exception_unexpectedException, t));
+ } finally {
+ try {
+ activityManager[0].dispose();
+ } catch (InvocationException ie) {
+ if (ie.getCause() != null && ie.getCause() instanceof CoreException) {
+ throw (CoreException) ie.getCause();
+ }
+ ThrowableHandler.handleThrowable(EGFProducerUIPlugin.getDefault().getPluginID(), ie);
+ } catch (Throwable t) {
+ throw new CoreException(EGFProducerUIPlugin.getDefault().newStatus(IStatus.ERROR, EGFCommonMessages.Exception_unexpectedException, t));
+ }
+ }
+ } finally {
+ innerMonitor.done();
+ }
+ return Status.OK_STATUS;
+ }
+ };
+ activityJob.setRule(ResourcesPlugin.getWorkspace().getRuleFactory().buildRule());
+ activityJob.setProperty(IProgressConstants.ICON_PROPERTY, ProducerUIImages.EGF_RUN_ACTIVITY);
+ activityJob.setPriority(Job.LONG);
+ activityJob.setUser(true);
+ activityJob.setSystem(false);
+ activityJob.schedule();
+
+ }
+
+ if (throwable != null && throwable instanceof InterruptedException == false) {
+ ThrowableHandler.handleThrowable(EGFProducerUIPlugin.getDefault().getPluginID(), throwable);
+ }
+
+ return;
+
+ }
+
+ private int showValidateDialog(List<Activity> activities, boolean validate, boolean prompt) {
+ if (validate) {
+ if (prompt && activities != null && activities.size() > 0) {
+ ActivityValidationSelectionDialog dialog = new ActivityValidationSelectionDialog(EGFProducerUIPlugin.getActiveWorkbenchShell(), activities);
+ if (dialog.open() == IDialogConstants.CANCEL_ID) {
+ return IDialogConstants.CANCEL_ID;
+ }
+ Object[] objects = dialog.getResult();
+ _validates = new ArrayList<Activity>(objects.length);
+ for (int i = 0; i < objects.length; i++) {
+ _validates.add((Activity) objects[i]);
+ }
+ } else {
+ _validates = activities;
+ }
+ }
+ return IDialogConstants.OK_ID;
+ }
+
+ // ---- IWorkbenchWindowActionDelegate
+ // ------------------------------------------------
+
+ public void run(IAction action) {
+ run();
+ }
+
+ public void dispose() {
+ // do nothing.
+ }
+
+ public void init(IWorkbenchWindow window) {
+ // do nothing.
+ }
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ // do nothing. Action doesn't depend on selection.
+ }
+
+ // ---- IActionDelegate2
+ // ------------------------------------------------
+
+ public void runWithEvent(IAction action, Event event) {
+ runWithEvent(event);
+ }
+
+ public void init(IAction action) {
+ // do nothing.
+ }
+
+}
diff --git a/org.eclipse.egf.producer.ui/src/org/eclipse/egf/producer/ui/internal/actions/RunActivityAction.java b/org.eclipse.egf.producer.ui/src/org/eclipse/egf/producer/ui/internal/actions/RunActivityAction.java
new file mode 100644
index 0000000..4fd5b5f
--- /dev/null
+++ b/org.eclipse.egf.producer.ui/src/org/eclipse/egf/producer/ui/internal/actions/RunActivityAction.java
@@ -0,0 +1,318 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.egf.producer.ui.internal.actions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.resources.WorkspaceJob;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.egf.common.helper.EMFHelper;
+import org.eclipse.egf.common.l10n.EGFCommonMessages;
+import org.eclipse.egf.common.ui.helper.ThrowableHandler;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.core.fcore.IPlatformFcore;
+import org.eclipse.egf.core.helper.ResourceHelper;
+import org.eclipse.egf.core.l10n.EGFCoreMessages;
+import org.eclipse.egf.core.preferences.IEGFModelConstants;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.core.ui.EGFCoreUIPlugin;
+import org.eclipse.egf.core.ui.diagnostic.EGFValidator;
+import org.eclipse.egf.model.editor.dialogs.ActivitySelectionDialog;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.producer.EGFProducerPlugin;
+import org.eclipse.egf.producer.l10n.ProducerMessages;
+import org.eclipse.egf.producer.manager.ActivityManagerProducer;
+import org.eclipse.egf.producer.manager.IActivityManager;
+import org.eclipse.egf.producer.ui.EGFProducerUIPlugin;
+import org.eclipse.egf.producer.ui.internal.dialogs.ActivityValidationSelectionDialog;
+import org.eclipse.egf.producer.ui.internal.ui.ProducerUIImages;
+import org.eclipse.egf.producer.ui.l10n.ProducerUIMessages;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialogWithToggle;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.progress.IProgressConstants;
+
+public class RunActivityAction implements IObjectActionDelegate {
+
+ private IPlatformFcore _fcore;
+
+ private Activity _activity;
+
+ /**
+ * Activities to validate (if any)
+ */
+ private List<Activity> _validates = null;
+
+ public void run(IAction action) {
+
+ _validates = null;
+
+ // 1 - Activity Selection
+ if (_fcore != null) {
+ ActivitySelectionDialog activityDialog = new ActivitySelectionDialog(EGFProducerUIPlugin.getActiveWorkbenchShell(), _fcore, false);
+ activityDialog.setTitle(ProducerUIMessages.GlobalRunActivityAction_dialogTitle);
+ int result = activityDialog.open();
+ if (result != IDialogConstants.OK_ID) {
+ return;
+ }
+ final Object[] selection = activityDialog.getResult();
+ if (selection == null || selection.length != 1) {
+ return;
+ }
+ _activity = (Activity) selection[0];
+ }
+
+ // Nothing to process
+ if (_activity == null) {
+ return;
+ }
+
+ final IActivityManager<?>[] activityManager = new IActivityManager[1];
+ Throwable throwable = null;
+ final int[] ticks = new int[1];
+
+ // 2 - Locate a Manager Producer
+ try {
+ ActivityManagerProducer<Activity> producer = null;
+ try {
+ producer = EGFProducerPlugin.getActivityManagerProducer(_activity);
+ } catch (Throwable t) {
+ throw new InvocationException(t);
+ }
+ // Create a Manager
+ activityManager[0] = producer.createActivityManager(_activity);
+ } catch (Throwable t) {
+ throwable = t;
+ }
+
+ // 3 - Validation
+ if (throwable == null) {
+ try {
+ IPreferenceStore store = EGFCoreUIPlugin.getDefault().getPreferenceStore();
+ String validate = store.getString(IEGFModelConstants.VALIDATE_MODEL_INSTANCES_BEFORE_LAUNCH);
+ List<Activity> activities = activityManager[0].getActivities();
+ int status = showValidateDialog(activities, validate.equals(MessageDialogWithToggle.NEVER) == false, validate.equals(MessageDialogWithToggle.PROMPT));
+ if (status != IDialogConstants.OK_ID) {
+ return;
+ }
+ if (_validates != null && _validates.size() != 0) {
+ EGFValidator validator = new EGFValidator(_validates);
+ Diagnostic validationDiag = validator.validate();
+ // Stop when an error is found
+ if (validationDiag.getSeverity() == Diagnostic.ERROR) {
+ return;
+ }
+ }
+ } catch (InvocationException ie) {
+ throwable = ie;
+ }
+ }
+
+ // 4 - PreInvoke Validation
+ if (throwable == null) {
+ try {
+ // Initialize Context
+ activityManager[0].initializeContext();
+ // Check if activity could be invoked
+ final Diagnostic preInvokeDiag = activityManager[0].canInvoke();
+ if (preInvokeDiag.getSeverity() != Diagnostic.OK) {
+ if (EGFProducerUIPlugin.getWorkbenchDisplay() != null) {
+ EGFProducerUIPlugin.getWorkbenchDisplay().asyncExec(new Runnable() {
+ public void run() {
+ EGFValidator.handleDiagnostic(ProducerUIMessages.ActivityValidationSelectionDialog_Title, ProducerUIMessages._UI_PreInvokeProblems_message, preInvokeDiag);
+ }
+ });
+ }
+ if (preInvokeDiag.getSeverity() == Diagnostic.ERROR) {
+ return;
+ }
+ }
+ } catch (InvocationException ie) {
+ throwable = ie;
+ }
+ }
+
+ // 5 - Count Ticks
+ if (throwable == null) {
+ try {
+ ticks[0] = activityManager[0].getSteps();
+ } catch (Throwable t) {
+ throwable = t;
+ }
+ }
+
+ // 6 - Run activity
+ if (throwable == null) {
+
+ WorkspaceJob activityJob = new WorkspaceJob(ProducerUIMessages.GlobalRunActivityAction_label) {
+
+ @Override
+ public boolean belongsTo(Object family) {
+ return EGFCorePlugin.FAMILY_MANUAL_BUILD.equals(family);
+ }
+
+ @Override
+ public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
+ try {
+ SubMonitor subMonitor = SubMonitor.convert(monitor, NLS.bind(EGFCoreMessages.Production_Invoke, EMFHelper.getText(activityManager[0].getElement())), (1000 * ticks[0]));
+ try {
+ if (EGFProducerUIPlugin.getDefault().isDebugging()) {
+ if (ticks[0] == 1) {
+ EGFProducerUIPlugin.getDefault().logInfo(NLS.bind(ProducerMessages.Activity_Invocation, EMFHelper.getText(_activity)));
+ } else {
+ EGFProducerUIPlugin.getDefault().logInfo(NLS.bind(ProducerMessages.Activity_Invocations, EMFHelper.getText(_activity), ticks[0]));
+ }
+ }
+ final Diagnostic diagnostic = activityManager[0].invoke(subMonitor.newChild(1000 * ticks[0], SubMonitor.SUPPRESS_NONE));
+ if (subMonitor.isCanceled()) {
+ throw new OperationCanceledException();
+ }
+ // Post Invoke Validation
+ if (diagnostic != null && diagnostic.getSeverity() != Diagnostic.OK) {
+ if (EGFProducerUIPlugin.getWorkbenchDisplay() != null) {
+ EGFProducerUIPlugin.getWorkbenchDisplay().asyncExec(new Runnable() {
+ public void run() {
+ EGFValidator.handleDiagnostic(ProducerUIMessages.ActivityValidationSelectionDialog_Title, ProducerUIMessages._UI_PreInvokeProblems_message, diagnostic);
+ }
+ });
+ }
+ }
+ } catch (InvocationException ie) {
+ if (ie.getCause() != null && ie.getCause() instanceof CoreException) {
+ throw (CoreException) ie.getCause();
+ }
+ ThrowableHandler.handleThrowable(EGFProducerUIPlugin.getDefault().getPluginID(), ie);
+ } catch (Throwable t) {
+ throw new CoreException(EGFProducerUIPlugin.getDefault().newStatus(IStatus.ERROR, EGFCommonMessages.Exception_unexpectedException, t));
+ } finally {
+ try {
+ activityManager[0].dispose();
+ } catch (InvocationException ie) {
+ if (ie.getCause() != null && ie.getCause() instanceof CoreException) {
+ throw (CoreException) ie.getCause();
+ }
+ ThrowableHandler.handleThrowable(EGFProducerUIPlugin.getDefault().getPluginID(), ie);
+ } catch (Throwable t) {
+ throw new CoreException(EGFProducerUIPlugin.getDefault().newStatus(IStatus.ERROR, EGFCommonMessages.Exception_unexpectedException, t));
+ }
+ }
+ } finally {
+ monitor.done();
+ }
+ return Status.OK_STATUS;
+ }
+ };
+ activityJob.setRule(ResourcesPlugin.getWorkspace().getRuleFactory().buildRule());
+ activityJob.setProperty(IProgressConstants.ICON_PROPERTY, ProducerUIImages.EGF_RUN_ACTIVITY);
+ activityJob.setPriority(Job.LONG);
+ activityJob.setUser(true);
+ activityJob.setSystem(false);
+ activityJob.schedule();
+
+ }
+
+ if (throwable != null && throwable instanceof InterruptedException == false) {
+ ThrowableHandler.handleThrowable(EGFProducerUIPlugin.getDefault().getPluginID(), throwable);
+ }
+
+ return;
+
+ }
+
+ protected Activity getActivitySelection(IStructuredSelection selection) {
+ Object selectedObject = selection.getFirstElement();
+ if (selectedObject == null) {
+ return null;
+ }
+ if (selectedObject instanceof Activity) {
+ return (Activity) selectedObject;
+ }
+ return null;
+ }
+
+ protected IPlatformFcore getPlatformFcoreSelection(IStructuredSelection selection) {
+ Object selectedObject = selection.getFirstElement();
+ if (selectedObject == null) {
+ return null;
+ }
+ if (selectedObject instanceof IResource) {
+ // Load this IFile as an EMF Resource
+ try {
+ ResourceSet resourceSet = new ResourceSetImpl();
+ Resource resource = ResourceHelper.loadResource(resourceSet, (IResource) selectedObject);
+ IPlatformFcore fcore = EGFCorePlugin.getPlatformFcore(resource);
+ if (fcore != null) {
+ if (resource.getContents().size() == 1 && resource.getContents().get(0) instanceof Activity) {
+ _activity = (Activity) resource.getContents().get(0);
+ return null;
+ }
+ return fcore;
+ }
+ } catch (Throwable t) {
+ EGFProducerUIPlugin.getDefault().logError(t);
+ }
+ }
+ return null;
+ }
+
+ private int showValidateDialog(List<Activity> activities, boolean validate, boolean prompt) {
+ if (validate) {
+ if (prompt && activities != null && activities.size() > 0) {
+ ActivityValidationSelectionDialog dialog = new ActivityValidationSelectionDialog(EGFProducerUIPlugin.getActiveWorkbenchShell(), activities);
+ if (dialog.open() == IDialogConstants.CANCEL_ID) {
+ return IDialogConstants.CANCEL_ID;
+ }
+ Object[] objects = dialog.getResult();
+ _validates = new ArrayList<Activity>(objects.length);
+ for (int i = 0; i < objects.length; i++) {
+ _validates.add((Activity) objects[i]);
+ }
+ } else {
+ _validates = activities;
+ }
+ }
+ return IDialogConstants.OK_ID;
+ }
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ _activity = null;
+ if (selection instanceof IStructuredSelection) {
+ _activity = getActivitySelection((IStructuredSelection) selection);
+ if (_activity == null) {
+ _fcore = getPlatformFcoreSelection((IStructuredSelection) selection);
+ }
+ }
+ }
+
+ public void setActivePart(IAction action, IWorkbenchPart activePart) {
+ // Nothing to do
+ }
+
+}
diff --git a/org.eclipse.egf.producer.ui/src/org/eclipse/egf/producer/ui/internal/dialogs/ActivityValidationSelectionDialog.java b/org.eclipse.egf.producer.ui/src/org/eclipse/egf/producer/ui/internal/dialogs/ActivityValidationSelectionDialog.java
new file mode 100644
index 0000000..1ba3dde
--- /dev/null
+++ b/org.eclipse.egf.producer.ui/src/org/eclipse/egf/producer/ui/internal/dialogs/ActivityValidationSelectionDialog.java
@@ -0,0 +1,190 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.producer.ui.internal.dialogs;
+
+import java.util.List;
+
+import org.eclipse.egf.core.preferences.IEGFModelConstants;
+import org.eclipse.egf.core.ui.EGFCoreUIPlugin;
+import org.eclipse.egf.core.ui.dialogs.AbstractCheckboxSelectionDialog;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.provider.FcoreItemProviderAdapterFactory;
+import org.eclipse.egf.model.fcore.provider.FcoreResourceItemProviderAdapterFactory;
+import org.eclipse.egf.model.fprod.provider.FprodItemProviderAdapterFactory;
+import org.eclipse.egf.producer.ui.EGFProducerUIPlugin;
+import org.eclipse.egf.producer.ui.l10n.ProducerUIMessages;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.ItemProvider;
+import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
+import org.eclipse.jface.dialogs.MessageDialogWithToggle;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.viewers.IContentProvider;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Shell;
+
+public class ActivityValidationSelectionDialog extends AbstractCheckboxSelectionDialog {
+
+ private final String SETTINGS_ID = EGFProducerUIPlugin.getDefault().getPluginID() + ".SCOPED_SAVE_SELECTION_DIALOG"; //$NON-NLS-1$
+
+ private Button _savePreferences;
+
+ private List<Activity> _activities;
+
+ private ComposedAdapterFactory _adapterFactory;
+
+ public ActivityValidationSelectionDialog(Shell parentShell, List<Activity> activities) {
+ super(parentShell);
+ _activities = activities;
+ setTitle(ProducerUIMessages.ActivityValidationSelectionDialog_Title);
+ setShellStyle(getShellStyle() | SWT.RESIZE);
+ setShowSelectAllButtons(true);
+ // Create an adapter factory that yields item providers.
+ _adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
+ _adapterFactory.addAdapterFactory(new FcoreResourceItemProviderAdapterFactory());
+ _adapterFactory.addAdapterFactory(new FprodItemProviderAdapterFactory());
+ _adapterFactory.addAdapterFactory(new FcoreItemProviderAdapterFactory());
+ _adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.egf.core.ui.dialogs.AbstractCheckboxSelectionDialog#getContentProvider()
+ */
+ @Override
+ protected IContentProvider getContentProvider() {
+ return new AdapterFactoryContentProvider(_adapterFactory);
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.egf.core.ui.dialogs.AbstractCheckboxSelectionDialog#getLabelProvider()
+ */
+ @Override
+ protected ILabelProvider getLabelProvider() {
+ return new LabelProvider() {
+ ILabelProvider _labelProvider = new AdapterFactoryLabelProvider(_adapterFactory);
+
+ @Override
+ public String getText(Object object) {
+ return _labelProvider.getText(object);
+ }
+
+ @Override
+ public Image getImage(Object object) {
+ return _labelProvider.getImage(object);
+ }
+ };
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.egf.core.ui.dialogs.AbstractCheckboxSelectionDialog#getDialogSettingsId()
+ */
+ @Override
+ protected String getDialogSettingsId() {
+ return SETTINGS_ID;
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.egf.core.ui.dialogs.AbstractCheckboxSelectionDialog#getViewerInput()
+ */
+ @Override
+ protected Object getViewerInput() {
+ return new ItemProvider(_adapterFactory, _activities);
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.egf.core.ui.dialogs.AbstractCheckboxSelectionDialog#getViewerLabel()
+ */
+ @Override
+ protected String getViewerLabel() {
+ return ProducerUIMessages.ActivityValidationSelectionDialog_Select;
+ }
+
+ /**
+ * Returns the list of initial element selections.
+ *
+ * @return List
+ */
+ @Override
+ protected List<?> getInitialElementSelections() {
+ return _activities;
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.egf.core.ui.dialogs.AbstractCheckboxSelectionDialog# addCustomFooterControls(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected void addCustomFooterControls(Composite parent) {
+ super.addCustomFooterControls(parent);
+ _savePreferences = new Button(parent, SWT.CHECK);
+ _savePreferences.setText(ProducerUIMessages.ActivityValidationSelectionDialog_Never_Validate);
+ _savePreferences.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ getCheckBoxTableViewer().setAllChecked(_savePreferences.getSelection());
+ }
+ });
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.egf.core.ui.dialogs.AbstractCheckboxSelectionDialog#okPressed()
+ */
+ @Override
+ protected void okPressed() {
+ IPreferenceStore store = EGFCoreUIPlugin.getDefault().getPreferenceStore();
+ String val = (_savePreferences.getSelection() ? MessageDialogWithToggle.NEVER : MessageDialogWithToggle.PROMPT);
+ store.setValue(IEGFModelConstants.VALIDATE_MODEL_INSTANCES_BEFORE_LAUNCH, val);
+ super.okPressed();
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.egf.core.ui.dialogs.AbstractCheckboxSelectionDialog# addViewerListeners(org.eclipse.jface.viewers.StructuredViewer)
+ */
+ @Override
+ protected void addViewerListeners(StructuredViewer viewer) {
+ // Override to remove listener that affects the ok button
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.egf.core.ui.dialogs.AbstractCheckboxSelectionDialog#isValid()
+ */
+ @Override
+ protected boolean isValid() {
+ return true;
+ }
+
+}
diff --git a/org.eclipse.egf.producer.ui/src/org/eclipse/egf/producer/ui/internal/ui/ProducerUIImages.java b/org.eclipse.egf.producer.ui/src/org/eclipse/egf/producer/ui/internal/ui/ProducerUIImages.java
new file mode 100644
index 0000000..36d737b
--- /dev/null
+++ b/org.eclipse.egf.producer.ui/src/org/eclipse/egf/producer/ui/internal/ui/ProducerUIImages.java
@@ -0,0 +1,78 @@
+/**
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * 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
+ *
+ */
+package org.eclipse.egf.producer.ui.internal.ui;
+
+import java.net.URL;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.egf.producer.ui.EGFProducerUIPlugin;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.osgi.framework.Bundle;
+
+/**
+ * Bundle of most images used by the EGF Model Producer UI plug-in.
+ */
+public class ProducerUIImages {
+
+ public static final IPath ICONS_PATH = new Path("$nl$/icons/full"); //$NON-NLS-1$
+
+ private static final String T_ELCL = "elcl16"; //$NON-NLS-1$
+
+ /*
+ * Set of predefined Image Descriptors.
+ */
+ public static final ImageDescriptor EGF_RUN_ACTIVITY = createUnManaged(T_ELCL, "runactivity.gif"); //$NON-NLS-1$
+
+ /*
+ * Creates an image descriptor for the given prefix and name in the EGF Model
+ * Editor
+ * bundle. The path can
+ * contain variables like $NL$.
+ * If no image could be found, <code>useMissingImageDescriptor</code> decides
+ * if either
+ * the 'missing image descriptor' is returned or <code>null</code>.
+ * or <code>null</code>.
+ */
+ private static ImageDescriptor create(String prefix, String name, boolean useMissingImageDescriptor) {
+ IPath path = ICONS_PATH.append(prefix).append(name);
+ return createImageDescriptor(EGFProducerUIPlugin.getDefault().getBundle(), path, useMissingImageDescriptor);
+ }
+
+ /*
+ * Creates an image descriptor for the given prefix and name in the JDT UI
+ * bundle. The path can
+ * contain variables like $NL$.
+ * If no image could be found, the 'missing image descriptor' is returned.
+ */
+ private static ImageDescriptor createUnManaged(String prefix, String name) {
+ return create(prefix, name, true);
+ }
+
+ /*
+ * Creates an image descriptor for the given path in a bundle. The path can
+ * contain variables
+ * like $NL$.
+ * If no image could be found, <code>useMissingImageDescriptor</code> decides
+ * if either
+ * the 'missing image descriptor' is returned or <code>null</code>.
+ * Added for 3.1.1.
+ */
+ public static ImageDescriptor createImageDescriptor(Bundle bundle, IPath path, boolean useMissingImageDescriptor) {
+ URL url = FileLocator.find(bundle, path, null);
+ if (url != null) {
+ return ImageDescriptor.createFromURL(url);
+ }
+ if (useMissingImageDescriptor) {
+ return ImageDescriptor.getMissingImageDescriptor();
+ }
+ return null;
+ }
+}
diff --git a/org.eclipse.egf.producer.ui/src/org/eclipse/egf/producer/ui/l10n/ProducerUIMessages.java b/org.eclipse.egf.producer.ui/src/org/eclipse/egf/producer/ui/l10n/ProducerUIMessages.java
new file mode 100644
index 0000000..ea03d7a
--- /dev/null
+++ b/org.eclipse.egf.producer.ui/src/org/eclipse/egf/producer/ui/l10n/ProducerUIMessages.java
@@ -0,0 +1,42 @@
+/**
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ * Thales Corporate Services S.A.S
+ */
+
+package org.eclipse.egf.producer.ui.l10n;
+
+import org.eclipse.osgi.util.NLS;
+
+public class ProducerUIMessages {
+
+ private static final String BUNDLE_NAME = "org.eclipse.egf.producer.ui.l10n.messages"; //$NON-NLS-1$
+
+ private ProducerUIMessages() {
+ // Do not instantiate
+ }
+
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, ProducerUIMessages.class);
+ }
+
+ public static String GlobalRunActivityAction_description;
+ public static String GlobalRunActivityAction_tooltip;
+ public static String GlobalRunActivityAction_label;
+ public static String GlobalRunActivityAction_dialogTitle;
+
+ public static String ActivityValidationSelectionDialog_Title;
+ public static String ActivityValidationSelectionDialog_Select;
+ public static String ActivityValidationSelectionDialog_Never_Validate;
+
+ public static String _UI_PreInvokeProblems_message;
+ public static String _UI_PostInvokeProblems_message;
+
+}
diff --git a/org.eclipse.egf.producer.ui/src/org/eclipse/egf/producer/ui/l10n/messages.properties b/org.eclipse.egf.producer.ui/src/org/eclipse/egf/producer/ui/l10n/messages.properties
new file mode 100644
index 0000000..c0284f3
--- /dev/null
+++ b/org.eclipse.egf.producer.ui/src/org/eclipse/egf/producer/ui/l10n/messages.properties
@@ -0,0 +1,22 @@
+##
+# 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
+##
+
+GlobalRunActivityAction_description= Run an EGF Activity in the Workbench
+GlobalRunActivityAction_tooltip= Run an EGF Activity
+GlobalRunActivityAction_label= Run EGF Activity...
+GlobalRunActivityAction_dialogTitle= Run EGF 'Activity'
+
+ActivityValidationSelectionDialog_Title= Activity Validation
+ActivityValidationSelectionDialog_Select= Select Activities to validate:
+ActivityValidationSelectionDialog_Never_Validate= Never validate Activities before launching.
+
+_UI_PreInvokeProblems_message= Problems encountered during Pre-Invocation validation.
+_UI_PostInvokeProblems_message= Problems encountered during Post-Invocation validation.
diff --git a/org.eclipse.egf.producer/.classpath b/org.eclipse.egf.producer/.classpath
new file mode 100644
index 0000000..2d1a430
--- /dev/null
+++ b/org.eclipse.egf.producer/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.egf.producer/.options b/org.eclipse.egf.producer/.options
new file mode 100644
index 0000000..9cebf9a
--- /dev/null
+++ b/org.eclipse.egf.producer/.options
@@ -0,0 +1,2 @@
+# Prints debug information
+org.eclipse.egf.producer/debug=true
diff --git a/org.eclipse.egf.producer/.project b/org.eclipse.egf.producer/.project
new file mode 100644
index 0000000..5a73bc9
--- /dev/null
+++ b/org.eclipse.egf.producer/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.producer</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.producer/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egf.producer/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..a9b414c
--- /dev/null
+++ b/org.eclipse.egf.producer/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:54:50 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.egf.producer/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egf.producer/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..383a775
--- /dev/null
+++ b/org.eclipse.egf.producer/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Tue Nov 03 17:21:07 CET 2009
+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/org.eclipse.egf.producer/META-INF/MANIFEST.MF b/org.eclipse.egf.producer/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..b8ebe79
--- /dev/null
+++ b/org.eclipse.egf.producer/META-INF/MANIFEST.MF
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.producer;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.egf.producer.EGFProducerPlugin
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle:
+ org.eclipse.egf.core.producer;visibility:=reexport,
+ org.eclipse.egf.model;visibility:=reexport
+Export-Package:
+ org.eclipse.egf.producer,
+ org.eclipse.egf.producer.context,
+ org.eclipse.egf.producer.internal.context;x-friends:="org.eclipse.egf.fprod.producer,org.eclipse.egf.ftask.producer",
+ org.eclipse.egf.producer.internal.manager;x-friends:="org.eclipse.egf.fprod.producer,org.eclipse.egf.ftask.producer",
+ org.eclipse.egf.producer.manager,
+ org.eclipse.egf.producer.l10n
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.egf.producer/about.html b/org.eclipse.egf.producer/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/org.eclipse.egf.producer/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/org.eclipse.egf.producer/build.properties b/org.eclipse.egf.producer/build.properties
new file mode 100644
index 0000000..3fe0827
--- /dev/null
+++ b/org.eclipse.egf.producer/build.properties
@@ -0,0 +1,20 @@
+##
+# 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
+##
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ schema/,\
+ .,\
+ .options,\
+ about.html,\
+ plugin.properties,\
+ plugin.xml
+src.includes = about.html
diff --git a/org.eclipse.egf.producer/plugin.properties b/org.eclipse.egf.producer/plugin.properties
new file mode 100644
index 0000000..b151adb
--- /dev/null
+++ b/org.eclipse.egf.producer/plugin.properties
@@ -0,0 +1,17 @@
+##
+# 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 Producer (Incubation)
+providerName=Eclipse Modeling Project
+
+EGFActivityManagerProducerExtensionPoint=EGF Activity Manager Producer
+EGFActivityProductionContextProducerExtensionPoint=EGF Activity Production Context Producer
+EGFOrchestrationManagerProducerExtensionPoint=EGF Orchestration Manager Producer
diff --git a/org.eclipse.egf.producer/plugin.xml b/org.eclipse.egf.producer/plugin.xml
new file mode 100644
index 0000000..4e9ffc8
--- /dev/null
+++ b/org.eclipse.egf.producer/plugin.xml
Binary files differ
diff --git a/org.eclipse.egf.producer/schema/activityManagerProducer.exsd b/org.eclipse.egf.producer/schema/activityManagerProducer.exsd
new file mode 100644
index 0000000..5a755d2
--- /dev/null
+++ b/org.eclipse.egf.producer/schema/activityManagerProducer.exsd
@@ -0,0 +1,103 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.egf.model.producer" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.egf.model.producer" id="activityManagerProducer" name="Activity Producer"/>
+ </appinfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="activityManagerProducer"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="activityManagerProducer">
+ <complexType>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ The implementation of the expected services.
+Must subclass ActivityManagerProducer.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn="org.eclipse.egf.producer.manager.ActivityManagerProducer:"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/org.eclipse.egf.producer/schema/activityProductionContextProducer.exsd b/org.eclipse.egf.producer/schema/activityProductionContextProducer.exsd
new file mode 100644
index 0000000..5f997fa
--- /dev/null
+++ b/org.eclipse.egf.producer/schema/activityProductionContextProducer.exsd
@@ -0,0 +1,103 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.egf.model.producer" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.egf.model.producer" id="activityProductionContextProducer" name="Activity Production Context Producer"/>
+ </appinfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="activityProductionContextProducer"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="activityProductionContextProducer">
+ <complexType>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ The implementation of the expected services.
+Must subclass ActivityProductionContextProducer.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn="org.eclipse.egf.producer.context.ActivityProductionContextProducer:"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/org.eclipse.egf.producer/schema/orchestrationManagerProducer.exsd b/org.eclipse.egf.producer/schema/orchestrationManagerProducer.exsd
new file mode 100644
index 0000000..de76767
--- /dev/null
+++ b/org.eclipse.egf.producer/schema/orchestrationManagerProducer.exsd
@@ -0,0 +1,103 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.egf.model.producer" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.egf.model.producer" id="orchestrationManagerProducer" name="Orchestration Producer"/>
+ </appinfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="orchestrationManagerProducer"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="orchestrationManagerProducer">
+ <complexType>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ The implementation of the expected services.
+Must subclass OrchestrationManagerProducer.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn="org.eclipse.egf.producer.manager.OrchestrationManagerProducer:"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/org.eclipse.egf.producer/src/org/eclipse/egf/producer/EGFProducerPlugin.java b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/EGFProducerPlugin.java
new file mode 100644
index 0000000..e729de2
--- /dev/null
+++ b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/EGFProducerPlugin.java
@@ -0,0 +1,107 @@
+package org.eclipse.egf.producer;
+
+import java.util.Map;
+
+import org.eclipse.egf.common.activator.EGFAbstractPlugin;
+import org.eclipse.egf.common.helper.EMFHelper;
+import org.eclipse.egf.core.producer.MissingExtensionException;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.Orchestration;
+import org.eclipse.egf.producer.context.ActivityProductionContextProducer;
+import org.eclipse.egf.producer.internal.registry.ProducerRegistry;
+import org.eclipse.egf.producer.l10n.ProducerMessages;
+import org.eclipse.egf.producer.manager.ActivityManagerProducer;
+import org.eclipse.egf.producer.manager.OrchestrationManagerProducer;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.osgi.util.NLS;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class EGFProducerPlugin extends EGFAbstractPlugin {
+
+ // The shared instance
+ private static EGFProducerPlugin __plugin;
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ __plugin = this;
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ __plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static EGFProducerPlugin getDefault() {
+ return __plugin;
+ }
+
+ /**
+ * Returns an ActivityManagerProducer based on an Fcore model Activity.
+ *
+ * @return an ActivityManagerProducer
+ */
+ @SuppressWarnings("unchecked")
+ public static <P extends Activity> ActivityManagerProducer<P> getActivityManagerProducer(P activity) throws MissingExtensionException {
+ Map<EClass, ActivityManagerProducer<?>> producers = ProducerRegistry.getActivityManagerProducers();
+ ActivityManagerProducer<P> producer = (ActivityManagerProducer<P>) producers.get(EMFHelper.solveAgainstStaticPackage(activity.eClass()));
+ if (producer == null) {
+ throw new MissingExtensionException(NLS.bind(ProducerMessages.ActivityManagerProducer_extension_error, ProducerRegistry.getName(activity)));
+ }
+ return producer;
+
+ }
+
+ /**
+ * Returns an ActivityProductionContextProducer based on a parent
+ * IModelElementProductionContext<?>.
+ *
+ * @return an ActivityProductionContextProducer
+ */
+ @SuppressWarnings("unchecked")
+ public static <P extends Activity> ActivityProductionContextProducer<P> getActivityProductionContextProducer(P activity) throws MissingExtensionException {
+ Map<EClass, ActivityProductionContextProducer<?>> producers = ProducerRegistry.getActivityProductionContextProducers();
+ ActivityProductionContextProducer<P> producer = (ActivityProductionContextProducer<P>) producers.get(EMFHelper.solveAgainstStaticPackage(activity.eClass()));
+ if (producer == null) {
+ throw new MissingExtensionException(NLS.bind(ProducerMessages.ActivityProductionContextProducer_extension_error, ProducerRegistry.getName(activity)));
+ }
+ return producer;
+
+ }
+
+ /**
+ * Returns an OrchestrationProducer based on a Fcore model Orchestration.
+ *
+ * @return an OrchestrationProducer
+ */
+ @SuppressWarnings("unchecked")
+ public static <P extends Orchestration> OrchestrationManagerProducer<P> getOrchestrationProducer(P orchestration) throws MissingExtensionException {
+ Map<EClass, OrchestrationManagerProducer<?>> producers = ProducerRegistry.getOrchestrationManagerProducers();
+ OrchestrationManagerProducer<P> producer = (OrchestrationManagerProducer<P>) producers.get(EMFHelper.solveAgainstStaticPackage(orchestration.eClass()));
+ if (producer == null) {
+ throw new MissingExtensionException(NLS.bind(ProducerMessages.OrchestrationManagerProducer_extension_error, ProducerRegistry.getName(orchestration)));
+ }
+ return producer;
+
+ }
+
+}
diff --git a/org.eclipse.egf.producer/src/org/eclipse/egf/producer/context/ActivityProductionContextProducer.java b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/context/ActivityProductionContextProducer.java
new file mode 100644
index 0000000..3d4de17
--- /dev/null
+++ b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/context/ActivityProductionContextProducer.java
@@ -0,0 +1,62 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.producer.context;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.egf.common.helper.EMFHelper;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.core.producer.context.IProductionContext;
+import org.eclipse.egf.core.session.ProjectBundleSession;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.producer.l10n.ProducerMessages;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public abstract class ActivityProductionContextProducer<P extends Activity> {
+
+ public abstract EClass getActivity();
+
+ protected abstract IActivityProductionContext<P> doCreateActivityProductionContext(ProjectBundleSession projectBundleSession, Activity activity) throws InvocationException;
+
+ protected abstract IActivityProductionContext<P> doCreateActivityProductionContext(IProductionContext<Invocation, InvocationContract> parent, ProjectBundleSession projectBundleSession, Activity activity) throws InvocationException;
+
+ public IActivityProductionContext<P> createActivityProductionContext(ProjectBundleSession projectBundleSession, Activity activity) throws InvocationException {
+ if (matchNature(activity) == false) {
+ throw new InvocationException(NLS.bind(ProducerMessages.ActivityManagerProducer_type_error, getActivity().eClass().getName(), activity.eClass().getName()));
+ }
+ return doCreateActivityProductionContext(projectBundleSession, activity);
+ }
+
+ public IActivityProductionContext<P> createActivityProductionContext(IProductionContext<Invocation, InvocationContract> parent, ProjectBundleSession projectBundleSession, Activity activity) throws InvocationException {
+ if (matchNature(activity) == false) {
+ throw new InvocationException(NLS.bind(ProducerMessages.ActivityManagerProducer_type_error, getActivity().eClass().getName(), activity.eClass().getName()));
+ }
+ return doCreateActivityProductionContext(parent, projectBundleSession, activity);
+ }
+
+ public boolean matchNature(Activity activity) {
+ Assert.isNotNull(activity);
+ Assert.isNotNull(getActivity());
+ return getActivity() == EMFHelper.solveAgainstStaticPackage(activity.eClass());
+ }
+
+}
diff --git a/org.eclipse.egf.producer/src/org/eclipse/egf/producer/context/IActivityProductionContext.java b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/context/IActivityProductionContext.java
new file mode 100644
index 0000000..7878514
--- /dev/null
+++ b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/context/IActivityProductionContext.java
@@ -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
+ */
+package org.eclipse.egf.producer.context;
+
+import org.eclipse.egf.core.producer.context.IProductionContext;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.Contract;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public interface IActivityProductionContext<P extends Activity> extends IProductionContext<P, Contract> {
+ // Nothing to do
+}
diff --git a/org.eclipse.egf.producer/src/org/eclipse/egf/producer/context/IFactoryComponentProductionContext.java b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/context/IFactoryComponentProductionContext.java
new file mode 100644
index 0000000..e52aa4d
--- /dev/null
+++ b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/context/IFactoryComponentProductionContext.java
@@ -0,0 +1,21 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.producer.context;
+
+import org.eclipse.egf.model.fcore.FactoryComponent;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public interface IFactoryComponentProductionContext extends IActivityProductionContext<FactoryComponent> {
+ // Nothing to do
+}
diff --git a/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/context/ActivityProductionContext.java b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/context/ActivityProductionContext.java
new file mode 100644
index 0000000..fb91d43
--- /dev/null
+++ b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/context/ActivityProductionContext.java
@@ -0,0 +1,145 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.producer.internal.context;
+
+import java.util.Collection;
+
+import org.eclipse.egf.common.helper.EMFHelper;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.core.producer.context.IProductionContext;
+import org.eclipse.egf.core.producer.context.ProductionContext;
+import org.eclipse.egf.core.producer.l10n.CoreProducerMessages;
+import org.eclipse.egf.core.session.ProjectBundleSession;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.Contract;
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.producer.context.IActivityProductionContext;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public abstract class ActivityProductionContext<P extends Activity> extends ProductionContext<P, Contract> implements IActivityProductionContext<P> {
+
+ public ActivityProductionContext(ProjectBundleSession projectBundleSession, P element, String name) {
+ super(projectBundleSession, element, name);
+ }
+
+ public <T extends Invocation> ActivityProductionContext(IProductionContext<T, InvocationContract> parent, ProjectBundleSession projectBundleSession, P element, String name) {
+ super(parent, projectBundleSession, element, name);
+ }
+
+ @Override
+ public boolean isSetAtRuntime(Object key) throws InvocationException {
+ // Looking for a Contract
+ Contract contract = getContract(key, getInputValueKeys());
+ // Unknown Contract
+ if (contract == null) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_unknown_name, ((String) key).trim(), getName()));
+ }
+ // Looking for a Parent Input Contract set at runtime
+ if (getParent() != null) {
+ return getParent().isSetAtRuntime(contract);
+ }
+ return false;
+ }
+
+ @Override
+ public Class<?> getInputValueType(Object key) throws InvocationException {
+ // Looking for a Contract
+ Contract contract = getContract(key, getInputValueKeys());
+ // Unknown Contract
+ if (contract == null) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_unknown_name, ((String) key).trim(), getName()));
+ }
+ // Looking for an Input Contract type
+ return super.getInputValueType(contract);
+ }
+
+ @Override
+ public <R> R getInputValue(Object key, Class<R> clazz) throws InvocationException {
+ // Looking for a Contract
+ Contract contract = getContract(key, getInputValueKeys());
+ // Unknown Contract
+ if (contract == null) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_unknown_name, ((String) key).trim(), getName()));
+ }
+ // Looking for an Input Contract value
+ return super.getInputValue(contract, clazz);
+ }
+
+ @Override
+ public Class<?> getOutputValueType(Object key) throws InvocationException {
+ // Looking for a Contract
+ Contract contract = getContract(key, getOutputValueKeys());
+ // Unknown Contract
+ if (contract == null) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_unknown_name, ((String) key).trim(), getName()));
+ }
+ // Looking for an Output Contract type
+ return super.getOutputValueType(contract);
+ }
+
+ @Override
+ public <R> R getOutputValue(Object key, Class<R> clazz) throws InvocationException {
+ // Looking for a Contract
+ Contract contract = getContract(key, getOutputValueKeys());
+ // Unknown Contract
+ if (contract == null) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_unknown_name, ((String) key).trim(), getName()));
+ }
+ // Looking for an Output Contract value
+ return super.getOutputValue(contract, clazz);
+ }
+
+ @Override
+ public void setOutputValue(Object key, Object value) throws InvocationException {
+ // Looking for a Contract
+ Contract contract = getContract(key, getOutputValueKeys());
+ // Unknown Contract
+ if (contract == null) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_unknown_name, ((String) key).trim(), getName()));
+ }
+ // Set Contract Value
+ super.setOutputValue(contract, value);
+ }
+
+ private Contract getContract(Object key, Collection<Contract> keys) throws InvocationException {
+ // Usual Tests
+ if (key == null) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_null_name, getName()));
+ }
+ if (key instanceof String == false) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_wrong_type, new Object[] { String.class.getName(), EMFHelper.getText(key), key.getClass().getName(), getName() }));
+ }
+ String innerName = ((String) key).trim();
+ if (innerName.length() == 0) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_emtpy_name, getName()));
+ }
+ // Looking for a Contract
+ Contract contract = null;
+ for (Contract innerContract : keys) {
+ if (innerName.equals(innerContract.getName())) {
+ contract = innerContract;
+ break;
+ }
+ }
+ // Unknown Contract
+ if (contract == null) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_unknown_name, innerName, getName()));
+ }
+ // Return
+ return contract;
+ }
+
+}
diff --git a/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/context/FactoryComponentProductionContext.java b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/context/FactoryComponentProductionContext.java
new file mode 100644
index 0000000..d9db0ec
--- /dev/null
+++ b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/context/FactoryComponentProductionContext.java
@@ -0,0 +1,227 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.producer.internal.context;
+
+import java.util.Collection;
+
+import org.eclipse.egf.common.helper.ClassHelper;
+import org.eclipse.egf.common.helper.EMFHelper;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.core.producer.context.IProductionContext;
+import org.eclipse.egf.core.producer.l10n.CoreProducerMessages;
+import org.eclipse.egf.core.session.ProjectBundleSession;
+import org.eclipse.egf.model.fcore.Contract;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.FactoryComponentContract;
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.producer.context.IFactoryComponentProductionContext;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class FactoryComponentProductionContext extends ActivityProductionContext<FactoryComponent> implements IFactoryComponentProductionContext {
+
+ public FactoryComponentProductionContext(ProjectBundleSession projectBundleSession, FactoryComponent element, String name) {
+ super(projectBundleSession, element, name);
+ }
+
+ public FactoryComponentProductionContext(IProductionContext<Invocation, InvocationContract> parent, ProjectBundleSession projectBundleSession, FactoryComponent element, String name) {
+ super(parent, projectBundleSession, element, name);
+ }
+
+ @Override
+ public boolean isSetAtRuntime(Object key) throws InvocationException {
+ // It could be a String in this context
+ if (key != null && key instanceof String) {
+ return super.isSetAtRuntime(key);
+ }
+ // Locate a Contract
+ Contract contract = getContract(key, getInputValueKeys());
+ // Contract should be known at this stage
+ if (contract == null) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_unknown_key, EMFHelper.getText(key), getName()));
+ }
+ // Looking for a Parent Input Contract set at runtime
+ if (getParent() != null) {
+ return getParent().isSetAtRuntime(contract);
+ }
+ return false;
+ }
+
+ @Override
+ public Class<?> getInputValueType(Object key) throws InvocationException {
+ // It could be a String in this context
+ if (key != null && key instanceof String) {
+ return super.getInputValueType(key);
+ }
+ // Locate a Contract
+ Contract contract = getContract(key, getInputValueKeys());
+ // Contract should be known at this stage
+ if (contract == null) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_unknown_key, EMFHelper.getText(key), getName()));
+ }
+ Class<?> valueType = null;
+ // Looking for Parent Value Type if available
+ if (getParent() != null) {
+ valueType = getParent().getInputValueType(contract);
+ }
+ // Looking for local Value Type if necessary
+ if (valueType == null) {
+ Data inputData = _inputDatas.get(contract);
+ if (inputData != null) {
+ valueType = inputData.getType();
+ }
+ }
+ return valueType;
+ }
+
+ @Override
+ public <R> R getInputValue(Object key, Class<R> clazz) throws InvocationException {
+ // It could be a String in this context
+ if (key != null && key instanceof String) {
+ return super.getInputValue(key, clazz);
+ }
+ // Locate an Contract
+ Contract contract = getContract(key, getInputValueKeys());
+ // Contract should be known at this stage
+ if (contract == null) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_unknown_key, EMFHelper.getText(key), getName()));
+ }
+ R value = null;
+ // Looking for Parent Value if available
+ if (getParent() != null) {
+ value = getParent().getInputValue(contract, clazz);
+ }
+ // Looking for a local value if necessary
+ if (value == null) {
+ Data inputData = _inputDatas.get(contract);
+ if (inputData != null) {
+ value = getValue(contract, clazz, inputData);
+ }
+ }
+ return value;
+ }
+
+ @Override
+ public Class<?> getOutputValueType(Object key) throws InvocationException {
+ // It could be a String in this context
+ if (key != null && key instanceof String) {
+ return super.getOutputValueType(key);
+ }
+ // Locate an Contract
+ Contract contract = getContract(key, getOutputValueKeys());
+ // Contract should be known at this stage
+ if (contract == null) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_unknown_key, EMFHelper.getText(key), getName()));
+ }
+ Class<?> valueType = null;
+ // Looking for Parent Value Type if available
+ if (getParent() != null) {
+ valueType = getParent().getOutputValueType(contract);
+ }
+ // Looking for a local Value Type if necessary
+ if (valueType == null) {
+ Data outputData = _outputDatas.get(contract);
+ if (outputData != null) {
+ valueType = outputData.getType();
+ }
+ }
+ return valueType;
+ }
+
+ @Override
+ public <R> R getOutputValue(Object key, Class<R> clazz) throws InvocationException {
+ // It could be a String in this context
+ if (key != null && key instanceof String) {
+ return super.getOutputValue(key, clazz);
+ }
+ // Locate an Contract
+ Contract contract = getContract(key, getOutputValueKeys());
+ // Contract should be known at this stage
+ if (contract == null) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_unknown_key, EMFHelper.getText(key), getName()));
+ }
+ R value = null;
+ // Looking for Parent Value if available
+ if (getParent() != null) {
+ value = getParent().getOutputValue(contract, clazz);
+ }
+ // Looking for a local value if necessary
+ if (value == null) {
+ Data outputData = _outputDatas.get(contract);
+ if (outputData != null) {
+ value = getValue(contract, clazz, outputData);
+ }
+ }
+ return value;
+ }
+
+ @Override
+ public void setOutputValue(Object key, Object value) throws InvocationException {
+ // It could be a String in this context
+ if (key != null && key instanceof String) {
+ super.setOutputValue(key, value);
+ }
+ // Locate an Contract
+ Contract contract = getContract(key, getOutputValueKeys());
+ // Contract should be known at this stage
+ if (contract == null) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_unknown_key, EMFHelper.getText(key), getName()));
+ }
+ // Propagate Value to parent if necessary
+ if (getParent() != null) {
+ getParent().setOutputValue(contract, value);
+ }
+ // Fetch available output data
+ Data outputData = _outputDatas.get(contract);
+ if (outputData == null) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_unknown_key, EMFHelper.getText(key), getName()));
+ }
+ // null value is a valid value
+ if (value != null && (ClassHelper.asSubClass(value.getClass(), outputData.getType()) == false || outputData.getType().isInstance(value) == false)) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_wrong_type, new Object[] { outputData.getType().getName(), EMFHelper.getText(key), value.getClass().getName(), getName() }));
+ }
+ // Set ouptut value
+ outputData.setValue(value);
+ // Set input value if it exists
+ Data inputData = _inputDatas.get(key);
+ if (inputData != null) {
+ inputData.setValue(value);
+ }
+ }
+
+ private Contract getContract(Object key, Collection<Contract> keys) throws InvocationException {
+ // Usual Tests
+ if (key == null) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_null_key, getName()));
+ }
+ if (key instanceof InvocationContract == false) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_wrong_type, new Object[] { InvocationContract.class.getName(), EMFHelper.getText(key), key.getClass().getName(), getName() }));
+ }
+ // Locate Contract
+ Contract contract = null;
+ for (Contract innerContract : keys) {
+ if (innerContract instanceof FactoryComponentContract == false) {
+ continue;
+ }
+ if (((FactoryComponentContract) innerContract).getInvocationContracts().contains(key)) {
+ contract = innerContract;
+ break;
+ }
+ }
+ // Return
+ return contract;
+ }
+
+}
diff --git a/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/context/InvocationProductionContext.java b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/context/InvocationProductionContext.java
new file mode 100644
index 0000000..c33d366
--- /dev/null
+++ b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/context/InvocationProductionContext.java
@@ -0,0 +1,218 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.producer.internal.context;
+
+import java.util.Collection;
+
+import org.eclipse.egf.common.helper.ClassHelper;
+import org.eclipse.egf.common.helper.EMFHelper;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.core.producer.context.IProductionContext;
+import org.eclipse.egf.core.producer.context.ProductionContext;
+import org.eclipse.egf.core.producer.l10n.CoreProducerMessages;
+import org.eclipse.egf.core.session.ProjectBundleSession;
+import org.eclipse.egf.model.fcore.Contract;
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.model.fcore.Orchestration;
+import org.eclipse.egf.model.fcore.OrchestrationParameter;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public abstract class InvocationProductionContext<P extends Invocation, T extends Orchestration> extends ProductionContext<P, InvocationContract> {
+
+ public InvocationProductionContext(ProjectBundleSession projectBundleSession, P element, String name) {
+ super(projectBundleSession, element, name);
+ }
+
+ public InvocationProductionContext(IProductionContext<T, OrchestrationParameter> parent, ProjectBundleSession projectBundleSession, P element, String name) {
+ super(parent, projectBundleSession, element, name);
+ }
+
+ @Override
+ public boolean isSetAtRuntime(Object key) throws InvocationException {
+ // Locate an InvocationContract
+ InvocationContract invocationContract = getInvocationContract(key, getInputValueKeys());
+ // Unknown InvocationContract
+ if (invocationContract == null) {
+ return false;
+ }
+ // Input Contract is set at runtime
+ if (invocationContract.getSourceInvocationContract() != null) {
+ return true;
+ }
+ // Is it necessary to propagate ?
+ if (invocationContract.getOrchestrationParameter() != null || invocationContract.getFactoryComponentContract() != null) {
+ if (getParent() != null) {
+ return getParent().isSetAtRuntime(invocationContract);
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public Class<?> getInputValueType(Object key) throws InvocationException {
+ // Locate an InvocationContract
+ InvocationContract invocationContract = getInvocationContract(key, getInputValueKeys());
+ // Unknown InvocationContract
+ if (invocationContract == null) {
+ return null;
+ }
+ // Parent or local value
+ Class<?> valueType = null;
+ // Is it necessary to propagate ?
+ if (invocationContract.getOrchestrationParameter() != null || invocationContract.getFactoryComponentContract() != null) {
+ if (getParent() != null) {
+ valueType = getParent().getInputValueType(invocationContract);
+ }
+ }
+ // Looking for local Value Type if necessary
+ if (valueType == null) {
+ Data inputData = _inputDatas.get(invocationContract);
+ if (inputData != null) {
+ valueType = inputData.getType();
+ }
+ }
+ return valueType;
+ }
+
+ @Override
+ public <R> R getInputValue(Object key, Class<R> clazz) throws InvocationException {
+ // Locate an InvocationContract
+ InvocationContract invocationContract = getInvocationContract(key, getInputValueKeys());
+ // Unknown InvocationContract
+ if (invocationContract == null) {
+ return null;
+ }
+ R value = null;
+ // Is it necessary to propagate ?
+ if (invocationContract.getOrchestrationParameter() != null || invocationContract.getFactoryComponentContract() != null) {
+ if (getParent() != null) {
+ value = getParent().getInputValue(invocationContract, clazz);
+ }
+ }
+ // Looking for local value if necessary
+ if (value == null) {
+ Data inputData = _inputDatas.get(invocationContract);
+ if (inputData != null) {
+ value = getValue(invocationContract, clazz, inputData);
+ }
+ }
+ return value;
+ }
+
+ @Override
+ public Class<?> getOutputValueType(Object key) throws InvocationException {
+ // Locate an InvocationContract
+ InvocationContract invocationContract = getInvocationContract(key, getOutputValueKeys());
+ // Unknown InvocationContract
+ if (invocationContract == null) {
+ return null;
+ }
+ Class<?> valueType = null;
+ // Is it necessary to propagate ?
+ if (invocationContract.getOrchestrationParameter() != null || invocationContract.getFactoryComponentContract() != null) {
+ if (getParent() != null) {
+ valueType = getParent().getOutputValueType(invocationContract);
+ }
+ }
+ // Looking for local Value Type if necessary
+ if (valueType == null) {
+ Data outputData = _outputDatas.get(invocationContract);
+ if (outputData != null) {
+ valueType = outputData.getType();
+ }
+ }
+ return valueType;
+ }
+
+ @Override
+ public <R> R getOutputValue(Object key, Class<R> clazz) throws InvocationException {
+ // Locate an InvocationContract
+ InvocationContract invocationContract = getInvocationContract(key, getOutputValueKeys());
+ // Unknown InvocationContract
+ if (invocationContract == null) {
+ return null;
+ }
+ R value = null;
+ // Is it necessary to propagate ?
+ if (invocationContract.getOrchestrationParameter() != null || invocationContract.getFactoryComponentContract() != null) {
+ if (getParent() != null) {
+ value = getParent().getOutputValue(invocationContract, clazz);
+ }
+ }
+ // Looking for local value if necessary
+ if (value == null) {
+ Data outputData = _outputDatas.get(invocationContract);
+ if (outputData != null) {
+ value = getValue(invocationContract, clazz, outputData);
+ }
+ }
+ return value;
+ }
+
+ @Override
+ public void setOutputValue(Object key, Object value) throws InvocationException {
+ // Locate an InvocationContract
+ InvocationContract invocationContract = getInvocationContract(key, getOutputValueKeys());
+ // Unknown InvocationContract
+ if (invocationContract == null) {
+ return;
+ }
+ // Propagate Value to parent if necessary
+ if (invocationContract.getOrchestrationParameter() != null || invocationContract.getFactoryComponentContract() != null) {
+ if (getParent() != null) {
+ getParent().setOutputValue(invocationContract, value);
+ }
+ }
+ // Fetch available output data
+ Data outputData = _outputDatas.get(invocationContract);
+ // It could be null at this step.
+ if (outputData == null) {
+ return;
+ }
+ // null value is a valid value
+ if (value != null && (ClassHelper.asSubClass(value.getClass(), outputData.getType()) == false || outputData.getType().isInstance(value) == false)) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_wrong_type, new Object[] { outputData.getType().getName(), EMFHelper.getText(key), value.getClass().getName(), getName() }));
+ }
+ // Set output value
+ outputData.setValue(value);
+ // Set input value if it exists
+ Data inputData = _inputDatas.get(key);
+ if (inputData != null) {
+ inputData.setValue(value);
+ }
+ }
+
+ private InvocationContract getInvocationContract(Object key, Collection<InvocationContract> keys) throws InvocationException {
+ // Usual Tests
+ if (key == null) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_null_key, getName()));
+ }
+ if (key instanceof Contract == false) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_wrong_type, new Object[] { Contract.class.getName(), EMFHelper.getText(key), key.getClass().getName(), getName() }));
+ }
+ // Locate InvocationContract
+ InvocationContract invocationContract = null;
+ for (InvocationContract innerInvocationContract : keys) {
+ if (key == innerInvocationContract.getInvokedContract()) {
+ invocationContract = innerInvocationContract;
+ break;
+ }
+ }
+ // Return
+ return invocationContract;
+ }
+
+}
diff --git a/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/context/OrchestrationProductionContext.java b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/context/OrchestrationProductionContext.java
new file mode 100644
index 0000000..e8b52e3
--- /dev/null
+++ b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/context/OrchestrationProductionContext.java
@@ -0,0 +1,173 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.producer.internal.context;
+
+import java.util.Collection;
+
+import org.eclipse.egf.common.helper.EMFHelper;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.core.producer.context.IProductionContext;
+import org.eclipse.egf.core.producer.context.ProductionContext;
+import org.eclipse.egf.core.producer.l10n.CoreProducerMessages;
+import org.eclipse.egf.core.session.ProjectBundleSession;
+import org.eclipse.egf.model.fcore.Contract;
+import org.eclipse.egf.model.fcore.ContractMode;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.model.fcore.Orchestration;
+import org.eclipse.egf.model.fcore.OrchestrationParameter;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public abstract class OrchestrationProductionContext<P extends Orchestration> extends ProductionContext<P, OrchestrationParameter> {
+
+ public OrchestrationProductionContext(ProjectBundleSession projectBundleSession, P element, String name) {
+ super(projectBundleSession, element, name);
+ }
+
+ public OrchestrationProductionContext(IProductionContext<FactoryComponent, Contract> parent, ProjectBundleSession projectBundleSession, P element, String name) {
+ super(parent, projectBundleSession, element, name);
+ }
+
+ @Override
+ public boolean isSetAtRuntime(Object key) throws InvocationException {
+ // Locate an OrchestrationParameter, just do it for key type checking
+ getOrchestrationParameter(key, getInputValueKeys());
+ InvocationContract invocationContract = (InvocationContract) key;
+ // Always propagate, An InvocationContract shouldn't be in an OrchestrationParameter
+ // and in an FactoryComponentContract
+ if (invocationContract.getFactoryComponentContract() != null) {
+ if (getParent() != null && invocationContract.getFactoryComponentContract().getMode() != ContractMode.OUT) {
+ return getParent().isSetAtRuntime(invocationContract);
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public Class<?> getInputValueType(Object key) throws InvocationException {
+ // Locate an OrchestrationParameter, it could be null, just do it for key type checking
+ OrchestrationParameter orchestrationParameter = getOrchestrationParameter(key, getInputValueKeys());
+ InvocationContract invocationContract = (InvocationContract) key;
+ Class<?> valueType = null;
+ // Always propagate, An InvocationContract shouldn't be in an OrchestrationParameter
+ // and in an FactoryComponent Contract
+ if (invocationContract.getFactoryComponentContract() != null) {
+ if (getParent() != null && invocationContract.getFactoryComponentContract().getMode() != ContractMode.OUT) {
+ valueType = getParent().getInputValueType(invocationContract);
+ }
+ } else {
+ // Shouldn't be null at this stage
+ if (orchestrationParameter == null) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_null_key, getName()));
+ }
+ // Looking for a local Value Type
+ Data data = _inputDatas.get(orchestrationParameter);
+ if (data != null) {
+ valueType = data.getType();
+ }
+ }
+ return valueType;
+ }
+
+ @Override
+ public <R> R getInputValue(Object key, Class<R> clazz) throws InvocationException {
+ // Locate an OrchestrationParameter, it could be null, just do it for key type checking
+ OrchestrationParameter orchestrationParameter = getOrchestrationParameter(key, getInputValueKeys());
+ InvocationContract invocationContract = (InvocationContract) key;
+ R value = null;
+ // Always propagate, An InvocationContract shouldn't be in an OrchestrationParameter
+ // and in an FactoryComponent Contract
+ if (invocationContract.getFactoryComponentContract() != null) {
+ if (getParent() != null && invocationContract.getFactoryComponentContract().getMode() != ContractMode.OUT) {
+ value = getParent().getInputValue(invocationContract, clazz);
+ }
+ } else {
+ // Shouldn't be null at this stage
+ if (orchestrationParameter == null) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_null_key, getName()));
+ }
+ // Looking for a local value
+ Data inputData = _inputDatas.get(orchestrationParameter);
+ if (inputData != null) {
+ value = getValue(orchestrationParameter, clazz, inputData);
+ }
+ }
+ return value;
+ }
+
+ @Override
+ public Class<?> getOutputValueType(Object key) throws InvocationException {
+ // Locate an OrchestrationParameter, it should be null, just do it for key type checking
+ getOrchestrationParameter(key, getOutputValueKeys());
+ InvocationContract invocationContract = (InvocationContract) key;
+ Class<?> valueType = null;
+ // Always propagate, OrchestrationParameter doesn't hold Output Values
+ if (invocationContract.getFactoryComponentContract() != null) {
+ if (getParent() != null && invocationContract.getFactoryComponentContract().getMode() != ContractMode.IN) {
+ valueType = getParent().getOutputValueType(invocationContract);
+ }
+ }
+ return valueType;
+ }
+
+ @Override
+ public <R> R getOutputValue(Object key, Class<R> clazz) throws InvocationException {
+ // Locate an OrchestrationParameter, it should be null, just do it for key type checking
+ getOrchestrationParameter(key, getOutputValueKeys());
+ InvocationContract invocationContract = (InvocationContract) key;
+ R value = null;
+ // Always propagate, OrchestrationParameter doesn't hold Output Values
+ if (invocationContract.getFactoryComponentContract() != null) {
+ if (getParent() != null && invocationContract.getFactoryComponentContract().getMode() != ContractMode.IN) {
+ value = getParent().getOutputValue(invocationContract, clazz);
+ }
+ }
+ return value;
+ }
+
+ @Override
+ public void setOutputValue(Object key, Object value) throws InvocationException {
+ // Locate an OrchestrationParameter, it should be null, just do it for key type checking
+ getOrchestrationParameter(key, getOutputValueKeys());
+ InvocationContract invocationContract = (InvocationContract) key;
+ // Always propagate, OrchestrationParameter doesn't hold Output Values
+ if (invocationContract.getFactoryComponentContract() != null) {
+ if (getParent() != null && invocationContract.getFactoryComponentContract().getMode() != ContractMode.IN) {
+ getParent().setOutputValue(invocationContract, value);
+ }
+ }
+ }
+
+ private OrchestrationParameter getOrchestrationParameter(Object key, Collection<OrchestrationParameter> keys) throws InvocationException {
+ // Usual Tests
+ if (key == null) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_null_key, getName()));
+ }
+ if (key instanceof InvocationContract == false) {
+ throw new InvocationException(NLS.bind(CoreProducerMessages.ProductionContext_wrong_type, new Object[] { InvocationContract.class.getName(), EMFHelper.getText(key), key.getClass().getName(), getName() }));
+ }
+ // Locate OrchestrationParameter
+ OrchestrationParameter orchestrationParameter = null;
+ for (OrchestrationParameter innerOrchestrationParameter : keys) {
+ if (innerOrchestrationParameter.getInvocationContracts().contains(key)) {
+ orchestrationParameter = innerOrchestrationParameter;
+ break;
+ }
+ }
+ // Return
+ return orchestrationParameter;
+ }
+
+}
diff --git a/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/context/ProducerContextFactory.java b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/context/ProducerContextFactory.java
new file mode 100644
index 0000000..3ed1083
--- /dev/null
+++ b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/context/ProducerContextFactory.java
@@ -0,0 +1,33 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.producer.internal.context;
+
+import org.eclipse.egf.common.helper.EMFHelper;
+import org.eclipse.egf.core.session.ProjectBundleSession;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.producer.context.IFactoryComponentProductionContext;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class ProducerContextFactory {
+
+ private ProducerContextFactory() {
+ // Prevent Instantiation
+ }
+
+ // FactoryComponent
+ public static IFactoryComponentProductionContext createContext(ProjectBundleSession projectBundleSession, FactoryComponent element) {
+ return new FactoryComponentProductionContext(projectBundleSession, element, EMFHelper.getText(element));
+ }
+
+}
diff --git a/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/manager/ActivityManager.java b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/manager/ActivityManager.java
new file mode 100644
index 0000000..4535846
--- /dev/null
+++ b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/manager/ActivityManager.java
@@ -0,0 +1,147 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.producer.internal.manager;
+
+import org.eclipse.egf.common.helper.EMFHelper;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.core.producer.context.ProductionContext;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.Contract;
+import org.eclipse.egf.model.fcore.ContractMode;
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.model.fcore.ModelElement;
+import org.eclipse.egf.model.helper.ActivityCycleFinder;
+import org.eclipse.egf.producer.EGFProducerPlugin;
+import org.eclipse.egf.producer.l10n.ProducerMessages;
+import org.eclipse.egf.producer.manager.IActivityManager;
+import org.eclipse.egf.producer.manager.IModelElementManager;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.osgi.util.NLS;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public abstract class ActivityManager<P extends Activity> extends ModelElementManager<P, Contract> implements IActivityManager<P> {
+
+ public ActivityManager(P activity) throws InvocationException {
+ super(activity);
+ // Diagnose Cycle
+ ActivityCycleFinder finder = new ActivityCycleFinder(activity);
+ ModelElement element = finder.getFirstRepetition();
+ if (element != null) {
+ throw new InvocationException(NLS.bind("Activity cycle detected in ''{0}''", EMFHelper.getText(element))); //$NON-NLS-1$
+ }
+ }
+
+ public ActivityManager(Bundle bundle, P activity) throws InvocationException {
+ super(bundle, activity);
+ // Diagnose Cycle
+ ActivityCycleFinder finder = new ActivityCycleFinder(activity);
+ ModelElement element = finder.getFirstRepetition();
+ if (element != null) {
+ throw new InvocationException(NLS.bind("Activity cycle detected in ''{0}''", EMFHelper.getText(element))); //$NON-NLS-1$
+ }
+ }
+
+ public <M extends Invocation> ActivityManager(IModelElementManager<M, InvocationContract> parent, P activity) throws InvocationException {
+ super(parent, activity);
+ }
+
+ @Override
+ protected BasicDiagnostic checkInputElement(boolean runtime) throws InvocationException {
+ BasicDiagnostic diagnostic = getDiagnostic(getElement(), runtime);
+ BasicDiagnostic containerDiagnostic = null;
+ ProductionContext<P, Contract> context = getInternalProductionContext();
+ // Diagnose Mandatory In and In_Out Contract
+ for (Contract contract : getElement().getContracts(ContractMode.IN)) {
+ if (contract.isMandatory()) {
+ // Check whether or not we face a contract set at runtime
+ if (runtime == false && context.isSetAtRuntime(contract.getName())) {
+ continue;
+ }
+ // Check Mandatory Value
+ Object value = null;
+ try {
+ value = context.getInputValue(contract.getName(), contract.getType().getType());
+ } catch (InvocationException ie) {
+ if (ie.getCause() != null) {
+ throw ie;
+ }
+ }
+ if (value == null) {
+ if (containerDiagnostic == null) {
+ containerDiagnostic = getDiagnostic(contract.getContractContainer(), runtime);
+ }
+ containerDiagnostic.add(new BasicDiagnostic(Diagnostic.ERROR, EGFProducerPlugin.getDefault().getPluginID(), 0, NLS.bind("Value is mandatory for ''{0}''", EMFHelper.getText(contract)), //$NON-NLS-1$
+ new Object[] { contract }));
+ }
+ }
+ }
+ // containerDiagnostic should be added at the end otherwise, the severity code is not propagated to the parent.
+ if (containerDiagnostic != null) {
+ diagnostic.add(containerDiagnostic);
+ }
+ return diagnostic;
+ }
+
+ @Override
+ protected BasicDiagnostic checkOutputElement(BasicDiagnostic diagnostic) throws InvocationException {
+ BasicDiagnostic containerDiagnostic = null;
+ ProductionContext<P, Contract> context = getInternalProductionContext();
+ // Diagnose Mandatory Out and In_Out Contract
+ for (Contract contract : getElement().getContracts(ContractMode.OUT)) {
+ if (contract.isMandatory()) {
+ // Check Mandatory Value
+ Object value = null;
+ try {
+ value = context.getOutputValue(contract.getName(), contract.getType().getType());
+ } catch (InvocationException ie) {
+ if (ie.getCause() != null) {
+ throw ie;
+ }
+ }
+ if (value == null) {
+ if (containerDiagnostic == null) {
+ containerDiagnostic = getDiagnostic(contract.getContractContainer(), true);
+ }
+ containerDiagnostic.add(new BasicDiagnostic(Diagnostic.ERROR, EGFProducerPlugin.getDefault().getPluginID(), 0, NLS.bind(ProducerMessages.ActivityManager_mandatory_value, EMFHelper.getText(contract)), new Object[] { contract }));
+ }
+ }
+ }
+ // containerDiagnostic should be added at the end otherwise, the severity code is not propagated to the parent.
+ if (containerDiagnostic != null) {
+ diagnostic.add(containerDiagnostic);
+ }
+ return diagnostic;
+ }
+
+ @Override
+ public void initializeContext() throws InvocationException {
+ // Get Context
+ ProductionContext<P, Contract> context = getInternalProductionContext();
+ // Clear Context
+ context.clear();
+ // Set Context
+ for (Contract contract : getElement().getContracts()) {
+ // Should not happen, anyway ignore
+ if (contract.getType() == null) {
+ continue;
+ }
+ // Populate
+ ModelElementManager.populateContext(context, getBundle(), contract, contract.getMode(), contract.getType(), contract.getType().getValue());
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/manager/FactoryComponentManager.java b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/manager/FactoryComponentManager.java
new file mode 100644
index 0000000..54c83fc
--- /dev/null
+++ b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/manager/FactoryComponentManager.java
@@ -0,0 +1,150 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.producer.internal.manager;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.egf.core.l10n.EGFCoreMessages;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.core.producer.context.IProductionContext;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.model.fcore.Orchestration;
+import org.eclipse.egf.model.fcore.OrchestrationParameter;
+import org.eclipse.egf.producer.EGFProducerPlugin;
+import org.eclipse.egf.producer.context.ActivityProductionContextProducer;
+import org.eclipse.egf.producer.internal.context.FactoryComponentProductionContext;
+import org.eclipse.egf.producer.manager.IModelElementManager;
+import org.eclipse.egf.producer.manager.OrchestrationManagerProducer;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.UniqueEList;
+import org.eclipse.osgi.util.NLS;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class FactoryComponentManager extends ActivityManager<FactoryComponent> {
+
+ private IModelElementManager<Orchestration, OrchestrationParameter> _orchestrationManager;
+
+ public FactoryComponentManager(FactoryComponent factoryComponent) throws InvocationException {
+ super(factoryComponent);
+ }
+
+ public FactoryComponentManager(Bundle bundle, FactoryComponent factoryComponent) throws InvocationException {
+ super(bundle, factoryComponent);
+ }
+
+ public <T extends Invocation> FactoryComponentManager(IModelElementManager<T, InvocationContract> parent, FactoryComponent factoryComponent) throws InvocationException {
+ super(parent, factoryComponent);
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public FactoryComponentProductionContext getInternalProductionContext() throws InvocationException {
+ if (_productionContext == null) {
+ ActivityProductionContextProducer<FactoryComponent> producer = null;
+ try {
+ producer = EGFProducerPlugin.getActivityProductionContextProducer(getElement());
+ } catch (Throwable t) {
+ throw new InvocationException(t);
+ }
+ if (getParent() != null) {
+ _productionContext = producer.createActivityProductionContext((IProductionContext<Invocation, InvocationContract>) getParent().getProductionContext(), getProjectBundleSession(), getElement());
+ } else {
+ _productionContext = producer.createActivityProductionContext(getProjectBundleSession(), getElement());
+ }
+ }
+ return (FactoryComponentProductionContext) _productionContext;
+ }
+
+ public IModelElementManager<Orchestration, OrchestrationParameter> getOrchestrationManager() throws InvocationException {
+ if (_orchestrationManager == null && getElement().getOrchestration() != null) {
+ OrchestrationManagerProducer<Orchestration> producer = null;
+ try {
+ producer = EGFProducerPlugin.getOrchestrationProducer(getElement().getOrchestration());
+ } catch (Throwable t) {
+ throw new InvocationException(t);
+ }
+ _orchestrationManager = producer.createOrchestrationManager(this, getElement().getOrchestration());
+ }
+ return _orchestrationManager;
+ }
+
+ public List<Activity> getActivities() throws InvocationException {
+ // Retrieve Activities
+ List<Activity> activities = new UniqueEList<Activity>();
+ activities.add(getElement());
+ if (getOrchestrationManager() != null) {
+ activities.addAll(getOrchestrationManager().getActivities());
+ }
+ return activities;
+ }
+
+ @Override
+ public void dispose() throws InvocationException {
+ super.dispose();
+ if (getOrchestrationManager() != null) {
+ getOrchestrationManager().dispose();
+ }
+ }
+
+ @Override
+ public Diagnostic canInvoke() throws InvocationException {
+ BasicDiagnostic diagnostic = checkInputElement(false);
+ // Continue
+ if (getOrchestrationManager() != null) {
+ diagnostic.add(getOrchestrationManager().canInvoke());
+ }
+ return diagnostic;
+ }
+
+ @Override
+ public void initializeContext() throws InvocationException {
+ super.initializeContext();
+ if (getOrchestrationManager() != null) {
+ getOrchestrationManager().initializeContext();
+ }
+ }
+
+ public int getSteps() throws InvocationException {
+ if (getOrchestrationManager() != null) {
+ return getOrchestrationManager().getSteps();
+ }
+ return 0;
+ }
+
+ public Diagnostic invoke(IProgressMonitor monitor) throws InvocationException {
+ SubMonitor subMonitor = SubMonitor.convert(monitor, NLS.bind(EGFCoreMessages.Production_Invoke, getName()), 1);
+ BasicDiagnostic diagnostic = checkInputElement(true);
+ if (diagnostic.getSeverity() != Diagnostic.ERROR) {
+ IModelElementManager<Orchestration, OrchestrationParameter> orchestrationManager = getOrchestrationManager();
+ if (orchestrationManager != null) {
+ // Invoke
+ diagnostic.add(orchestrationManager.invoke(subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE)));
+ if (monitor.isCanceled()) {
+ throw new OperationCanceledException();
+ }
+ checkOutputElement(diagnostic);
+ }
+ }
+ return diagnostic;
+ }
+
+}
diff --git a/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/manager/FactoryComponentManagerProducer.java b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/manager/FactoryComponentManagerProducer.java
new file mode 100644
index 0000000..8c0c3ab
--- /dev/null
+++ b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/manager/FactoryComponentManagerProducer.java
@@ -0,0 +1,52 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.producer.internal.manager;
+
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.producer.manager.ActivityManagerProducer;
+import org.eclipse.egf.producer.manager.FactoryComponentManagerFactory;
+import org.eclipse.egf.producer.manager.IActivityManager;
+import org.eclipse.egf.producer.manager.IModelElementManager;
+import org.eclipse.emf.ecore.EClass;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class FactoryComponentManagerProducer extends ActivityManagerProducer<FactoryComponent> {
+
+ @Override
+ public EClass getActivity() {
+ return FcorePackage.Literals.FACTORY_COMPONENT;
+ }
+
+ @Override
+ protected IActivityManager<FactoryComponent> doCreateActivityManager(Activity activity) throws InvocationException {
+ return FactoryComponentManagerFactory.createProductionManager((FactoryComponent) activity);
+ }
+
+ @Override
+ protected IActivityManager<FactoryComponent> doCreateActivityManager(Bundle bundle, Activity activity) throws InvocationException {
+ return FactoryComponentManagerFactory.createProductionManager(bundle, (FactoryComponent) activity);
+ }
+
+ @Override
+ protected <T extends Invocation> IActivityManager<FactoryComponent> doCreateActivityManager(IModelElementManager<T, InvocationContract> parent, Activity activity) throws InvocationException {
+ return FactoryComponentManagerFactory.createProductionManager(parent, (FactoryComponent) activity);
+ }
+
+}
diff --git a/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/manager/InvocationManager.java b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/manager/InvocationManager.java
new file mode 100644
index 0000000..95fb12e
--- /dev/null
+++ b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/manager/InvocationManager.java
@@ -0,0 +1,56 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.producer.internal.manager;
+
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.core.producer.context.ProductionContext;
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.model.fcore.Orchestration;
+import org.eclipse.egf.model.fcore.OrchestrationParameter;
+import org.eclipse.egf.model.types.Type;
+import org.eclipse.egf.producer.manager.IModelElementManager;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public abstract class InvocationManager<P extends Orchestration, T extends Invocation> extends ModelElementManager<T, InvocationContract> {
+
+ public InvocationManager(IModelElementManager<P, OrchestrationParameter> parent, T invocation) throws InvocationException {
+ super(parent, invocation);
+ }
+
+ @Override
+ public void initializeContext() throws InvocationException {
+ // Get Context
+ ProductionContext<T, InvocationContract> context = getInternalProductionContext();
+ // Clear Context
+ context.clear();
+ // Set Context
+ for (InvocationContract invocationContract : getElement().getInvocationContracts()) {
+ // Nothing to process
+ if (invocationContract.getInvokedContract() == null) {
+ continue;
+ }
+ // Fetch Type and Value
+ Type type = invocationContract.getType() != null ? invocationContract.getType() : invocationContract.getInvokedContract().getType();
+ Object value = invocationContract.getType() != null ? invocationContract.getType().getValue() : null;
+ // Nothing to process
+ if (type == null) {
+ continue;
+ }
+ // Populate
+ ModelElementManager.populateContext(context, getBundle(), invocationContract, invocationContract.getInvokedMode(), type, value);
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/manager/ModelElementManager.java b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/manager/ModelElementManager.java
new file mode 100644
index 0000000..c3c3a7a
--- /dev/null
+++ b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/manager/ModelElementManager.java
@@ -0,0 +1,216 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.producer.internal.manager;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.egf.common.helper.BundleHelper;
+import org.eclipse.egf.common.helper.EMFHelper;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.core.fcore.IPlatformFcore;
+import org.eclipse.egf.core.helper.BundleSessionHelper;
+import org.eclipse.egf.core.l10n.EGFCoreMessages;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.core.producer.context.IProductionContext;
+import org.eclipse.egf.core.producer.context.ProductionContext;
+import org.eclipse.egf.core.session.ProjectBundleSession;
+import org.eclipse.egf.model.fcore.ContractMode;
+import org.eclipse.egf.model.fcore.ModelElement;
+import org.eclipse.egf.model.fcore.NamedModelElement;
+import org.eclipse.egf.model.types.Type;
+import org.eclipse.egf.model.types.TypeAbstractClass;
+import org.eclipse.egf.producer.EGFProducerPlugin;
+import org.eclipse.egf.producer.l10n.ProducerMessages;
+import org.eclipse.egf.producer.manager.IModelElementManager;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.osgi.util.NLS;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public abstract class ModelElementManager<P extends ModelElement, T extends ModelElement> implements IModelElementManager<P, T> {
+
+ protected static BasicDiagnostic getDiagnostic(ModelElement element, boolean runtime) {
+ String message = null;
+ if (element instanceof NamedModelElement) {
+ NamedModelElement namedElement = (NamedModelElement) element;
+ if (namedElement.getName() != null && namedElement.getName().trim().length() != 0) {
+ if (runtime) {
+ message = NLS.bind(ProducerMessages.RuntimeCanInvoke_Diagnosis_message, namedElement.getName());
+ } else {
+ message = NLS.bind(ProducerMessages.CanInvoke_Diagnosis_message, namedElement.getName());
+ }
+ }
+ }
+ if (message == null) {
+ if (runtime) {
+ message = NLS.bind(ProducerMessages.RuntimeCanInvoke_Diagnosis_message, element.eClass().getName());
+ } else {
+ message = NLS.bind(ProducerMessages.CanInvoke_Diagnosis_message, element.eClass().getName());
+ }
+ }
+ return new BasicDiagnostic(EGFProducerPlugin.getDefault().getPluginID(), 0, message, new Object[] { element });
+ }
+
+ protected static <M extends ModelElement> void populateContext(ProductionContext<?, M> context, Bundle bundle, M key, ContractMode mode, Type type, Object value) throws InvocationException {
+ // Class
+ if (type instanceof TypeAbstractClass) {
+ try {
+ Object object = null;
+ // Should we instantiate value
+ String fqcn = (String) value;
+ if (fqcn != null && fqcn.trim().length() != 0) {
+ object = BundleHelper.instantiate(fqcn.trim(), bundle);
+ if (object == null) {
+ throw new InvocationException(new CoreException(EGFProducerPlugin.getDefault().newStatus(IStatus.ERROR, NLS.bind(EGFCoreMessages.ProjectBundleSession_BundleClassInstantiationFailure, value, bundle.getSymbolicName()), null)));
+ }
+ }
+ if (mode == ContractMode.IN) {
+ context.addInputData(key, type.getType(), object, true);
+ } else if (mode == ContractMode.OUT) {
+ context.addOutputData(key, type.getType(), null, true);
+ } else if (mode == ContractMode.IN_OUT) {
+ context.addInputData(key, type.getType(), object, true);
+ context.addOutputData(key, type.getType(), object, true);
+ }
+ } catch (Throwable t) {
+ throw new InvocationException(new CoreException(EGFProducerPlugin.getDefault().newStatus(IStatus.ERROR, NLS.bind(EGFCoreMessages.ProjectBundleSession_BundleClassInstantiationFailure, value), t)));
+ }
+ } else {
+ if (mode == ContractMode.IN) {
+ context.addInputData(key, type.getType(), value, true);
+ } else if (mode == ContractMode.OUT) {
+ context.addOutputData(key, type.getType(), null, true);
+ } else if (mode == ContractMode.IN_OUT) {
+ context.addInputData(key, type.getType(), value, true);
+ context.addOutputData(key, type.getType(), value, true);
+ }
+ }
+ }
+
+ private P _element;
+
+ protected IModelElementManager<?, ?> _parent;
+
+ protected IProductionContext<P, T> _productionContext;
+
+ private Bundle _bundle;
+
+ private ProjectBundleSession _projectBundleSession;
+
+ private IPlatformFcore _platformFcore;
+
+ public ModelElementManager(P element) throws InvocationException {
+ Assert.isNotNull(element);
+ _element = element;
+ if (_element.eResource() == null) {
+ throw new InvocationException(new CoreException(EGFProducerPlugin.getDefault().newStatus(IStatus.ERROR, NLS.bind(ProducerMessages.ModelElementManager_fcore_no_resource, getName()), null)));
+ }
+ _platformFcore = EGFCorePlugin.getPlatformFcore(_element.eResource());
+ if (_platformFcore == null) {
+ throw new InvocationException(new CoreException(EGFProducerPlugin.getDefault().newStatus(IStatus.ERROR, NLS.bind(ProducerMessages.ModelElementManager_fcore_activity, _element.eResource().getURI()), null)));
+ }
+ }
+
+ public ModelElementManager(Bundle bundle, P element) {
+ Assert.isNotNull(bundle);
+ Assert.isNotNull(element);
+ _bundle = bundle;
+ _element = element;
+ }
+
+ public ModelElementManager(IModelElementManager<?, ?> parent, P element) throws InvocationException {
+ Assert.isNotNull(parent);
+ Assert.isNotNull(element);
+ _parent = parent;
+ _element = element;
+ _platformFcore = EGFCorePlugin.getPlatformFcore(element.eResource());
+ if (_platformFcore == null) {
+ throw new InvocationException(new CoreException(EGFProducerPlugin.getDefault().newStatus(IStatus.ERROR, NLS.bind(ProducerMessages.ModelElementManager_fcore_activity, getName()), null)));
+ }
+ }
+
+ public P getElement() {
+ return _element;
+ }
+
+ public IProductionContext<P, T> getProductionContext() throws InvocationException {
+ return getInternalProductionContext();
+ }
+
+ public IModelElementManager<?, ?> getParent() {
+ return _parent;
+ }
+
+ protected abstract ProductionContext<P, T> getInternalProductionContext() throws InvocationException;
+
+ public String getName() {
+ return EMFHelper.getText(getElement());
+ }
+
+ public Bundle getBundle() throws InvocationException {
+ // Platform
+ if (_platformFcore != null) {
+ try {
+ return BundleSessionHelper.getBundle(getProjectBundleSession(), _platformFcore);
+ } catch (Throwable t) {
+ throw new InvocationException(t);
+ }
+ }
+ // Always from parent
+ if (getParent() != null) {
+ return getParent().getBundle();
+ }
+ // Parent
+ return _bundle;
+ }
+
+ public ProjectBundleSession getProjectBundleSession() {
+ if (getParent() != null) {
+ return getParent().getProjectBundleSession();
+ }
+ if (_projectBundleSession == null) {
+ _projectBundleSession = new ProjectBundleSession(EGFProducerPlugin.getDefault().getBundle().getBundleContext());
+ }
+ return _projectBundleSession;
+ }
+
+ @SuppressWarnings("unused")
+ protected BasicDiagnostic checkInputElement(boolean runtime) throws InvocationException {
+ return getDiagnostic(getElement(), runtime);
+ }
+
+ @SuppressWarnings("unused")
+ protected BasicDiagnostic checkOutputElement(BasicDiagnostic diagnostic) throws InvocationException {
+ return diagnostic;
+ }
+
+ public Diagnostic canInvoke() throws InvocationException {
+ return checkInputElement(false);
+ }
+
+ public abstract void initializeContext() throws InvocationException;
+
+ public void dispose() throws InvocationException {
+ if (_projectBundleSession != null) {
+ try {
+ _projectBundleSession.dispose();
+ } catch (Throwable t) {
+ throw new InvocationException(t);
+ }
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/manager/OrchestrationManager.java b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/manager/OrchestrationManager.java
new file mode 100644
index 0000000..6bde55f
--- /dev/null
+++ b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/manager/OrchestrationManager.java
@@ -0,0 +1,48 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.producer.internal.manager;
+
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.core.producer.context.ProductionContext;
+import org.eclipse.egf.model.fcore.ContractMode;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.Orchestration;
+import org.eclipse.egf.model.fcore.OrchestrationParameter;
+import org.eclipse.egf.producer.manager.IActivityManager;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public abstract class OrchestrationManager<P extends Orchestration> extends ModelElementManager<P, OrchestrationParameter> {
+
+ public OrchestrationManager(IActivityManager<FactoryComponent> parent, P orchestration) throws InvocationException {
+ super(parent, orchestration);
+ }
+
+ @Override
+ public void initializeContext() throws InvocationException {
+ // Get Context
+ ProductionContext<P, OrchestrationParameter> context = getInternalProductionContext();
+ // Clear Context
+ context.clear();
+ // Set Context
+ for (OrchestrationParameter orchestrationParameter : getElement().getOrchestrationParameters()) {
+ // Nothing to process
+ if (orchestrationParameter.getType() == null) {
+ continue;
+ }
+ // Populate
+ ModelElementManager.populateContext(context, getBundle(), orchestrationParameter, ContractMode.IN, orchestrationParameter.getType(), orchestrationParameter.getType().getValue());
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/registry/ProducerRegistry.java b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/registry/ProducerRegistry.java
new file mode 100644
index 0000000..8c3a070
--- /dev/null
+++ b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/internal/registry/ProducerRegistry.java
@@ -0,0 +1,178 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.producer.internal.registry;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.egf.common.helper.ExtensionPointHelper;
+import org.eclipse.egf.producer.EGFProducerPlugin;
+import org.eclipse.egf.producer.context.ActivityProductionContextProducer;
+import org.eclipse.egf.producer.manager.ActivityManagerProducer;
+import org.eclipse.egf.producer.manager.OrchestrationManagerProducer;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class ProducerRegistry {
+
+ private ProducerRegistry() {
+ // Prevent Instantiation
+ }
+
+ /**
+ * Extension point "activityManagerProducer" short id.
+ */
+ protected static final String EXTENSION_POINT_SHORT_ID_ACTIVITY_MANAGER_PRODUCER = "activityManagerProducer"; //$NON-NLS-1$
+
+ /**
+ * Extension point "activityProductionContextProducer" short id.
+ */
+ protected static final String EXTENSION_POINT_SHORT_ID_ACTIVITY_PRODUCTION_CONTEXT_PRODUCER = "activityProductionContextProducer"; //$NON-NLS-1$
+
+ /**
+ * Extension point "orchestrationManagerProducer" short id.
+ */
+ protected static final String EXTENSION_POINT_SHORT_ID_ORCHESTRATION_MANAGER_PRODUCER = "orchestrationManagerProducer"; //$NON-NLS-1$
+
+ /**
+ * EGF Registered Activity Manager Producers.
+ */
+ private static Map<EClass, ActivityManagerProducer<?>> __activityManagerProducers;
+
+ /**
+ * EGF Registered Activity Production Context Producers.
+ */
+ private static Map<EClass, ActivityProductionContextProducer<?>> __activityProductionContextProducers;
+
+ /**
+ * EGF Registered Orchestration Manager Producers.
+ */
+ private static Map<EClass, OrchestrationManagerProducer<?>> __orchestrationManagerProducers;
+
+ public static String getName(Object object) {
+ if (object instanceof EObject) {
+ return ((EObject) object).eClass().getName();
+ } else if (object instanceof Class<?>) {
+ return ((Class<?>) object).getName();
+ }
+ return object.getClass().getName();
+ }
+
+ /**
+ * Get Activity Manager Producers implementations.
+ *
+ * @return an empty map if none could be found.
+ */
+ public static Map<EClass, ActivityManagerProducer<?>> getActivityManagerProducers() {
+ // Lazy loading. Search for the implementation.
+ if (__activityManagerProducers == null) {
+ __activityManagerProducers = new HashMap<EClass, ActivityManagerProducer<?>>();
+ // Get ActivityProducer extension points.
+ for (IConfigurationElement configurationElement : ExtensionPointHelper.getConfigurationElements(EGFProducerPlugin.getDefault().getPluginID(), EXTENSION_POINT_SHORT_ID_ACTIVITY_MANAGER_PRODUCER)) {
+ Object object = null;
+ try {
+ object = ExtensionPointHelper.createInstance(configurationElement);
+ } catch (CoreException ce) {
+ EGFProducerPlugin.getDefault().logError(ce);
+ }
+ if (object == null) {
+ continue;
+ }
+ // Make sure this is the correct resulting type.
+ if (object instanceof ActivityManagerProducer<?> == false) {
+ EGFProducerPlugin.getDefault().logError(NLS.bind("Wrong Class {0}", object.getClass().getName())); //$NON-NLS-1$
+ EGFProducerPlugin.getDefault().logInfo(NLS.bind("This Class should be a sub-type of ''{0}''.", ActivityManagerProducer.class.getName()), 1); //$NON-NLS-1$
+ EGFProducerPlugin.getDefault().logInfo(NLS.bind("Bundle ''{0}''", ExtensionPointHelper.getNamespace(configurationElement)), 1); //$NON-NLS-1$
+ EGFProducerPlugin.getDefault().logInfo(NLS.bind("Extension-point ''{0}''", configurationElement.getName()), 1); //$NON-NLS-1$
+ continue;
+ }
+ __activityManagerProducers.put(((ActivityManagerProducer<?>) object).getActivity(), (ActivityManagerProducer<?>) object);
+ }
+ }
+ return __activityManagerProducers;
+ }
+
+ /**
+ * Get Activity Production Context Producers implementations.
+ *
+ * @return an empty map if none could be found.
+ */
+ public static Map<EClass, ActivityProductionContextProducer<?>> getActivityProductionContextProducers() {
+ // Lazy loading. Search for the implementation.
+ if (__activityProductionContextProducers == null) {
+ __activityProductionContextProducers = new HashMap<EClass, ActivityProductionContextProducer<?>>();
+ // Get ActivityProductionContextProducer extension points.
+ for (IConfigurationElement configurationElement : ExtensionPointHelper.getConfigurationElements(EGFProducerPlugin.getDefault().getPluginID(), EXTENSION_POINT_SHORT_ID_ACTIVITY_PRODUCTION_CONTEXT_PRODUCER)) {
+ Object object = null;
+ try {
+ object = ExtensionPointHelper.createInstance(configurationElement);
+ } catch (CoreException ce) {
+ EGFProducerPlugin.getDefault().logError(ce);
+ }
+ if (object == null) {
+ continue;
+ }
+ // Make sure this is the correct resulting type.
+ if (object instanceof ActivityProductionContextProducer<?> == false) {
+ EGFProducerPlugin.getDefault().logError(NLS.bind("Wrong Class {0}", object.getClass().getName())); //$NON-NLS-1$
+ EGFProducerPlugin.getDefault().logInfo(NLS.bind("This Class should be a sub-type of ''{0}''.", ActivityProductionContextProducer.class.getName()), 1); //$NON-NLS-1$
+ EGFProducerPlugin.getDefault().logInfo(NLS.bind("Bundle ''{0}''", ExtensionPointHelper.getNamespace(configurationElement)), 1); //$NON-NLS-1$
+ EGFProducerPlugin.getDefault().logInfo(NLS.bind("Extension-point ''{0}''", configurationElement.getName()), 1); //$NON-NLS-1$
+ continue;
+ }
+ __activityProductionContextProducers.put(((ActivityProductionContextProducer<?>) object).getActivity(), (ActivityProductionContextProducer<?>) object);
+ }
+ }
+ return __activityProductionContextProducers;
+ }
+
+ /**
+ * Get Orchestration Manager Producers implementations.
+ *
+ * @return an empty map if none could be found.
+ */
+ public static Map<EClass, OrchestrationManagerProducer<?>> getOrchestrationManagerProducers() {
+ // Lazy loading. Search for the implementation.
+ if (__orchestrationManagerProducers == null) {
+ __orchestrationManagerProducers = new HashMap<EClass, OrchestrationManagerProducer<?>>();
+ // Get ActivityProducer extension points.
+ for (IConfigurationElement configurationElement : ExtensionPointHelper.getConfigurationElements(EGFProducerPlugin.getDefault().getPluginID(), EXTENSION_POINT_SHORT_ID_ORCHESTRATION_MANAGER_PRODUCER)) {
+ Object object = null;
+ try {
+ object = ExtensionPointHelper.createInstance(configurationElement);
+ } catch (CoreException ce) {
+ EGFProducerPlugin.getDefault().logError(ce);
+ }
+ if (object == null) {
+ continue;
+ }
+ // Make sure this is the correct resulting type.
+ if (object instanceof OrchestrationManagerProducer<?> == false) {
+ EGFProducerPlugin.getDefault().logError(NLS.bind("Wrong Class {0}", object.getClass().getName())); //$NON-NLS-1$
+ EGFProducerPlugin.getDefault().logInfo(NLS.bind("This Class should be a sub-type of ''{0}''.", OrchestrationManagerProducer.class.getName()), 1); //$NON-NLS-1$
+ EGFProducerPlugin.getDefault().logInfo(NLS.bind("Bundle ''{0}''", ExtensionPointHelper.getNamespace(configurationElement)), 1); //$NON-NLS-1$
+ EGFProducerPlugin.getDefault().logInfo(NLS.bind("Extension-point ''{0}''", configurationElement.getName()), 1); //$NON-NLS-1$
+ continue;
+ }
+ __orchestrationManagerProducers.put(((OrchestrationManagerProducer<?>) object).getOrchestration(), (OrchestrationManagerProducer<?>) object);
+ }
+ }
+ return __orchestrationManagerProducers;
+ }
+
+}
diff --git a/org.eclipse.egf.producer/src/org/eclipse/egf/producer/l10n/ProducerMessages.java b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/l10n/ProducerMessages.java
new file mode 100644
index 0000000..25d013c
--- /dev/null
+++ b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/l10n/ProducerMessages.java
@@ -0,0 +1,50 @@
+/**
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ * Thales Corporate Services S.A.S
+ */
+
+package org.eclipse.egf.producer.l10n;
+
+import org.eclipse.osgi.util.NLS;
+
+public class ProducerMessages {
+
+ private static final String BUNDLE_NAME = "org.eclipse.egf.producer.l10n.messages"; //$NON-NLS-1$
+
+ private ProducerMessages() {
+ // Do not instantiate
+ }
+
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, ProducerMessages.class);
+ }
+
+ public static String ModelElementManager_fcore_no_resource;
+ public static String ModelElementManager_fcore_activity;
+
+ public static String ActivityManager_mandatory_value;
+
+ public static String ActivityManagerProducer_extension_error;
+ public static String ActivityManagerProducer_type_error;
+
+ public static String ActivityProductionContextProducer_extension_error;
+ public static String ActivityProductionContextProducer_type_error;
+
+ public static String OrchestrationManagerProducer_extension_error;
+ public static String OrchestrationManagerProducer_type_error;
+
+ public static String CanInvoke_Diagnosis_message;
+ public static String RuntimeCanInvoke_Diagnosis_message;
+
+ public static String Activity_Invocation;
+ public static String Activity_Invocations;
+
+}
diff --git a/org.eclipse.egf.producer/src/org/eclipse/egf/producer/l10n/messages.properties b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/l10n/messages.properties
new file mode 100644
index 0000000..d75c907
--- /dev/null
+++ b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/l10n/messages.properties
@@ -0,0 +1,30 @@
+##
+# 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
+##
+
+ModelElementManager_fcore_no_resource= Fcore element ''{0}'' is not contained in a resource.
+ModelElementManager_fcore_activity= Fcore resource ''{0}'' is not exposed through it's according extension point.
+
+ActivityManager_mandatory_value= Mandatory value for ''{0}''
+
+ActivityManagerProducer_extension_error= Cannot find an Activity Manager Producer for ''{0}''.
+ActivityManagerProducer_type_error= Expected Activity is ''{0}'', got ''{1}''.
+
+ActivityProductionContextProducer_extension_error= Cannot find an Activity Production Context for ''{0}''.
+ActivityProductionContextProducer_type_error= Expected Activity Production Context is ''{0}'', got ''{1}''.
+
+OrchestrationManagerProducer_extension_error= Cannot find Orchestration Manager Producer for ''{0}''.
+OrchestrationManagerProducer_type_error= Expected Orchestration is ''{0}'', got ''{1}''.
+
+CanInvoke_Diagnosis_message== Invocation Validation Diagnosis for ''{0}''.
+RuntimeCanInvoke_Diagnosis_message== Runtime Invocation Validation Diagnosis for ''{0}''.
+
+Activity_Invocation= Activity ''{0}'' will invoke 1 step.
+Activity_Invocations= Activity ''{0}'' will invoke ''{1}'' steps.
diff --git a/org.eclipse.egf.producer/src/org/eclipse/egf/producer/manager/ActivityManagerProducer.java b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/manager/ActivityManagerProducer.java
new file mode 100644
index 0000000..acc4514
--- /dev/null
+++ b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/manager/ActivityManagerProducer.java
@@ -0,0 +1,70 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.producer.manager;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.egf.common.helper.EMFHelper;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.producer.l10n.ProducerMessages;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.osgi.util.NLS;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public abstract class ActivityManagerProducer<P extends Activity> {
+
+ public abstract EClass getActivity();
+
+ protected abstract IActivityManager<P> doCreateActivityManager(Activity activity) throws InvocationException;
+
+ protected abstract IActivityManager<P> doCreateActivityManager(Bundle bundle, Activity activity) throws InvocationException;
+
+ protected abstract <T extends Invocation> IActivityManager<P> doCreateActivityManager(IModelElementManager<T, InvocationContract> parent, Activity activity) throws InvocationException;
+
+ public IActivityManager<P> createActivityManager(P activity) throws InvocationException {
+ if (matchNature(activity) == false) {
+ throw new InvocationException(NLS.bind(ProducerMessages.ActivityManagerProducer_type_error, getActivity().eClass().getName(), activity.eClass().getName()));
+ }
+ return doCreateActivityManager(activity);
+ }
+
+ public IActivityManager<P> createActivityManager(Bundle bundle, Activity activity) throws InvocationException {
+ if (matchNature(activity) == false) {
+ throw new InvocationException(NLS.bind(ProducerMessages.ActivityManagerProducer_type_error, getActivity().eClass().getName(), activity.eClass().getName()));
+ }
+ return doCreateActivityManager(bundle, activity);
+ }
+
+ public <T extends Invocation> IActivityManager<P> createActivityManager(IModelElementManager<T, InvocationContract> parent, Activity activity) throws InvocationException {
+ if (matchNature(activity) == false) {
+ throw new InvocationException(NLS.bind(ProducerMessages.ActivityManagerProducer_type_error, getActivity().eClass().getName(), activity.eClass().getName()));
+ }
+ return doCreateActivityManager(parent, activity);
+ }
+
+ public boolean matchNature(Activity activity) {
+ Assert.isNotNull(activity);
+ Assert.isNotNull(getActivity());
+ return getActivity() == EMFHelper.solveAgainstStaticPackage(activity.eClass());
+ }
+
+}
diff --git a/org.eclipse.egf.producer/src/org/eclipse/egf/producer/manager/FactoryComponentManagerFactory.java b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/manager/FactoryComponentManagerFactory.java
new file mode 100644
index 0000000..302d6da
--- /dev/null
+++ b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/manager/FactoryComponentManagerFactory.java
@@ -0,0 +1,42 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.producer.manager;
+
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.Invocation;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.producer.internal.manager.FactoryComponentManager;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class FactoryComponentManagerFactory {
+
+ private FactoryComponentManagerFactory() {
+ // Prevent Instantiation
+ }
+
+ public static IActivityManager<FactoryComponent> createProductionManager(FactoryComponent factoryComponent) throws InvocationException {
+ return new FactoryComponentManager(factoryComponent);
+ }
+
+ public static IActivityManager<FactoryComponent> createProductionManager(Bundle bundle, FactoryComponent factoryComponent) throws InvocationException {
+ return new FactoryComponentManager(bundle, factoryComponent);
+ }
+
+ public static <T extends Invocation> IActivityManager<FactoryComponent> createProductionManager(IModelElementManager<T, InvocationContract> parent, FactoryComponent factoryComponent) throws InvocationException {
+ return new FactoryComponentManager(parent, factoryComponent);
+ }
+
+}
diff --git a/org.eclipse.egf.producer/src/org/eclipse/egf/producer/manager/IActivityManager.java b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/manager/IActivityManager.java
new file mode 100644
index 0000000..c8dc43c
--- /dev/null
+++ b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/manager/IActivityManager.java
@@ -0,0 +1,22 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.producer.manager;
+
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.Contract;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public interface IActivityManager<P extends Activity> extends IModelElementManager<P, Contract> {
+ // Nothing to do
+}
diff --git a/org.eclipse.egf.producer/src/org/eclipse/egf/producer/manager/IModelElementManager.java b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/manager/IModelElementManager.java
new file mode 100644
index 0000000..362c2c4
--- /dev/null
+++ b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/manager/IModelElementManager.java
@@ -0,0 +1,28 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.producer.manager;
+
+import java.util.List;
+
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.core.producer.manager.IProducerManager;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.ModelElement;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public interface IModelElementManager<P extends ModelElement, T extends ModelElement> extends IProducerManager<P, T> {
+
+ public List<Activity> getActivities() throws InvocationException;
+
+}
diff --git a/org.eclipse.egf.producer/src/org/eclipse/egf/producer/manager/OrchestrationManagerProducer.java b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/manager/OrchestrationManagerProducer.java
new file mode 100644
index 0000000..361686c
--- /dev/null
+++ b/org.eclipse.egf.producer/src/org/eclipse/egf/producer/manager/OrchestrationManagerProducer.java
@@ -0,0 +1,51 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.producer.manager;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.egf.common.helper.EMFHelper;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.Orchestration;
+import org.eclipse.egf.model.fcore.OrchestrationParameter;
+import org.eclipse.egf.producer.l10n.ProducerMessages;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public abstract class OrchestrationManagerProducer<T extends Orchestration> {
+
+ public abstract EClass getOrchestration();
+
+ protected abstract IModelElementManager<T, OrchestrationParameter> doCreateOrchestrationManager(IActivityManager<FactoryComponent> parent, T orchestration) throws InvocationException;
+
+ public IModelElementManager<T, OrchestrationParameter> createOrchestrationManager(IActivityManager<FactoryComponent> parent, T orchestration) throws InvocationException {
+ if (matchNature(orchestration) == false) {
+ throw new InvocationException(NLS.bind(ProducerMessages.OrchestrationManagerProducer_type_error, getOrchestration().eClass().getName(), orchestration.eClass().getName()));
+ }
+ return doCreateOrchestrationManager(parent, orchestration);
+ }
+
+ public boolean matchNature(Orchestration orchestration) {
+ Assert.isNotNull(orchestration);
+ Assert.isNotNull(getOrchestration());
+ return getOrchestration() == EMFHelper.solveAgainstStaticPackage(orchestration.eClass());
+ }
+
+}
diff --git a/org.eclipse.egf.task.ui/.classpath b/org.eclipse.egf.task.ui/.classpath
new file mode 100644
index 0000000..64c5e31
--- /dev/null
+++ b/org.eclipse.egf.task.ui/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.egf.task.ui/.project b/org.eclipse.egf.task.ui/.project
new file mode 100644
index 0000000..35f5ae9
--- /dev/null
+++ b/org.eclipse.egf.task.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.task.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.task.ui/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egf.task.ui/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..fab6348
--- /dev/null
+++ b/org.eclipse.egf.task.ui/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:47:38 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.egf.task.ui/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egf.task.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..447ee02
--- /dev/null
+++ b/org.eclipse.egf.task.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Mon Feb 15 16:26:48 CET 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/org.eclipse.egf.task.ui/META-INF/MANIFEST.MF b/org.eclipse.egf.task.ui/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..27a5103
--- /dev/null
+++ b/org.eclipse.egf.task.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.task.ui;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.egf.task.ui.EGFTaskUIPlugin
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle:
+ org.eclipse.core.runtime,
+ org.eclipse.egf.core.ui,
+ org.eclipse.egf.model.ftask,
+ org.eclipse.egf.model.editor,
+ org.eclipse.egf.task
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.egf.task.ui/about.html b/org.eclipse.egf.task.ui/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/org.eclipse.egf.task.ui/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/org.eclipse.egf.task.ui/build.properties b/org.eclipse.egf.task.ui/build.properties
new file mode 100644
index 0000000..5629f2c
--- /dev/null
+++ b/org.eclipse.egf.task.ui/build.properties
@@ -0,0 +1,18 @@
+##
+# 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
+##
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ about.html,\
+ plugin.xml
+src.includes = about.html
diff --git a/org.eclipse.egf.task.ui/plugin.properties b/org.eclipse.egf.task.ui/plugin.properties
new file mode 100644
index 0000000..e39cd0f
--- /dev/null
+++ b/org.eclipse.egf.task.ui/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 Task UI (Incubation)
+providerName=Eclipse Modeling Project
diff --git a/org.eclipse.egf.task.ui/plugin.xml b/org.eclipse.egf.task.ui/plugin.xml
new file mode 100644
index 0000000..26431c6
--- /dev/null
+++ b/org.eclipse.egf.task.ui/plugin.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+
+<!--
+
+ 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>
+
+ <!-- ================================================================================= -->
+ <!-- Menu Contributor -->
+ <!-- ================================================================================= -->
+
+ <extension
+ point="org.eclipse.egf.core.ui.editor.menu.contributor"
+ >
+ <contribution
+ class="org.eclipse.egf.task.ui.contributions.TaskMenuContributor"
+ />
+ </extension>
+
+ <extension
+ point="org.eclipse.egf.core.ui.editor.property.contributor"
+ >
+ <contribution
+ class="org.eclipse.egf.task.ui.contributions.TaskJavaEditorContributor"
+ />
+ </extension>
+
+</plugin>
+
diff --git a/org.eclipse.egf.task.ui/src/org/eclipse/egf/task/ui/EGFTaskUIPlugin.java b/org.eclipse.egf.task.ui/src/org/eclipse/egf/task/ui/EGFTaskUIPlugin.java
new file mode 100644
index 0000000..2fcf740
--- /dev/null
+++ b/org.eclipse.egf.task.ui/src/org/eclipse/egf/task/ui/EGFTaskUIPlugin.java
@@ -0,0 +1,95 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+package org.eclipse.egf.task.ui;
+
+import org.eclipse.egf.common.ui.activator.EGFAbstractUIPlugin;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.osgi.framework.BundleContext;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class EGFTaskUIPlugin extends EGFAbstractUIPlugin {
+
+ // The shared instance
+ private static EGFTaskUIPlugin __plugin;
+
+ /**
+ *
+ * Returns the currently active window for this workbench (if any). Returns
+ * <code>null</code> if there is no active workbench window. Returns
+ * <code>null</code> if called from a non-UI thread.
+ *
+ * @return the active workbench window, or <code>null</code> if there is
+ * no active workbench window or if called from a non-UI thread
+ */
+ public static IWorkbenchWindow getActiveWorkbenchWindow() {
+ return getDefault().getWorkbench().getActiveWorkbenchWindow();
+ }
+
+ /**
+ * Returns the currently active shell for this workbench (if any).
+ *
+ * @return the active workbench shell.
+ */
+ public static Shell getActiveWorkbenchShell() {
+ IWorkbenchWindow window = getActiveWorkbenchWindow();
+ if (window == null) {
+ IWorkbenchWindow[] windows = getDefault().getWorkbench().getWorkbenchWindows();
+ if (windows.length > 0) {
+ return windows[0].getShell();
+ }
+ } else {
+ return window.getShell();
+ }
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ __plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ __plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static EGFTaskUIPlugin getDefault() {
+ return __plugin;
+ }
+
+}
diff --git a/org.eclipse.egf.task.ui/src/org/eclipse/egf/task/ui/contributions/AbstractTaskEditorContributor.java b/org.eclipse.egf.task.ui/src/org/eclipse/egf/task/ui/contributions/AbstractTaskEditorContributor.java
new file mode 100644
index 0000000..8481adf
--- /dev/null
+++ b/org.eclipse.egf.task.ui/src/org/eclipse/egf/task/ui/contributions/AbstractTaskEditorContributor.java
@@ -0,0 +1,63 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.task.ui.contributions;
+
+import org.eclipse.egf.ftask.producer.invocation.ITaskProduction;
+import org.eclipse.egf.model.editor.contributions.AbstractTypeEditorContributor;
+import org.eclipse.egf.model.ftask.FtaskPackage;
+import org.eclipse.egf.model.ftask.Task;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public abstract class AbstractTaskEditorContributor extends AbstractTypeEditorContributor {
+
+ private final String _kind;
+
+ protected AbstractTaskEditorContributor(String kind) {
+ super();
+ _kind = kind;
+ if (kind == null) {
+ throw new IllegalArgumentException();
+ }
+ }
+
+ @Override
+ public boolean canApply(Object object, IItemPropertyDescriptor descriptor) {
+ if (checkFeature(object, descriptor, FtaskPackage.Literals.TASK__IMPLEMENTATION) && object instanceof Task) {
+ Task task = (Task) object;
+ return getKind().equals(task.getKindValue());
+ }
+ return false;
+ }
+
+ @Override
+ protected String getCurrentClassname(Object object) {
+ return ((Task) object).getImplementation();
+ }
+
+ @Override
+ protected Class<?> getType(Object object) {
+ return ITaskProduction.class;
+ }
+
+ protected String getKind() {
+ return _kind;
+ }
+
+}
diff --git a/org.eclipse.egf.task.ui/src/org/eclipse/egf/task/ui/contributions/TaskJavaEditorContributor.java b/org.eclipse.egf.task.ui/src/org/eclipse/egf/task/ui/contributions/TaskJavaEditorContributor.java
new file mode 100644
index 0000000..cabf5ab
--- /dev/null
+++ b/org.eclipse.egf.task.ui/src/org/eclipse/egf/task/ui/contributions/TaskJavaEditorContributor.java
@@ -0,0 +1,30 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.task.ui.contributions;
+
+import org.eclipse.egf.task.EGFTaskPlugin;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class TaskJavaEditorContributor extends AbstractTaskEditorContributor {
+
+ public TaskJavaEditorContributor() {
+ super(EGFTaskPlugin.KIND_JAVA);
+ }
+
+}
diff --git a/org.eclipse.egf.task.ui/src/org/eclipse/egf/task/ui/contributions/TaskMenuContributor.java b/org.eclipse.egf.task.ui/src/org/eclipse/egf/task/ui/contributions/TaskMenuContributor.java
new file mode 100644
index 0000000..feb7710
--- /dev/null
+++ b/org.eclipse.egf.task.ui/src/org/eclipse/egf/task/ui/contributions/TaskMenuContributor.java
@@ -0,0 +1,71 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.task.ui.contributions;
+
+import org.eclipse.egf.common.ui.constant.EGFCommonUIConstants;
+import org.eclipse.egf.core.ui.contributor.MenuContributor;
+import org.eclipse.egf.core.ui.l10n.CoreUIMessages;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.ftask.task.TaskHook;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.viewers.IStructuredSelection;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class TaskMenuContributor extends MenuContributor {
+
+ @Override
+ public void menuAboutToShow(IMenuManager menuManager) {
+ IStructuredSelection selection2 = (IStructuredSelection) selection;
+ if (selection2.size() == 1) {
+ if (selection2.getFirstElement() instanceof Activity) {
+ IContributionItem item = menuManager.find(EGFCommonUIConstants.CREATE_SIBLING);
+ MenuManager createSiblingMenuManager = null;
+ if (item != null && item instanceof MenuManager) {
+ createSiblingMenuManager = (MenuManager) item;
+ } else {
+ createSiblingMenuManager = new MenuManager(CoreUIMessages.MenuContributor_siblingChildGroup_label);
+ menuManager.insertAfter(EGFCommonUIConstants.CREATE_CHILD, createSiblingMenuManager);
+ }
+
+ // TODO voir MultiRootTaskJavaCreateAction
+
+ for (String kind : TaskHook.HELPER.getKinds()) {
+ // createSiblingMenuManager.add(new
+ // MultiRootTaskJavaCreateAction(activeEditorPart, new
+ // StructuredSelection(domain.getParent(object))));
+
+ // descriptor = new CommandParameter(null,
+ // PatternPackage.Literals.PATTERN_LIBRARY__ELEMENTS,
+ // FcoreFactory.eINSTANCE.createFactoryComponent());
+ // createChildAction = new
+ // CreateChildAction(activeEditorPart, selection,
+ // descriptor);
+ // createChildAction.setText("Task "+kind);
+ // createChildAction.setImageDescriptor(ImageDescriptor.createFromURL(patternExtension.getImageURL()));
+ // createSiblingMenuManager.add(createChildAction);
+
+ }
+
+ }
+ }
+ }
+
+}
diff --git a/org.eclipse.egf.task.ui/src/org/eclipse/egf/task/ui/l10n/EGFTaskUIMessages.java b/org.eclipse.egf.task.ui/src/org/eclipse/egf/task/ui/l10n/EGFTaskUIMessages.java
new file mode 100644
index 0000000..ba5174a
--- /dev/null
+++ b/org.eclipse.egf.task.ui/src/org/eclipse/egf/task/ui/l10n/EGFTaskUIMessages.java
@@ -0,0 +1,34 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.task.ui.l10n;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class EGFTaskUIMessages extends NLS {
+
+ public static String missing_invoker_message;
+
+ private static final String BUNDLE_NAME = "org.eclipse.egf.task.ui.l10n.messages";//$NON-NLS-1$
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, EGFTaskUIMessages.class);
+ }
+
+}
diff --git a/org.eclipse.egf.task.ui/src/org/eclipse/egf/task/ui/l10n/messages.properties b/org.eclipse.egf.task.ui/src/org/eclipse/egf/task/ui/l10n/messages.properties
new file mode 100644
index 0000000..0826aa2
--- /dev/null
+++ b/org.eclipse.egf.task.ui/src/org/eclipse/egf/task/ui/l10n/messages.properties
@@ -0,0 +1 @@
+missing_invoker_message = No invoker for ''{0}'' task.
\ No newline at end of file
diff --git a/org.eclipse.egf.task/.classpath b/org.eclipse.egf.task/.classpath
new file mode 100644
index 0000000..64c5e31
--- /dev/null
+++ b/org.eclipse.egf.task/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.egf.task/.project b/org.eclipse.egf.task/.project
new file mode 100644
index 0000000..29af5cc
--- /dev/null
+++ b/org.eclipse.egf.task/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.task</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.egf.task/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egf.task/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..fab6348
--- /dev/null
+++ b/org.eclipse.egf.task/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:47:38 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.egf.task/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egf.task/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..447ee02
--- /dev/null
+++ b/org.eclipse.egf.task/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Mon Feb 15 16:26:48 CET 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/org.eclipse.egf.task/META-INF/MANIFEST.MF b/org.eclipse.egf.task/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..07df37e
--- /dev/null
+++ b/org.eclipse.egf.task/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.task;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.egf.task.EGFTaskPlugin
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle:
+ org.eclipse.core.runtime,
+ org.eclipse.egf.model.ftask
+Export-Package:
+ org.eclipse.egf.task
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.egf.task/about.html b/org.eclipse.egf.task/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/org.eclipse.egf.task/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/org.eclipse.egf.task/build.properties b/org.eclipse.egf.task/build.properties
new file mode 100644
index 0000000..5629f2c
--- /dev/null
+++ b/org.eclipse.egf.task/build.properties
@@ -0,0 +1,18 @@
+##
+# 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
+##
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ about.html,\
+ plugin.xml
+src.includes = about.html
diff --git a/org.eclipse.egf.task/plugin.properties b/org.eclipse.egf.task/plugin.properties
new file mode 100644
index 0000000..8f8455a
--- /dev/null
+++ b/org.eclipse.egf.task/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 Task (Incubation)
+providerName=Eclipse Modeling Project
diff --git a/org.eclipse.egf.task/plugin.xml b/org.eclipse.egf.task/plugin.xml
new file mode 100644
index 0000000..14ccd83
--- /dev/null
+++ b/org.eclipse.egf.task/plugin.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+
+<!--
+
+ 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>
+
+ <!-- ================================================================================= -->
+ <!-- Task -->
+ <!-- ================================================================================= -->
+
+ <extension
+ point="org.eclipse.egf.model.ftask.task"
+ >
+ <hook
+ class="org.eclipse.egf.task.internal.hook.TaskJavaHook"
+ />
+ </extension>
+
+</plugin>
+
diff --git a/org.eclipse.egf.task/src/org/eclipse/egf/task/EGFTaskPlugin.java b/org.eclipse.egf.task/src/org/eclipse/egf/task/EGFTaskPlugin.java
new file mode 100644
index 0000000..1865687
--- /dev/null
+++ b/org.eclipse.egf.task/src/org/eclipse/egf/task/EGFTaskPlugin.java
@@ -0,0 +1,64 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+package org.eclipse.egf.task;
+
+import org.eclipse.egf.common.activator.EGFAbstractPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class EGFTaskPlugin extends EGFAbstractPlugin {
+
+ public static String KIND_JAVA = "java"; //$NON-NLS-1$
+
+ // The shared instance
+ private static EGFTaskPlugin __plugin;
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ __plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ __plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static EGFTaskPlugin getDefault() {
+ return __plugin;
+ }
+
+}
diff --git a/org.eclipse.egf.task/src/org/eclipse/egf/task/internal/hook/TaskJavaHook.java b/org.eclipse.egf.task/src/org/eclipse/egf/task/internal/hook/TaskJavaHook.java
new file mode 100644
index 0000000..9bb00ab
--- /dev/null
+++ b/org.eclipse.egf.task/src/org/eclipse/egf/task/internal/hook/TaskJavaHook.java
@@ -0,0 +1,97 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.task.internal.hook;
+
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.egf.common.helper.BundleHelper;
+import org.eclipse.egf.core.l10n.EGFCoreMessages;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+import org.eclipse.egf.ftask.producer.invocation.ITaskProduction;
+import org.eclipse.egf.model.ftask.Task;
+import org.eclipse.egf.model.ftask.task.TaskHook;
+import org.eclipse.egf.model.helper.ValidationHelper;
+import org.eclipse.egf.task.EGFTaskPlugin;
+import org.eclipse.egf.task.l10n.EGFTaskMessages;
+import org.eclipse.osgi.util.NLS;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class TaskJavaHook implements TaskHook {
+
+ public void invoke(Bundle bundle, ITaskProductionContext context, Task task, IProgressMonitor monitor) throws InvocationException {
+ ITaskProduction taskImpl = null;
+ if (task == null || task.getImplementationValue() == null) {
+ return;
+ }
+ String value = task.getImplementationValue().trim();
+ try {
+ taskImpl = (ITaskProduction) BundleHelper.instantiate(value, bundle);
+ } catch (Exception e) {
+ throw new InvocationException(new CoreException(EGFTaskPlugin.getDefault().newStatus(IStatus.ERROR, NLS.bind(EGFCoreMessages.ProjectBundleSession_BundleClassInstantiationFailure, value, bundle.getSymbolicName()), e)));
+ }
+ SubMonitor subMonitor = SubMonitor.convert(monitor, NLS.bind(EGFTaskMessages.Production_TaskJava_Invoke, value), 300);
+ taskImpl.preExecute(context, subMonitor.newChild(100, SubMonitor.SUPPRESS_NONE));
+ subMonitor.worked(100);
+ if (subMonitor.isCanceled()) {
+ throw new OperationCanceledException();
+ }
+ taskImpl.doExecute(context, subMonitor.newChild(100, SubMonitor.SUPPRESS_NONE));
+ subMonitor.worked(100);
+ if (subMonitor.isCanceled()) {
+ throw new OperationCanceledException();
+ }
+ taskImpl.postExecute(context, subMonitor.newChild(100, SubMonitor.SUPPRESS_NONE));
+ subMonitor.worked(100);
+ if (subMonitor.isCanceled()) {
+ throw new OperationCanceledException();
+ }
+ }
+
+ public String getKind() {
+ return EGFTaskPlugin.KIND_JAVA;
+ }
+
+ public boolean isLoadableImplementation(Task task, Map<Object, Object> context) {
+ if (task == null) {
+ return false;
+ }
+ if (ValidationHelper.isLoadableClass(task, task.getImplementationValue(), context)) {
+ return true;
+ }
+ return false;
+ }
+
+ public boolean isValidImplementation(Task task, Map<Object, Object> context) {
+ if (task == null) {
+ return false;
+ }
+ if (ValidationHelper.isValidClass(task, ITaskProduction.class, task.getImplementationValue(), context)) {
+ return true;
+ }
+ return false;
+ }
+
+}
diff --git a/org.eclipse.egf.task/src/org/eclipse/egf/task/l10n/EGFTaskMessages.java b/org.eclipse.egf.task/src/org/eclipse/egf/task/l10n/EGFTaskMessages.java
new file mode 100644
index 0000000..74f9444
--- /dev/null
+++ b/org.eclipse.egf.task/src/org/eclipse/egf/task/l10n/EGFTaskMessages.java
@@ -0,0 +1,34 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.task.l10n;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class EGFTaskMessages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.egf.task.l10n.messages"; //$NON-NLS-1$
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, EGFTaskMessages.class);
+ }
+
+ public static String Production_TaskJava_Invoke;
+
+}
diff --git a/org.eclipse.egf.task/src/org/eclipse/egf/task/l10n/messages.properties b/org.eclipse.egf.task/src/org/eclipse/egf/task/l10n/messages.properties
new file mode 100644
index 0000000..3df58a2
--- /dev/null
+++ b/org.eclipse.egf.task/src/org/eclipse/egf/task/l10n/messages.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
+##
+
+
+Production_TaskJava_Invoke= Invoke Task Java ''{0}''
diff --git a/org.eclipse.jet.editor/.classpath b/org.eclipse.jet.editor/.classpath
new file mode 100644
index 0000000..2d1a430
--- /dev/null
+++ b/org.eclipse.jet.editor/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.jet.editor/.jetproperties b/org.eclipse.jet.editor/.jetproperties
new file mode 100644
index 0000000..a9dc5d9
--- /dev/null
+++ b/org.eclipse.jet.editor/.jetproperties
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jet-settings>
+ <template-container>templates</template-container> <source-container>src</source-container>
+</jet-settings>
diff --git a/org.eclipse.jet.editor/.project b/org.eclipse.jet.editor/.project
new file mode 100644
index 0000000..c4407e3
--- /dev/null
+++ b/org.eclipse.jet.editor/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.jet.editor</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jet.builder</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.jet.jet2Nature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.jet.editor/.settings/org.eclipse.core.resources.prefs b/org.eclipse.jet.editor/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..16d66df
--- /dev/null
+++ b/org.eclipse.jet.editor/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:55:11 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/org.eclipse.jet.editor/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jet.editor/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..1c532b5
--- /dev/null
+++ b/org.eclipse.jet.editor/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Mon Jan 26 16:41:11 EST 2009
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
diff --git a/org.eclipse.jet.editor/META-INF/MANIFEST.MF b/org.eclipse.jet.editor/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..1850330
--- /dev/null
+++ b/org.eclipse.jet.editor/META-INF/MANIFEST.MF
@@ -0,0 +1,37 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.jet.editor; singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.jet.internal.editor.Activator
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.jface.text;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.ui;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.ui.ide;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.ui.editors;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.ui.workbench.texteditor;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.ui.views;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.ui.views.properties.tabbed;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.jdt.core;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.jdt.ui;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.jet;bundle-version="[0.8.0,2.0.0)",
+ org.eclipse.emf.codegen.ecore;bundle-version="[2.2.0,3.0.0)",
+ org.eclipse.emf.ecore;bundle-version="[2.2.0,3.0.0)",
+ org.eclipse.emf.codegen.ecore.ui;bundle-version="[2.2.0,3.0.0)"
+Eclipse-LazyStart: true
+Export-Package: org.eclipse.jet.internal.editor,
+ org.eclipse.jet.internal.editor.annotations,
+ org.eclipse.jet.internal.editor.autoedit,
+ org.eclipse.jet.internal.editor.configuration,
+ org.eclipse.jet.internal.editor.configuration.delegates,
+ org.eclipse.jet.internal.editor.contentassist,
+ org.eclipse.jet.internal.editor.formatter,
+ org.eclipse.jet.internal.editor.outline,
+ org.eclipse.jet.internal.editor.partition,
+ org.eclipse.jet.internal.editor.rules,
+ org.eclipse.jet.internal.editor.scanners
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.jet.editor/ModelingFeature.png b/org.eclipse.jet.editor/ModelingFeature.png
new file mode 100644
index 0000000..6b08de2
--- /dev/null
+++ b/org.eclipse.jet.editor/ModelingFeature.png
Binary files differ
diff --git a/org.eclipse.jet.editor/about.html b/org.eclipse.jet.editor/about.html
new file mode 100644
index 0000000..fc86a34
--- /dev/null
+++ b/org.eclipse.jet.editor/about.html
@@ -0,0 +1,29 @@
+<!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">
+ <h3>About This Content</h3>
+
+ <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/org/documents/epl-v10.php">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>
+ <p align="right"><small><a href="#top">go to top</a></small></p>
+
+</body>
+</html>
diff --git a/org.eclipse.jet.editor/about.ini b/org.eclipse.jet.editor/about.ini
new file mode 100644
index 0000000..330201a
--- /dev/null
+++ b/org.eclipse.jet.editor/about.ini
@@ -0,0 +1,28 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%blurb
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=ModelingFeature.png
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (not translated)
+# needed for primary features only
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
+
+# Property "tipsAndTricksHref" contains the Help topic href to a tips and tricks page
+# optional
+#tipsAndTricksHref=/org.eclipse.jet.doc/tips/jet_tips.html
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/about.mappings b/org.eclipse.jet.editor/about.mappings
new file mode 100644
index 0000000..0dfb735
--- /dev/null
+++ b/org.eclipse.jet.editor/about.mappings
@@ -0,0 +1,6 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
+0=@build@
diff --git a/org.eclipse.jet.editor/about.properties b/org.eclipse.jet.editor/about.properties
new file mode 100644
index 0000000..44e0c11
--- /dev/null
+++ b/org.eclipse.jet.editor/about.properties
@@ -0,0 +1,23 @@
+###############################################################################
+# Copyright (c) 2006, 2008 IBM Corporation and others.
+# 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:
+# IBM Corporation - initial API and implementation
+###############################################################################
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+blurb=Java Emitter Templates (JET) Editor\n\
+\n\
+Version: {featureVersion}\n\
+Build id: {0}\n\
+\n\
+(c) Copyright IBM Corporation and others 2005, 2008. All rights reserved.\n\
+Visit http://www.eclipse.org/modeling/m2t/?project=jet#jet
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/build.properties b/org.eclipse.jet.editor/build.properties
new file mode 100644
index 0000000..05b77d7
--- /dev/null
+++ b/org.eclipse.jet.editor/build.properties
@@ -0,0 +1,14 @@
+source.. = src/
+output.. = bin/
+bin.includes = plugin.xml,\
+ META-INF/,\
+ .,\
+ icons/,\
+ .jetproperties,\
+ ModelingFeature.png,\
+ about.html,\
+ about.ini,\
+ about.mappings,\
+ about.properties,\
+ plugin.properties
+src.includes = about.html
diff --git a/org.eclipse.jet.editor/icons/full/ctool16/JETFileWizard.gif b/org.eclipse.jet.editor/icons/full/ctool16/JETFileWizard.gif
new file mode 100644
index 0000000..b603b01
--- /dev/null
+++ b/org.eclipse.jet.editor/icons/full/ctool16/JETFileWizard.gif
Binary files differ
diff --git a/org.eclipse.jet.editor/icons/full/ctool16/JETProjectWizard.gif b/org.eclipse.jet.editor/icons/full/ctool16/JETProjectWizard.gif
new file mode 100644
index 0000000..8d97ee5
--- /dev/null
+++ b/org.eclipse.jet.editor/icons/full/ctool16/JETProjectWizard.gif
Binary files differ
diff --git a/org.eclipse.jet.editor/icons/full/obj16/JETTemplateFile.gif b/org.eclipse.jet.editor/icons/full/obj16/JETTemplateFile.gif
new file mode 100644
index 0000000..66f8c76
--- /dev/null
+++ b/org.eclipse.jet.editor/icons/full/obj16/JETTemplateFile.gif
Binary files differ
diff --git a/org.eclipse.jet.editor/icons/full/wizban/JETProjectWizard.gif b/org.eclipse.jet.editor/icons/full/wizban/JETProjectWizard.gif
new file mode 100644
index 0000000..8d97ee5
--- /dev/null
+++ b/org.eclipse.jet.editor/icons/full/wizban/JETProjectWizard.gif
Binary files differ
diff --git a/org.eclipse.jet.editor/icons/sample.gif b/org.eclipse.jet.editor/icons/sample.gif
new file mode 100644
index 0000000..34fb3c9
--- /dev/null
+++ b/org.eclipse.jet.editor/icons/sample.gif
Binary files differ
diff --git a/org.eclipse.jet.editor/plugin.properties b/org.eclipse.jet.editor/plugin.properties
new file mode 100644
index 0000000..4ff8167
--- /dev/null
+++ b/org.eclipse.jet.editor/plugin.properties
@@ -0,0 +1,4 @@
+pluginName = JET Editor
+providerName = Eclipse Modeling Project
+_UI_SetContentColorerAction.label=Set Non-JET Text Content Colorer ...
+editor.name.0 = JET - Java Emitter Templates Editor
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/plugin.xml b/org.eclipse.jet.editor/plugin.xml
new file mode 100644
index 0000000..5fca4dd
--- /dev/null
+++ b/org.eclipse.jet.editor/plugin.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension-point id="defaultContentColorerDelegates" name="Default JET Text Content Colorer Delegates" schema="schema/defaultContentColorerDelegates.exsd"/>
+
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ class="org.eclipse.jet.internal.editor.JETTextEditor"
+ contributorClass="org.eclipse.ui.texteditor.BasicTextEditorActionContributor"
+ default="true"
+ extensions="jet,jet2"
+ icon="icons/full/obj16/JETTemplateFile.gif"
+ id="org.eclipse.jet.editor.JETEditor"
+ name="%editor.name.0">
+ </editor>
+ </extension>
+ <extension
+ point="org.eclipse.jet.editor.defaultContentColorerDelegates">
+ <defaultContentColorerDelegate
+ delegateClass="org.eclipse.jet.internal.editor.configuration.delegates.java.JavaContentPartitionConfigurationDelegate">
+ </defaultContentColorerDelegate>
+ <defaultContentColorerDelegate
+ delegateClass="org.eclipse.jet.internal.editor.configuration.delegates.xml.XMLContentPartitionConfigurationDelegate">
+ </defaultContentColorerDelegate>
+ </extension>
+ <extension
+ point="org.eclipse.ui.editorActions">
+ <editorContribution
+ id="org.eclipse.jet.editor.JETEditor.actionsContributor"
+ targetID="org.eclipse.jet.editor.JETEditor">
+ <action
+ actionID="setDelegateColorerActionID"
+ class="org.eclipse.jet.internal.editor.actions.SetContentColorerAction"
+ id="org.eclipse.jet.editor.setDelegateColorerActionID"
+ label="%_UI_SetContentColorerAction.label"
+ style="push">
+ </action>
+ </editorContribution>
+ </extension>
+ <extension
+ point="org.eclipse.ui.editors.annotationTypes">
+ <type
+ markerSeverity="2"
+ name="org.eclipse.jet.editor.error"
+ super="org.eclipse.ui.workbench.texteditor.error">
+ </type>
+ <type
+ markerSeverity="1"
+ name="org.eclipse.jet.editor.warning"
+ super="org.eclipse.ui.workbench.texteditor.warning">
+ </type>
+ <type
+ markerSeverity="0"
+ name="org.eclipse.jet.editor.info"
+ super="org.eclipse.ui.workbench.texteditor.info">
+ </type>
+ </extension>
+
+</plugin>
diff --git a/org.eclipse.jet.editor/schema/defaultContentColorerDelegates.exsd b/org.eclipse.jet.editor/schema/defaultContentColorerDelegates.exsd
new file mode 100644
index 0000000..9c8f890
--- /dev/null
+++ b/org.eclipse.jet.editor/schema/defaultContentColorerDelegates.exsd
@@ -0,0 +1,105 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.jet.internal.editor">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.eclipse.jet.internal.editor" id="defaultContentColorerDelegates" name="Default Content Colorer Delegates"/>
+ </appInfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <complexType>
+ <sequence>
+ <element ref="defaultContentColorerDelegate" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="defaultContentColorerDelegate">
+ <complexType>
+ <attribute name="delegateClass" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java" basedOn="org.eclipse.jet.internal.editor.configuration.delegates.IJETDefaultTextColorerDelegate"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiInfo"/>
+ </appInfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="copyright"/>
+ </appInfo>
+ <documentation>
+
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/Activator.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/Activator.java
new file mode 100644
index 0000000..5250c0c
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/Activator.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.jet.internal.editor";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+ /**
+ * Returns an image descriptor for the image file at the given
+ * plug-in relative path
+ *
+ * @param path the path
+ * @return the image descriptor
+ */
+ public static ImageDescriptor getImageDescriptor(String path) {
+ return imageDescriptorFromPlugin(PLUGIN_ID, path);
+ }
+
+ /**
+ * Log an exception in Eclipse's logger with this plugin ID
+ * @param e
+ */
+ public static void log(Exception e) {
+ IStatus status = new Status(IStatus.ERROR, PLUGIN_ID, e.getMessage(), e);
+ getDefault().getLog().log(status);
+ }
+}
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/JETDocumentReader.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/JETDocumentReader.java
new file mode 100644
index 0000000..238e6f6
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/JETDocumentReader.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+
+/**
+ * @author jcheuoua
+ *
+ * To change the template for this generated type comment go to Window>Preferences>Java>Code Generation>Code
+ * and Comments
+ * @version $Revision: 1.2 $
+ */
+public class JETDocumentReader {
+ public static final int EOF = -1;
+
+ private IDocument document;
+
+ private int offset;
+
+ /**
+ * Constructor for JETDocumentReader.
+ *
+ * @param document
+ * IDocument
+ * @param documentOffset
+ * int
+ */
+ public JETDocumentReader(IDocument document, int documentOffset) {
+ this.document = null;
+ offset = -1;
+ if (documentOffset > 0)
+ offset = documentOffset;
+ this.document = document;
+ }
+
+ /**
+ * Method readForward.
+ *
+ * @return char
+ */
+ public char readForward() {
+ try {
+ if (document.getChar(offset) == '\uFFFF') {
+ return '\uFFFF';
+ } else {
+ offset++;
+ return document.getChar(offset);
+ }
+ } catch (BadLocationException ex) {
+ return '\uFFFF';
+ }
+ }
+
+ /**
+ * Method readBackward.
+ *
+ * @return char
+ */
+ public char readBackward() {
+ if (offset <= 0)
+ return '\uFFFF';
+ try {
+ offset--;
+ return document.getChar(offset);
+ } catch (BadLocationException e) {
+ return '\uFFFF';
+ }
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/JETEditor.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/JETEditor.java
new file mode 100644
index 0000000..f6b52b6
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/JETEditor.java
@@ -0,0 +1,140 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.action.*;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.ui.*;
+import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.ide.IGotoMarker;
+import org.eclipse.ui.part.MultiPageSelectionProvider;
+import org.eclipse.ui.texteditor.IStatusField;
+import org.eclipse.ui.texteditor.ITextEditorExtension;
+import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
+import org.eclipse.ui.views.properties.IPropertySheetPage;
+import org.eclipse.ui.views.properties.PropertySheetPage;
+
+public class JETEditor extends FormEditor implements ITextEditorExtension, IMenuListener, IGotoMarker {
+
+ public static final String ID = "org.eclipse.jet.internal.editor";
+ public static final String copyright = "(c) 2006 Joel Cheuoua & Contributors";
+ protected IStatusLineManager contentOutlineStatusLineManager;
+ protected TreeViewer contentOutlineViewer;
+ protected PropertySheetPage propertySheetPage;
+ protected ISelectionChangedListener selectionChangedListener;
+ protected JETTextEditor jetTextEditor;
+
+ public JETEditor() {
+ jetTextEditor = new JETTextEditor();
+ }
+
+ public JETTextEditor getJetTextEditor() {
+ return jetTextEditor;
+ }
+
+ public void addPages() {
+ try {
+ int pageIndex = addPage(jetTextEditor, getEditorInput());
+ setPageText(pageIndex, "Edition");
+ } catch (PartInitException e) {
+ e.printStackTrace();
+ }
+ Viewer viewer = new JETTextPreviewViewer(getContainer());
+ viewer.setInput(getEditorInput());
+ int pageIndex = addPage(viewer.getControl());
+ setPageText(pageIndex, "Preview");
+ }
+
+ public Object getAdapter(Class key) {
+ if (key.equals(IContentOutlinePage.class))
+ return jetTextEditor.getAdapter(key);
+ if (key.equals(IPropertySheetPage.class))
+ return getPropertySheetPage();
+ if (key.equals(IGotoMarker.class))
+ return this;
+ else
+ return super.getAdapter(key);
+ }
+
+ public IPropertySheetPage getPropertySheetPage() {
+ return propertySheetPage;
+ }
+
+ public boolean isDirty() {
+ return jetTextEditor != null && jetTextEditor.isDirty();
+ }
+
+ public void doSave(IProgressMonitor progressMonitor) {
+ if (jetTextEditor != null)
+ jetTextEditor.doSave(progressMonitor);
+ }
+
+ public boolean isSaveAsAllowed() {
+ if (jetTextEditor != null)
+ return jetTextEditor.isSaveAsAllowed();
+ else
+ return true;
+ }
+
+ public void doSaveAs() {
+ if (jetTextEditor != null)
+ jetTextEditor.doSaveAs();
+ }
+
+ public void gotoMarker(IMarker marker) {
+ if (jetTextEditor != null) {
+ IGotoMarker gotoMarker = (IGotoMarker) jetTextEditor.getAdapter(IGotoMarker.class);
+ if (gotoMarker != null)
+ gotoMarker.gotoMarker(marker);
+ }
+ }
+
+ public void init(IEditorSite site, IEditorInput editorInput) throws PartInitException {
+ setSite(site);
+ setInput(editorInput);
+ jetTextEditor.init(site, editorInput);
+ setPartName(editorInput.getName());
+ site.setSelectionProvider(new MultiPageSelectionProvider(this));
+ }
+
+ public void menuAboutToShow(IMenuManager menuManager) {
+ ((IMenuListener) getEditorSite().getActionBarContributor()).menuAboutToShow(menuManager);
+ }
+
+ public void dispose() {
+ if (jetTextEditor != null)
+ jetTextEditor.dispose();
+ super.dispose();
+ }
+
+ public void setStatusField(IStatusField field, String category) {
+ if (jetTextEditor != null)
+ jetTextEditor.setStatusField(field, category);
+ }
+
+ public boolean isEditorInputReadOnly() {
+ if (jetTextEditor != null)
+ jetTextEditor.isEditorInputReadOnly();
+ return false;
+ }
+
+ public void addRulerContextMenuListener(IMenuListener listener) {
+ if (jetTextEditor != null)
+ jetTextEditor.addRulerContextMenuListener(listener);
+ }
+
+ public void removeRulerContextMenuListener(IMenuListener listener) {
+ if (jetTextEditor != null)
+ jetTextEditor.removeRulerContextMenuListener(listener);
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/JETEditorHelper.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/JETEditorHelper.java
new file mode 100644
index 0000000..add6f0e
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/JETEditorHelper.java
@@ -0,0 +1,476 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IPackageFragment;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.IProblemRequestor;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.WorkingCopyOwner;
+import org.eclipse.jdt.core.compiler.IProblem;
+import org.eclipse.jdt.core.eval.IEvaluationContext;
+import org.eclipse.jdt.internal.ui.text.java.AbstractJavaCompletionProposal;
+import org.eclipse.jdt.ui.text.java.CompletionProposalCollector;
+import org.eclipse.jdt.ui.text.java.IJavaCompletionProposal;
+import org.eclipse.jet.compiler.CompileOptionsManager;
+import org.eclipse.jet.core.compiler.JETCompilerOptions;
+import org.eclipse.jet.core.parser.ProblemSeverity;
+import org.eclipse.jet.core.parser.ast.JETASTElement;
+import org.eclipse.jet.core.parser.ast.JETCompilationUnit;
+import org.eclipse.jet.core.parser.ast.JavaDeclaration;
+import org.eclipse.jet.core.parser.ast.JavaExpression;
+import org.eclipse.jet.core.parser.ast.JavaScriptlet;
+import org.eclipse.jet.core.parser.ast.Problem;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.Position;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.ui.IFileEditorInput;
+
+/**
+ * Helper class for code completion and JET compilation unit processing
+ * purposespurposes
+ *
+ * @author Joel
+ *
+ */
+public class JETEditorHelper {
+ /**
+ * Problem requestor for java expressions of the JET template
+ *
+ * @author Joel
+ *
+ */
+ private static final class JETJavaContentProblemRequestor implements IProblemRequestor {
+
+ /**
+ * The JET problems computed from the java problems
+ */
+ private List problems;
+
+ /**
+ * The problems collected from the compiled java source
+ */
+ private List javaProblems;
+
+ /**
+ * The jet source
+ */
+ private IDocument jetDocument;
+
+ private Map mappingPositions;
+
+ private JETJavaContentProblemRequestor(List problems, Map mappings, IDocument jetDocument) {
+ this.problems = problems;
+ mappingPositions = mappings;
+ javaProblems = new ArrayList();
+ this.jetDocument = jetDocument;
+ }
+
+ /**
+ * @return
+ */
+ public List getProblems() {
+ return problems;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jdt.core.IProblemRequestor#acceptProblem(org.eclipse.
+ * jdt.core.compiler.IProblem)
+ */
+ public void acceptProblem(IProblem problem) {
+ javaProblems.add(problem);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jdt.core.IProblemRequestor#beginReporting()
+ */
+ public void beginReporting() {
+ javaProblems.clear();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jdt.core.IProblemRequestor#endReporting()
+ */
+ public void endReporting() {
+ Problem problem;
+ // walk through the java problems collected from the generated java
+ // source and create the
+ // corresponding JET problems in the JET source using the position
+ // mappings
+ for (Iterator iter = javaProblems.iterator(); iter.hasNext();) {
+ IProblem javaProblem = (IProblem) iter.next();
+
+ int javaProblemOffset = javaProblem.getSourceStart();
+ int problemLength = (javaProblem.getSourceEnd() - javaProblemOffset) + 1;
+
+ // Retrieve the corresponding JET AST Element and its position
+ // in the JET source
+ JETASTElement astElement = getElementForJavaOffset(javaProblemOffset);
+ Position pos = (Position) mappingPositions.get(astElement);
+
+ // jetOffset =
+ // start position of the AST element in JET Code +
+ // offset till the position delimited by the javaProblemOffset
+ // The offset till the position delimited by the
+ // javaProblemOffset
+ // depends on the starting offset of the java content in the JET
+ // AST element.
+ // This is due to the fact that the JET AST element first
+ // position does not represents the starting offset of
+ // offset of its java content.
+
+ int astElementJavaContentStart = pos == null ? -1 : pos.getOffset();
+ int jetOffset = pos == null ? 0 : JETEditorHelper.getASTElementContentStart(astElement, jetDocument) + (javaProblemOffset - astElementJavaContentStart);
+
+ // Create the problem at the specified location
+ URI baseLocation = URI.create("");
+ problem = new Problem(baseLocation, "", javaProblem.isWarning() ? ProblemSeverity.WARNING : ProblemSeverity.ERROR, -1, javaProblem.getMessage(), javaProblem.getArguments(), jetOffset, jetOffset + problemLength, -1, -1);
+ // add the problem to the problems list
+ problems.add(problem);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jdt.core.IProblemRequestor#isActive()
+ */
+ public boolean isActive() {
+ return true;
+ }
+
+ /**
+ * Find the JET AST element that matches the given java offset in the
+ * generated java template source
+ *
+ * @param javaOffset
+ * @return
+ */
+ private JETASTElement getElementForJavaOffset(int javaOffset) {
+ for (Iterator iterator = mappingPositions.keySet().iterator(); iterator.hasNext();) {
+ JETASTElement element = (JETASTElement) iterator.next();
+ Position pos = (Position) mappingPositions.get(element);
+ if (pos.getOffset() <= javaOffset && javaOffset < pos.getOffset() + pos.getLength())
+ return element;
+ }
+ return null;
+ }
+ } // End class JETJavaContentProblemRequestor
+
+ /**
+ * @param astElement
+ * @param jetDocument
+ * @return
+ */
+ public static int getASTElementContentStart(JETASTElement astElement, IDocument jetDocument) {
+ int jetStart = astElement.getStart();
+ if (astElement instanceof JavaDeclaration)
+ jetStart += 3;
+ if ((astElement instanceof JavaExpression) || (astElement instanceof JavaScriptlet))
+ try {
+ String jetSnippet = jetDocument.get(jetStart, astElement.getEnd() - jetStart);
+ String javaContent = (astElement instanceof JavaExpression) ? ((JavaExpression) astElement).getJavaContent() : ((JavaScriptlet) astElement).getJavaContent();
+ int idx = jetSnippet.indexOf(javaContent);
+ jetStart += idx;
+ } catch (BadLocationException e) {
+ Activator.log(e);
+ }
+ return jetStart;
+ }
+
+ public static boolean checkOffsetPositions(String javaSource, String jetSource, int jetOffset, int javaOffset, int checkDepth) {
+ boolean result = false;
+
+ String javaCheckString = javaSource.substring(javaOffset, Math.min(javaSource.length(), javaOffset + checkDepth));
+ String jetCheckString = jetSource.substring(jetOffset, Math.min(jetSource.length(), jetOffset + checkDepth));
+ result = javaCheckString.compareTo(jetCheckString) == 0;
+ if (!result) {
+ System.err.println("position matching error");
+ System.err.println("JET Check String : " + jetCheckString);
+ System.err.println("Java Check String : " + javaCheckString);
+ }
+ return result;
+ }
+
+ /**
+ * @param jetEditor
+ * @param cu
+ * @param jetDocument
+ * @return
+ */
+ public static List evaluateProblems(JETTextEditor jetEditor, IDocument jetDocument) {
+ JETCompilationUnit cu = jetEditor.requestCompilationUnit();
+ String packageName = cu.getOutputJavaPackage();
+ String className = cu.getOutputJavaClassName();
+ List problems = new ArrayList();
+ if (packageName == null || className == null)
+ return problems;
+ Map mappingPositions = new HashMap();
+ String javaSource = jetEditor.compilationHelper().getJavaCode(cu, mappingPositions);
+ JETJavaContentProblemRequestor problemRequestor = new JETJavaContentProblemRequestor(problems, mappingPositions, jetDocument);
+ try {
+ ICompilationUnit compilationUnit = null;
+ IJavaProject javaProject = jetEditor.getJavaProject();
+ System.out.println("Project: " + javaProject.getElementName());
+ if (!javaProject.getElementName().startsWith("."))
+ System.out.println();
+ IPackageFragmentRoot roots[] = javaProject.getPackageFragmentRoots();
+ for (int i = 0; i < roots.length; i++) {
+ IPackageFragmentRoot root = roots[i];
+ if (IPackageFragmentRoot.K_SOURCE != root.getKind()) {
+ continue;
+ }
+ IPackageFragment packageFragment = root.getPackageFragment(packageName);
+ if (packageFragment == null || !packageFragment.exists())
+ packageFragment = root.createPackageFragment(packageName, true, new NullProgressMonitor());
+ compilationUnit = packageFragment.createCompilationUnit((new StringBuilder(String.valueOf(className))).append(".java").toString(), javaSource, true, new NullProgressMonitor());
+ break;
+ }
+ WorkingCopyOwner owner = new WorkingCopyOwner() {
+ };
+ ICompilationUnit copy = compilationUnit.getWorkingCopy(owner, problemRequestor, null);
+ copy.reconcile(0, true, owner, null);
+ } catch (JavaModelException e) {
+ System.out.println(e);
+ Activator.log(e);
+ }
+ return problems;
+ }
+
+ /**
+ * @param javaProject
+ * @param cu
+ * @param codeSnippet
+ * @param offset
+ * @return
+ */
+ public static CompletionProposalCollector collect(IJavaProject javaProject, JETCompilationUnit cu, String codeSnippet, int offset) {
+ IEvaluationContext context;
+ CompletionProposalCollector proposalCollector;
+ context = javaProject.newEvaluationContext();
+ List importList = new ArrayList();
+ importList.addAll(cu.getImports());
+ importList.add("org.eclipse.jet.JET2Context");
+ importList.add("org.eclipse.jet.JET2Template");
+ importList.add("org.eclipse.jet.JET2Writer");
+ importList.add("org.eclipse.jet.taglib.RuntimeTagElement");
+ importList.add("org.eclipse.jet.taglib.TagInfo");
+ String imports[] = new String[importList.size()];
+ importList.toArray(imports);
+ String packageName = cu.getOutputJavaPackage();
+ if (packageName == null) {
+ Map options = CompileOptionsManager.getOptions(javaProject.getProject());
+ if (options.isEmpty())
+ options = JETCompilerOptions.getDefaultCompilerOptions();
+ packageName = (String) options.get("org.eclipse.jet.compiledTemplatePackage");
+ }
+ context.setPackageName(packageName);
+ context.setImports(imports);
+ proposalCollector = new CompletionProposalCollector(javaProject);
+ try {
+ context.codeComplete(codeSnippet, offset, proposalCollector);
+ return proposalCollector;
+ } catch (JavaModelException e) {
+ Activator.log(e);
+ }
+ return null;
+ }
+
+ /**
+ * @param editor
+ * @param viewer
+ * @param completionOffset
+ * @return
+ */
+ public static IJavaCompletionProposal[] getJavaCompletionProposal(JETTextEditor jetEditor, ITextViewer viewer, int completionOffset) {
+ IJavaProject javaProject;
+ String packageName;
+ String className;
+ Map mappingPositions;
+ IDocument javaDocument;
+ JETCompilationUnit cu = jetEditor.requestCompilationUnit();
+ javaProject = jetEditor.getJavaProject();
+ packageName = cu.getOutputJavaPackage();
+ className = cu.getOutputJavaClassName();
+ if (packageName == null) {
+ Map options = CompileOptionsManager.getOptions(javaProject.getProject());
+ if (options.isEmpty())
+ options = JETCompilerOptions.getDefaultCompilerOptions();
+ packageName = (String) options.get("org.eclipse.jet.compiledTemplatePackage");
+ }
+ if (className == null && (jetEditor.getEditorInput() instanceof IFileEditorInput)) {
+ IFile file = ((IFileEditorInput) jetEditor.getEditorInput()).getFile();
+ String inputName = file.getFullPath().removeFileExtension().lastSegment();
+ String baseClassName = makeJavaClassName(inputName);
+ className = baseClassName;
+ }
+ if (packageName == null || className == null)
+ return new IJavaCompletionProposal[0];
+ mappingPositions = new HashMap();
+ javaDocument = new Document(jetEditor.compilationHelper().getJavaCode(cu, mappingPositions));
+ IJavaCompletionProposal results[];
+ ICompilationUnit compilationUnit = null;
+ try {
+ IPackageFragmentRoot roots[] = javaProject.getPackageFragmentRoots();
+ for (int i = 0; i < roots.length;) {
+ IPackageFragmentRoot root = roots[i];
+ IPackageFragment packageFragment = root.getPackageFragment(packageName);
+ if (packageFragment == null || !packageFragment.exists())
+ packageFragment = root.createPackageFragment(packageName, true, new NullProgressMonitor());
+ compilationUnit = packageFragment.createCompilationUnit((new StringBuilder(String.valueOf(className))).append(".java").toString(), javaDocument.get(), true, new NullProgressMonitor());
+ break;
+ }
+
+ CompletionProposalCollector proposalCollector = new CompletionProposalCollector(compilationUnit);
+ JETASTElement astElement = jetEditor.getASTElement(completionOffset);
+ Position javaPosition = (Position) mappingPositions.get(astElement);
+ int jetStart = getASTElementContentStart(astElement, viewer.getDocument());
+ int javaStart = javaPosition.getOffset();
+ int javaCompletionOffset = javaStart + (completionOffset - jetStart);
+ compilationUnit.codeComplete(javaCompletionOffset, proposalCollector);
+ Point selection = viewer.getSelectedRange();
+ if (selection.y > 0)
+ proposalCollector.setReplacementLength(selection.y);
+ IJavaCompletionProposal javaProposals[] = proposalCollector.getJavaCompletionProposals();
+ IJavaCompletionProposal keywordsProposals[] = proposalCollector.getKeywordCompletionProposals();
+ IJavaCompletionProposal unsortedJavaProposals[] = new IJavaCompletionProposal[javaProposals.length + keywordsProposals.length];
+ System.arraycopy(keywordsProposals, 0, unsortedJavaProposals, 0, keywordsProposals.length);
+ System.arraycopy(javaProposals, 0, unsortedJavaProposals, keywordsProposals.length, javaProposals.length);
+ List sortedJavaProposals = new LinkedList();
+ for (int i = 0; i < unsortedJavaProposals.length; i++) {
+ IJavaCompletionProposal unsortedJavaProposal = unsortedJavaProposals[i];
+ int index = 0;
+ for (Iterator iterator = sortedJavaProposals.iterator(); iterator.hasNext();) {
+ IJavaCompletionProposal proposal = (IJavaCompletionProposal) iterator.next();
+ if (proposal.getRelevance() <= unsortedJavaProposal.getRelevance()) {
+ index = sortedJavaProposals.indexOf(proposal);
+ break;
+ }
+ }
+
+ sortedJavaProposals.add(index, unsortedJavaProposal);
+ }
+
+ results = new IJavaCompletionProposal[sortedJavaProposals.size()];
+ sortedJavaProposals.toArray(results);
+ adjustResults(results, completionOffset);
+ return results;
+ } catch (JavaModelException e) {
+ Activator.log(e);
+ }
+ return new IJavaCompletionProposal[0];
+ }
+
+ /**
+ * @param javaProject
+ * @param cu
+ * @param codeSnippet
+ * @param viewer
+ * @param offset
+ * @return
+ */
+ public static IJavaCompletionProposal[] getJavaCompletionProposal(IJavaProject javaProject, JETCompilationUnit cu, String codeSnippet, ITextViewer viewer, int offset) {
+ CompletionProposalCollector proposalCollector = collect(javaProject, cu, codeSnippet, offset);
+ if (proposalCollector != null) {
+ Point selection = viewer.getSelectedRange();
+ if (selection.y > 0)
+ proposalCollector.setReplacementLength(selection.y);
+ IJavaCompletionProposal javaProposals[] = proposalCollector.getJavaCompletionProposals();
+ IJavaCompletionProposal keywordsProposals[] = proposalCollector.getKeywordCompletionProposals();
+ IJavaCompletionProposal unsortedJavaProposals[] = new IJavaCompletionProposal[javaProposals.length + keywordsProposals.length];
+ System.arraycopy(keywordsProposals, 0, unsortedJavaProposals, 0, keywordsProposals.length);
+ System.arraycopy(javaProposals, 0, unsortedJavaProposals, keywordsProposals.length, javaProposals.length);
+ List sortedJavaProposals = new LinkedList();
+ for (int i = 0; i < unsortedJavaProposals.length; i++) {
+ IJavaCompletionProposal unsortedJavaProposal = unsortedJavaProposals[i];
+ int index = 0;
+ for (Iterator iterator = sortedJavaProposals.iterator(); iterator.hasNext();) {
+ IJavaCompletionProposal proposal = (IJavaCompletionProposal) iterator.next();
+ if (proposal.getRelevance() <= unsortedJavaProposal.getRelevance()) {
+ index = sortedJavaProposals.indexOf(proposal);
+ break;
+ }
+ }
+ sortedJavaProposals.add(index, unsortedJavaProposal);
+ }
+
+ IJavaCompletionProposal results[] = new IJavaCompletionProposal[sortedJavaProposals.size()];
+ sortedJavaProposals.toArray(results);
+ return results;
+ } else {
+ return new IJavaCompletionProposal[0];
+ }
+ }
+
+ /**
+ * @param results
+ * @param offset
+ */
+ public static void adjustResults(IJavaCompletionProposal[] results, int offset) {
+ for (int i = 0; i < results.length; i++)
+ if (results[i] instanceof AbstractJavaCompletionProposal) {
+ AbstractJavaCompletionProposal proposal = (AbstractJavaCompletionProposal) results[i];
+ proposal.setReplacementOffset(offset);
+ }
+ }
+
+ /**
+ * @param results
+ * @param offset
+ * @param allWords
+ */
+ public static void adjustJavaScriptletProposalResults(IJavaCompletionProposal[] results, int offset) {
+ if (results.length > 0) {
+ IJavaCompletionProposal iJavaCompletionProposal = results[0];
+ if (iJavaCompletionProposal instanceof AbstractJavaCompletionProposal) {
+ AbstractJavaCompletionProposal proposal = (AbstractJavaCompletionProposal) iJavaCompletionProposal;
+ int replacementLength = proposal.getReplacementLength();
+ adjustResults(results, offset - replacementLength);
+ }
+ }
+ }
+
+ /**
+ * @param name
+ * @return
+ */
+ public static String makeJavaClassName(String name) {
+ StringBuffer result = new StringBuffer("_jet_");
+ for (int i = 0; i < name.length(); i++) {
+ char c = name.charAt(i);
+ if (Character.isJavaIdentifierPart(c))
+ result.append(c);
+ }
+ return result.toString();
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/JETSourceViewer.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/JETSourceViewer.java
new file mode 100644
index 0000000..e976590
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/JETSourceViewer.java
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.jface.text.source.IOverviewRuler;
+import org.eclipse.jface.text.source.IVerticalRuler;
+import org.eclipse.jface.text.source.projection.ProjectionViewer;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+
+public class JETSourceViewer extends ProjectionViewer implements IPropertyChangeListener {
+
+ private IPreferenceStore preferenceStore;
+ private Color foregroundColor;
+ private Color backgroundColor;
+ private Color selectionForegroundColor;
+ private Color selectionBackgroundColor;
+
+ public JETSourceViewer(Composite parent, IVerticalRuler ruler, IOverviewRuler overviewRuler,
+ boolean showsAnnotationOverview, int styles, IPreferenceStore store) {
+ super(parent, ruler, overviewRuler, showsAnnotationOverview, styles);
+ setPreferenceStore(store);
+ }
+
+ public void setPreferenceStore(IPreferenceStore store) {
+ if (preferenceStore != null)
+ preferenceStore.removePropertyChangeListener(this);
+ preferenceStore = store;
+ if (preferenceStore != null) {
+ preferenceStore.addPropertyChangeListener(this);
+ initializeViewerColors();
+ }
+ }
+
+ private void initializeViewerColors() {
+ if (preferenceStore != null) {
+ StyledText styledText = getTextWidget();
+ if (styledText == null || styledText.isDisposed())
+ return;
+ Color color = preferenceStore.getBoolean("AbstractTextEditor.Color.Foreground.SystemDefault") ? null
+ : createColor(preferenceStore, "AbstractTextEditor.Color.Foreground", styledText.getDisplay());
+ styledText.setForeground(color);
+ if (foregroundColor != null)
+ foregroundColor.dispose();
+ foregroundColor = color;
+ color = preferenceStore.getBoolean("AbstractTextEditor.Color.Background.SystemDefault") ? null : createColor(
+ preferenceStore, "AbstractTextEditor.Color.Background", styledText.getDisplay());
+ styledText.setBackground(color);
+ if (backgroundColor != null)
+ backgroundColor.dispose();
+ backgroundColor = color;
+ color = preferenceStore.getBoolean("AbstractTextEditor.Color.SelectionForeground.SystemDefault") ? null
+ : createColor(preferenceStore, "AbstractTextEditor.Color.SelectionForeground", styledText.getDisplay());
+ styledText.setSelectionForeground(color);
+ if (selectionForegroundColor != null)
+ selectionForegroundColor.dispose();
+ selectionForegroundColor = color;
+ color = preferenceStore.getBoolean("AbstractTextEditor.Color.SelectionBackground.SystemDefault") ? null
+ : createColor(preferenceStore, "AbstractTextEditor.Color.SelectionBackground", styledText.getDisplay());
+ styledText.setSelectionBackground(color);
+ if (selectionBackgroundColor != null)
+ selectionBackgroundColor.dispose();
+ selectionBackgroundColor = color;
+ }
+ }
+
+ private Color createColor(IPreferenceStore store, String key, Display display) {
+ org.eclipse.swt.graphics.RGB rgb = null;
+ if (store.contains(key)) {
+ if (store.isDefault(key))
+ rgb = PreferenceConverter.getDefaultColor(store, key);
+ else
+ rgb = PreferenceConverter.getColor(store, key);
+ if (rgb != null)
+ return new Color(display, rgb);
+ }
+ return null;
+ }
+
+ public void propertyChange(PropertyChangeEvent event) {
+ String property = event.getProperty();
+ if ("AbstractTextEditor.Color.Foreground".equals(property)
+ || "AbstractTextEditor.Color.Foreground.SystemDefault".equals(property)
+ || "AbstractTextEditor.Color.Background".equals(property)
+ || "AbstractTextEditor.Color.Background.SystemDefault".equals(property)
+ || "AbstractTextEditor.Color.SelectionForeground".equals(property)
+ || "AbstractTextEditor.Color.SelectionForeground.SystemDefault".equals(property)
+ || "AbstractTextEditor.Color.SelectionBackground".equals(property)
+ || "AbstractTextEditor.Color.SelectionBackground.SystemDefault".equals(property))
+ initializeViewerColors();
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/JETTextEditor.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/JETTextEditor.java
new file mode 100644
index 0000000..73c496e
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/JETTextEditor.java
@@ -0,0 +1,505 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.ResourceBundle;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jet.core.parser.ast.Comment;
+import org.eclipse.jet.core.parser.ast.IncludedContent;
+import org.eclipse.jet.core.parser.ast.JETASTElement;
+import org.eclipse.jet.core.parser.ast.JETASTVisitor;
+import org.eclipse.jet.core.parser.ast.JETCompilationUnit;
+import org.eclipse.jet.core.parser.ast.JETDirective;
+import org.eclipse.jet.core.parser.ast.JavaDeclaration;
+import org.eclipse.jet.core.parser.ast.JavaExpression;
+import org.eclipse.jet.core.parser.ast.JavaScriptlet;
+import org.eclipse.jet.core.parser.ast.TextElement;
+import org.eclipse.jet.core.parser.ast.XMLBodyElement;
+import org.eclipse.jet.core.parser.ast.XMLBodyElementEnd;
+import org.eclipse.jet.core.parser.ast.XMLEmptyElement;
+import org.eclipse.jet.internal.compiler.CompilationHelper;
+import org.eclipse.jet.internal.editor.configuration.JETDocumentProvider;
+import org.eclipse.jet.internal.editor.configuration.JETEditorPreferenceConstants;
+import org.eclipse.jet.internal.editor.configuration.JETSourceViewerConfiguration;
+import org.eclipse.jet.internal.editor.configuration.JETTokenStyleManager;
+import org.eclipse.jet.internal.editor.configuration.delegates.IJETDefaultTextColorerDelegate;
+import org.eclipse.jet.internal.editor.outline.JETOutlinePage;
+import org.eclipse.jet.internal.editor.partition.JETDocumentPartitionScanner;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.DefaultInformationControl;
+import org.eclipse.jface.text.DocumentEvent;
+import org.eclipse.jface.text.IInformationControl;
+import org.eclipse.jface.text.IInformationControlCreator;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.jface.text.source.IVerticalRuler;
+import org.eclipse.jface.text.source.projection.ProjectionSupport;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.editors.text.IEncodingSupport;
+import org.eclipse.ui.editors.text.TextEditor;
+import org.eclipse.ui.texteditor.ContentAssistAction;
+import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
+import org.osgi.framework.Bundle;
+
+/**
+ * The editor for JET templates files
+ *
+ * @author Joel
+ */
+public class JETTextEditor extends TextEditor {
+
+ private JETTokenStyleManager tokenStyleManager;
+
+ private JETSourceViewer sourceViewer;
+
+ private JETDocumentPartitionScanner partitionScanner;
+
+ private ProjectionSupport projectionSupport;
+
+ private IContentOutlinePage outlinePage;
+
+ private JETCompilationUnit cUnit;
+
+ private IProject project;
+
+ private Map positions;
+
+ private boolean cUnitInvalidated;
+
+ private ArrayList defaultContentColorerDelegates;
+
+ private IJETDefaultTextColorerDelegate currentDelegate;
+
+ /**
+ * Creates a new JET editor
+ */
+ public JETTextEditor() {
+ positions = Collections.EMPTY_MAP;
+ IPreferenceStore preferenceStore = Activator.getDefault()
+ .getPreferenceStore();
+ JETEditorPreferenceConstants.initializeDefaultValues(preferenceStore);
+ setPreferenceStore(preferenceStore);
+ tokenStyleManager = new JETTokenStyleManager(preferenceStore);
+ partitionScanner = new JETDocumentPartitionScanner(this);
+ setSourceViewerConfiguration(new JETSourceViewerConfiguration(this));
+ setDocumentProvider(new JETDocumentProvider(this));
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.editors.text.TextEditor#dispose()
+ */
+ public void dispose() {
+ tokenStyleManager.dispose();
+ super.dispose();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.texteditor.AbstractTextEditor#init(org.eclipse.ui.IEditorSite
+ * , org.eclipse.ui.IEditorInput)
+ */
+ public void init(IEditorSite site, IEditorInput input)
+ throws PartInitException {
+ if (input instanceof IFileEditorInput)
+ project = ((IFileEditorInput) input).getFile().getProject();
+ super.init(site, input);
+ initDefaultContentColorerDelegetes();
+ if (!defaultContentColorerDelegates.isEmpty())
+ currentDelegate = (IJETDefaultTextColorerDelegate) defaultContentColorerDelegates
+ .get(0);
+ }
+
+ /**
+ * Set the content colorer delegate (used for syntax coloring of non JET
+ * text) to use.
+ *
+ * @param delegate
+ */
+ public void setCurrentColorerDelegate(
+ IJETDefaultTextColorerDelegate delegate) {
+ currentDelegate = delegate;
+ // notify the damager repairers so that they recompute the partitions
+ // and the tokens to colorize
+ partitionScanner.updateJETTextContentDamagerRepairer();
+ // reset the text display
+ if (isDirty())
+ getSourceViewer().getDocument().set(
+ getSourceViewer().getDocument().get());
+ else
+ setInput(getEditorInput());
+ }
+
+ /**
+ * Returns the content colorer delegate (used for syntax coloring of non JET
+ * text) in use.
+ *
+ * @return the content colorer delegate
+ */
+ public IJETDefaultTextColorerDelegate getCurrentColorerDelegate() {
+ return currentDelegate;
+ }
+
+ /**
+ * Returns the list of all the available (registered) content colorer
+ * delegates.
+ *
+ * @return
+ */
+ public IJETDefaultTextColorerDelegate[] getColorerDelegates() {
+ IJETDefaultTextColorerDelegate results[] = new IJETDefaultTextColorerDelegate[defaultContentColorerDelegates
+ .size()];
+ defaultContentColorerDelegates.toArray(results);
+ return results;
+ }
+
+ /**
+ * Compute the list of the registered content colorer delegates.
+ */
+ private void initDefaultContentColorerDelegetes() {
+ defaultContentColorerDelegates = new ArrayList();
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+ IConfigurationElement elements[] = registry
+ .getConfigurationElementsFor("org.eclipse.jet.internal.editor",
+ "defaultContentColorerDelegates");
+ for (int i = 0; i < elements.length; i++) {
+ IConfigurationElement element = elements[i];
+ Bundle bundle = Platform
+ .getBundle(element.getNamespaceIdentifier());
+ String delegateClass = element.getAttribute("delegateClass");
+ IJETDefaultTextColorerDelegate delegate = null;
+ try {
+ Class clazz = bundle.loadClass(delegateClass);
+ Class argTypes[] = { JETTextEditor.class };
+ Constructor ctorWithTextEditor = null;
+ try {
+ ctorWithTextEditor = clazz.getConstructor(argTypes);
+ } catch (SecurityException e) {
+ Activator.log(e);
+ } catch (NoSuchMethodException e) {
+ Activator.log(e);
+ }
+ if (ctorWithTextEditor != null)
+ delegate = (IJETDefaultTextColorerDelegate) ctorWithTextEditor
+ .newInstance(new Object[] { this });
+ else
+ delegate = (IJETDefaultTextColorerDelegate) clazz
+ .newInstance();
+ defaultContentColorerDelegates.add(delegate);
+ } catch (ClassNotFoundException e) {
+ Activator.log(e);
+ } catch (InstantiationException e) {
+ Activator.log(e);
+ } catch (IllegalAccessException e) {
+ Activator.log(e);
+ } catch (IllegalArgumentException e) {
+ Activator.log(e);
+ } catch (InvocationTargetException e) {
+ Activator.log(e);
+ }
+ }
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.texteditor.AbstractDecoratedTextEditor#createSourceViewer
+ * (org.eclipse.swt.widgets.Composite,
+ * org.eclipse.jface.text.source.IVerticalRuler, int)
+ */
+ protected ISourceViewer createSourceViewer(Composite parent,
+ IVerticalRuler ruler, int styles) {
+ fAnnotationAccess = getAnnotationAccess();
+ fOverviewRuler = createOverviewRuler(getSharedColors());
+ sourceViewer = new JETSourceViewer(parent, ruler, getOverviewRuler(),
+ isOverviewRulerVisible(), styles, getPreferenceStore());
+ getSourceViewerDecorationSupport(sourceViewer);
+ projectionSupport = new ProjectionSupport(sourceViewer,
+ getAnnotationAccess(), getSharedColors());
+ projectionSupport
+ .addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.error");
+ projectionSupport
+ .addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.warning");
+ projectionSupport
+ .setHoverControlCreator(new IInformationControlCreator() {
+ public IInformationControl createInformationControl(
+ Shell shell) {
+ return new DefaultInformationControl(shell, true);
+ // return new DefaultInformationControl(shell,
+ // getOrientation(), 0, new HTMLTextPresenter());
+ }
+ });
+ projectionSupport.install();
+ return sourceViewer;
+ }
+
+ /**
+ * Return the editor's source viewer. This method exist to make this viewer
+ * accessible to other classes.
+ *
+ * @return the editor's source viewer
+ */
+ public ISourceViewer getEditorSourceViewer() {
+ return sourceViewer;
+ }
+
+ /**
+ * Returns the editor's preference store. This method exist to make the
+ * preference store accessible to other classes.
+ *
+ * @return the editor's preference store
+ */
+ public IPreferenceStore getEditorPreferenceStore() {
+ return super.getPreferenceStore();
+ }
+
+ public JETDocumentPartitionScanner getPartitionScanner() {
+ return partitionScanner;
+ }
+
+ public JETTokenStyleManager getTokenStyleManager() {
+ return tokenStyleManager;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.texteditor.StatusTextEditor#handleEditorInputChanged()
+ */
+ protected void handleEditorInputChanged() {
+ super.handleEditorInputChanged();
+ handleDocumentChange(null);
+ }
+
+ public void handleDocumentChange(DocumentEvent e) {
+ cUnitInvalidated = true;
+ if (outlinePage != null && outlinePage.getControl().isVisible())
+ ((JETOutlinePage) outlinePage).setInput();
+ }
+
+ public boolean isCUnitInvalidated() {
+ return cUnitInvalidated;
+ }
+
+ public CompilationHelper compilationHelper() {
+ CompilationHelper jetCompilationHelper = new CompilationHelper(project);
+ return jetCompilationHelper;
+ }
+
+ /**
+ * Compute and retrun the compilation unit of this document
+ *
+ * @return the computed (or recomputed) compilation unit for this template
+ */
+ public JETCompilationUnit requestCompilationUnit() {
+ if (cUnit == null || cUnitInvalidated) {
+ IEditorInput editorInput = getEditorInput();
+ String templatePath = editorInput.getName();
+ if (editorInput instanceof IFileEditorInput)
+ templatePath = ((IFileEditorInput) editorInput).getFile()
+ .getProjectRelativePath().toString();
+ if (sourceViewer == null) { // sourceViewer is null ... we can parse
+ // from the file directly
+ cUnit = compilationHelper().getAST(templatePath);
+ } else {
+ cUnit = compilationHelper().getASTFromSource(
+ sourceViewer.getDocument().get(), templatePath);
+ }
+ PositionsCollector collector = new PositionsCollector();
+ cUnit.accept(collector);
+ positions = collector.getPositions();
+ cUnitInvalidated = false;
+ }
+ return cUnit;
+ }
+
+ public JETASTElement getASTElement(int offset) {
+ requestCompilationUnit();
+ return getCachedASTElement(offset);
+ }
+
+ public JETASTElement getCachedASTElement(int offset) {
+ for (Iterator iterator = positions.keySet().iterator(); iterator
+ .hasNext();) {
+ Position pos = (Position) iterator.next();
+ if (pos.offset <= offset && pos.length + pos.offset > offset)
+ return (JETASTElement) positions.get(pos);
+ }
+ return null;
+ }
+
+ public IJavaProject getJavaProject() {
+ return JavaCore.create(project);
+ }
+
+ protected void createActions() {
+ super.createActions();
+ ResourceBundle resourceBundle = ResourceBundle
+ .getBundle("org.eclipse.jet.internal.editor.i18n.TextEditorMessages");
+ Action action = new ContentAssistAction(resourceBundle,
+ "ContentAssistProposal.", this);
+ action
+ .setActionDefinitionId("org.eclipse.ui.edit.text.contentAssist.proposals");
+ setAction("ContentAssistProposal", action);
+ markAsStateDependentAction("ContentAssistProposal", true);
+ }
+
+ protected void handlePreferenceStoreChanged(PropertyChangeEvent event) {
+ super.handlePreferenceStoreChanged(event);
+ if (event.getNewValue() instanceof RGB)
+ getTokenStyleManager().bindColor(event.getProperty(),
+ (RGB) event.getNewValue());
+ }
+
+ public Object getAdapter(Class required) {
+ if (IContentOutlinePage.class.equals(required)) {
+ if (outlinePage == null)
+ outlinePage = createOutlinePage();
+ return outlinePage;
+ }
+ if (IEncodingSupport.class.equals(required))
+ return fEncodingSupport;
+ if (projectionSupport != null) {
+ Object adapter = projectionSupport.getAdapter(getSourceViewer(),
+ required);
+ if (adapter != null)
+ return adapter;
+ }
+ return super.getAdapter(required);
+ }
+
+ public void editorContextMenuAboutToShow(IMenuManager menu) {
+ super.editorContextMenuAboutToShow(menu);
+ addAction(menu, "settings", "setDelegateColorerActionID");
+ }
+
+ protected IContentOutlinePage createOutlinePage() {
+ JETOutlinePage page = new JETOutlinePage(this);
+ page.addSelectionChangedListener(new ISelectionChangedListener() {
+ public void selectionChanged(SelectionChangedEvent event) {
+ handleContentOutlineSelection(event.getSelection());
+ }
+ });
+ return page;
+ }
+
+ protected void handleContentOutlineSelection(ISelection selection) {
+ IStructuredSelection ssel = (IStructuredSelection) selection;
+ Object firstElement = ssel.getFirstElement();
+ if (firstElement instanceof JETASTElement) {
+ JETASTElement astElement = (JETASTElement) firstElement;
+ int start = astElement.getStart();
+ int end = astElement.getEnd();
+ int length = end - start;
+ if (astElement instanceof TextElement) {
+ if (astElement.getPrevElement() != null)
+ start = astElement.getPrevElement().getEnd();
+ else
+ start = 0;
+ length = ((TextElement) astElement).getText().length;
+ }
+ sourceViewer.setSelectedRange(start, length);
+ sourceViewer.revealRange(start, length);
+ }
+ }
+
+ private static class PositionsCollector extends JETASTVisitor {
+ private Map positions;
+
+ private PositionsCollector() {
+ positions = new HashMap();
+ }
+
+ public Map getPositions() {
+ return positions;
+ }
+
+ public boolean visit(JavaDeclaration declaration) {
+ return matchOffset(declaration);
+ }
+
+ public boolean visit(JETDirective directive) {
+ return matchOffset(directive);
+ }
+
+ public boolean visit(JavaExpression expression) {
+ return matchOffset(expression);
+ }
+
+ public boolean visit(IncludedContent content) {
+ // don't process include content
+ return false;
+ }
+
+ public boolean visit(JavaScriptlet scriptlet) {
+ return matchOffset(scriptlet);
+ }
+
+ public boolean visit(XMLEmptyElement xmlEmptyElement) {
+ return matchOffset(xmlEmptyElement);
+ }
+
+ public boolean visit(XMLBodyElement xmlBodyElement) {
+ return matchOffset(xmlBodyElement);
+ }
+
+ public boolean visit(XMLBodyElementEnd xmlBodyElementEnd) {
+ return matchOffset(xmlBodyElementEnd);
+ }
+
+ public boolean visit(Comment comment) {
+ return matchOffset(comment);
+ }
+
+ public boolean matchOffset(JETASTElement astElement) {
+ int start = astElement.getStart();
+ if (start < 0) {
+ return false;
+ }
+ int end = astElement.getEnd();
+ int length = end - Math.abs(start);
+ positions.put(new Position(start, length), astElement);
+ return true;
+ }
+ }
+}
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/JETTextPreviewViewer.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/JETTextPreviewViewer.java
new file mode 100644
index 0000000..9e3c0b0
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/JETTextPreviewViewer.java
@@ -0,0 +1,203 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.emf.codegen.ecore.genmodel.provider.GenModelItemProviderAdapterFactory;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
+import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.text.source.SourceViewer;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.dialogs.ResourceSelectionDialog;
+import org.eclipse.ui.editors.text.EditorsUI;
+import org.eclipse.ui.editors.text.TextSourceViewerConfiguration;
+import org.eclipse.ui.forms.ManagedForm;
+import org.eclipse.ui.forms.SectionPart;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+
+public class JETTextPreviewViewer extends Viewer {
+
+ private SourceViewer sourceViewer;
+
+ private Object fInput;
+
+ private ScrolledForm sForm;
+
+ private Text inputResource;
+
+ private Button browseWorkspace;
+
+ private Tree tree;
+
+ private TreeViewer treeViewer;
+
+ private ISelection selection;
+
+ public JETTextPreviewViewer(Composite parent) {
+ inputResource = null;
+ browseWorkspace = null;
+ tree = null;
+ treeViewer = null;
+ org.eclipse.swt.widgets.Display display = parent.getDisplay();
+ FormToolkit formToolkit = new FormToolkit(display);
+ sForm = formToolkit.createScrolledForm(parent);
+ ManagedForm overviewForm = new ManagedForm(formToolkit, sForm);
+ Composite body = sForm.getBody();
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 1;
+ layout.marginWidth = 10;
+ layout.horizontalSpacing = 10;
+ layout.verticalSpacing = 10;
+ body.setLayout(layout);
+ createInputArgumentsSection(overviewForm, body, formToolkit);
+ createTextViewerSection(overviewForm, body, formToolkit);
+ overviewForm.initialize();
+ overviewForm.refresh();
+ }
+
+ private void createInputArgumentsSection(ManagedForm mForm, Composite body, FormToolkit formToolkit) {
+ final Section section = formToolkit.createSection(body, 256);
+ section.setText("Input Argument");
+ Composite client = formToolkit.createComposite(section);
+ GridLayout layout = new GridLayout();
+ layout.marginWidth = formToolkit.getBorderStyle() == 0 ? 2 : 0;
+ layout.numColumns = 2;
+ client.setLayout(layout);
+ inputResource = formToolkit.createText(client, "<Empty>");
+ inputResource.setEditable(false);
+ GridData gd = new GridData();
+ gd.horizontalSpan = 1;
+ gd.grabExcessHorizontalSpace = true;
+ gd.horizontalAlignment = 4;
+ gd.grabExcessVerticalSpace = false;
+ inputResource.setLayoutData(gd);
+ browseWorkspace = formToolkit.createButton(client, "Browse ...", 0);
+ browseWorkspace.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ ResourceSelectionDialog resSelectionDialog = new ResourceSelectionDialog(section.getShell(),
+ ResourcesPlugin.getWorkspace().getRoot(), "Select a workspace resource");
+ if (resSelectionDialog.open() == 0) {
+ Object result[] = resSelectionDialog.getResult();
+ if (result.length == 1) {
+ String inputFile = ((IResource) result[0]).getFullPath().toString();
+ inputResource.setText(inputFile);
+ ResourceSet resourceSet = new ResourceSetImpl();
+ URI uri = URI.createPlatformResourceURI(inputFile, true);
+ org.eclipse.emf.ecore.resource.Resource resource = resourceSet.getResource(uri, true);
+ if (resource != null)
+ treeViewer.setInput(resourceSet);
+ }
+ }
+ }
+ });
+ tree = formToolkit.createTree(client, 2052);
+ gd = new GridData();
+ gd.horizontalSpan = 2;
+ gd.horizontalAlignment = 4;
+ gd.verticalAlignment = 4;
+ gd.grabExcessVerticalSpace = true;
+ tree.setLayoutData(gd);
+ treeViewer = new TreeViewer(tree);
+ List factories = new ArrayList();
+ factories.add(new ResourceItemProviderAdapterFactory());
+ factories.add(new GenModelItemProviderAdapterFactory());
+ factories.add(new ReflectiveItemProviderAdapterFactory());
+ org.eclipse.emf.common.notify.AdapterFactory adapterFactory = new ComposedAdapterFactory(factories);
+ treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ Button button = formToolkit.createButton(client, "Apply", 0x800008);
+ button.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ IFileEditorInput fileInput = (IFileEditorInput) getInput();
+ IFile file = fileInput.getFile();
+ JavaCore.create(file.getProject());
+ }
+ });
+ section.setClient(client);
+ gd = new GridData();
+ gd.grabExcessHorizontalSpace = true;
+ gd.horizontalAlignment = 4;
+ gd.verticalAlignment = 1;
+ section.setLayoutData(gd);
+ SectionPart sectionPart = new SectionPart(section);
+ mForm.addPart(sectionPart);
+ }
+
+ private void createTextViewerSection(ManagedForm mForm, Composite body, FormToolkit formToolkit) {
+ Section section = formToolkit.createSection(body, 256);
+ section.setText("Preview");
+ org.eclipse.jface.preference.IPreferenceStore store = EditorsUI.getPreferenceStore();
+ sourceViewer = new SourceViewer(section, null, 768);
+ sourceViewer.configure(new TextSourceViewerConfiguration(store));
+ sourceViewer.getTextWidget().setFont(JFaceResources.getFont("org.eclipse.jdt.ui.editors.textfont"));
+ sourceViewer.setEditable(false);
+ section.setClient(sourceViewer.getControl());
+ GridData gd = new GridData();
+ gd.horizontalAlignment = 4;
+ gd.verticalAlignment = 4;
+ gd.grabExcessHorizontalSpace = true;
+ gd.grabExcessVerticalSpace = true;
+ section.setLayoutData(gd);
+ SectionPart sectionPart = new SectionPart(section);
+ mForm.addPart(sectionPart);
+ }
+
+ public Control getControl() {
+ return sForm;
+ }
+
+ public void setInput(Object input) {
+ fInput = input;
+ }
+
+ public Object getInput() {
+ return fInput;
+ }
+
+ public ISelection getSelection() {
+ return selection;
+ }
+
+ public void setSelection(ISelection s, boolean reveal) {
+ selection = s;
+ }
+
+ public void refresh() {
+ }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/actions/SetContentColorerAction.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/actions/SetContentColorerAction.java
new file mode 100644
index 0000000..a16f2ca
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/actions/SetContentColorerAction.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.actions;
+
+import org.eclipse.jet.internal.editor.JETTextEditor;
+import org.eclipse.jet.internal.editor.configuration.delegates.IJETDefaultTextColorerDelegate;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.*;
+import org.eclipse.ui.dialogs.ListDialog;
+
+public class SetContentColorerAction implements IEditorActionDelegate {
+ private JETTextEditor editor;
+
+ public SetContentColorerAction() {
+ }
+
+ public void setActiveEditor(IAction action, IEditorPart targetEditor) {
+ editor = (JETTextEditor) targetEditor;
+ action.setText("Set default content colorer ...");
+ }
+
+ public void run(IAction action) {
+ ListDialog dialog = new ListDialog(editor.getSite().getShell());
+ dialog.setLabelProvider(new LabelProvider() {
+ public String getText(Object element) {
+ if (element instanceof IJETDefaultTextColorerDelegate)
+ return ((IJETDefaultTextColorerDelegate) element).getName();
+ else
+ return super.getText(element);
+ }
+
+ public Image getImage(Object element) {
+ if (element instanceof IJETDefaultTextColorerDelegate)
+ return ((IJETDefaultTextColorerDelegate) element).getImage();
+ else
+ return super.getImage(element);
+ }
+ });
+ dialog.setContentProvider(new IStructuredContentProvider() {
+ public Object[] getElements(Object inputElement) {
+ return editor.getColorerDelegates();
+ }
+ public void dispose() {
+ }
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ // TODO Auto-generated method stub
+ }
+ });
+ dialog.setTitle("JET default text content colorer");
+ dialog.setMessage("Select the content colorer to the default text embeded in the JET template");
+ dialog.setInitialSelections(editor.getColorerDelegates());
+ dialog.setInput(editor);
+ int result = dialog.open();
+ if (result == 0) {
+ IJETDefaultTextColorerDelegate delegate = (IJETDefaultTextColorerDelegate) dialog.getResult()[0];
+ editor.setCurrentColorerDelegate(delegate);
+ }
+ }
+
+ public void selectionChanged(IAction iaction, ISelection iselection) {
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/annotations/JETAnnotationHover.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/annotations/JETAnnotationHover.java
new file mode 100644
index 0000000..ccdad23
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/annotations/JETAnnotationHover.java
@@ -0,0 +1,155 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.annotations;
+
+import java.util.*;
+import org.eclipse.jface.text.*;
+import org.eclipse.jface.text.source.*;
+
+public class JETAnnotationHover implements IAnnotationHover {
+
+ /**
+ * Returns the distance to the ruler line.
+ * @param position Position
+ * @param document IDocument
+ * @param line int
+ * @return int
+ */
+ protected int compareRulerLine(Position position, IDocument document, int line) {
+ if (position.getOffset() > -1 && position.getLength() > -1) {
+ try {
+ int javaAnnotationLine = document.getLineOfOffset(position.getOffset());
+ if (line == javaAnnotationLine)
+ return 1;
+ if (javaAnnotationLine <= line
+ && line <= document.getLineOfOffset(position.getOffset() + position.getLength()))
+ return 2;
+ } catch (BadLocationException x) {
+ }
+ }
+ return 0;
+ }
+ /**
+ * Selects a set of markers from the two lists. By default, it just returns the set of exact
+ * matches.
+ * @param exactMatch List
+ * @param including List
+ * @return List
+ */
+ protected List select(List exactMatch, List including) {
+ return exactMatch;
+ }
+ /**
+ * Returns one marker which includes the ruler's line of activity.
+ * @param viewer ISourceViewer
+ * @param line int
+ * @return List
+ */
+ protected List getAnnotationsForLine(ISourceViewer viewer, int line) {
+ IDocument document = viewer.getDocument();
+ IAnnotationModel model = viewer.getAnnotationModel();
+ if (model == null)
+ return null;
+ List exact = new ArrayList();
+ List including = new ArrayList();
+ Iterator e = model.getAnnotationIterator();
+ HashMap messagesAtPosition = new HashMap();
+ while (e.hasNext()) {
+ Object o = e.next();
+ if (o instanceof JETProblemAnnotation) {
+ JETProblemAnnotation a = (JETProblemAnnotation) o;
+ Position position = model.getPosition(a);
+ if (position != null && !isDuplicateAnnotation(messagesAtPosition, position, a.getText()))
+ switch (compareRulerLine(position, document, line)) {
+ case 1: // '\001'
+ exact.add(a);
+ break;
+
+ case 2: // '\002'
+ including.add(a);
+ break;
+ }
+ }
+ }
+ return select(exact, including);
+ }
+ /**
+ * Method isDuplicateAnnotation.
+ * @param messagesAtPosition Map
+ * @param position Position
+ * @param message String
+ * @return boolean
+ */
+ private boolean isDuplicateAnnotation(Map messagesAtPosition, Position position, String message) {
+ if (messagesAtPosition.containsKey(position)) {
+ Object value = messagesAtPosition.get(position);
+ if (message.equals(value))
+ return true;
+ if (value instanceof List) {
+ List messages = (List) value;
+ if (messages.contains(message))
+ return true;
+ messages.add(message);
+ } else {
+ ArrayList messages = new ArrayList();
+ messages.add(value);
+ messages.add(message);
+ messagesAtPosition.put(position, messages);
+ }
+ } else {
+ messagesAtPosition.put(position, message);
+ }
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.text.source.IAnnotationHover#getHoverInfo(org.eclipse
+ * .jface.text.source.ISourceViewer, int)
+ */
+ public String getHoverInfo(ISourceViewer sourceViewer, int lineNumber) {
+ List annotations = getAnnotationsForLine(sourceViewer, lineNumber);
+ if (annotations != null) {
+ int size = annotations.size();
+ if (size == 1) {
+ JETProblemAnnotation annotation = (JETProblemAnnotation) annotations.get(0);
+ String message = annotation.getText();
+ if (message != null && message.trim().length() > 0)
+ return message;
+ } else {
+ List messages = new ArrayList();
+ for (int i = 0; i < size; i++) {
+ JETProblemAnnotation javaAnnotation = (JETProblemAnnotation) annotations.get(i);
+ String message = javaAnnotation.getText();
+ if (message != null && message.trim().length() > 0) {
+ messages.add(message.trim());
+ }
+ }
+
+ if (messages.size() == 1)
+ return (String) messages.get(0);
+ if (messages.size() > 1){
+ String result = "Multiple markers at this line"+"\n";
+ for(int j = 0;j<messages.size();j++){
+ result = result + " - "+messages.get(j);
+ if(j!=messages.size()-1){
+ result = result +"\n";
+ }
+ }
+ return result;
+ }
+ }
+ }
+ return "";
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/annotations/JETAnnotationModel.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/annotations/JETAnnotationModel.java
new file mode 100644
index 0000000..7de19d5
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/annotations/JETAnnotationModel.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.annotations;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.ui.texteditor.MarkerAnnotation;
+import org.eclipse.ui.texteditor.ResourceMarkerAnnotationModel;
+
+public class JETAnnotationModel extends ResourceMarkerAnnotationModel {
+ private boolean fireChanges;
+
+ public JETAnnotationModel(IResource resource) {
+ super(resource);
+ fireChanges = true;
+ }
+
+ public synchronized boolean isFireChanges() {
+ return fireChanges;
+ }
+
+ public synchronized void setFireChanges(boolean b) {
+ fireChanges = b;
+ }
+
+ public synchronized void addAnnotation(Annotation annotation, Position position) {
+ try {
+ addAnnotation(annotation, position, fireChanges);
+ } catch (BadLocationException _ex) {
+ }
+ }
+
+ public synchronized void removeAllAnnotations() {
+ super.removeAllAnnotations(fireChanges);
+ }
+
+ public synchronized void removeAnnotation(Annotation annotation) {
+ super.removeAnnotation(annotation, fireChanges);
+ }
+
+ public MarkerAnnotation createMarkerAnnotation(IMarker marker) {
+ return super.createMarkerAnnotation(marker);
+ }
+
+ public Position createPositionFromMarker(IMarker marker) {
+ return super.createPositionFromMarker(marker);
+ }
+
+ public void fireAnnotationModelChanged() {
+ fireModelChanged();
+ }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/annotations/JETProblemAnnotation.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/annotations/JETProblemAnnotation.java
new file mode 100644
index 0000000..7412ad8
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/annotations/JETProblemAnnotation.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.annotations;
+
+import org.eclipse.jet.core.parser.ProblemSeverity;
+import org.eclipse.jet.core.parser.ast.Problem;
+import org.eclipse.jface.text.source.Annotation;
+
+public class JETProblemAnnotation extends Annotation {
+
+ public static final String ERROR_ANNOTATION_TYPE = "org.eclipse.jet.editor.error";
+
+ public static final String WARNING_ANNOTATION_TYPE = "org.eclipse.jet.editor.warning";
+
+ public static final String INFO_ANNOTATION_TYPE = "org.eclipse.jet.editor.info";
+
+ public JETProblemAnnotation(Problem problem) {
+ if (problem.getProblemSeverity() == ProblemSeverity.ERROR)
+ setType(ERROR_ANNOTATION_TYPE);
+ else if (problem.getProblemSeverity() == ProblemSeverity.WARNING)
+ setType(WARNING_ANNOTATION_TYPE);
+ setText(problem.getMessage());
+ }
+
+}
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/autoedit/JETTemplateAutoEditStrategy.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/autoedit/JETTemplateAutoEditStrategy.java
new file mode 100644
index 0000000..a909992
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/autoedit/JETTemplateAutoEditStrategy.java
@@ -0,0 +1,276 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.autoedit;
+
+import org.eclipse.jface.text.*;
+
+public class JETTemplateAutoEditStrategy extends DefaultIndentLineAutoEditStrategy {
+
+ public JETTemplateAutoEditStrategy() {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.IAutoEditStrategy#customizeDocumentCommand(IDocument, DocumentCommand)
+ */
+ public void customizeDocumentCommand(IDocument d, DocumentCommand c) {
+ if (c.length == 0 && c.text != null && endsWithDelimiter(d, c.text))
+ smartIndentAfterNewLine(d, c);
+ else if ("%>".equals(c.text)) { //$NON-NLS-1$
+ smartInsertAfterBracket(d, c);
+ }
+ }
+
+ /**
+ * Returns whether or not the text ends with one of the given search strings.
+ * @param d IDocument
+ * @param txt String
+ * @return boolean
+ */
+ private boolean endsWithDelimiter(IDocument d, String txt) {
+ String[] delimiters = d.getLegalLineDelimiters();
+ for (int i = 0; i < delimiters.length; i++) {
+ if (txt.endsWith(delimiters[i]))
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Returns the line number of the next bracket after end.
+ * @param document - the document being parsed
+ * @param line - the line to start searching back from
+ * @param end - the end position to search back from
+ * @param closingBracketIncrease - the number of brackets to skip
+ * @return int
+ * @throws BadLocationException
+ */
+ protected int findMatchingOpenBracket(IDocument document, int line, int end, int closingBracketIncrease)
+ throws BadLocationException {
+
+ int start = document.getLineOffset(line);
+ int brackcount = getBracketCount(document, start, end, false) - closingBracketIncrease;
+
+ // sum up the brackets counts of each line (closing brackets count negative,
+ // opening positive) until we find a line the brings the count to zero
+ while (brackcount < 0) {
+ line--;
+ if (line < 0) {
+ return -1;
+ }
+ start = document.getLineOffset(line);
+ end = start + document.getLineLength(line) - 1;
+ brackcount += getBracketCount(document, start, end, false);
+ }
+ return line;
+ }
+
+ /**
+ * Returns the bracket value of a section of text. Closing brackets have a value of -1 and
+ * open brackets have a value of 1.
+ * @param document - the document being parsed
+ * @param start - the start position for the search
+ * @param end - the end position for the search
+ * @param ignoreCloseJspTags boolean
+ * @return int
+ * @throws BadLocationException
+ */
+ private int getBracketCount(IDocument document, int start, int end, boolean ignoreCloseJspTags)
+ throws BadLocationException {
+
+ int begin = start;
+ int jsptagcount = 0;
+ while (begin < end) {
+ char curr = document.getChar(begin);
+ begin++;
+ switch (curr) {
+ case '/':
+ begin = adjustBeginOnComment(document, end, begin);
+ break;
+ case '*':
+ if (begin < end) {
+ char next = document.getChar(begin);
+ if (next == '/') {
+ // we have been in a comment: forget what we read before
+ jsptagcount = 0;
+ begin++;
+ }
+ }
+ break;
+ case '<':
+ if ((begin + 1 < document.getLength()) && (document.getChar(begin + 1) == '%')) {
+ jsptagcount++;
+ ignoreCloseJspTags = false;
+ }
+ break;
+ case '>':
+ if (!ignoreCloseJspTags && (begin > 1) && (document.getChar(begin - 1) == '%')) {
+ jsptagcount--;
+ }
+ break;
+ case '"':
+ case '\'':
+ begin = getStringEnd(document, begin, end, curr);
+ break;
+ default:
+ }
+ }
+ return jsptagcount;
+ }
+
+ private int adjustBeginOnComment(IDocument document, int end, int begin) throws BadLocationException {
+ if (begin < end) {
+ char next = document.getChar(begin);
+ if (next == '*') {
+ // a comment starts, advance to the comment end
+ begin = getCommentEnd(document, begin + 1, end);
+ } else if (next == '/') {
+ // '//'-comment: nothing to do anymore on this line
+ begin = end;
+ }
+ }
+ return begin;
+ }
+
+ /**
+ * Returns the end position a comment starting at pos.
+ * @param document - the document being parsed
+ * @param position - the start position for the search
+ * @param end - the end position for the search
+ * @return int
+ * @throws BadLocationException
+ */
+ private int getCommentEnd(IDocument document, int position, int end) throws BadLocationException {
+ int currentPosition = position;
+ while (currentPosition < end) {
+ char curr = document.getChar(currentPosition);
+ currentPosition++;
+ if (curr == '*') {
+ if (currentPosition < end && document.getChar(currentPosition) == '/') {
+ return currentPosition + 1;
+ }
+ }
+ }
+ return end;
+ }
+
+ /**
+ * Returns the String at line with the leading whitespace removed.
+ * @param document - the document being parsed
+ * @param line - the line being searched
+ * @return String
+ * @throws BadLocationException
+ */
+ protected String getIndentOfLine(IDocument document, int line) throws BadLocationException {
+ if (line > -1) {
+ int start = document.getLineOffset(line);
+ int end = start + document.getLineLength(line) - 1;
+ int whiteend = findEndOfWhiteSpace(document, start, end);
+ return document.get(start, whiteend - start);
+ } else {
+ return ""; //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * Returns the position of the character in the document after position.
+ * @param document - the document being parsed
+ * @param position - the position to start searching from
+ * @param end - the end of the document
+ * @param character - the character you are trying to match
+ * @return int
+ * @throws BadLocationException
+ */
+ private int getStringEnd(IDocument document, int position, int end, char character) throws BadLocationException {
+ int currentPosition = position;
+ while (currentPosition < end) {
+ char currentCharacter = document.getChar(currentPosition);
+ currentPosition++;
+ if (currentCharacter == '\\') {
+ // ignore escaped characters
+ currentPosition++;
+ } else if (currentCharacter == character) {
+ return currentPosition;
+ }
+ }
+ return end;
+ }
+
+ /**
+ * Set the indent of a new line based on the command provided in the supplied document.
+ * @param document - the document being parsed
+ * @param command - the command being performed
+ */
+ protected void smartIndentAfterNewLine(IDocument document, DocumentCommand command) {
+
+ int docLength = document.getLength();
+ if (command.offset == -1 || docLength == 0)
+ return;
+
+ try {
+ int p = (command.offset == docLength ? command.offset - 1 : command.offset);
+ int line = document.getLineOfOffset(p);
+
+ StringBuffer buf = new StringBuffer(command.text);
+ if (command.offset < docLength && document.getChar(command.offset) == '}') {
+ int indLine = findMatchingOpenBracket(document, line, command.offset, 0);
+ if (indLine == -1) {
+ indLine = line;
+ }
+ buf.append(getIndentOfLine(document, indLine));
+ } else {
+ int start = document.getLineOffset(line);
+ int whiteend = findEndOfWhiteSpace(document, start, command.offset);
+ buf.append(document.get(start, whiteend - start));
+ if (getBracketCount(document, start, command.offset, true) > 0) {
+ buf.append('\t');
+ }
+ }
+ command.text = buf.toString();
+
+ } catch (BadLocationException excp) {
+ }
+ }
+
+ /**
+ * Set the indent of a bracket based on the command provided in the supplied document.
+ * @param document - the document being parsed
+ * @param command - the command being performed
+ */
+ protected void smartInsertAfterBracket(IDocument document, DocumentCommand command) {
+ if (command.offset == -1 || document.getLength() == 0)
+ return;
+
+ try {
+ int p = (command.offset == document.getLength() ? command.offset - 1 : command.offset);
+ int line = document.getLineOfOffset(p);
+ int start = document.getLineOffset(line);
+ int whiteend = findEndOfWhiteSpace(document, start, command.offset);
+
+ // shift only when line does not contain any text up to the closing bracket
+ if (whiteend == command.offset) {
+ // evaluate the line with the opening bracket that matches out closing bracket
+ int indLine = findMatchingOpenBracket(document, line, command.offset, 1);
+ if (indLine != -1 && indLine != line) {
+ // take the indent of the found line
+ StringBuffer replaceText = new StringBuffer(getIndentOfLine(document, indLine));
+ // add the rest of the current line including the just added close bracket
+ replaceText.append(document.get(whiteend, command.offset - whiteend));
+ replaceText.append(command.text);
+ // modify document command
+ command.length = command.offset - start;
+ command.offset = start;
+ command.text = replaceText.toString();
+ }
+ }
+ } catch (BadLocationException excp) {
+ }
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/DoubleClickStrategy.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/DoubleClickStrategy.java
new file mode 100644
index 0000000..c24469b
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/DoubleClickStrategy.java
@@ -0,0 +1,122 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.configuration;
+
+import org.eclipse.jface.text.*;
+
+public class DoubleClickStrategy implements ITextDoubleClickStrategy {
+ protected ITextViewer fText;
+
+ public void doubleClicked(ITextViewer part) {
+ int pos = part.getSelectedRange().x;
+
+ if (pos < 0)
+ return;
+
+ fText = part;
+
+ if (!selectComment(pos)) {
+ selectWord(pos);
+ }
+ }
+ protected boolean selectComment(int caretPos) {
+ IDocument doc = fText.getDocument();
+ int startPos, endPos;
+
+ try {
+ int pos = caretPos;
+ char c = ' ';
+
+ while (pos >= 0) {
+ c = doc.getChar(pos);
+ if (c == '\\') {
+ pos -= 2;
+ continue;
+ }
+ if (c == Character.LINE_SEPARATOR || c == '\"')
+ break;
+ --pos;
+ }
+
+ if (c != '\"')
+ return false;
+
+ startPos = pos;
+
+ pos = caretPos;
+ int length = doc.getLength();
+ c = ' ';
+
+ while (pos < length) {
+ c = doc.getChar(pos);
+ if (c == Character.LINE_SEPARATOR || c == '\"')
+ break;
+ ++pos;
+ }
+ if (c != '\"')
+ return false;
+
+ endPos = pos;
+
+ int offset = startPos + 1;
+ int len = endPos - offset;
+ fText.setSelectedRange(offset, len);
+ return true;
+ } catch (BadLocationException x) {
+ }
+
+ return false;
+ }
+ protected boolean selectWord(int caretPos) {
+
+ IDocument doc = fText.getDocument();
+ int startPos, endPos;
+
+ try {
+
+ int pos = caretPos;
+ char c;
+
+ while (pos >= 0) {
+ c = doc.getChar(pos);
+ if (!Character.isJavaIdentifierPart(c))
+ break;
+ --pos;
+ }
+
+ startPos = pos;
+
+ pos = caretPos;
+ int length = doc.getLength();
+
+ while (pos < length) {
+ c = doc.getChar(pos);
+ if (!Character.isJavaIdentifierPart(c))
+ break;
+ ++pos;
+ }
+
+ endPos = pos;
+ selectRange(startPos, endPos);
+ return true;
+
+ } catch (BadLocationException x) {
+ }
+
+ return false;
+ }
+
+ private void selectRange(int startPos, int stopPos) {
+ int offset = startPos + 1;
+ int length = stopPos - offset;
+ fText.setSelectedRange(offset, length);
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/IJETColorConstants.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/IJETColorConstants.java
new file mode 100644
index 0000000..c33f230
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/IJETColorConstants.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.configuration;
+
+import org.eclipse.swt.graphics.RGB;
+
+public interface IJETColorConstants {
+ RGB JET_CUSTOM_TAG_FG = new RGB(180, 128, 0);
+ RGB JET_COMMENT_FG = new RGB(0, 155, 50);
+ RGB JET_DIRECTIVE_FG = new RGB(180, 128, 0);
+ RGB JET_EXPRESSION_FG = new RGB (180, 128, 0);
+ RGB JET_SCRIPTLET_FG = new RGB(180, 128, 0);
+
+ RGB JET_EXPRESSION_BG = new RGB(220, 230, 255);
+ RGB JET_DEFAULT_BG = new RGB(230, 230, 230);
+
+ RGB JET_JAVA_CODE = new RGB(128, 128, 128);
+ RGB PROC_INSTR = new RGB(128, 128, 128);
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/JETDocumentProvider.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/JETDocumentProvider.java
new file mode 100644
index 0000000..5994f1e
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/JETDocumentProvider.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.configuration;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jet.internal.editor.JETTextEditor;
+import org.eclipse.jet.internal.editor.annotations.JETAnnotationModel;
+import org.eclipse.jet.internal.editor.partition.JETDocumentPartitionScanner;
+import org.eclipse.jface.text.DocumentEvent;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IDocumentPartitioner;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.editors.text.FileDocumentProvider;
+
+public class JETDocumentProvider extends FileDocumentProvider {
+
+ private JETTextEditor editor;
+
+ public JETDocumentProvider(JETTextEditor editor) {
+ this.editor = editor;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.editors.text.StorageDocumentProvider#createDocument(java
+ * .lang.Object)
+ */
+ protected IDocument createDocument(Object element) throws CoreException {
+ IDocument document = super.createDocument(element);
+ JETDocumentPartitionScanner partitionScanner = editor
+ .getPartitionScanner();
+ if (document != null) {
+ IDocumentPartitioner partitioner = new par(partitionScanner,
+ partitionScanner.getContentTypes()) {
+ public IRegion documentChanged2(DocumentEvent e) {
+ editor.handleDocumentChange(e);
+ return super.documentChanged2(e);
+ }
+ };
+ partitioner.connect(document);
+ document.setDocumentPartitioner(partitioner);
+ }
+ return document;
+ }
+
+ protected IAnnotationModel createAnnotationModel(Object element)
+ throws CoreException {
+ if (element instanceof IFileEditorInput) {
+ IFileEditorInput input = (IFileEditorInput) element;
+ return new JETAnnotationModel(input.getFile());
+ } else {
+ return super.createAnnotationModel(element);
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/JETEditorPreferenceConstants.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/JETEditorPreferenceConstants.java
new file mode 100644
index 0000000..f68a56f
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/JETEditorPreferenceConstants.java
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * Copyright (c) 2005 - 2006 Joel Cheuoua & others.
+ * 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:
+ * Joel Cheuoua - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.configuration;
+
+import org.eclipse.jdt.ui.PreferenceConstants;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants;
+
+/**
+ * Preference Constants used for the IRL Editor
+ * @author lmirguet
+ * @version $Revision: 1.1 $
+ */
+public class JETEditorPreferenceConstants {
+ public static final String JET_CUSTOM_TAG_FG_COLOR = "jet_custom_tag_foreground";
+ public static final String JET_CUSTOM_TAG_BOLD = "jet_custom_tag_bold";
+ public static final String JET_CUSTOM_TAG_ITALIC = "jet_custom_tag_italic";
+ public static final String JET_CUSTOM_TAG_UNDERLINE = "jet_custom_tag_underline";
+
+ public static final String JET_COMMENT_FG_COLOR = "jet_comment_foreground";
+ public static final String JET_COMMENT_BOLD = "jet_comment_bold";
+ public static final String JET_COMMENT_ITALIC = "jet_comment_italic";
+ public static final String JET_COMMENT_UNDERLINE = "jet_comment_underline";
+
+ public static final String JET_EXPRESSION_FG_COLOR = "jet_expression_foreground";
+ public static final String JET_EXPRESSION_BOLD = "jet_expression_bold";
+ public static final String JET_EXPRESSION_ITALIC = "jet_expression_italic";
+ public static final String JET_EXPRESSION_UNDERLINE = "jet_expression_underline";
+
+ public static final String JET_SCRIPTLET_FG_COLOR = "jet_scriptlet_foreground";
+ public static final String JET_SCRIPTLET_BOLD = "jet_scriptlet_bold";
+ public static final String JET_SCRIPTLET_ITALIC = "jet_scriptlet_italic";
+ public static final String JET_SCRIPTLET_UNDERLINE = "jet_scriptlet_underline";
+
+ public static final String JET_DIRECTIVE_FG_COLOR = "jet_directive_foreground";
+ public static final String JET_DIRECTIVE_BOLD = "jet_directive_bold";
+ public static final String JET_DIRECTIVE_ITALIC = "jet_directive_italic";
+ public static final String JET_DIRECTIVE_UNDERLINE = "jet_directive_underline";
+
+ public static final String JET_DIRECTIVE_KEYWORD_BOLD = "jet_directive_keyword_bold";
+ public static final String JET_EXPRESSION_BG_COLOR = "jet_expression_background";
+ public static final String JET_DEFAULT_BG_COLOR = "jet_default_background";
+
+ public static final String AUTO_COMPLETE_ENABLED = "autoCompleteEnable";
+ public static final String AUTO_COMPLETE_DELAY = "autoCompleteDelay";
+
+ /**
+ * Should not be instanciated.
+ *
+ */
+ private JETEditorPreferenceConstants() {
+ }
+
+ /**
+ * Initialize with the default values.
+ * @param store IPreferenceStore
+ */
+ public static void initializeDefaultValues(IPreferenceStore store) {
+
+ PreferenceConstants.initializeDefaultValues(store);
+ AbstractDecoratedTextEditorPreferenceConstants.initializeDefaultValues(store);
+
+ PreferenceConverter.setDefault(store, JET_COMMENT_FG_COLOR, IJETColorConstants.JET_COMMENT_FG);
+ store.setDefault(JET_COMMENT_BOLD, false);
+ store.setDefault(JET_COMMENT_ITALIC, true);
+ store.setDefault(JET_COMMENT_UNDERLINE, false);
+
+ PreferenceConverter.setDefault(store, JET_CUSTOM_TAG_FG_COLOR, IJETColorConstants.JET_CUSTOM_TAG_FG);
+ store.setDefault(JET_CUSTOM_TAG_BOLD, false);
+ store.setDefault(JET_CUSTOM_TAG_ITALIC, false);
+ store.setDefault(JET_CUSTOM_TAG_UNDERLINE, true);
+
+ PreferenceConverter.setDefault(store, JET_EXPRESSION_FG_COLOR, IJETColorConstants.JET_EXPRESSION_FG);
+ store.setDefault(JET_EXPRESSION_BOLD, false);
+ store.setDefault(JET_EXPRESSION_ITALIC, false);
+ store.setDefault(JET_EXPRESSION_UNDERLINE, false);
+
+ PreferenceConverter.setDefault(store, JET_DIRECTIVE_FG_COLOR, IJETColorConstants.JET_DIRECTIVE_FG);
+ store.setDefault(JET_DIRECTIVE_BOLD, false);
+ store.setDefault(JET_DIRECTIVE_KEYWORD_BOLD, true);
+ store.setDefault(JET_DIRECTIVE_ITALIC, false);
+ store.setDefault(JET_DIRECTIVE_UNDERLINE, false);
+
+ PreferenceConverter.setDefault(store, JET_SCRIPTLET_FG_COLOR, IJETColorConstants.JET_SCRIPTLET_FG);
+ store.setDefault(JET_SCRIPTLET_BOLD, false);
+ store.setDefault(JET_SCRIPTLET_ITALIC, true);
+ store.setDefault(JET_SCRIPTLET_UNDERLINE, false);
+
+ PreferenceConverter.setDefault(store, JET_DEFAULT_BG_COLOR, IJETColorConstants.JET_DEFAULT_BG);
+ PreferenceConverter.setDefault(store, JET_EXPRESSION_BG_COLOR, IJETColorConstants.JET_EXPRESSION_BG);
+
+ store.setDefault(AUTO_COMPLETE_ENABLED, store.getDefaultBoolean(PreferenceConstants.CODEASSIST_AUTOACTIVATION));
+ store.setDefault(AUTO_COMPLETE_DELAY, store.getDefaultInt(PreferenceConstants.CODEASSIST_AUTOACTIVATION_DELAY));
+ }
+
+}
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/JETReconcilingStrategy.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/JETReconcilingStrategy.java
new file mode 100644
index 0000000..3397dfb
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/JETReconcilingStrategy.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.configuration;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jet.core.parser.ast.JETCompilationUnit;
+import org.eclipse.jet.core.parser.ast.Problem;
+import org.eclipse.jet.internal.editor.JETEditorHelper;
+import org.eclipse.jet.internal.editor.JETTextEditor;
+import org.eclipse.jet.internal.editor.annotations.JETAnnotationModel;
+import org.eclipse.jet.internal.editor.annotations.JETProblemAnnotation;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.reconciler.DirtyRegion;
+import org.eclipse.jface.text.reconciler.IReconcilingStrategy;
+import org.eclipse.jface.text.reconciler.IReconcilingStrategyExtension;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.ui.texteditor.MarkerAnnotation;
+
+/**
+ * The reconciling strategy for the JET editor
+ * @author Joel
+ */
+public class JETReconcilingStrategy implements IReconcilingStrategy, IReconcilingStrategyExtension {
+
+ private JETTextEditor jetEditor;
+
+ private ISourceViewer sourceViewer;
+
+ /**
+ * Main constructor
+ * @param sourceViewer
+ * @param jetEditor
+ */
+ public JETReconcilingStrategy(ISourceViewer sourceViewer, JETTextEditor jetEditor) {
+ this.jetEditor = jetEditor;
+ this.sourceViewer = sourceViewer;
+ }
+
+ /**
+ * This is the single method that performs the annotation model problems evaluations and update
+ */
+ private void internalReconcile() {
+ JETCompilationUnit cUnit = jetEditor.requestCompilationUnit();
+ List cUnitProblems = cUnit.getProblems();
+ List javaContentProblems = JETEditorHelper.evaluateProblems(jetEditor, sourceViewer.getDocument());
+ JETAnnotationModel annotationModel = (JETAnnotationModel) sourceViewer.getAnnotationModel();
+ if (annotationModel != null) {
+ // avoid changes to the annotation model to be notified to the viewers until the job is done
+ annotationModel.setFireChanges(false);
+
+ // Remove all the previous annotations related to JET problems
+ // and related to resource markers
+ for (Iterator it = annotationModel.getAnnotationIterator(); it.hasNext();) {
+ Annotation annotation = (Annotation) it.next();
+ if ((annotation instanceof JETProblemAnnotation) || (annotation instanceof MarkerAnnotation))
+ annotationModel.removeAnnotation(annotation);
+ }
+
+ // Problems for JET document structure
+ for (Iterator iterator = cUnitProblems.iterator(); iterator.hasNext(); ) {
+ Problem problem = (Problem) iterator.next();
+ JETProblemAnnotation annotation = new JETProblemAnnotation(problem);
+ Position position = new Position(problem.getStart(), problem.getEnd() - problem.getStart());
+ annotationModel.addAnnotation(annotation, position);
+ }
+
+ // Problems in java contents of the JET document
+ for (Iterator iterator = javaContentProblems.iterator(); iterator.hasNext(); ) {
+ Problem problem = (Problem) iterator.next();
+ JETProblemAnnotation annotation = new JETProblemAnnotation(problem);
+ Position position = new Position(problem.getStart(), problem.getEnd() - problem.getStart());
+ annotationModel.addAnnotation(annotation, position);
+ }
+
+ annotationModel.setFireChanges(true);
+ annotationModel.fireAnnotationModelChanged();
+ }
+ }
+
+ public void setDocument(IDocument idocument) {
+ }
+
+ public void initialReconcile() {
+ internalReconcile();
+ }
+
+ public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) {
+ internalReconcile();
+ }
+
+ public void reconcile(IRegion partition) {
+ internalReconcile();
+ }
+
+ public void setProgressMonitor(IProgressMonitor iprogressmonitor) {
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/JETSourceViewerConfiguration.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/JETSourceViewerConfiguration.java
new file mode 100644
index 0000000..b4260e3
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/JETSourceViewerConfiguration.java
@@ -0,0 +1,122 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.configuration;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jet.internal.editor.JETTextEditor;
+import org.eclipse.jet.internal.editor.annotations.JETAnnotationHover;
+import org.eclipse.jface.text.IAutoEditStrategy;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextDoubleClickStrategy;
+import org.eclipse.jface.text.contentassist.ContentAssistant;
+import org.eclipse.jface.text.contentassist.IContentAssistant;
+import org.eclipse.jface.text.formatter.IContentFormatter;
+import org.eclipse.jface.text.formatter.MultiPassContentFormatter;
+import org.eclipse.jface.text.presentation.IPresentationReconciler;
+import org.eclipse.jface.text.presentation.PresentationReconciler;
+import org.eclipse.jface.text.reconciler.IReconciler;
+import org.eclipse.jface.text.reconciler.MonoReconciler;
+import org.eclipse.jface.text.source.*;
+
+public class JETSourceViewerConfiguration extends SourceViewerConfiguration {
+
+ private DoubleClickStrategy doubleClickStrategy;
+ private JETTextEditor editor;
+
+ public JETSourceViewerConfiguration(JETTextEditor editor) {
+ this.editor = editor;
+ }
+
+ public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
+ return editor.getPartitionScanner().getContentTypes();
+ }
+
+ public ITextDoubleClickStrategy getDoubleClickStrategy(ISourceViewer sourceViewer, String contentType) {
+ if (doubleClickStrategy == null)
+ doubleClickStrategy = new DoubleClickStrategy();
+ return doubleClickStrategy;
+ }
+
+ public IReconciler getReconciler(ISourceViewer sourceViewer) {
+ JETReconcilingStrategy strategy = new JETReconcilingStrategy(sourceViewer, editor);
+ MonoReconciler reconciler = new MonoReconciler(strategy, false);
+ reconciler.setProgressMonitor(new NullProgressMonitor());
+ reconciler.setDelay(500);
+ return reconciler;
+ }
+
+ public IAnnotationHover getAnnotationHover(ISourceViewer sourceViewer) {
+ return new JETAnnotationHover();
+ }
+
+ public IAutoEditStrategy[] getAutoEditStrategies(ISourceViewer sourceViewer, String contentType) {
+ IAutoEditStrategy strategies[] = editor.getPartitionScanner().getAutoEditStrategies(contentType);
+ if (strategies == null)
+ strategies = super.getAutoEditStrategies(sourceViewer, contentType);
+ return strategies;
+ }
+
+ public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
+ ContentAssistant assistant = new ContentAssistant();
+ assistant.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
+ String configuredContentTypes[] = getConfiguredContentTypes(sourceViewer);
+ for (int i = 0; i < configuredContentTypes.length; i++) {
+ String contentType = configuredContentTypes[i];
+ org.eclipse.jface.text.contentassist.IContentAssistProcessor processor = editor.getPartitionScanner()
+ .getCompletionProcessor(contentType, assistant);
+ if (processor != null)
+ assistant.setContentAssistProcessor(processor, contentType);
+ }
+
+ assistant.setContextInformationPopupOrientation(20);
+ assistant.setInformationControlCreator(getInformationControlCreator(sourceViewer));
+ assistant.enableAutoInsert(false);
+ assistant.enableAutoActivation(true);
+ return assistant;
+ }
+
+ public IContentFormatter getContentFormatter(ISourceViewer sourceViewer) {
+ MultiPassContentFormatter formatter = new MultiPassContentFormatter(
+ getConfiguredDocumentPartitioning(sourceViewer), IDocument.DEFAULT_CONTENT_TYPE);
+ String configuredContentTypes[] = getConfiguredContentTypes(sourceViewer);
+ for (int i = 0; i < configuredContentTypes.length; i++) {
+ String contentType = configuredContentTypes[i];
+ org.eclipse.jface.text.formatter.IFormattingStrategy strategy = editor.getPartitionScanner()
+ .getFormattingStrategy(contentType);
+ if (strategy != null)
+ if (IDocument.DEFAULT_CONTENT_TYPE.equals(contentType))
+ formatter.setMasterStrategy(strategy);
+ else
+ formatter.setSlaveStrategy(strategy, contentType);
+ }
+
+ return formatter;
+ }
+
+ public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
+ PresentationReconciler reconciler = new PresentationReconciler();
+ String configuredContentTypes[] = getConfiguredContentTypes(sourceViewer);
+ for (int i = 0; i < configuredContentTypes.length; i++) {
+ String contentType = configuredContentTypes[i];
+ org.eclipse.jface.text.presentation.IPresentationDamager damager = editor.getPartitionScanner().getDamager(
+ contentType);
+ org.eclipse.jface.text.presentation.IPresentationRepairer repairer = editor.getPartitionScanner().getRepairer(
+ contentType);
+ if (damager != null)
+ reconciler.setDamager(damager, contentType);
+ if (repairer != null)
+ reconciler.setRepairer(repairer, contentType);
+ }
+
+ return reconciler;
+ }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/JETTokenStyleManager.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/JETTokenStyleManager.java
new file mode 100644
index 0000000..39a36df
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/JETTokenStyleManager.java
@@ -0,0 +1,160 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.configuration;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.jdt.ui.text.IColorManager;
+import org.eclipse.jdt.ui.text.IColorManagerExtension;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.jface.text.TextAttribute;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.Token;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.texteditor.AbstractTextEditor;
+
+public class JETTokenStyleManager implements IColorManager, IColorManagerExtension {
+ private IPreferenceStore preferenceStore;
+
+ protected Map colorTable = new HashMap(10);
+ protected Map keyTable= new HashMap(10);
+ protected Map tokenMap = new HashMap(10);
+
+ public JETTokenStyleManager(IPreferenceStore store) {
+ this.preferenceStore = store;
+ }
+ public void dispose() {
+ Iterator e = colorTable.values().iterator();
+ while (e.hasNext())
+ ((Color) e.next()).dispose();
+ }
+ public Color getColor(RGB rgb) {
+ Color color = (Color) colorTable.get(rgb);
+ if (color == null) {
+ color = new Color(Display.getCurrent(), rgb);
+ colorTable.put(rgb, color);
+ }
+ return color;
+ }
+ public Color getColor(String key) {
+ if (key == null)
+ return null;
+ RGB rgb= (RGB) keyTable.get(key);
+ if (rgb == null) {
+ rgb= PreferenceConverter.getColor(preferenceStore, key);
+ if (rgb == null)
+ return null;
+ keyTable.put(key, rgb);
+ }
+ return getColor(rgb);
+ }
+
+ /*
+ * @see IColorManagerExtension#bindColor(String, RGB)
+ */
+ public void bindColor(String key, RGB rgb) {
+ Object value= keyTable.get(key);
+ if (value != null)
+ throw new UnsupportedOperationException();
+ keyTable.put(key, rgb);
+ }
+
+ /*
+ * @see IColorManagerExtension#unbindColor(String)
+ */
+ public void unbindColor(String key) {
+ keyTable.remove(key);
+ }
+
+ public IToken getCachedToken(String id) {
+ return ((IToken)tokenMap.get(id));
+ }
+
+ public IToken requestToken(String id,
+ String fgColorKey,
+ String bgColorKey,
+ String boldKey,
+ String italicKey,
+ String strikethroughKey,
+ String underlineKey) {
+ if (fgColorKey != null && getColor(fgColorKey) == null) {
+ RGB rgb= PreferenceConverter.getColor(preferenceStore, fgColorKey);
+ unbindColor(fgColorKey);
+ bindColor(fgColorKey, rgb);
+ }
+
+ if (bgColorKey != null && getColor(bgColorKey) == null) {
+ RGB rgb= PreferenceConverter.getColor(preferenceStore, bgColorKey);
+ unbindColor(bgColorKey);
+ bindColor(bgColorKey, rgb);
+ }
+
+ Token token= ((Token)tokenMap.get(id));
+ if (token == null) {
+ token = new Token(createTextAttribute(fgColorKey, bgColorKey, boldKey, italicKey, strikethroughKey, underlineKey));
+ tokenMap.put(id, token);
+ } else {
+ token.setData(createTextAttribute(fgColorKey, bgColorKey, boldKey, italicKey, strikethroughKey, underlineKey));
+ }
+ return token;
+ }
+
+ /**
+ * Create a text attribute based on the given color, bold, italic, strikethrough and underline preference keys.
+ *
+ * @param fgColorKey the fg color preference key
+ * @param bgColorKey the fg color preference key
+ * @param boldKey the bold preference key
+ * @param italicKey the italic preference key
+ * @param strikethroughKey the strikethrough preference key
+ * @param underlineKey the italic preference key
+ * @return the created text attribute
+ * @since 3.0
+ */
+ private TextAttribute createTextAttribute(String fgColorKey, String bgColorKey, String boldKey, String italicKey, String strikethroughKey, String underlineKey) {
+ Color fgColor= null;
+ if (fgColorKey != null)
+ fgColor= getColor(fgColorKey);
+ Color bgColor= null;
+ if (bgColorKey != null)
+ bgColor= getColor(bgColorKey);
+
+ int style = (boldKey != null && preferenceStore.getBoolean(boldKey))? SWT.BOLD : SWT.NORMAL;
+
+ if (italicKey != null && preferenceStore.getBoolean(italicKey))
+ style |= SWT.ITALIC;
+
+ if (strikethroughKey != null && preferenceStore.getBoolean(strikethroughKey))
+ style |= TextAttribute.STRIKETHROUGH;
+
+ if (underlineKey != null && preferenceStore.getBoolean(underlineKey))
+ style |= TextAttribute.UNDERLINE;
+
+ return new TextAttribute(fgColor, bgColor, style);
+ }
+
+ public IToken requestDefaultToken() {
+ return requestToken("__jet_default_return_token",
+ AbstractTextEditor.PREFERENCE_COLOR_FOREGROUND,
+ JETEditorPreferenceConstants.JET_DEFAULT_BG_COLOR,
+ null,
+ null,
+ null,
+ null);
+
+ }
+}
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/JETWhitespaceDetector.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/JETWhitespaceDetector.java
new file mode 100644
index 0000000..b078889
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/JETWhitespaceDetector.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.configuration;
+
+import org.eclipse.jface.text.rules.IWhitespaceDetector;
+
+public class JETWhitespaceDetector implements IWhitespaceDetector {
+
+ public boolean isWhitespace(char c) {
+ return (c == ' ' || c == '\t' || c == '\n' || c == '\r');
+ }
+}
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/NonRuleBasedDamagerRepairer.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/NonRuleBasedDamagerRepairer.java
new file mode 100644
index 0000000..318e5b5
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/NonRuleBasedDamagerRepairer.java
@@ -0,0 +1,148 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.configuration;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.DocumentEvent;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITypedRegion;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.TextAttribute;
+import org.eclipse.jface.text.TextPresentation;
+import org.eclipse.jface.text.presentation.IPresentationDamager;
+import org.eclipse.jface.text.presentation.IPresentationRepairer;
+import org.eclipse.swt.custom.StyleRange;
+
+public class NonRuleBasedDamagerRepairer
+ implements IPresentationDamager, IPresentationRepairer {
+
+ /** The document this object works on */
+ protected IDocument fDocument;
+ /** The default text attribute if non is returned as data by the current token */
+ protected TextAttribute fDefaultTextAttribute;
+
+ /**
+ * Constructor for NonRuleBasedDamagerRepairer.
+ */
+ public NonRuleBasedDamagerRepairer(TextAttribute defaultTextAttribute) {
+ Assert.isNotNull(defaultTextAttribute);
+
+ fDefaultTextAttribute = defaultTextAttribute;
+ }
+
+ /**
+ * @see IPresentationRepairer#setDocument(IDocument)
+ */
+ public void setDocument(IDocument document) {
+ fDocument = document;
+ }
+
+ /**
+ * Returns the end offset of the line that contains the specified offset or
+ * if the offset is inside a line delimiter, the end offset of the next line.
+ *
+ * @param offset the offset whose line end offset must be computed
+ * @return the line end offset for the given offset
+ * @exception BadLocationException if offset is invalid in the current document
+ */
+ protected int endOfLineOf(int offset) throws BadLocationException {
+
+ IRegion info = fDocument.getLineInformationOfOffset(offset);
+ if (offset <= info.getOffset() + info.getLength())
+ return info.getOffset() + info.getLength();
+
+ int line = fDocument.getLineOfOffset(offset);
+ try {
+ info = fDocument.getLineInformation(line + 1);
+ return info.getOffset() + info.getLength();
+ } catch (BadLocationException x) {
+ return fDocument.getLength();
+ }
+ }
+
+ /**
+ * @see IPresentationDamager#getDamageRegion(ITypedRegion, DocumentEvent, boolean)
+ */
+ public IRegion getDamageRegion(
+ ITypedRegion partition,
+ DocumentEvent event,
+ boolean documentPartitioningChanged) {
+ if (!documentPartitioningChanged) {
+ try {
+
+ IRegion info =
+ fDocument.getLineInformationOfOffset(event.getOffset());
+ int start = Math.max(partition.getOffset(), info.getOffset());
+
+ int end =
+ event.getOffset()
+ + (event.getText() == null
+ ? event.getLength()
+ : event.getText().length());
+
+ if (info.getOffset() <= end
+ && end <= info.getOffset() + info.getLength()) {
+ // optimize the case of the same line
+ end = info.getOffset() + info.getLength();
+ } else
+ end = endOfLineOf(end);
+
+ end =
+ Math.min(
+ partition.getOffset() + partition.getLength(),
+ end);
+ return new Region(start, end - start);
+
+ } catch (BadLocationException x) {
+ }
+ }
+
+ return partition;
+ }
+
+ /**
+ * @see IPresentationRepairer#createPresentation(TextPresentation, ITypedRegion)
+ */
+ public void createPresentation(
+ TextPresentation presentation,
+ ITypedRegion region) {
+ addRange(
+ presentation,
+ region.getOffset(),
+ region.getLength(),
+ fDefaultTextAttribute);
+ }
+
+ /**
+ * Adds style information to the given text presentation.
+ *
+ * @param presentation the text presentation to be extended
+ * @param offset the offset of the range to be styled
+ * @param length the length of the range to be styled
+ * @param attr the attribute describing the style of the range to be styled
+ */
+ protected void addRange(
+ TextPresentation presentation,
+ int offset,
+ int length,
+ TextAttribute attr) {
+ if (attr != null)
+ presentation.addStyleRange(
+ new StyleRange(
+ offset,
+ length,
+ attr.getForeground(),
+ attr.getBackground(),
+ attr.getStyle()));
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/delegates/IJETDefaultTextColorerDelegate.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/delegates/IJETDefaultTextColorerDelegate.java
new file mode 100644
index 0000000..ea1a0fd
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/delegates/IJETDefaultTextColorerDelegate.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.configuration.delegates;
+
+import org.eclipse.jet.internal.editor.partition.ITokenScannerProvider;
+import org.eclipse.jface.text.rules.IPredicateRule;
+import org.eclipse.swt.graphics.Image;
+
+public interface IJETDefaultTextColorerDelegate extends ITokenScannerProvider {
+ IPredicateRule[] getPartitioningRules();
+ String getName();
+ Image getImage();
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/delegates/java/JavaContentPartitionConfigurationDelegate.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/delegates/java/JavaContentPartitionConfigurationDelegate.java
new file mode 100644
index 0000000..0abf149
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/delegates/java/JavaContentPartitionConfigurationDelegate.java
@@ -0,0 +1,123 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.configuration.delegates.java;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.jdt.ui.ISharedImages;
+import org.eclipse.jdt.ui.JavaUI;
+import org.eclipse.jdt.ui.text.JavaSourceViewerConfiguration;
+import org.eclipse.jet.internal.editor.JETTextEditor;
+import org.eclipse.jet.internal.editor.configuration.delegates.IJETDefaultTextColorerDelegate;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.rules.*;
+import org.eclipse.swt.graphics.Image;
+
+public class JavaContentPartitionConfigurationDelegate implements IJETDefaultTextColorerDelegate {
+ private JETJavaSourceViewerConfiguration javaConfiguration;
+
+ public JavaContentPartitionConfigurationDelegate(JETTextEditor editor) {
+ javaConfiguration = new JETJavaSourceViewerConfiguration(editor);
+ }
+
+ public String getName() {
+ return "Java Text Content Colorer";
+ }
+
+ public Image getImage() {
+ return JavaUI.getSharedImages().getImage(ISharedImages.IMG_OBJS_CUNIT);
+ }
+
+ public IPredicateRule[] getPartitioningRules() {
+ org.eclipse.jface.text.rules.IToken string = new Token("__java_string");
+ org.eclipse.jface.text.rules.IToken character = new Token("__java_character");
+ org.eclipse.jface.text.rules.IToken javaDoc = new Token("__java_javadoc");
+ org.eclipse.jface.text.rules.IToken multiLineComment = new Token("__java_multiline_comment");
+ org.eclipse.jface.text.rules.IToken singleLineComment = new Token("__java_singleline_comment");
+ List rules = new ArrayList();
+ rules.add(new EndOfLineRule("//", singleLineComment));
+ rules.add(new SingleLineRule("\"", "\"", string, '\\'));
+ rules.add(new SingleLineRule("'", "'", character, '\\'));
+ EmptyCommentRule wordRule = new EmptyCommentRule(multiLineComment);
+ rules.add(wordRule);
+ rules.add(new MultiLineRule("/**", "*/", javaDoc));
+ rules.add(new MultiLineRule("/*", "*/", multiLineComment));
+ IPredicateRule result[] = new IPredicateRule[rules.size()];
+ rules.toArray(result);
+ return result;
+ }
+
+ public ITokenScanner getTokenScanner(String contentType) {
+ if (IDocument.DEFAULT_CONTENT_TYPE.equals(contentType))
+ return javaConfiguration.getCodeScanner();
+ if ("__java_javadoc".equals(contentType))
+ return javaConfiguration.getJavaDocScanner();
+ if ("__java_multiline_comment".equals(contentType))
+ return javaConfiguration.getMultilineCommentScanner();
+ if ("__java_singleline_comment".equals(contentType))
+ return javaConfiguration.getSinglelineCommentScanner();
+ if ("__java_string".equals(contentType))
+ return javaConfiguration.getStringScanner();
+ if ("__java_character".equals(contentType))
+ return javaConfiguration.getStringScanner();
+ else
+ return javaConfiguration.getCodeScanner();
+ }
+
+ private class JETJavaSourceViewerConfiguration extends JavaSourceViewerConfiguration {
+ public RuleBasedScanner getCodeScanner() {
+ return super.getCodeScanner();
+ }
+ public RuleBasedScanner getMultilineCommentScanner() {
+ return super.getMultilineCommentScanner();
+ }
+ public RuleBasedScanner getSinglelineCommentScanner() {
+ return super.getSinglelineCommentScanner();
+ }
+ public RuleBasedScanner getStringScanner() {
+ return super.getStringScanner();
+ }
+ public RuleBasedScanner getJavaDocScanner() {
+ return super.getJavaDocScanner();
+ }
+ public JETJavaSourceViewerConfiguration(JETTextEditor editor) {
+ super(JavaUI.getColorManager(), editor.getEditorPreferenceStore(), editor, null);
+ }
+ }
+
+ private class EmptyCommentDetector implements IWordDetector {
+ public boolean isWordStart(char c) {
+ return c == '/';
+ }
+
+ public boolean isWordPart(char c) {
+ return c == '*' || c == '/';
+ }
+ }
+
+ private class EmptyCommentRule extends WordRule implements IPredicateRule {
+ public IToken evaluate(ICharacterScanner scanner, boolean resume) {
+ return evaluate(scanner);
+ }
+
+ public IToken getSuccessToken() {
+ return fSuccessToken;
+ }
+
+ private IToken fSuccessToken;
+
+ public EmptyCommentRule(IToken successToken) {
+ super(new EmptyCommentDetector());
+ fSuccessToken = successToken;
+ addWord("/**/", fSuccessToken);
+ }
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/delegates/xml/XMLContentPartitionConfigurationDelegate.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/delegates/xml/XMLContentPartitionConfigurationDelegate.java
new file mode 100644
index 0000000..8435afc
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/delegates/xml/XMLContentPartitionConfigurationDelegate.java
@@ -0,0 +1,166 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.configuration.delegates.xml;
+
+import org.eclipse.jdt.ui.text.IColorManager;
+import org.eclipse.jet.internal.editor.Activator;
+import org.eclipse.jet.internal.editor.JETTextEditor;
+import org.eclipse.jet.internal.editor.configuration.delegates.IJETDefaultTextColorerDelegate;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.TextAttribute;
+import org.eclipse.jface.text.rules.ICharacterScanner;
+import org.eclipse.jface.text.rules.IPredicateRule;
+import org.eclipse.jface.text.rules.IRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.ITokenScanner;
+import org.eclipse.jface.text.rules.IWhitespaceDetector;
+import org.eclipse.jface.text.rules.MultiLineRule;
+import org.eclipse.jface.text.rules.RuleBasedScanner;
+import org.eclipse.jface.text.rules.SingleLineRule;
+import org.eclipse.jface.text.rules.Token;
+import org.eclipse.jface.text.rules.WhitespaceRule;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.RGB;
+
+public class XMLContentPartitionConfigurationDelegate implements IJETDefaultTextColorerDelegate {
+ public static final String XML_COMMENT = "__xml_comment";
+ public static final String XML_TAG = "__xml_tag";
+
+ private XMLTagScanner tagScanner;
+ private XMLScanner scanner;
+ private XMLScanner commentScanner;
+ private IColorManager colorManager;
+
+ public static interface IXMLColorConstants {
+ RGB XML_COMMENT = new RGB(128, 0, 0);
+ RGB PROC_INSTR = new RGB(128, 128, 128);
+ RGB STRING = new RGB(0, 128, 0);
+ RGB DEFAULT = new RGB(0, 0, 0);
+ RGB TAG = new RGB(0, 0, 128);
+ }
+
+ public class TagRule extends MultiLineRule {
+
+ protected boolean sequenceDetected(ICharacterScanner scanner, char sequence[], boolean eofAllowed) {
+ int c = scanner.read();
+ if (sequence[0] == '<') {
+ if (c == 63) {
+ scanner.unread();
+ return false;
+ }
+ if (c == 33) {
+ scanner.unread();
+ return false;
+ }
+ } else if (sequence[0] == '>')
+ scanner.unread();
+ return super.sequenceDetected(scanner, sequence, eofAllowed);
+ }
+
+ public TagRule(IToken token) {
+ super("<", ">", token);
+ }
+ }
+
+ public class XMLWhitespaceDetector implements IWhitespaceDetector {
+ public boolean isWhitespace(char c) {
+ return c == ' ' || c == '\t' || c == '\n' || c == '\r';
+ }
+
+ public XMLWhitespaceDetector() {
+ super();
+ }
+ }
+
+ public class XMLScanner extends RuleBasedScanner {
+
+ public XMLScanner(IColorManager manager) {
+ super();
+ org.eclipse.jface.text.rules.IToken procInstr = new Token(new TextAttribute(manager
+ .getColor(IXMLColorConstants.PROC_INSTR)));
+ IRule rules[] = new IRule[2];
+ rules[0] = new SingleLineRule("<?", "?>", procInstr);
+ rules[1] = new WhitespaceRule(new XMLWhitespaceDetector());
+ setRules(rules);
+ }
+ }
+
+ public class XMLTagScanner extends RuleBasedScanner {
+
+ public XMLTagScanner(IColorManager manager) {
+ super();
+ org.eclipse.jface.text.rules.IToken string = new Token(new TextAttribute(manager
+ .getColor(IXMLColorConstants.STRING)));
+ IRule rules[] = new IRule[3];
+ rules[0] = new SingleLineRule("\"", "\"", string, '\\');
+ rules[1] = new SingleLineRule("'", "'", string, '\\');
+ rules[2] = new WhitespaceRule(new XMLWhitespaceDetector());
+ setRules(rules);
+ }
+ }
+
+ public XMLContentPartitionConfigurationDelegate(JETTextEditor editor) {
+ colorManager = editor.getTokenStyleManager();
+ }
+
+ public String getName() {
+ return "XML Text Content Colorer";
+ }
+
+ public Image getImage() {
+ return Activator.getDefault().getWorkbench().getSharedImages().getImage("IMG_OBJ_FILE");
+ }
+
+ public IPredicateRule[] getPartitioningRules() {
+ org.eclipse.jface.text.rules.IToken xmlComment = new Token(XML_COMMENT);
+ org.eclipse.jface.text.rules.IToken tag = new Token(XML_TAG);
+ IPredicateRule rules[] = new IPredicateRule[2];
+ rules[0] = new MultiLineRule("<!--", "-->", xmlComment);
+ rules[1] = new TagRule(tag);
+ return rules;
+ }
+
+ public ITokenScanner getTokenScanner(String contentType) {
+ if (IDocument.DEFAULT_CONTENT_TYPE.equals(contentType))
+ return getXMLScanner();
+ if (XML_TAG.equals(contentType))
+ return getXMLTagScanner();
+ if (XML_COMMENT.equals(contentType))
+ return getCommentScanner();
+ else
+ return getXMLScanner();
+ }
+
+ protected XMLScanner getCommentScanner() {
+ if (commentScanner == null) {
+ commentScanner = new XMLScanner(colorManager);
+ commentScanner.setDefaultReturnToken(new Token(new TextAttribute(colorManager
+ .getColor(IXMLColorConstants.XML_COMMENT))));
+ }
+ return commentScanner;
+ }
+
+ protected XMLScanner getXMLScanner() {
+ if (scanner == null) {
+ scanner = new XMLScanner(colorManager);
+ scanner.setDefaultReturnToken(new Token(new TextAttribute(colorManager.getColor(IXMLColorConstants.DEFAULT))));
+ }
+ return scanner;
+ }
+
+ protected XMLTagScanner getXMLTagScanner() {
+ if (tagScanner == null) {
+ tagScanner = new XMLTagScanner(colorManager);
+ tagScanner.setDefaultReturnToken(new Token(new TextAttribute(colorManager.getColor(IXMLColorConstants.TAG))));
+ }
+ return tagScanner;
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/par.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/par.java
new file mode 100644
index 0000000..c412bd9
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/configuration/par.java
@@ -0,0 +1,41 @@
+package org.eclipse.jet.internal.editor.configuration;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITypedRegion;
+import org.eclipse.jface.text.rules.FastPartitioner;
+import org.eclipse.jface.text.rules.IPartitionTokenScanner;
+
+public class par extends FastPartitioner {
+
+ public par(IPartitionTokenScanner scanner, String[] legalContentTypes) {
+ super(scanner, legalContentTypes);
+ // TODO Auto-generated constructor stub
+ }
+
+ public void connect(IDocument document, boolean delayInitialization) {
+ super.connect(document, delayInitialization);
+ printPartitions(document);
+ }
+
+ public void printPartitions(IDocument document) {
+ StringBuffer buffer = new StringBuffer();
+
+ ITypedRegion[] partitions = computePartitioning(0, document.getLength());
+ for (int i = 0; i < partitions.length; i++) {
+ try {
+ buffer.append("Partition type: " + partitions[i].getType()
+ + ", offset: " + partitions[i].getOffset()
+ + ", length: " + partitions[i].getLength());
+ buffer.append("\n");
+ buffer.append("Text:\n");
+ buffer.append(document.get(partitions[i].getOffset(),
+ partitions[i].getLength()));
+ buffer.append("\n---------------------------\n\n\n");
+ } catch (BadLocationException e) {
+ e.printStackTrace();
+ }
+ }
+// System.out.print(buffer);
+ }
+}
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/contentassist/AbstractJETAssistProcessor.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/contentassist/AbstractJETAssistProcessor.java
new file mode 100644
index 0000000..f5168c7
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/contentassist/AbstractJETAssistProcessor.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.contentassist;
+
+import org.eclipse.jet.internal.editor.JETTextEditor;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+
+public abstract class AbstractJETAssistProcessor implements IContentAssistProcessor {
+ protected JETTextEditor editor;
+ public AbstractJETAssistProcessor(JETTextEditor editor) {
+ this.editor = editor;
+ }
+
+ public String getErrorMessage() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/contentassist/AbstractXMLTagsBasedAssistProcessor.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/contentassist/AbstractXMLTagsBasedAssistProcessor.java
new file mode 100644
index 0000000..16b84c5
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/contentassist/AbstractXMLTagsBasedAssistProcessor.java
@@ -0,0 +1,165 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.contentassist;
+
+import java.util.*;
+
+import org.eclipse.jet.internal.editor.JETDocumentReader;
+import org.eclipse.jet.internal.editor.JETTextEditor;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.contentassist.CompletionProposal;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+
+public abstract class AbstractXMLTagsBasedAssistProcessor extends AbstractJETAssistProcessor {
+
+ private TreeSet keywordSet;
+ private TreeSet innerKeywordSet;
+ private TreeMap innerMap;
+
+ public AbstractXMLTagsBasedAssistProcessor(JETTextEditor editor) {
+ super(editor);
+ keywordSet = new TreeSet();
+ innerKeywordSet = new TreeSet();
+ innerMap = new TreeMap();
+ String tagAttrs[][] = getTagAttributes();
+ for (int i = 0; i < tagAttrs.length; i++)
+ keywordSet.add(tagAttrs[i][0]);
+
+ for (int i = 0; i < tagAttrs.length; i++) {
+ TreeSet innerSet = new TreeSet();
+ for (int j = 1; j < tagAttrs[i].length; j++) {
+ innerSet.add(tagAttrs[i][j]);
+ innerKeywordSet.add(tagAttrs[i][j]);
+ }
+
+ innerMap.put(tagAttrs[i][0], innerSet);
+ }
+
+ }
+
+ public abstract String[] getRootTags();
+
+ public abstract String[][] getTagAttributes();
+
+ public String[] getAllKeywords() {
+ return (String[]) keywordSet.toArray(new String[keywordSet.size()]);
+ }
+
+ public String[] getAllInnerKeywords() {
+ return (String[]) innerKeywordSet.toArray(new String[innerKeywordSet.size()]);
+ }
+
+ public String[] getInnerKeywordsFor(String key) {
+ TreeSet set = (TreeSet) (TreeSet) innerMap.get(key);
+ if (set == null && key.length() == 0)
+ return getRootTags();
+ else if (set != null)
+ return (String[]) set.toArray(new String[set.size()]);
+ return new String[0];
+ }
+
+ private boolean prefixMatches(String prefix, String word) {
+ prefix = prefix.toLowerCase();
+ return word.startsWith(prefix);
+ }
+
+ public String[] getAllWordsWithPrefix(String prefix) {
+ String all[] = getAllKeywords();
+ return getMatched(prefix, all);
+ }
+
+ private String[] getMatched(String prefix, String all[]) {
+ ArrayList matched = new ArrayList(10);
+ for (int i = 0; i < all.length; i++)
+ if (prefixMatches(prefix, all[i]))
+ matched.add(all[i]);
+
+ return (String[]) matched.toArray(new String[matched.size()]);
+ }
+
+ public String[] getTagsWithPrefix(String prefix) {
+ return getMatched(prefix, getRootTags());
+ }
+
+ public String[] getNonTagsKeywordsWithPrefix(String key, String prefix) {
+ return getMatched(prefix, getInnerKeywordsFor(key));
+ }
+
+ protected String[] getAllWords(char c, JETDocumentReader reader) {
+ ArrayList all = new ArrayList(20);
+ char currChar = c;
+ currChar = trimBlanksBackward(reader, currChar);
+ for (boolean done = false; !done;) {
+ Stack stack = new Stack();
+ for (; currChar != '\uFFFF' && !Character.isWhitespace(currChar); currChar = reader.readBackward())
+ stack.push(new Character(currChar));
+
+ String s;
+ for (s = new String(); !stack.empty(); s = (new StringBuilder(String.valueOf(s))).append(
+ ((Character) stack.pop()).toString()).toString())
+ ;
+ int jspPt = s.indexOf("<%@");
+ if (jspPt >= 0) {
+ s = s.substring(jspPt + 3);
+ done = true;
+ }
+ all.add(s);
+ currChar = trimBlanksBackward(reader, currChar);
+ if (currChar == '\uFFFF' || currChar == '@')
+ done = true;
+ }
+
+ return (String[]) all.toArray(new String[all.size()]);
+ }
+
+ private char trimBlanksBackward(JETDocumentReader reader, char currChar) {
+ for (; currChar != '\uFFFF' && Character.isWhitespace(currChar); currChar = reader.readBackward())
+ ;
+ return currChar;
+ }
+
+ protected abstract char getRootTagPrevChar();
+
+ public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
+ org.eclipse.jface.text.IDocument doc = viewer.getDocument();
+ JETDocumentReader reader = new JETDocumentReader(doc, offset);
+ char c = reader.readBackward();
+ ICompletionProposal result[] = (ICompletionProposal[]) null;
+ String allWords[] = getAllWords(c, reader);
+ if (Character.isSpaceChar(c)) {
+ String nonTagWords[] = getInnerKeywordsFor(allWords[allWords.length - 1]);
+ result = new ICompletionProposal[nonTagWords.length];
+ for (int i = 0; i < nonTagWords.length; i++)
+ result[i] = new CompletionProposal(nonTagWords[i], offset, 0, nonTagWords[i].length());
+
+ } else if (c == getRootTagPrevChar()) {
+ String words[] = getRootTags();
+ result = new ICompletionProposal[words.length];
+ for (int i = 0; i < words.length; i++)
+ result[i] = new CompletionProposal(words[i].substring(allWords[0].length()), offset, 0, words[i].length()
+ - allWords[0].length(), null, words[i], null, null);
+
+ } else if (Character.isLetter(c)) {
+ String words[];
+ if (allWords.length > 1)
+ words = getNonTagsKeywordsWithPrefix(allWords[allWords.length - 1], allWords[0]);
+ else
+ words = getTagsWithPrefix(allWords[0]);
+ result = new ICompletionProposal[words.length];
+ for (int i = 0; i < words.length; i++)
+ result[i] = new CompletionProposal(words[i].substring(allWords[0].length()), offset, 0, words[i].length()
+ - allWords[0].length(), null, words[i], null, null);
+
+ }
+ return result;
+ }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/contentassist/JETCustomTagAssistProcessor.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/contentassist/JETCustomTagAssistProcessor.java
new file mode 100644
index 0000000..ed5129d
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/contentassist/JETCustomTagAssistProcessor.java
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.contentassist;
+
+import java.util.*;
+
+import org.eclipse.jet.internal.editor.JETTextEditor;
+import org.eclipse.jet.taglib.*;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.contentassist.IContextInformation;
+import org.eclipse.jface.text.contentassist.IContextInformationValidator;
+
+public class JETCustomTagAssistProcessor extends AbstractXMLTagsBasedAssistProcessor {
+
+ private String rootTags[];
+ private String tagAttributes[][];
+
+ public JETCustomTagAssistProcessor(JETTextEditor editor) {
+ super(editor);
+ }
+
+ public String[] getRootTags() {
+ if (rootTags == null) {
+ Collection tagNames = new ArrayList();
+ String tagLibIds[] = TagLibraryManager.getInstance().getKnownLibraryIds();
+ for (int i = 0; i < tagLibIds.length; i++) {
+ String id = tagLibIds[i];
+ TagLibrary tagLib = TagLibraryManager.getInstance().getTagLibrary(id, true);
+ String names[] = tagLib.getTagNames();
+ for (int j = 0; j < names.length; j++) {
+ String name = names[j];
+ tagNames.add((new StringBuilder(String.valueOf(tagLib.getDefaultPrefix()))).append(":").append(name)
+ .toString());
+ }
+
+ }
+
+ rootTags = new String[tagNames.size()];
+ tagNames.toArray(rootTags);
+ }
+ return rootTags;
+ }
+
+ public String[][] getTagAttributes() {
+ if (tagAttributes == null) {
+ Map tagAttributesMap = new HashMap();
+ String tagLibIds[] = TagLibraryManager.getInstance().getKnownLibraryIds();
+ for (int i = 0; i < tagLibIds.length; i++) {
+ String id = tagLibIds[i];
+ TagLibrary tagLib = TagLibraryManager.getInstance().getTagLibrary(id, true);
+ String names[] = tagLib.getTagNames();
+ for (int j = 0; j < names.length; j++) {
+ String name = names[j];
+ TagDefinition tagDef = tagLib.getTagDefinition(name);
+ Collection tagAttributeDefinitions = tagDef.getAttributeDefinitions();
+ String attributeNames[] = new String[tagAttributeDefinitions.size() + 1];
+ attributeNames[0] = (new StringBuilder(String.valueOf(tagLib.getDefaultPrefix()))).append(":").append(name)
+ .toString();
+ int cpt = 1;
+ for (Iterator iterator = tagAttributeDefinitions.iterator(); iterator.hasNext();) {
+ TagAttributeDefinition tagAttributeDef = (TagAttributeDefinition) iterator.next();
+ attributeNames[cpt++] = tagAttributeDef.getName();
+ }
+
+ tagAttributesMap.put((new StringBuilder(String.valueOf(tagLib.getDefaultPrefix()))).append(":").append(name)
+ .toString(), attributeNames);
+ }
+
+ }
+
+ int cpt = 0;
+ tagAttributes = new String[tagAttributesMap.size()][];
+ for (Iterator iterator = tagAttributesMap.keySet().iterator(); iterator.hasNext();) {
+ String tagName = (String) iterator.next();
+ String attributeNames[] = (String[]) tagAttributesMap.get(tagName);
+ tagAttributes[cpt++] = attributeNames;
+ }
+
+ }
+ return tagAttributes;
+ }
+
+ protected char getRootTagPrevChar() {
+ return '<';
+ }
+
+ public IContextInformation[] computeContextInformation(ITextViewer viewer, int offset) {
+ return null;
+ }
+
+ public char[] getCompletionProposalAutoActivationCharacters() {
+ return null;
+ }
+
+ public char[] getContextInformationAutoActivationCharacters() {
+ return null;
+ }
+
+ public IContextInformationValidator getContextInformationValidator() {
+ return null;
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/contentassist/JETDirectiveAssistProcessor.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/contentassist/JETDirectiveAssistProcessor.java
new file mode 100644
index 0000000..9f89c14
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/contentassist/JETDirectiveAssistProcessor.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.contentassist;
+
+import org.eclipse.jet.internal.editor.JETTextEditor;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.contentassist.IContextInformation;
+import org.eclipse.jface.text.contentassist.IContextInformationValidator;
+
+public class JETDirectiveAssistProcessor extends AbstractXMLTagsBasedAssistProcessor {
+ private static String rootTags[] = { "jet", "taglib", "include", "start", "end" };
+ private static String tagAttributes[][] = { { "jet", "package", "class", "imports", "startTag", "endTag" },
+ { "taglib", "id", "prefix" }, { "include", "file" }, { "start", "id" }, { "end", "id" } };
+
+ public JETDirectiveAssistProcessor(JETTextEditor editor) {
+ super(editor);
+ }
+
+ public String[] getRootTags() {
+ return rootTags;
+ }
+
+ public String[][] getTagAttributes() {
+ return tagAttributes;
+ }
+
+ protected char getRootTagPrevChar() {
+ return '@';
+ }
+
+ public IContextInformation[] computeContextInformation(ITextViewer viewer, int offset) {
+ return null;
+ }
+
+ public char[] getCompletionProposalAutoActivationCharacters() {
+ return null;
+ }
+
+ public char[] getContextInformationAutoActivationCharacters() {
+ return null;
+ }
+
+ public IContextInformationValidator getContextInformationValidator() {
+ return null;
+ }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/contentassist/JETJavaDeclarationAssistProcessor.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/contentassist/JETJavaDeclarationAssistProcessor.java
new file mode 100644
index 0000000..84e5d6e
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/contentassist/JETJavaDeclarationAssistProcessor.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.contentassist;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.ui.text.java.IJavaCompletionProposal;
+import org.eclipse.jet.core.parser.ast.JETCompilationUnit;
+import org.eclipse.jet.core.parser.ast.JavaDeclaration;
+import org.eclipse.jet.internal.editor.JETEditorHelper;
+import org.eclipse.jet.internal.editor.JETTextEditor;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.IContextInformation;
+import org.eclipse.jface.text.contentassist.IContextInformationValidator;
+
+public class JETJavaDeclarationAssistProcessor extends AbstractJETAssistProcessor {
+ private char completionProposalAutoActivationCharacters[];
+
+ public JETJavaDeclarationAssistProcessor(JETTextEditor editor) {
+ super(editor);
+ completionProposalAutoActivationCharacters = editor.getEditorPreferenceStore().getString(
+ "content_assist_autoactivation_triggers_java").toCharArray();
+ }
+
+ public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
+ JETCompilationUnit cu = editor.requestCompilationUnit();
+ JavaDeclaration declaration = (JavaDeclaration) editor.getASTElement(offset);
+
+ // locate the java content first offset start in the JET document.
+ // a java element is of the form <% {java content} %>
+ // in order to have an exact matching between the completion offset in the JET document and the
+ // completion offset of the java content, we should perform the offset matching with the java content start
+ // not with the element offset start (the "<%" char offset start)
+ int javaContentStart = declaration.getJavaStart();
+
+ IJavaProject javaProject = editor.getJavaProject();
+ if (javaProject != null) {
+ Map mappingPositions = new HashMap();
+ String javaSource = editor.compilationHelper().getJavaCode(cu, mappingPositions);
+ int javaStartOffset = ((Position)mappingPositions.get(declaration)).offset;
+ int javaOffset = javaStartOffset + (offset - javaContentStart);
+
+ // check that the positions matches
+ JETEditorHelper.checkOffsetPositions(javaSource, viewer.getDocument().get(), javaContentStart, javaStartOffset, declaration.getJavaEnd() - javaContentStart);
+
+ IJavaCompletionProposal javaCompletionProposals[] = JETEditorHelper
+ .getJavaCompletionProposal(javaProject, cu, javaSource, viewer, javaOffset);
+ JETEditorHelper.adjustResults(javaCompletionProposals, offset);
+ return javaCompletionProposals;
+ } else {
+ return null;
+ }
+ }
+
+ public IContextInformation[] computeContextInformation(ITextViewer viewer, int offset) {
+ return null;
+ }
+
+ public char[] getCompletionProposalAutoActivationCharacters() {
+ return completionProposalAutoActivationCharacters;
+ }
+
+ public char[] getContextInformationAutoActivationCharacters() {
+ return null;
+ }
+
+ public IContextInformationValidator getContextInformationValidator() {
+ return null;
+ }
+
+ public String getErrorMessage() {
+ return null;
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/contentassist/JETJavaExpressionAssistProcessor.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/contentassist/JETJavaExpressionAssistProcessor.java
new file mode 100644
index 0000000..0984c62
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/contentassist/JETJavaExpressionAssistProcessor.java
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.contentassist;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.ui.text.java.IJavaCompletionProposal;
+import org.eclipse.jet.core.parser.ast.JETCompilationUnit;
+import org.eclipse.jet.core.parser.ast.JavaExpression;
+import org.eclipse.jet.internal.editor.JETEditorHelper;
+import org.eclipse.jet.internal.editor.JETTextEditor;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.IContextInformation;
+import org.eclipse.jface.text.contentassist.IContextInformationValidator;
+
+public class JETJavaExpressionAssistProcessor extends AbstractJETAssistProcessor {
+ private char completionProposalAutoActivationCharacters[];
+
+ /**
+ * @param editor
+ */
+ public JETJavaExpressionAssistProcessor(JETTextEditor editor) {
+ super(editor);
+ completionProposalAutoActivationCharacters = editor.getEditorPreferenceStore().getString(
+ "content_assist_autoactivation_triggers_java").toCharArray();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeCompletionProposals(org.eclipse.jface.text.ITextViewer, int)
+ */
+ public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
+ JETCompilationUnit cu = editor.requestCompilationUnit();
+ JavaExpression expression = (JavaExpression) editor.getASTElement(offset);
+
+ // locate the java content first offset start in the JET document.
+ // a java element is of the form <% {java content} %>
+ // in order to have an exact matching between the completion offset in the JET document and the
+ // completion offset of the java content, we should perform the offset matching with the java content start
+ // not with the element offset start (the "<%" char offset start)
+ int javaContentStart = expression.getJavaStart();
+
+ IJavaProject javaProject = editor.getJavaProject();
+ if (javaProject != null) {
+ // fetch the java content generated for all the AST elements till the current expression
+ Map mappingPositions = new HashMap();
+ String javaSource = editor.compilationHelper().getJavaCode(cu, mappingPositions);
+ int javaStartOffset = ((Position)mappingPositions.get(expression)).offset;
+ // check that the positions matches
+ JETEditorHelper.checkOffsetPositions(javaSource, viewer.getDocument().get(), javaContentStart, javaStartOffset, expression.getJavaEnd() - javaContentStart);
+
+ // calculate where the cursor would be (offset) within the javaSource...
+ int javaCursorOffset = javaStartOffset + (offset - javaContentStart);
+ IJavaCompletionProposal javaCompletionProposals[] = JETEditorHelper
+ .getJavaCompletionProposal(javaProject, cu, javaSource, viewer, javaCursorOffset);
+ JETEditorHelper.adjustResults(javaCompletionProposals, offset);
+ return javaCompletionProposals;
+ } else {
+ return null;
+ }
+ }
+
+ public IContextInformation[] computeContextInformation(ITextViewer viewer, int offset) {
+ return null;
+ }
+
+ public char[] getCompletionProposalAutoActivationCharacters() {
+ return completionProposalAutoActivationCharacters;
+ }
+
+ public char[] getContextInformationAutoActivationCharacters() {
+ return null;
+ }
+
+ public IContextInformationValidator getContextInformationValidator() {
+ return null;
+ }
+
+ public String getErrorMessage() {
+ return null;
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/contentassist/JETJavaScriptletAssistProcessor.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/contentassist/JETJavaScriptletAssistProcessor.java
new file mode 100644
index 0000000..56e7319
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/contentassist/JETJavaScriptletAssistProcessor.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.contentassist;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.ui.text.java.IJavaCompletionProposal;
+import org.eclipse.jet.core.parser.ast.JETCompilationUnit;
+import org.eclipse.jet.core.parser.ast.JavaScriptlet;
+import org.eclipse.jet.internal.editor.JETEditorHelper;
+import org.eclipse.jet.internal.editor.JETTextEditor;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.IContextInformation;
+import org.eclipse.jface.text.contentassist.IContextInformationValidator;
+
+public class JETJavaScriptletAssistProcessor extends AbstractJETAssistProcessor {
+ private char completionProposalAutoActivationCharacters[];
+
+ public JETJavaScriptletAssistProcessor(JETTextEditor editor) {
+ super(editor);
+ completionProposalAutoActivationCharacters = editor.getEditorPreferenceStore().getString("content_assist_autoactivation_triggers_java").toCharArray();
+ }
+
+ public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
+ JETCompilationUnit cu = editor.requestCompilationUnit();
+ JavaScriptlet scriptlet = (JavaScriptlet) editor.getASTElement(offset);
+
+ // locate the java content first offset start in the JET document.
+ // a java element is of the form <% {java content} %>
+ // in order to have an exact matching between the completion offset in
+ // the JET document and the
+ // completion offset of the java content, we should perform the offset
+ // matching with the java content start
+ // not with the element offset start (the "<%" char offset start)
+ int javaContentStart = scriptlet.getJavaStart();
+
+ IJavaProject javaProject = editor.getJavaProject();
+ if (javaProject != null) {
+ // fetch the java content generated for all the AST elements till
+ // the current expression
+ Map mappingPositions = new HashMap();
+ String javaSource = editor.compilationHelper().getJavaCode(cu, mappingPositions);
+ int javaStartOffset = ((Position) mappingPositions.get(scriptlet)).offset;
+ // check that the positions matches
+ JETEditorHelper.checkOffsetPositions(javaSource, viewer.getDocument().get(), javaContentStart, javaStartOffset, scriptlet.getJavaEnd() - javaContentStart);
+
+ // calculate where the cursor would be (offset) within the
+ // javaSource...
+ int javaCursorOffset = javaStartOffset + (offset - javaContentStart);
+ IJavaCompletionProposal javaCompletionProposals[] = JETEditorHelper.getJavaCompletionProposal(javaProject, cu, javaSource, viewer, javaCursorOffset);
+ JETEditorHelper.adjustJavaScriptletProposalResults(javaCompletionProposals, offset);
+ return javaCompletionProposals;
+ } else {
+ return null;
+ }
+ }
+
+ public IContextInformation[] computeContextInformation(ITextViewer viewer, int offset) {
+ return null;
+ }
+
+ public char[] getCompletionProposalAutoActivationCharacters() {
+ return completionProposalAutoActivationCharacters;
+ }
+
+ public char[] getContextInformationAutoActivationCharacters() {
+ return null;
+ }
+
+ public IContextInformationValidator getContextInformationValidator() {
+ return null;
+ }
+
+ public String getErrorMessage() {
+ return null;
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/contentassist/JETTagAssistProcessor.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/contentassist/JETTagAssistProcessor.java
new file mode 100644
index 0000000..77a5e98
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/contentassist/JETTagAssistProcessor.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.contentassist;
+
+import org.eclipse.jet.internal.editor.JETTextEditor;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.IContextInformation;
+import org.eclipse.jface.text.contentassist.IContextInformationValidator;
+
+
+public class JETTagAssistProcessor extends AbstractJETAssistProcessor {
+
+ public JETTagAssistProcessor(JETTextEditor editor) {
+ super(editor);
+ // TODO Auto-generated constructor stub
+ }
+
+ public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public IContextInformation[] computeContextInformation(ITextViewer viewer, int offset) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public char[] getCompletionProposalAutoActivationCharacters() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public char[] getContextInformationAutoActivationCharacters() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public IContextInformationValidator getContextInformationValidator() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getErrorMessage() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/formatter/JETCustomTagFormattingStrategy.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/formatter/JETCustomTagFormattingStrategy.java
new file mode 100644
index 0000000..b3cf4df
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/formatter/JETCustomTagFormattingStrategy.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.formatter;
+
+import org.eclipse.jface.text.formatter.IFormattingContext;
+import org.eclipse.jface.text.formatter.IFormattingStrategy;
+import org.eclipse.jface.text.formatter.IFormattingStrategyExtension;
+
+public class JETCustomTagFormattingStrategy implements IFormattingStrategy, IFormattingStrategyExtension {
+
+ public String format(String content, boolean isLineStart, String indentation, int[] positions) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void formatterStarts(String initialIndentation) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void formatterStops() {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void format() {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void formatterStarts(IFormattingContext context) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/formatter/JETDirectiveFormattingStrategy.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/formatter/JETDirectiveFormattingStrategy.java
new file mode 100644
index 0000000..0022ecf
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/formatter/JETDirectiveFormattingStrategy.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.formatter;
+
+import org.eclipse.jface.text.formatter.IFormattingContext;
+import org.eclipse.jface.text.formatter.IFormattingStrategy;
+import org.eclipse.jface.text.formatter.IFormattingStrategyExtension;
+
+public class JETDirectiveFormattingStrategy implements IFormattingStrategy, IFormattingStrategyExtension {
+
+ public String format(String content, boolean isLineStart, String indentation, int[] positions) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void formatterStarts(String initialIndentation) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void formatterStops() {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void format() {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void formatterStarts(IFormattingContext context) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/formatter/JETJavaDeclarationFormattingStrategy.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/formatter/JETJavaDeclarationFormattingStrategy.java
new file mode 100644
index 0000000..8d77d9f
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/formatter/JETJavaDeclarationFormattingStrategy.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.formatter;
+
+import org.eclipse.jface.text.formatter.IFormattingContext;
+import org.eclipse.jface.text.formatter.IFormattingStrategy;
+import org.eclipse.jface.text.formatter.IFormattingStrategyExtension;
+
+public class JETJavaDeclarationFormattingStrategy implements IFormattingStrategy, IFormattingStrategyExtension {
+
+ public String format(String content, boolean isLineStart, String indentation, int[] positions) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void formatterStarts(String initialIndentation) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void formatterStops() {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void format() {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void formatterStarts(IFormattingContext context) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/formatter/JETJavaExpressionFormattingStrategy.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/formatter/JETJavaExpressionFormattingStrategy.java
new file mode 100644
index 0000000..0360bcd
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/formatter/JETJavaExpressionFormattingStrategy.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.formatter;
+
+import org.eclipse.jface.text.formatter.IFormattingContext;
+import org.eclipse.jface.text.formatter.IFormattingStrategy;
+import org.eclipse.jface.text.formatter.IFormattingStrategyExtension;
+
+public class JETJavaExpressionFormattingStrategy implements IFormattingStrategy, IFormattingStrategyExtension {
+
+ public String format(String content, boolean isLineStart, String indentation, int[] positions) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void formatterStarts(String initialIndentation) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void formatterStops() {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void format() {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void formatterStarts(IFormattingContext context) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/formatter/JETJavaScriptletFormattingStrategy.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/formatter/JETJavaScriptletFormattingStrategy.java
new file mode 100644
index 0000000..a48304c
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/formatter/JETJavaScriptletFormattingStrategy.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.formatter;
+
+import org.eclipse.jface.text.formatter.IFormattingContext;
+import org.eclipse.jface.text.formatter.IFormattingStrategy;
+import org.eclipse.jface.text.formatter.IFormattingStrategyExtension;
+
+public class JETJavaScriptletFormattingStrategy implements IFormattingStrategy, IFormattingStrategyExtension {
+
+ public String format(String content, boolean isLineStart, String indentation, int[] positions) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void formatterStarts(String initialIndentation) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void formatterStops() {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void format() {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void formatterStarts(IFormattingContext context) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/i18n/TextEditorMessages.properties b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/i18n/TextEditorMessages.properties
new file mode 100644
index 0000000..7deaa82
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/i18n/TextEditorMessages.properties
@@ -0,0 +1 @@
+ContentAssistProposal.label = Content Assist
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/outline/JETOutlineContentProvider.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/outline/JETOutlineContentProvider.java
new file mode 100644
index 0000000..bc98f43
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/outline/JETOutlineContentProvider.java
@@ -0,0 +1,187 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.outline;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.eclipse.jet.core.parser.ast.JETASTElement;
+import org.eclipse.jet.core.parser.ast.JETCompilationUnit;
+import org.eclipse.jet.core.parser.ast.TextElement;
+import org.eclipse.jet.core.parser.ast.XMLBodyElement;
+import org.eclipse.jet.internal.editor.JETTextEditor;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+
+public class JETOutlineContentProvider implements ITreeContentProvider {
+ private ImportsContainerInput importContainerInput;
+ private CompilationUnitContainerInput astContainerInput;
+ private OutputPackageInput outputPackageInput;
+ private JETCompilationUnit cu;
+ private OutputClassInput outputClassInput;
+ private JETTextEditor editor;
+
+ public class OutputClassInput {
+ private JETCompilationUnit compilationUnit;
+ public OutputClassInput(JETCompilationUnit cu) {
+ this.compilationUnit = cu;
+ }
+ public JETCompilationUnit getCompilationUnit() {
+ return compilationUnit;
+ }
+ }
+
+ public class OutputPackageInput {
+ private JETCompilationUnit compilationUnit;
+ public OutputPackageInput(JETCompilationUnit cu) {
+ this.compilationUnit = cu;
+ }
+ public JETCompilationUnit getCompilationUnit() {
+ return compilationUnit;
+ }
+ }
+
+ public class ImportInput {
+ private ImportsContainerInput container;
+ private String imp;
+ public ImportInput(ImportsContainerInput container, String imp) {
+ this.container = container;
+ this.imp = imp;
+ }
+ public ImportsContainerInput getImportsContainerInput() {
+ return container;
+ }
+ public String toString() {
+ return imp;
+ }
+ }
+
+ public class ImportsContainerInput {
+ private JETCompilationUnit compilationUnit;
+ private Collection importInputs;
+ public ImportsContainerInput(JETCompilationUnit cu) {
+ this.compilationUnit = cu;
+ importInputs = new ArrayList();
+ for (Iterator iterator = cu.getImports().iterator(); iterator.hasNext();) {
+ String imp = (String) iterator.next();
+ importInputs.add(new ImportInput(this, imp));
+ }
+ }
+ public JETCompilationUnit getCompilationUnit() {
+ return compilationUnit;
+ }
+ public Collection getImportImputs() {
+ return importInputs;
+ }
+ }
+
+ public class CompilationUnitContainerInput {
+ private Collection bodyElements;
+
+ private JETCompilationUnit compilationUnit;
+
+ public CompilationUnitContainerInput(JETCompilationUnit cu) {
+ this.bodyElements = new ArrayList();
+ this.compilationUnit = cu;
+ for (Iterator iterator = cu.getBodyElements().iterator(); iterator.hasNext();) {
+ JETASTElement elt = (JETASTElement) iterator.next();
+ if (isFiltered(elt))
+ continue;
+ bodyElements.add(elt);
+ }
+ }
+
+ public Collection getFilteredASTElements() {
+ return bodyElements;
+ }
+
+ public JETCompilationUnit getCompilationUnit() {
+ return compilationUnit;
+ }
+
+ private boolean isFiltered(JETASTElement elt) {
+ if (elt instanceof TextElement) {
+ String text = new String(((TextElement) elt).getText());
+ text = text.replace('\r', ' ');
+ text = text.replace('\n', ' ');
+ text = text.replace('\t', ' ');
+ text = text.trim();
+ return text.length() == 0;
+ }
+ return false;
+ }
+ }
+
+ public JETOutlineContentProvider(JETTextEditor editor) {
+ this.editor = editor;
+ }
+
+ public void dispose() {
+ // TODO Auto-generated method stub
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ cu = (JETCompilationUnit) newInput;
+ }
+
+ public Object[] getElements(Object inputElement) {
+ Collection results = new ArrayList();
+ if (inputElement instanceof JETCompilationUnit) {
+ JETCompilationUnit cu = (JETCompilationUnit) inputElement;
+ results.add(outputPackageInput = new OutputPackageInput(cu));
+ results.add(importContainerInput = new ImportsContainerInput(cu));
+ results.add(astContainerInput = new CompilationUnitContainerInput(cu));
+ results.addAll(Arrays.asList(cu.getTagLibraryReferences()));
+ }
+ return results.toArray();
+ }
+
+ public Object[] getChildren(Object parentElement) {
+ if (parentElement == outputPackageInput) {
+ return new Object[] { outputClassInput = new OutputClassInput(cu) };
+ }
+ if (parentElement == importContainerInput) {
+ return importContainerInput.getImportImputs().toArray();
+ }
+ if (parentElement == astContainerInput) {
+ return astContainerInput.bodyElements.toArray();
+ }
+ if (parentElement instanceof XMLBodyElement) {
+ XMLBodyElement astElement = (XMLBodyElement) parentElement;
+ return astElement.getBodyElements().toArray();
+ }
+ return null;
+ }
+
+ public Object getParent(Object element) {
+ if (element == outputPackageInput || element == importContainerInput || element == astContainerInput)
+ return cu;
+ if (element == outputClassInput)
+ return outputPackageInput;
+ if (element instanceof ImportInput)
+ return ((ImportInput) element).getImportsContainerInput();
+ if (element instanceof JETASTElement) {
+ if (((JETASTElement) element).getParent() == cu)
+ return astContainerInput;
+ return ((JETASTElement) element).getParent();
+ }
+ if (importContainerInput.getCompilationUnit().getImports().contains(element))
+ return importContainerInput;
+ return null;
+ }
+
+ public boolean hasChildren(Object element) {
+ return (element instanceof XMLBodyElement) || (element == outputPackageInput) || (element == importContainerInput)
+ || (element == astContainerInput);
+ }
+}
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/outline/JETOutlineLabelProvider.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/outline/JETOutlineLabelProvider.java
new file mode 100644
index 0000000..de39325
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/outline/JETOutlineLabelProvider.java
@@ -0,0 +1,155 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.outline;
+
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jdt.ui.JavaUI;
+import org.eclipse.jet.compiler.CompileOptionsManager;
+import org.eclipse.jet.core.compiler.JETCompilerOptions;
+import org.eclipse.jet.core.parser.ast.Comment;
+import org.eclipse.jet.core.parser.ast.JETDirective;
+import org.eclipse.jet.core.parser.ast.JavaDeclaration;
+import org.eclipse.jet.core.parser.ast.JavaExpression;
+import org.eclipse.jet.core.parser.ast.JavaScriptlet;
+import org.eclipse.jet.core.parser.ast.TextElement;
+import org.eclipse.jet.core.parser.ast.XMLElement;
+import org.eclipse.jet.internal.editor.Activator;
+import org.eclipse.jet.internal.editor.JETEditorHelper;
+import org.eclipse.jet.internal.editor.JETTextEditor;
+import org.eclipse.jet.taglib.TagLibraryReference;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.ISharedImages;
+
+public class JETOutlineLabelProvider extends LabelProvider {
+ private JETTextEditor editor;
+
+ public JETOutlineLabelProvider(JETTextEditor editor) {
+ this.editor = editor;
+ }
+
+ public Image getImage(Object element) {
+ if (element instanceof Comment) {
+ return JavaUI.getSharedImages().getImage(org.eclipse.jdt.ui.ISharedImages.IMG_OBJS_JAVADOCTAG);
+ } else if (element instanceof JavaDeclaration) {
+ return JavaUI.getSharedImages().getImage(org.eclipse.jdt.ui.ISharedImages.IMG_OBJS_PUBLIC);
+ } else if (element instanceof JavaExpression) {
+ return JavaUI.getSharedImages().getImage(org.eclipse.jdt.ui.ISharedImages.IMG_OBJS_DEFAULT);
+ } else if (element instanceof JavaScriptlet) {
+ return JavaUI.getSharedImages().getImage(org.eclipse.jdt.ui.ISharedImages.IMG_OBJS_PUBLIC);
+ } else if (element instanceof JETDirective) {
+ return JavaUI.getSharedImages().getImage(org.eclipse.jdt.ui.ISharedImages.IMG_OBJS_PROTECTED);
+ } else if (element instanceof TextElement) {
+ return JavaUI.getSharedImages().getImage(org.eclipse.jdt.ui.ISharedImages.IMG_OBJS_IMPDECL);
+ } else if (element instanceof XMLElement) {
+ return JavaUI.getSharedImages().getImage(org.eclipse.jdt.ui.ISharedImages.IMG_OBJS_PROTECTED);
+ } else if (element instanceof JETOutlineContentProvider.ImportsContainerInput) {
+ return JavaUI.getSharedImages().getImage(org.eclipse.jdt.ui.ISharedImages.IMG_OBJS_IMPCONT);
+ } else if (element instanceof JETOutlineContentProvider.ImportInput) {
+ return JavaUI.getSharedImages().getImage(org.eclipse.jdt.ui.ISharedImages.IMG_OBJS_IMPDECL);
+ } else if (element instanceof JETOutlineContentProvider.CompilationUnitContainerInput) {
+ return Activator.getDefault().getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FILE);
+ } else if (element instanceof JETOutlineContentProvider.OutputPackageInput) {
+ return JavaUI.getSharedImages().getImage(org.eclipse.jdt.ui.ISharedImages.IMG_OBJS_PACKDECL);
+ } else if (element instanceof JETOutlineContentProvider.OutputClassInput) {
+ return JavaUI.getSharedImages().getImage(org.eclipse.jdt.ui.ISharedImages.IMG_OBJS_CUNIT);
+ } else if (element instanceof TagLibraryReference) {
+ return JavaUI.getSharedImages().getImage(org.eclipse.jdt.ui.ISharedImages.IMG_OBJS_ANNOTATION);
+ }
+ return super.getImage(element);
+ }
+
+ public String getText(Object element) {
+ if (element instanceof Comment)
+ return getShortText(((Comment) element).getCommentText());
+ if (element instanceof JavaDeclaration)
+ return (new StringBuilder("<%!")).append(getShortText(((JavaDeclaration) element).getJavaContent())).append("%>")
+ .toString();
+ if (element instanceof JavaExpression)
+ return (new StringBuilder("<%=")).append(getShortText(((JavaExpression) element).getJavaContent())).append("%>")
+ .toString();
+ if (element instanceof JavaScriptlet)
+ return (new StringBuilder("<%")).append(getShortText(((JavaScriptlet) element).getJavaContent())).append("%>")
+ .toString();
+ if (element instanceof JETDirective)
+ return (new StringBuilder("<%@")).append(((JETDirective) element).getName()).append(" ").append(
+ getAttributesText((JETDirective) element)).append("%>").toString();
+ if (element instanceof TextElement)
+ return getShortText(new String(((TextElement) element).getText()));
+ if (element instanceof XMLElement)
+ return (new StringBuilder("<")).append(((XMLElement) element).getName()).append(" ").append(
+ getAttributesText((XMLElement) element)).append(">").toString();
+ if (element instanceof JETOutlineContentProvider.ImportsContainerInput)
+ return "import declarations";
+ if (element instanceof JETOutlineContentProvider.CompilationUnitContainerInput)
+ return "Template AST";
+ if (element instanceof JETOutlineContentProvider.OutputPackageInput) {
+ String packageName = ((JETOutlineContentProvider.OutputPackageInput) element).getCompilationUnit()
+ .getOutputJavaPackage();
+ if (packageName == null) {
+ Map options = CompileOptionsManager.getOptions(editor.getJavaProject().getProject());
+ if (options.isEmpty())
+ options = JETCompilerOptions.getDefaultCompilerOptions();
+ packageName = (String) options.get("org.eclipse.jet.compiledTemplatePackage");
+ }
+ return packageName;
+ }
+ if (element instanceof JETOutlineContentProvider.OutputClassInput) {
+ String className = ((JETOutlineContentProvider.OutputClassInput) element).getCompilationUnit()
+ .getOutputJavaClassName();
+ if (className == null && (editor.getEditorInput() instanceof IFileEditorInput)) {
+ IFile file = ((IFileEditorInput) editor.getEditorInput()).getFile();
+ String inputName = file.getFullPath().removeFileExtension().lastSegment();
+ String baseClassName = JETEditorHelper.makeJavaClassName(inputName);
+ className = baseClassName;
+ }
+ return className;
+ }
+ if (element instanceof TagLibraryReference)
+ return ((TagLibraryReference) element).getTagLibraryId();
+ else
+ return super.getText(element);
+ }
+
+ private String getShortText(String text) {
+ if (text.length() > 25)
+ text = text.substring(0, 25) + "...";
+ return text;
+ }
+
+ private String getAttributesText(XMLElement element) {
+ Map attributes = element.getAttributes();
+ StringBuffer textBuffer = new StringBuffer(attributes.size() * 5);
+ for (Iterator iterator = attributes.keySet().iterator(); iterator.hasNext();) {
+ String attrName = (String) iterator.next();
+ String attrValue = (String) attributes.get(attrName);
+ textBuffer.append(attrName).append("=\"").append(attrValue).append("\"");
+ textBuffer.append(' ');
+ }
+ return textBuffer.toString();
+ }
+
+ private String getAttributesText(JETDirective directive) {
+ Map attributes = directive.getAttributes();
+ StringBuffer textBuffer = new StringBuffer(attributes.size() * 5);
+ for (Iterator iterator = attributes.keySet().iterator(); iterator.hasNext();) {
+ String attrName = (String) iterator.next();
+ String attrValue = (String) attributes.get(attrName);
+ textBuffer.append(attrName).append("=\"").append(attrValue).append("\"");
+ textBuffer.append(' ');
+ }
+ return textBuffer.toString();
+ }
+}
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/outline/JETOutlinePage.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/outline/JETOutlinePage.java
new file mode 100644
index 0000000..1a310d1
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/outline/JETOutlinePage.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.outline;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jet.core.parser.ast.JETCompilationUnit;
+import org.eclipse.jet.internal.editor.JETTextEditor;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.views.contentoutline.ContentOutlinePage;
+
+public class JETOutlinePage extends ContentOutlinePage implements IAdaptable {
+ private JETTextEditor editor;
+
+ private TreeViewer contentOutlineViewer;
+
+ public JETOutlinePage(JETTextEditor editor) {
+ this.editor = editor;
+ }
+
+ public void createControl(Composite parent) {
+ super.createControl(parent);
+ contentOutlineViewer = getTreeViewer();
+ contentOutlineViewer.addSelectionChangedListener(this);
+ contentOutlineViewer.setContentProvider(new JETOutlineContentProvider(editor));
+ contentOutlineViewer.setLabelProvider(new JETOutlineLabelProvider(editor));
+ setInput();
+ }
+
+ public void setInput() {
+ JETCompilationUnit cu = editor.requestCompilationUnit();
+ contentOutlineViewer.setInput(cu);
+ contentOutlineViewer.refresh();
+ }
+
+ public Object getAdapter(Class adapter) {
+ return null;
+ }
+}
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/partition/ITokenScannerProvider.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/partition/ITokenScannerProvider.java
new file mode 100644
index 0000000..0864668
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/partition/ITokenScannerProvider.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.partition;
+
+import org.eclipse.jface.text.rules.ITokenScanner;
+
+public interface ITokenScannerProvider {
+
+ public abstract ITokenScanner getTokenScanner(String s);
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/partition/JETDocumentPartitionScanner.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/partition/JETDocumentPartitionScanner.java
new file mode 100644
index 0000000..0491c0f
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/partition/JETDocumentPartitionScanner.java
@@ -0,0 +1,492 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.partition;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.jdt.ui.text.JavaSourceViewerConfiguration;
+import org.eclipse.jdt.ui.text.JavaTextTools;
+import org.eclipse.jet.internal.editor.JETTextEditor;
+import org.eclipse.jet.internal.editor.autoedit.JETTemplateAutoEditStrategy;
+import org.eclipse.jet.internal.editor.configuration.delegates.IJETDefaultTextColorerDelegate;
+import org.eclipse.jet.internal.editor.contentassist.JETCustomTagAssistProcessor;
+import org.eclipse.jet.internal.editor.contentassist.JETDirectiveAssistProcessor;
+import org.eclipse.jet.internal.editor.contentassist.JETJavaDeclarationAssistProcessor;
+import org.eclipse.jet.internal.editor.contentassist.JETJavaExpressionAssistProcessor;
+import org.eclipse.jet.internal.editor.contentassist.JETJavaScriptletAssistProcessor;
+import org.eclipse.jet.internal.editor.formatter.JETCustomTagFormattingStrategy;
+import org.eclipse.jet.internal.editor.formatter.JETDirectiveFormattingStrategy;
+import org.eclipse.jet.internal.editor.formatter.JETJavaDeclarationFormattingStrategy;
+import org.eclipse.jet.internal.editor.formatter.JETJavaExpressionFormattingStrategy;
+import org.eclipse.jet.internal.editor.formatter.JETJavaScriptletFormattingStrategy;
+import org.eclipse.jet.internal.editor.rules.ASTJETCommentRule;
+import org.eclipse.jet.internal.editor.rules.ASTJETCustomTagRule;
+import org.eclipse.jet.internal.editor.rules.ASTJETDirectiveRule;
+import org.eclipse.jet.internal.editor.rules.ASTJETJavaDeclarationRule;
+import org.eclipse.jet.internal.editor.rules.ASTJETJavaExpressionRule;
+import org.eclipse.jet.internal.editor.rules.ASTJETJavaScriptletRule;
+import org.eclipse.jet.internal.editor.scanners.JETCommentScanner;
+import org.eclipse.jet.internal.editor.scanners.JETCustomTagScanner;
+import org.eclipse.jet.internal.editor.scanners.JETDirectiveScanner;
+import org.eclipse.jet.internal.editor.scanners.JETJavaDeclarationScanner;
+import org.eclipse.jet.internal.editor.scanners.JETJavaExpressionScanner;
+import org.eclipse.jet.internal.editor.scanners.JETJavaScriptletScanner;
+import org.eclipse.jface.text.IAutoEditStrategy;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.contentassist.ContentAssistant;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.text.formatter.IFormattingStrategy;
+import org.eclipse.jface.text.presentation.IPresentationDamager;
+import org.eclipse.jface.text.presentation.IPresentationRepairer;
+import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
+import org.eclipse.jface.text.rules.IPredicateRule;
+import org.eclipse.jface.text.rules.ITokenScanner;
+import org.eclipse.jface.text.rules.RuleBasedPartitionScanner;
+import org.eclipse.jface.text.rules.Token;
+
+/**
+ * @author pelder
+ *
+ */
+public class JETDocumentPartitionScanner extends RuleBasedPartitionScanner {
+
+ public static final String JET_COMMENT = "__jet_comment";
+ public static final String JET_CUSTOM_TAG = "__jet_xml_tag";
+ public static final String JET_DIRECTIVE = "__jet_directive";
+ public static final String JET_JAVA_DECLARATION = "__jet_java_declaration";
+ public static final String JET_JAVA_EXPRESSION = "__jet_java_expression";
+ public static final String JET_JAVA_SCRIPTLET = "__jet_java_scriptlet";
+
+ private Map tokenScanners;
+ private Map damagerRepairers;
+ private Map damagersOnly;
+ private Map repairersOnly;
+ private Map completionProcessors;
+ private Map formattingStrategies;
+ private JETTextEditor editor;
+
+ private List contentTypes;
+ private JETCustomTagScanner tagScanner;
+ private JETDirectiveScanner directiveScanner;
+ private JETJavaDeclarationScanner declarationScanner;
+ private JETJavaExpressionScanner expressionScanner;
+ private JETJavaScriptletScanner scriptletScanner;
+ private JETCommentScanner commentScanner;
+
+ private IContentAssistProcessor tagAssistProcessor;
+ private IContentAssistProcessor scriptletAssistProcessor;
+ private IContentAssistProcessor expressionAssistProcessor;
+ private IContentAssistProcessor declarationAssistProcessor;
+
+ private IContentAssistProcessor directiveAssistProcessor;
+ private IFormattingStrategy tagFormattingStrategy;
+ private IFormattingStrategy scriptletFormattingStrategy;
+ private IFormattingStrategy expressionFormattingStrategy;
+ private IFormattingStrategy declarationFormattingStrategy;
+ private IFormattingStrategy directiveFormattingStrategy;
+
+ private PartitionScannerBasedDamagerRepairer jetTextContentDamagerRepairer;
+
+ private JavaSourceViewerConfiguration javaSourceViewConfig;
+
+ public JETDocumentPartitionScanner(JETTextEditor editor) {
+ this.editor = editor;
+ List rules = new ArrayList();
+ org.eclipse.jface.text.rules.IToken jetComments = new Token(
+ "__jet_comment");
+ org.eclipse.jface.text.rules.IToken jetCustomTags = new Token(
+ "__jet_xml_tag");
+ org.eclipse.jface.text.rules.IToken jetDirective = new Token(
+ "__jet_directive");
+ org.eclipse.jface.text.rules.IToken jetJavaDeclaration = new Token(
+ "__jet_java_declaration");
+ org.eclipse.jface.text.rules.IToken jetJavaExpression = new Token(
+ "__jet_java_expression");
+ org.eclipse.jface.text.rules.IToken jetJavaScriptlet = new Token(
+ "__jet_java_scriptlet");
+ rules.add(new ASTJETCommentRule(editor, jetComments));
+ rules.add(new ASTJETCustomTagRule(editor, jetCustomTags));
+ rules.add(new ASTJETDirectiveRule(editor, jetDirective));
+ rules.add(new ASTJETJavaDeclarationRule(editor, jetJavaDeclaration));
+ rules.add(new ASTJETJavaExpressionRule(editor, jetJavaExpression));
+ rules.add(new ASTJETJavaScriptletRule(editor, jetJavaScriptlet));
+ IPredicateRule result[] = new IPredicateRule[rules.size()];
+ result = (IPredicateRule[]) rules.toArray(result);
+ setPredicateRules(result);
+
+ // used to get Java auto edit strategies without using internal JDT
+ // APIs.
+ javaSourceViewConfig = new JavaSourceViewerConfiguration(
+ new JavaTextTools(editor.getEditorPreferenceStore())
+ .getColorManager(), editor.getEditorPreferenceStore(),
+ editor, "__dftl_partitioning");
+ }
+
+ public int getNextCharacterOffset() {
+ return fOffset;
+ }
+
+ public String[] getContentTypes() {
+ if (contentTypes == null) {
+ contentTypes = new ArrayList();
+ contentTypes.add(IDocument.DEFAULT_CONTENT_TYPE);
+ contentTypes.add("__jet_comment");
+ contentTypes.add("__jet_xml_tag");
+ contentTypes.add("__jet_directive");
+ contentTypes.add("__jet_java_declaration");
+ contentTypes.add("__jet_java_expression");
+ contentTypes.add("__jet_java_scriptlet");
+ }
+ String result[] = new String[contentTypes.size()];
+ result = (String[]) contentTypes.toArray(result);
+ return result;
+ }
+
+ private void initTokenScanners() {
+ tokenScanners = new HashMap();
+ tokenScanners.put("__jet_comment", getCommentScanner());
+ tokenScanners.put("__jet_xml_tag", getCustomTagScanner());
+ tokenScanners.put("__jet_directive", getDirectiveScanner());
+ tokenScanners
+ .put("__jet_java_declaration", getJavaDeclarationScanner());
+ tokenScanners.put("__jet_java_expression", getJavaExpressionScanner());
+ tokenScanners.put("__jet_java_scriptlet", getJavaScriptletScanner());
+ }
+
+ private void initCompletionProcessors(ContentAssistant assistant) {
+ completionProcessors = new HashMap();
+ completionProcessors.put(IDocument.DEFAULT_CONTENT_TYPE,
+ getTextElementAssistProcessor(assistant));
+ completionProcessors.put("__jet_comment",
+ getCommentAssistProcessor(assistant));
+ completionProcessors.put("__jet_xml_tag",
+ getCustomTagAssistProcessor(assistant));
+ completionProcessors.put("__jet_directive",
+ getDirectiveAssistProcessor(assistant));
+ completionProcessors.put("__jet_java_declaration",
+ getJavaDeclarationAssistProcessor(assistant));
+ completionProcessors.put("__jet_java_expression",
+ getJavaExpressionAssistProcessor(assistant));
+ completionProcessors.put("__jet_java_scriptlet",
+ getJavaScriptletAssistProcessor(assistant));
+ }
+
+ private void initFormattingStrategies() {
+ formattingStrategies = new HashMap();
+ formattingStrategies.put(IDocument.DEFAULT_CONTENT_TYPE,
+ getTextElementFormattingStrategy());
+ formattingStrategies.put("__jet_comment",
+ getCommentFormattingStrategy());
+ formattingStrategies.put("__jet_xml_tag",
+ getCustomTagFormattingStrategy());
+ formattingStrategies.put("__jet_directive",
+ getDirectiveFormattingStrategy());
+ formattingStrategies.put("__jet_java_declaration",
+ getJavaDeclarationFormattingStrategy());
+ formattingStrategies.put("__jet_java_expression",
+ getJavaExpressionFormattingStrategy());
+ formattingStrategies.put("__jet_java_scriptlet",
+ getJavaScriptletFormattingStrategy());
+ }
+
+ private void initDamagerRepairers() {
+ damagerRepairers = new HashMap();
+ damagerRepairers.put("__jet_comment",
+ createDefaultDamagerRepairer("__jet_comment"));
+ damagerRepairers.put("__jet_xml_tag",
+ createDefaultDamagerRepairer("__jet_xml_tag"));
+ damagerRepairers.put("__jet_directive",
+ createDefaultDamagerRepairer("__jet_directive"));
+ damagerRepairers.put("__jet_java_declaration",
+ createDefaultDamagerRepairer("__jet_java_declaration"));
+ damagerRepairers.put("__jet_java_expression",
+ createDefaultDamagerRepairer("__jet_java_expression"));
+ damagerRepairers.put("__jet_java_scriptlet",
+ createDefaultDamagerRepairer("__jet_java_scriptlet"));
+ if (createJETTextContentDamagerRepairer() != null)
+ damagerRepairers.put(IDocument.DEFAULT_CONTENT_TYPE,
+ jetTextContentDamagerRepairer);
+ }
+
+ private void initDamagersOnly() {
+ damagersOnly = new HashMap();
+ }
+
+ protected void initRepairersOnly() {
+ repairersOnly = new HashMap();
+ }
+
+ protected IFormattingStrategy getTextElementFormattingStrategy() {
+ return null;
+ }
+
+ protected IFormattingStrategy getCommentFormattingStrategy() {
+ return null;
+ }
+
+ protected IFormattingStrategy getCustomTagFormattingStrategy() {
+ if (tagFormattingStrategy == null)
+ tagFormattingStrategy = new JETCustomTagFormattingStrategy();
+ return tagFormattingStrategy;
+ }
+
+ protected IFormattingStrategy getJavaScriptletFormattingStrategy() {
+ if (scriptletFormattingStrategy == null)
+ scriptletFormattingStrategy = new JETJavaScriptletFormattingStrategy();
+ return scriptletFormattingStrategy;
+ }
+
+ protected IFormattingStrategy getJavaExpressionFormattingStrategy() {
+ if (expressionFormattingStrategy == null)
+ expressionFormattingStrategy = new JETJavaExpressionFormattingStrategy();
+ return expressionFormattingStrategy;
+ }
+
+ protected IFormattingStrategy getJavaDeclarationFormattingStrategy() {
+ if (declarationFormattingStrategy == null)
+ declarationFormattingStrategy = new JETJavaDeclarationFormattingStrategy();
+ return declarationFormattingStrategy;
+ }
+
+ protected IFormattingStrategy getDirectiveFormattingStrategy() {
+ if (directiveFormattingStrategy == null)
+ directiveFormattingStrategy = new JETDirectiveFormattingStrategy();
+ return directiveFormattingStrategy;
+ }
+
+ protected IContentAssistProcessor getTextElementAssistProcessor(
+ ContentAssistant assistant) {
+ return null;
+ }
+
+ protected IContentAssistProcessor getCommentAssistProcessor(
+ ContentAssistant assistant) {
+ return null;
+ }
+
+ protected IContentAssistProcessor getCustomTagAssistProcessor(
+ ContentAssistant assistant) {
+ if (tagAssistProcessor == null)
+ tagAssistProcessor = new JETCustomTagAssistProcessor(editor);
+ return tagAssistProcessor;
+ }
+
+ protected IContentAssistProcessor getJavaScriptletAssistProcessor(
+ ContentAssistant assistant) {
+ if (scriptletAssistProcessor == null)
+ scriptletAssistProcessor = new JETJavaScriptletAssistProcessor(
+ editor);
+ return scriptletAssistProcessor;
+ }
+
+ protected IContentAssistProcessor getJavaExpressionAssistProcessor(
+ ContentAssistant assistant) {
+ if (expressionAssistProcessor == null)
+ expressionAssistProcessor = new JETJavaExpressionAssistProcessor(
+ editor);
+ return expressionAssistProcessor;
+ }
+
+ protected IContentAssistProcessor getJavaDeclarationAssistProcessor(
+ ContentAssistant assistant) {
+ if (declarationAssistProcessor == null)
+ declarationAssistProcessor = new JETJavaDeclarationAssistProcessor(
+ editor);
+ return declarationAssistProcessor;
+ }
+
+ protected IContentAssistProcessor getDirectiveAssistProcessor(
+ ContentAssistant assistant) {
+ if (directiveAssistProcessor == null)
+ directiveAssistProcessor = new JETDirectiveAssistProcessor(editor);
+ return directiveAssistProcessor;
+ }
+
+ protected ITokenScanner getCommentScanner() {
+ org.eclipse.jet.internal.editor.configuration.JETTokenStyleManager tokenStyleManager = editor
+ .getTokenStyleManager();
+ org.eclipse.jface.preference.IPreferenceStore preferenceStore = editor
+ .getEditorPreferenceStore();
+ if (commentScanner == null)
+ commentScanner = new JETCommentScanner(tokenStyleManager,
+ preferenceStore);
+ return commentScanner;
+ }
+
+ protected ITokenScanner getCustomTagScanner() {
+ org.eclipse.jet.internal.editor.configuration.JETTokenStyleManager tokenStyleManager = editor
+ .getTokenStyleManager();
+ org.eclipse.jface.preference.IPreferenceStore preferenceStore = editor
+ .getEditorPreferenceStore();
+ if (tagScanner == null)
+ tagScanner = new JETCustomTagScanner(tokenStyleManager,
+ preferenceStore);
+ return tagScanner;
+ }
+
+ protected ITokenScanner getJavaScriptletScanner() {
+ org.eclipse.jet.internal.editor.configuration.JETTokenStyleManager tokenStyleManager = editor
+ .getTokenStyleManager();
+ org.eclipse.jface.preference.IPreferenceStore preferenceStore = editor
+ .getEditorPreferenceStore();
+ if (scriptletScanner == null)
+ scriptletScanner = new JETJavaScriptletScanner(tokenStyleManager,
+ preferenceStore);
+ return scriptletScanner;
+ }
+
+ protected ITokenScanner getJavaExpressionScanner() {
+ org.eclipse.jet.internal.editor.configuration.JETTokenStyleManager tokenStyleManager = editor
+ .getTokenStyleManager();
+ org.eclipse.jface.preference.IPreferenceStore preferenceStore = editor
+ .getEditorPreferenceStore();
+ if (expressionScanner == null)
+ expressionScanner = new JETJavaExpressionScanner(tokenStyleManager,
+ preferenceStore);
+ return expressionScanner;
+ }
+
+ protected ITokenScanner getJavaDeclarationScanner() {
+ org.eclipse.jet.internal.editor.configuration.JETTokenStyleManager tokenStyleManager = editor
+ .getTokenStyleManager();
+ org.eclipse.jface.preference.IPreferenceStore preferenceStore = editor
+ .getEditorPreferenceStore();
+ if (declarationScanner == null)
+ declarationScanner = new JETJavaDeclarationScanner(
+ tokenStyleManager, preferenceStore);
+ return declarationScanner;
+ }
+
+ protected ITokenScanner getDirectiveScanner() {
+ org.eclipse.jet.internal.editor.configuration.JETTokenStyleManager tokenStyleManager = editor
+ .getTokenStyleManager();
+ org.eclipse.jface.preference.IPreferenceStore preferenceStore = editor
+ .getEditorPreferenceStore();
+ if (directiveScanner == null)
+ directiveScanner = new JETDirectiveScanner(tokenStyleManager,
+ preferenceStore);
+ return directiveScanner;
+ }
+
+ public ITokenScanner getTokenScanner(String contentType) {
+ if (tokenScanners == null)
+ initTokenScanners();
+ ITokenScanner scanner = (ITokenScanner) tokenScanners.get(contentType);
+ return scanner;
+ }
+
+ private PartitionScannerBasedDamagerRepairer createJETTextContentDamagerRepairer() {
+ if (jetTextContentDamagerRepairer == null) {
+ IJETDefaultTextColorerDelegate delegate = editor
+ .getCurrentColorerDelegate();
+ if (delegate != null) {
+ RuleBasedPartitionScanner partitionScanner = new RuleBasedPartitionScanner();
+ partitionScanner.setPredicateRules(delegate
+ .getPartitioningRules());
+ jetTextContentDamagerRepairer = new PartitionScannerBasedDamagerRepairer(
+ partitionScanner, delegate);
+ }
+ }
+ return jetTextContentDamagerRepairer;
+ }
+
+ public void updateJETTextContentDamagerRepairer() {
+ if (jetTextContentDamagerRepairer != null) {
+ IJETDefaultTextColorerDelegate delegate = editor
+ .getCurrentColorerDelegate();
+ if (delegate != null) {
+ RuleBasedPartitionScanner partitionScanner = new RuleBasedPartitionScanner();
+ partitionScanner.setPredicateRules(delegate
+ .getPartitioningRules());
+ jetTextContentDamagerRepairer
+ .setPartitionScanner(partitionScanner);
+ jetTextContentDamagerRepairer.setTokenScannerProvider(delegate);
+ }
+ }
+ }
+
+ private DefaultDamagerRepairer createDefaultDamagerRepairer(
+ String contentType) {
+ ITokenScanner tokenScanner = getTokenScanner(contentType);
+ return tokenScanner != null ? new DefaultDamagerRepairer(tokenScanner)
+ : null;
+ }
+
+ public IPresentationDamager getDamager(String contentType) {
+ if (damagerRepairers == null)
+ initDamagerRepairers();
+ IPresentationDamager damager = (IPresentationDamager) damagerRepairers
+ .get(contentType);
+ if (damager == null) {
+ if (damagersOnly == null)
+ initDamagersOnly();
+ damager = (IPresentationDamager) damagersOnly.get(contentType);
+ }
+ return damager;
+ }
+
+ public IPresentationRepairer getRepairer(String contentType) {
+ if (damagerRepairers == null)
+ initDamagerRepairers();
+ IPresentationRepairer repairer = (IPresentationRepairer) damagerRepairers
+ .get(contentType);
+ if (repairer == null) {
+ if (repairersOnly == null)
+ initRepairersOnly();
+ repairer = (IPresentationRepairer) repairersOnly.get(contentType);
+ }
+ return repairer;
+ }
+
+ public IContentAssistProcessor getCompletionProcessor(String contentType,
+ ContentAssistant assistant) {
+ if (completionProcessors == null)
+ initCompletionProcessors(assistant);
+ IContentAssistProcessor processor = (IContentAssistProcessor) completionProcessors
+ .get(contentType);
+ return processor;
+ }
+
+ public IFormattingStrategy getFormattingStrategy(String contentType) {
+ if (formattingStrategies == null)
+ initFormattingStrategies();
+ IFormattingStrategy formatter = (IFormattingStrategy) formattingStrategies
+ .get(contentType);
+ return formatter;
+ }
+
+ public IAutoEditStrategy[] getAutoEditStrategies(String contentType) {
+ IAutoEditStrategy result[] = (IAutoEditStrategy[]) null;
+ if ("__jet_directive".equals(contentType))
+ result = (new IAutoEditStrategy[] { new JETTemplateAutoEditStrategy() });
+ else if ("__jet_java_scriptlet".equals(contentType)) {
+ final List resultList = new ArrayList();
+ resultList.addAll(Arrays.asList(javaSourceViewConfig
+ .getAutoEditStrategies(null, "__dftl_partitioning")));
+ resultList.add(new JETTemplateAutoEditStrategy());
+ result = (IAutoEditStrategy[]) resultList
+ .toArray(new IAutoEditStrategy[resultList.size()]);
+ } else if ("__jet_java_declaration".equals(contentType)) {
+ final List resultList = new ArrayList();
+ resultList.addAll(Arrays.asList(javaSourceViewConfig
+ .getAutoEditStrategies(null, "__dftl_partitioning")));
+ resultList.add(new JETTemplateAutoEditStrategy());
+ result = (IAutoEditStrategy[]) resultList
+ .toArray(new IAutoEditStrategy[resultList.size()]);
+ }
+ return result;
+ }
+
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/partition/PartitionScannerBasedDamagerRepairer.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/partition/PartitionScannerBasedDamagerRepairer.java
new file mode 100644
index 0000000..3375b7f
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/partition/PartitionScannerBasedDamagerRepairer.java
@@ -0,0 +1,151 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.partition;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.text.*;
+import org.eclipse.jface.text.presentation.IPresentationDamager;
+import org.eclipse.jface.text.presentation.IPresentationRepairer;
+import org.eclipse.jface.text.rules.*;
+import org.eclipse.swt.custom.StyleRange;
+
+public class PartitionScannerBasedDamagerRepairer implements IPresentationDamager, IPresentationRepairer {
+
+ protected IDocument document;
+ protected IPartitionTokenScanner partitionScanner;
+ protected ITokenScannerProvider tokenScannerProvider;
+ protected TextAttribute defaultTextAttribute;
+
+ public PartitionScannerBasedDamagerRepairer(IPartitionTokenScanner scanner, ITokenScannerProvider provider) {
+ Assert.isNotNull(scanner);
+ Assert.isNotNull(provider);
+ partitionScanner = scanner;
+ tokenScannerProvider = provider;
+ defaultTextAttribute = new TextAttribute(null);
+ }
+
+ public void setDocument(IDocument document) {
+ this.document = document;
+ }
+
+ public void setPartitionScanner(IPartitionTokenScanner partitionScanner) {
+ this.partitionScanner = partitionScanner;
+ }
+
+ public void setTokenScannerProvider(ITokenScannerProvider provider) {
+ tokenScannerProvider = provider;
+ }
+
+ public IRegion getDamageRegion(ITypedRegion partition, DocumentEvent e, boolean documentPartitioningChanged) {
+ if (!documentPartitioningChanged)
+ return new Region(partition.getOffset(), partition.getLength());
+ else
+ return partition;
+ }
+
+ public void createPresentation(TextPresentation presentation, ITypedRegion region) {
+ partitionScanner.setRange(document, region.getOffset(), region.getLength());
+ String lastContentType = null;
+ int partitionScannerTokenLength = 0;
+ int partitionScannerTokenOffset = region.getOffset();
+ do {
+ IToken partitionToken = partitionScanner.nextToken();
+ if (partitionToken.isEOF()) {
+ if (lastContentType != null) {
+ ITokenScanner tokenScanner = tokenScannerProvider.getTokenScanner(lastContentType);
+ if (tokenScanner == null)
+ addRange(presentation, partitionScanner.getTokenOffset(), partitionScanner.getTokenLength(),
+ defaultTextAttribute);
+ else
+ applyTokenScanner(presentation, partitionScannerTokenLength, partitionScannerTokenOffset, tokenScanner);
+ }
+ break;
+ }
+ String contentType = getTokenContentType(partitionToken);
+ if (contentType == null)
+ contentType = IDocument.DEFAULT_CONTENT_TYPE;
+ if (contentType.equals(lastContentType)) {
+ partitionScannerTokenLength += partitionScanner.getTokenLength();
+ } else {
+ if (lastContentType != null) {
+ ITokenScanner tokenScanner = tokenScannerProvider.getTokenScanner(lastContentType);
+ if (tokenScanner == null)
+ addRange(presentation, partitionScanner.getTokenOffset(), partitionScanner.getTokenLength(),
+ defaultTextAttribute);
+ else
+ applyTokenScanner(presentation, partitionScannerTokenLength, partitionScannerTokenOffset, tokenScanner);
+ }
+ lastContentType = contentType;
+ partitionScannerTokenOffset = partitionScanner.getTokenOffset();
+ partitionScannerTokenLength = partitionScanner.getTokenLength();
+ }
+ } while (true);
+ }
+
+ private void applyTokenScanner(TextPresentation presentation, int partitionScannerTokenLength,
+ int partitionScannerTokenOffset, ITokenScanner tokenScanner) {
+ int lastStart = partitionScannerTokenOffset;
+ int length = 0;
+ boolean firstToken = true;
+ IToken lastToken = Token.UNDEFINED;
+ TextAttribute lastAttribute = getTokenTextAttribute(lastToken);
+ tokenScanner.setRange(document, partitionScannerTokenOffset, partitionScannerTokenLength);
+ do {
+ IToken token = tokenScanner.nextToken();
+ if (!token.isEOF()) {
+ TextAttribute attribute = getTokenTextAttribute(token);
+ if (lastAttribute != null && lastAttribute.equals(attribute)) {
+ length += tokenScanner.getTokenLength();
+ firstToken = false;
+ } else {
+ if (!firstToken)
+ addRange(presentation, lastStart, length, lastAttribute);
+ firstToken = false;
+ lastToken = token;
+ lastAttribute = attribute;
+ lastStart = tokenScanner.getTokenOffset();
+ length = tokenScanner.getTokenLength();
+ }
+ } else {
+ addRange(presentation, lastStart, length, lastAttribute);
+ return;
+ }
+ } while (true);
+ }
+
+ protected String getTokenContentType(IToken token) {
+ Object data = token.getData();
+ if (data instanceof String)
+ return (String) data;
+ else
+ return null;
+ }
+
+ protected TextAttribute getTokenTextAttribute(IToken token) {
+ Object data = token.getData();
+ if (data instanceof TextAttribute)
+ return (TextAttribute) data;
+ else
+ return defaultTextAttribute;
+ }
+
+ protected void addRange(TextPresentation presentation, int offset, int length, TextAttribute attr) {
+ if (attr != null) {
+ int style = attr.getStyle();
+ int fontStyle = style & 3;
+ StyleRange styleRange = new StyleRange(offset, length, attr.getForeground(), attr.getBackground(), fontStyle);
+ styleRange.strikeout = (style & 0x20000000) != 0;
+ styleRange.underline = (style & 0x40000000) != 0;
+ styleRange.font = attr.getFont();
+ presentation.addStyleRange(styleRange);
+ }
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/ASTElementScannerRule.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/ASTElementScannerRule.java
new file mode 100644
index 0000000..ca144d6
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/ASTElementScannerRule.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.rules;
+
+import org.eclipse.jet.core.parser.ast.JETASTElement;
+import org.eclipse.jet.internal.editor.JETTextEditor;
+import org.eclipse.jet.internal.editor.partition.JETDocumentPartitionScanner;
+import org.eclipse.jface.text.rules.*;
+
+public abstract class ASTElementScannerRule implements IPredicateRule {
+ private JETTextEditor editor;
+
+ private IToken successToken;
+
+ public ASTElementScannerRule(JETTextEditor editor, IToken successToken) {
+ this.editor = editor;
+ this.successToken = successToken;
+ }
+
+ public IToken getSuccessToken() {
+ return successToken;
+ }
+
+ public IToken evaluate(ICharacterScanner scanner) {
+ return evaluate(scanner, false);
+ }
+
+ public IToken evaluate(ICharacterScanner scanner, boolean resume) {
+ JETDocumentPartitionScanner jetScanner = (JETDocumentPartitionScanner) scanner;
+ int offset = jetScanner.getNextCharacterOffset();
+ JETASTElement element = editor.getASTElement(offset);
+ if (element != null && isAcceptedElement(element)) {
+ int length = element.getEnd() - offset;
+ for (int i = 0; i < length; i++)
+ scanner.read();
+
+ return successToken;
+ } else {
+ return Token.UNDEFINED;
+ }
+ }
+
+ protected abstract boolean isAcceptedElement(JETASTElement jet2astelement);
+}
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/ASTJETCommentRule.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/ASTJETCommentRule.java
new file mode 100644
index 0000000..16c47b8
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/ASTJETCommentRule.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.rules;
+
+import org.eclipse.jet.core.parser.ast.Comment;
+import org.eclipse.jet.core.parser.ast.JETASTElement;
+import org.eclipse.jet.internal.editor.JETTextEditor;
+import org.eclipse.jface.text.rules.IToken;
+
+public class ASTJETCommentRule extends ASTElementScannerRule {
+
+ public ASTJETCommentRule(JETTextEditor editor, IToken token) {
+ super(editor, token);
+ }
+
+ protected boolean isAcceptedElement(JETASTElement element) {
+ return element instanceof Comment;
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/ASTJETCustomTagRule.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/ASTJETCustomTagRule.java
new file mode 100644
index 0000000..9459603
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/ASTJETCustomTagRule.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.rules;
+
+import org.eclipse.jet.core.parser.ast.JETASTElement;
+import org.eclipse.jet.core.parser.ast.XMLBodyElementEnd;
+import org.eclipse.jet.core.parser.ast.XMLElement;
+import org.eclipse.jet.internal.editor.JETTextEditor;
+import org.eclipse.jface.text.rules.IToken;
+
+public class ASTJETCustomTagRule extends ASTElementScannerRule {
+
+ public ASTJETCustomTagRule(JETTextEditor editor, IToken token) {
+ super(editor, token);
+ }
+
+ protected boolean isAcceptedElement(JETASTElement element) {
+ return (element instanceof XMLElement) || (element instanceof XMLBodyElementEnd);
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/ASTJETDirectiveRule.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/ASTJETDirectiveRule.java
new file mode 100644
index 0000000..0cc04fa
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/ASTJETDirectiveRule.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.rules;
+
+import org.eclipse.jet.core.parser.ast.JETDirective;
+import org.eclipse.jet.core.parser.ast.JETASTElement;
+import org.eclipse.jet.internal.editor.JETTextEditor;
+import org.eclipse.jface.text.rules.IToken;
+
+public class ASTJETDirectiveRule extends ASTElementScannerRule {
+
+ public ASTJETDirectiveRule(JETTextEditor editor, IToken token) {
+ super(editor, token);
+ }
+
+ protected boolean isAcceptedElement(JETASTElement element) {
+ return element instanceof JETDirective;
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/ASTJETJavaDeclarationRule.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/ASTJETJavaDeclarationRule.java
new file mode 100644
index 0000000..592d6d5
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/ASTJETJavaDeclarationRule.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.rules;
+
+import org.eclipse.jet.core.parser.ast.JETASTElement;
+import org.eclipse.jet.core.parser.ast.JavaDeclaration;
+import org.eclipse.jet.internal.editor.JETTextEditor;
+import org.eclipse.jface.text.rules.IToken;
+
+public class ASTJETJavaDeclarationRule extends ASTElementScannerRule {
+
+ public ASTJETJavaDeclarationRule(JETTextEditor editor, IToken token) {
+ super(editor, token);
+ }
+
+ protected boolean isAcceptedElement(JETASTElement element) {
+ return element instanceof JavaDeclaration;
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/ASTJETJavaExpressionRule.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/ASTJETJavaExpressionRule.java
new file mode 100644
index 0000000..3c3a81d
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/ASTJETJavaExpressionRule.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.rules;
+
+import org.eclipse.jet.core.parser.ast.JETASTElement;
+import org.eclipse.jet.core.parser.ast.JavaExpression;
+import org.eclipse.jet.internal.editor.JETTextEditor;
+import org.eclipse.jface.text.rules.IToken;
+
+public class ASTJETJavaExpressionRule extends ASTElementScannerRule {
+
+ public ASTJETJavaExpressionRule(JETTextEditor editor, IToken token) {
+ super(editor, token);
+ }
+
+ protected boolean isAcceptedElement(JETASTElement element) {
+ return element instanceof JavaExpression;
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/ASTJETJavaScriptletRule.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/ASTJETJavaScriptletRule.java
new file mode 100644
index 0000000..bdd5cb4
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/ASTJETJavaScriptletRule.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.rules;
+
+import org.eclipse.jet.core.parser.ast.JETASTElement;
+import org.eclipse.jet.core.parser.ast.JavaScriptlet;
+import org.eclipse.jet.internal.editor.JETTextEditor;
+import org.eclipse.jface.text.rules.IToken;
+
+public class ASTJETJavaScriptletRule extends ASTElementScannerRule {
+
+ public ASTJETJavaScriptletRule(JETTextEditor editor, IToken token) {
+ super(editor, token);
+ }
+
+ protected boolean isAcceptedElement(JETASTElement element) {
+ return element instanceof JavaScriptlet;
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/JETBracketRule.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/JETBracketRule.java
new file mode 100644
index 0000000..980a944
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/JETBracketRule.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2005 - 2006 Joel Cheuoua & others.
+ * 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:
+ * Joel Cheuoua - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.rules;
+
+import org.eclipse.jface.text.rules.ICharacterScanner;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.MultiLineRule;
+import org.eclipse.jface.text.rules.Token;
+
+/**
+ * @author jcheuoua
+ * @version $Revision: 1.2 $
+ */
+public class JETBracketRule extends MultiLineRule {
+ protected IToken token;
+
+ /**
+ * Constructor for JETBracketRule.
+ *
+ * @param token
+ * IToken
+ */
+ public JETBracketRule(IToken token) {
+ super("<%", "%>", token);
+ this.token = token;
+ }
+
+ /**
+ * Method evaluate.
+ *
+ * @param scanner
+ * ICharacterScanner
+ * @return IToken
+ * @see org.eclipse.jface.text.rules.IRule#evaluate(ICharacterScanner)
+ */
+ public IToken evaluate(ICharacterScanner scanner) {
+ char c = (char) scanner.read();
+ if (c == '%') { // we're reaching the end of the token zone
+ c = (char) scanner.read();
+ if (c == '>') {
+ return token;
+ } else {
+ scanner.unread();
+ scanner.unread();
+ return Token.UNDEFINED;
+ }
+ }
+ if (c == '<') { // we're at the beginning of the token zone
+ c = (char) scanner.read();
+ if (c == '%') {
+ c = (char) scanner.read();
+ if (c == '!' || c == '@' || c == '=' || c == '-') {
+ return token;
+ } else {
+ scanner.unread();
+ return token;
+ }
+ } else {
+ scanner.unread();
+ scanner.unread();
+ return Token.UNDEFINED;
+ }
+ } else {
+ scanner.unread();
+ return Token.UNDEFINED;
+ }
+ }
+}
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/JETCommentRule.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/JETCommentRule.java
new file mode 100644
index 0000000..6501748
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/JETCommentRule.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.rules;
+
+import org.eclipse.jface.text.rules.*;
+
+public class JETCommentRule extends MultiLineRule {
+
+ public JETCommentRule(IToken token) {
+ super("<%--", "--%>", token, '\\');
+ }
+}
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/JETCustomTagRule.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/JETCustomTagRule.java
new file mode 100644
index 0000000..9f0b30b
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/JETCustomTagRule.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.rules;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.jet.taglib.TagLibrary;
+import org.eclipse.jet.taglib.TagLibraryManager;
+import org.eclipse.jface.text.rules.*;
+
+public class JETCustomTagRule extends MultiLineRule {
+ private Set tagElementNames;
+ public JETCustomTagRule(IToken token) {
+ super("<", ">", token, '\\');
+ String[] tagLibIds = TagLibraryManager.getInstance().getKnownLibraryIds();
+ tagElementNames = new HashSet();
+ for (int i = 0; i < tagLibIds.length; i++) {
+ String id = tagLibIds[i];
+ TagLibrary tagLib = TagLibraryManager.getInstance().getTagLibrary(id, true);
+ String[] names = tagLib.getTagNames();
+ for (int j = 0; j < names.length; j++) {
+ String name = names[j];
+ tagElementNames.add(tagLib.getDefaultPrefix() + ":" + name);
+ }
+ }
+ }
+
+ public IToken evaluate(ICharacterScanner scanner, boolean resume) {
+ // TODO Auto-generated method stub
+ return super.evaluate(scanner, resume);
+ }
+
+ protected boolean sequenceDetected(ICharacterScanner scanner, char[] sequence, boolean eofAllowed) {
+ int c = scanner.read();
+ int readCount = 1;
+ if (sequence[0] == '<') {
+ // Cut through obvious cases
+ if ((char)c == '%') {
+ // processing jet instruction - abort
+ scanner.unread();
+ return false;
+ }
+ if ((char)c == '?') {
+ // processing instruction - abort
+ scanner.unread();
+ return false;
+ }
+ if ((char)c == '!') {
+ scanner.unread();
+ // comment - abort
+ return false;
+ }
+ StringBuffer name = new StringBuffer();
+ while ((char)c == ' ') {
+ c = scanner.read();
+ readCount++;
+ }
+ if (c == ICharacterScanner.EOF) {
+ for (int i = 0; i < readCount; i++) scanner.unread();
+ return false;
+ }
+ while ((char)c != ' ' && c != ICharacterScanner.EOF && (char)c != '>') {
+ name.append((char)c);
+ c = scanner.read();
+ readCount++;
+ }
+ if (tagElementNames.contains(name.toString())) {
+ scanner.unread();
+ return true;
+ } else {
+ for (int i = 0; i < readCount; i++) scanner.unread();
+ return false;
+ }
+ } else if (sequence[0] == '>') {
+ scanner.unread();
+ }
+ return super.sequenceDetected(scanner, sequence, eofAllowed);
+ }
+}
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/JETDirectiveRule.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/JETDirectiveRule.java
new file mode 100644
index 0000000..44ffd12
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/JETDirectiveRule.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.rules;
+
+import org.eclipse.jface.text.rules.*;
+
+public class JETDirectiveRule extends MultiLineRule {
+
+ public JETDirectiveRule(IToken token) {
+ super("<%@", "%>", token, '\\');
+ }
+}
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/JETJavaDeclarationRule.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/JETJavaDeclarationRule.java
new file mode 100644
index 0000000..c3204be
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/JETJavaDeclarationRule.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.rules;
+
+import org.eclipse.jface.text.rules.*;
+
+public class JETJavaDeclarationRule extends MultiLineRule {
+
+ public JETJavaDeclarationRule(IToken token) {
+ super("<%!", "%>", token, '\\');
+ }
+}
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/JETJavaExpressionRule.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/JETJavaExpressionRule.java
new file mode 100644
index 0000000..585f458
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/JETJavaExpressionRule.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.rules;
+
+import org.eclipse.jface.text.rules.*;
+
+public class JETJavaExpressionRule extends MultiLineRule {
+
+ public JETJavaExpressionRule(IToken token) {
+ super("<%=", "%>", token, '\\');
+ }
+}
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/JETJavaScriptletRule.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/JETJavaScriptletRule.java
new file mode 100644
index 0000000..6b3f0d1
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/JETJavaScriptletRule.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.rules;
+
+import org.eclipse.jface.text.rules.*;
+
+public class JETJavaScriptletRule extends MultiLineRule {
+
+ public JETJavaScriptletRule(IToken token) {
+ super("<%", "%>", token, '\\');
+ }
+}
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/WordListDetectorRule.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/WordListDetectorRule.java
new file mode 100644
index 0000000..fba4825
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/rules/WordListDetectorRule.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.rules;
+
+import java.util.Collection;
+
+import org.eclipse.jface.text.rules.ICharacterScanner;
+import org.eclipse.jface.text.rules.IRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.Token;
+
+public class WordListDetectorRule implements IRule {
+ private IToken success;
+ private String[] words;
+ public WordListDetectorRule(IToken token, String[] words) {
+ this.success = token;
+ this.words = words;
+ }
+ public WordListDetectorRule(IToken token, Collection words) {
+ this.success = token;
+ this.words = new String[words.size()];
+ this.words = (String[]) words.toArray(this.words);
+ }
+ public IToken evaluate(ICharacterScanner scanner) {
+ char c = (char) scanner.read();
+ char initialChar = c;
+ for (int i = 0; i < words.length; i++) {
+ String keyword = words[i];
+ int index = 0;
+ while (keyword.length() > index && c == keyword.charAt(index)) {
+ c = (char) scanner.read();
+ index++;
+ }
+ if (index == keyword.length()) {// success for this keyword ... we'read until the end
+ scanner.unread(); // there is one read in excess at the end
+ return success;
+ }
+ // otherwise, unread and proceed to the next word
+ for (int j = 0; j < index; j++) {
+ scanner.unread();
+ }
+ c = initialChar;
+ }
+ scanner.unread();
+ return Token.UNDEFINED;
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/scanners/JETCommentScanner.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/scanners/JETCommentScanner.java
new file mode 100644
index 0000000..8796590
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/scanners/JETCommentScanner.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.scanners;
+
+import org.eclipse.jet.internal.editor.configuration.JETEditorPreferenceConstants;
+import org.eclipse.jet.internal.editor.configuration.JETTokenStyleManager;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.rules.RuleBasedScanner;
+
+public class JETCommentScanner extends RuleBasedScanner {
+
+ public JETCommentScanner(JETTokenStyleManager manager, IPreferenceStore preferenceStore) {
+ setDefaultReturnToken(manager.requestToken("__jet_comment",
+ JETEditorPreferenceConstants.JET_COMMENT_FG_COLOR,
+ JETEditorPreferenceConstants.JET_DEFAULT_BG_COLOR,
+ JETEditorPreferenceConstants.JET_COMMENT_BOLD,
+ JETEditorPreferenceConstants.JET_COMMENT_ITALIC,
+ null,
+ null));
+ }
+}
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/scanners/JETCustomTagScanner.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/scanners/JETCustomTagScanner.java
new file mode 100644
index 0000000..7f3e7de
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/scanners/JETCustomTagScanner.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.scanners;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.jdt.ui.PreferenceConstants;
+import org.eclipse.jet.internal.editor.configuration.JETEditorPreferenceConstants;
+import org.eclipse.jet.internal.editor.configuration.JETTokenStyleManager;
+import org.eclipse.jet.internal.editor.rules.WordListDetectorRule;
+import org.eclipse.jet.taglib.TagLibrary;
+import org.eclipse.jet.taglib.TagLibraryManager;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.rules.IRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.RuleBasedScanner;
+import org.eclipse.jface.text.rules.SingleLineRule;
+
+public class JETCustomTagScanner extends RuleBasedScanner {
+
+ public JETCustomTagScanner(JETTokenStyleManager manager,
+ IPreferenceStore preferenceStore) {
+ IToken tagElementName = manager.requestToken(
+ "__jet_custom_tag_elementName",
+ JETEditorPreferenceConstants.JET_CUSTOM_TAG_FG_COLOR,
+ JETEditorPreferenceConstants.JET_DEFAULT_BG_COLOR,
+ JETEditorPreferenceConstants.JET_CUSTOM_TAG_BOLD,
+ JETEditorPreferenceConstants.JET_CUSTOM_TAG_ITALIC, null,
+ JETEditorPreferenceConstants.JET_CUSTOM_TAG_UNDERLINE);
+
+ IToken string = manager.requestToken("__jet_custom_tag_string",
+ PreferenceConstants.EDITOR_STRING_COLOR,
+ JETEditorPreferenceConstants.JET_DEFAULT_BG_COLOR,
+ PreferenceConstants.EDITOR_STRING_BOLD,
+ PreferenceConstants.EDITOR_STRING_ITALIC, null,
+ PreferenceConstants.EDITOR_STRING_UNDERLINE);
+
+ Collection tagNames = new ArrayList();
+ String[] tagLibIds = TagLibraryManager.getInstance()
+ .getKnownLibraryIds();
+ for (int i = 0; i < tagLibIds.length; i++) {
+ String id = tagLibIds[i];
+ TagLibrary tagLib = TagLibraryManager.getInstance().getTagLibrary(
+ id, true);
+ String[] names = tagLib.getTagNames();
+ for (int j = 0; j < names.length; j++) {
+ String name = names[j];
+ tagNames.add(tagLib.getDefaultPrefix() + ":" + name);
+ }
+ }
+
+ IRule[] rules = new IRule[3];
+
+ // Add rule for double quotes
+ rules[0] = new SingleLineRule("\"", "\"", string, '\\');
+ // Add a rule for single quotes
+ rules[1] = new SingleLineRule("'", "'", string, '\\');
+ // Add a rule for the custom tag identifier
+ rules[2] = new WordListDetectorRule(tagElementName, tagNames);
+
+ setRules(rules);
+
+ IToken defaultReturnToken = manager.requestToken("__jet_custom_tag",
+ JETEditorPreferenceConstants.JET_CUSTOM_TAG_FG_COLOR,
+ JETEditorPreferenceConstants.JET_DEFAULT_BG_COLOR, null, null,
+ null, null);
+ setDefaultReturnToken(defaultReturnToken);
+ }
+}
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/scanners/JETDefaultContentScanner.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/scanners/JETDefaultContentScanner.java
new file mode 100644
index 0000000..8f7eb08
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/scanners/JETDefaultContentScanner.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.scanners;
+
+import org.eclipse.jet.internal.editor.configuration.JETTokenStyleManager;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.rules.RuleBasedScanner;
+
+public class JETDefaultContentScanner extends RuleBasedScanner {
+
+ public JETDefaultContentScanner(JETTokenStyleManager manager, IPreferenceStore preferenceStore) {
+ setDefaultReturnToken(manager.requestDefaultToken());
+ }
+}
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/scanners/JETDirectiveScanner.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/scanners/JETDirectiveScanner.java
new file mode 100644
index 0000000..8d197c4
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/scanners/JETDirectiveScanner.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.scanners;
+
+import org.eclipse.jdt.ui.PreferenceConstants;
+import org.eclipse.jet.internal.editor.configuration.JETEditorPreferenceConstants;
+import org.eclipse.jet.internal.editor.configuration.JETTokenStyleManager;
+import org.eclipse.jet.internal.editor.rules.JETBracketRule;
+import org.eclipse.jet.internal.editor.rules.WordListDetectorRule;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.rules.IRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.RuleBasedScanner;
+import org.eclipse.jface.text.rules.SingleLineRule;
+
+public class JETDirectiveScanner extends RuleBasedScanner {
+
+ public JETDirectiveScanner(JETTokenStyleManager manager, IPreferenceStore preferenceStore) {
+ IToken keyword = manager.requestToken("__jet_directive_keyword",
+ JETEditorPreferenceConstants.JET_DIRECTIVE_FG_COLOR,
+ JETEditorPreferenceConstants.JET_DEFAULT_BG_COLOR,
+ JETEditorPreferenceConstants.JET_DIRECTIVE_KEYWORD_BOLD,
+ JETEditorPreferenceConstants.JET_DIRECTIVE_ITALIC,
+ null,
+ JETEditorPreferenceConstants.JET_DIRECTIVE_UNDERLINE);
+ IToken string = manager.requestToken("__jet_directive_string",
+ PreferenceConstants.EDITOR_STRING_COLOR,
+ JETEditorPreferenceConstants.JET_DEFAULT_BG_COLOR,
+ PreferenceConstants.EDITOR_STRING_BOLD,
+ PreferenceConstants.EDITOR_STRING_ITALIC,
+ null,
+ PreferenceConstants.EDITOR_STRING_UNDERLINE);
+ IToken bracket = manager.requestToken("__jet_bracket",
+ PreferenceConstants.EDITOR_JAVA_KEYWORD_COLOR,
+ JETEditorPreferenceConstants.JET_DEFAULT_BG_COLOR,
+ PreferenceConstants.EDITOR_JAVA_KEYWORD_BOLD,
+ PreferenceConstants.EDITOR_JAVA_KEYWORD_ITALIC,
+ null,
+ PreferenceConstants.EDITOR_JAVA_KEYWORD_UNDERLINE);
+
+ IRule[] rules = new IRule[4];
+
+ // Add rule for brackets
+ rules[0] = new JETBracketRule(bracket);
+ // Add rule for double quotes
+ rules[1] = new SingleLineRule("\"", "\"", string, '\\');
+ // Add a rule for single quotes
+ rules[2] = new SingleLineRule("'", "'", string, '\\');
+ // Add word rule for reserved jet directive words
+ rules[3] = new WordListDetectorRule(keyword, new String[] {"jet", "taglib", "include", "start", "end"});
+
+ setRules(rules);
+
+ IToken defaultReturnToken = manager.requestToken("__jet_directive",
+ JETEditorPreferenceConstants.JET_DIRECTIVE_FG_COLOR,
+ JETEditorPreferenceConstants.JET_DEFAULT_BG_COLOR,
+ JETEditorPreferenceConstants.JET_DIRECTIVE_BOLD,
+ JETEditorPreferenceConstants.JET_DIRECTIVE_ITALIC,
+ null,
+ JETEditorPreferenceConstants.JET_DIRECTIVE_UNDERLINE);
+ setDefaultReturnToken(defaultReturnToken);
+ }
+}
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/scanners/JETJavaCodeScanner.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/scanners/JETJavaCodeScanner.java
new file mode 100644
index 0000000..6ca8441
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/scanners/JETJavaCodeScanner.java
@@ -0,0 +1,251 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.scanners;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jdt.ui.PreferenceConstants;
+import org.eclipse.jet.internal.editor.configuration.JETTokenStyleManager;
+import org.eclipse.jface.text.rules.BufferedRuleBasedScanner;
+import org.eclipse.jface.text.rules.ICharacterScanner;
+import org.eclipse.jface.text.rules.IRule;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.IWordDetector;
+import org.eclipse.jface.text.rules.MultiLineRule;
+import org.eclipse.jface.text.rules.SingleLineRule;
+import org.eclipse.jface.text.rules.Token;
+import org.eclipse.jface.text.rules.WordRule;
+
+
+/**
+ * A Java code scanner for JET-java sections.
+ */
+public class JETJavaCodeScanner extends BufferedRuleBasedScanner {
+
+ /**
+ * Rule to detect java operators.
+ */
+ private class OperatorRule implements IRule {
+ private char[] JAVA_OPERATORS= { ';', '.', '=', '/', '\\', '+', '-', '*', '<', '>', ':', '?', '!', ',', '|', '&', '^', '%', '~'};
+ private IToken fToken;
+
+ public OperatorRule(IToken token) {
+ fToken= token;
+ }
+
+ public boolean isOperator(char character) {
+ for (int index= 0; index < JAVA_OPERATORS.length; index++) {
+ if (JAVA_OPERATORS[index] == character)
+ return true;
+ }
+ return false;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.rules.IRule#evaluate(org.eclipse.jface.text.rules.ICharacterScanner)
+ */
+ public IToken evaluate(ICharacterScanner scanner) {
+ int character= scanner.read();
+ if (isOperator((char) character)) {
+ do {
+ character= scanner.read();
+ } while (isOperator((char) character));
+ scanner.unread();
+ return fToken;
+ } else {
+ scanner.unread();
+ return Token.UNDEFINED;
+ }
+ }
+ }
+
+ /**
+ * Rule to detect java brackets.
+ */
+ private class BracketRule implements IRule {
+
+ private char[] JAVA_BRACKETS= { '(', ')', '{', '}', '[', ']' };
+ private final IToken success;
+
+ public BracketRule(IToken token) {
+ success= token;
+ }
+
+ public boolean isBracket(char character) {
+ for (int index= 0; index < JAVA_BRACKETS.length; index++) {
+ if (JAVA_BRACKETS[index] == character)
+ return true;
+ }
+ return false;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.rules.IRule#evaluate(org.eclipse.jface.text.rules.ICharacterScanner)
+ */
+ public IToken evaluate(ICharacterScanner scanner) {
+ int character= scanner.read();
+ if (isBracket((char) character)) {
+ do {
+ character= scanner.read();
+ } while (isBracket((char) character));
+ scanner.unread();
+ return success;
+ } else {
+ scanner.unread();
+ return Token.UNDEFINED;
+ }
+ }
+ }
+
+ private class JavaWordDetector implements IWordDetector {
+ /*
+ * @see IWordDetector#isWordStart
+ */
+ public boolean isWordStart(char c) {
+ return Character.isJavaIdentifierStart(c);
+ }
+
+ /*
+ * @see IWordDetector#isWordPart
+ */
+ public boolean isWordPart(char c) {
+ return Character.isJavaIdentifierPart(c);
+ }
+ }
+
+ private String[] javaKeywords= {
+ "abstract", //$NON-NLS-1$
+ "break", //$NON-NLS-1$
+ "case", "catch", "class", "const", "continue", //$NON-NLS-5$ //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
+ "default", "do", //$NON-NLS-2$ //$NON-NLS-1$
+ "else", "extends", //$NON-NLS-2$ //$NON-NLS-1$
+ "final", "finally", "for", //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
+ "goto", //$NON-NLS-1$
+ "if", "implements", "import", "instanceof", "interface", //$NON-NLS-5$ //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
+ "native", "new", //$NON-NLS-2$ //$NON-NLS-1$
+ "package", "private", "protected", "public", //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
+ "static", "super", "switch", "synchronized", //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
+ "this", "throw", "throws", "transient", "try", //$NON-NLS-5$ //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
+ "volatile", //$NON-NLS-1$
+ "while", //$NON-NLS-1$
+ "assert", //$NON-NLS-1$
+ "enum", //$NON-NLS-1$
+ "return" //$NON-NLS-1$
+ };
+
+ private String[] javaTypes= { "class", "interface", "void", "boolean", "char", "byte", "short", "strictfp", "int", "long", "float", "double" }; //$NON-NLS-1$ //$NON-NLS-5$ //$NON-NLS-7$ //$NON-NLS-6$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-2$
+
+ private String[] javaConstants= { "false", "null", "true" }; //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
+
+ private String defaultBg;
+ /**
+ * Creates a Java code scanner
+ *
+ * @param manager the color manager
+ * @param store the preference store
+ */
+ public JETJavaCodeScanner(JETTokenStyleManager manager, String defaultBg) {
+ this.defaultBg = defaultBg;
+ List rules = createRules(manager);
+ IRule[] result= new IRule[rules.size()];
+ rules.toArray(result);
+ setRules(result);
+ }
+
+
+ protected List createRules(JETTokenStyleManager manager) {
+ List rules= new ArrayList();
+
+ // Add rule for character constants.
+ IToken token= manager.requestToken("__jet_java_string_" + defaultBg,
+ PreferenceConstants.EDITOR_STRING_COLOR,
+ defaultBg,
+ PreferenceConstants.EDITOR_STRING_BOLD,
+ PreferenceConstants.EDITOR_STRING_ITALIC,
+ PreferenceConstants.EDITOR_STRING_STRIKETHROUGH,
+ PreferenceConstants.EDITOR_STRING_UNDERLINE);
+ rules.add(new SingleLineRule("'", "'", token, '\\')); //$NON-NLS-2$ //$NON-NLS-1$
+
+
+ // Add generic whitespace rule.
+ //rules.add(new WhitespaceRule(new JETWhitespaceDetector()));
+
+ // Add rule for multiline comments
+ token= manager.requestToken("__jet_java_multi_line_comment_" + defaultBg,
+ PreferenceConstants.EDITOR_MULTI_LINE_COMMENT_COLOR,
+ defaultBg,
+ PreferenceConstants.EDITOR_MULTI_LINE_COMMENT_BOLD,
+ PreferenceConstants.EDITOR_MULTI_LINE_COMMENT_ITALIC,
+ PreferenceConstants.EDITOR_MULTI_LINE_COMMENT_STRIKETHROUGH,
+ PreferenceConstants.EDITOR_MULTI_LINE_COMMENT_UNDERLINE);
+ MultiLineRule multiLineCommentsRule = new MultiLineRule("/*", "*/", token, '\\');
+ rules.add(multiLineCommentsRule);
+
+ // Add rule for single line comments
+ token= manager.requestToken("__jet_java_single_line_comment_" + defaultBg,
+ PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_COLOR,
+ defaultBg,
+ PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_BOLD,
+ PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_ITALIC,
+ PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_STRIKETHROUGH,
+ PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_UNDERLINE);
+ SingleLineRule singleLineCommentsRule = new SingleLineRule("//", null, token);
+ rules.add(singleLineCommentsRule);
+
+ // Add word rule for keywords,types and constants
+ JavaWordDetector wordDetector= new JavaWordDetector();
+ token= manager.requestToken("__jet_java_default_" + defaultBg,
+ PreferenceConstants.EDITOR_JAVA_DEFAULT_COLOR,
+ defaultBg,
+ PreferenceConstants.EDITOR_JAVA_DEFAULT_BOLD,
+ PreferenceConstants.EDITOR_JAVA_DEFAULT_ITALIC,
+ PreferenceConstants.EDITOR_JAVA_DEFAULT_STRIKETHROUGH,
+ PreferenceConstants.EDITOR_JAVA_DEFAULT_UNDERLINE);
+ WordRule wordRule= new WordRule(wordDetector, token);
+
+ token = manager.requestToken("__jet_java_keyword_" + defaultBg,
+ PreferenceConstants.EDITOR_JAVA_KEYWORD_COLOR,
+ defaultBg,
+ PreferenceConstants.EDITOR_JAVA_KEYWORD_BOLD,
+ PreferenceConstants.EDITOR_JAVA_KEYWORD_ITALIC,
+ PreferenceConstants.EDITOR_JAVA_KEYWORD_STRIKETHROUGH,
+ PreferenceConstants.EDITOR_JAVA_KEYWORD_UNDERLINE);
+ for (int i=0; i<javaKeywords.length; i++)
+ wordRule.addWord(javaKeywords[i], token);
+ for (int i=0; i<javaTypes.length; i++)
+ wordRule.addWord(javaTypes[i], token);
+ for (int i=0; i<javaConstants.length; i++)
+ wordRule.addWord(javaConstants[i], token);
+ rules.add(wordRule);
+
+ // Add rule for operators
+ token = manager.requestToken("__jet_java_operator_" + defaultBg,
+ PreferenceConstants.EDITOR_JAVA_OPERATOR_COLOR,
+ defaultBg,
+ PreferenceConstants.EDITOR_JAVA_OPERATOR_BOLD,
+ PreferenceConstants.EDITOR_JAVA_OPERATOR_ITALIC,
+ PreferenceConstants.EDITOR_JAVA_OPERATOR_STRIKETHROUGH,
+ PreferenceConstants.EDITOR_JAVA_OPERATOR_UNDERLINE);;
+ rules.add(new OperatorRule(token));
+
+ // Add rule for brackets
+ token = manager.requestToken("__jet_java_bracket_" + defaultBg,
+ PreferenceConstants.EDITOR_JAVA_BRACKET_COLOR,
+ defaultBg,
+ PreferenceConstants.EDITOR_JAVA_BRACKET_BOLD,
+ PreferenceConstants.EDITOR_JAVA_BRACKET_ITALIC,
+ PreferenceConstants.EDITOR_JAVA_BRACKET_STRIKETHROUGH,
+ PreferenceConstants.EDITOR_JAVA_BRACKET_UNDERLINE);;
+ rules.add(new BracketRule(token));
+ return rules;
+ }
+}
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/scanners/JETJavaDeclarationScanner.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/scanners/JETJavaDeclarationScanner.java
new file mode 100644
index 0000000..7a10c14
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/scanners/JETJavaDeclarationScanner.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.scanners;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jdt.ui.PreferenceConstants;
+import org.eclipse.jet.internal.editor.configuration.JETEditorPreferenceConstants;
+import org.eclipse.jet.internal.editor.configuration.JETTokenStyleManager;
+import org.eclipse.jet.internal.editor.rules.JETBracketRule;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.rules.IToken;
+
+public class JETJavaDeclarationScanner extends JETJavaCodeScanner {
+ public JETJavaDeclarationScanner(JETTokenStyleManager manager, IPreferenceStore preferenceStore) {
+ super(manager, JETEditorPreferenceConstants.JET_DEFAULT_BG_COLOR);
+ setDefaultReturnToken(manager.requestDefaultToken());
+ }
+
+ protected List createRules(JETTokenStyleManager manager) {
+ List rules = new ArrayList();
+ List parentRules = super.createRules(manager);
+ IToken bracket = manager.requestToken("__jet_bracket",
+ PreferenceConstants.EDITOR_JAVA_KEYWORD_COLOR,
+ JETEditorPreferenceConstants.JET_DEFAULT_BG_COLOR,
+ PreferenceConstants.EDITOR_JAVA_KEYWORD_BOLD,
+ PreferenceConstants.EDITOR_JAVA_KEYWORD_ITALIC,
+ null,
+ PreferenceConstants.EDITOR_JAVA_KEYWORD_UNDERLINE);
+ // Add rule for brackets
+ rules.add(new JETBracketRule(bracket));
+ rules.addAll(parentRules);
+ return rules;
+ }
+}
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/scanners/JETJavaExpressionScanner.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/scanners/JETJavaExpressionScanner.java
new file mode 100644
index 0000000..dd8396e
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/scanners/JETJavaExpressionScanner.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.scanners;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jdt.ui.PreferenceConstants;
+import org.eclipse.jet.internal.editor.configuration.JETEditorPreferenceConstants;
+import org.eclipse.jet.internal.editor.configuration.JETTokenStyleManager;
+import org.eclipse.jet.internal.editor.rules.JETBracketRule;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.rules.IToken;
+
+public class JETJavaExpressionScanner extends JETJavaCodeScanner {
+
+ public JETJavaExpressionScanner(JETTokenStyleManager manager, IPreferenceStore preferenceStore) {
+ super(manager, JETEditorPreferenceConstants.JET_EXPRESSION_BG_COLOR);
+ setDefaultReturnToken(manager.requestToken("__jet_expression_default",
+ PreferenceConstants.EDITOR_JAVA_KEYWORD_COLOR,
+ JETEditorPreferenceConstants.JET_EXPRESSION_BG_COLOR,
+ null,
+ null,
+ null,
+ null));
+ }
+
+ protected List createRules(JETTokenStyleManager manager) {
+ List rules = new ArrayList();
+ List parentRules = super.createRules(manager);
+ IToken bracket = manager.requestToken("__jet_expression_bracket",
+ PreferenceConstants.EDITOR_JAVA_KEYWORD_COLOR,
+ JETEditorPreferenceConstants.JET_EXPRESSION_BG_COLOR,
+ PreferenceConstants.EDITOR_JAVA_KEYWORD_BOLD,
+ PreferenceConstants.EDITOR_JAVA_KEYWORD_ITALIC,
+ null,
+ PreferenceConstants.EDITOR_JAVA_KEYWORD_UNDERLINE);
+ // Add rule for brackets
+ rules.add(new JETBracketRule(bracket));
+ rules.addAll(parentRules);
+ return rules;
+ }
+}
diff --git a/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/scanners/JETJavaScriptletScanner.java b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/scanners/JETJavaScriptletScanner.java
new file mode 100644
index 0000000..47ed3e8
--- /dev/null
+++ b/org.eclipse.jet.editor/src/org/eclipse/jet/internal/editor/scanners/JETJavaScriptletScanner.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 ILOG and others.
+ * 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:
+ * Joel Cheuoua - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jet.internal.editor.scanners;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jdt.ui.PreferenceConstants;
+import org.eclipse.jet.internal.editor.configuration.JETEditorPreferenceConstants;
+import org.eclipse.jet.internal.editor.configuration.JETTokenStyleManager;
+import org.eclipse.jet.internal.editor.rules.JETBracketRule;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.rules.IToken;
+
+public class JETJavaScriptletScanner extends JETJavaCodeScanner {
+
+ public JETJavaScriptletScanner(JETTokenStyleManager manager, IPreferenceStore preferenceStore) {
+ super(manager, JETEditorPreferenceConstants.JET_DEFAULT_BG_COLOR);
+ setDefaultReturnToken(manager.requestDefaultToken());
+ }
+
+ protected List createRules(JETTokenStyleManager manager) {
+ List rules = new ArrayList();
+ List parentRules = super.createRules(manager);
+ IToken bracket = manager.requestToken("__jet_bracket",
+ PreferenceConstants.EDITOR_JAVA_KEYWORD_COLOR,
+ JETEditorPreferenceConstants.JET_DEFAULT_BG_COLOR,
+ PreferenceConstants.EDITOR_JAVA_KEYWORD_BOLD,
+ PreferenceConstants.EDITOR_JAVA_KEYWORD_ITALIC,
+ null,
+ PreferenceConstants.EDITOR_JAVA_KEYWORD_UNDERLINE);
+ // Add rule for brackets
+ rules.add(new JETBracketRule(bracket));
+ rules.addAll(parentRules);
+ return rules;
+ }
+}
diff --git a/portfolio/org.eclipse.egf.eclipse.resources.mgt/.classpath b/portfolio/org.eclipse.egf.eclipse.resources.mgt/.classpath
new file mode 100644
index 0000000..304e861
--- /dev/null
+++ b/portfolio/org.eclipse.egf.eclipse.resources.mgt/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/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/portfolio/org.eclipse.egf.eclipse.resources.mgt/.project b/portfolio/org.eclipse.egf.eclipse.resources.mgt/.project
new file mode 100644
index 0000000..032ddda
--- /dev/null
+++ b/portfolio/org.eclipse.egf.eclipse.resources.mgt/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.eclipse.resources.mgt</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/portfolio/org.eclipse.egf.eclipse.resources.mgt/.settings/org.eclipse.core.resources.prefs b/portfolio/org.eclipse.egf.eclipse.resources.mgt/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..883ca24
--- /dev/null
+++ b/portfolio/org.eclipse.egf.eclipse.resources.mgt/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:50:07 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/portfolio/org.eclipse.egf.eclipse.resources.mgt/.settings/org.eclipse.jdt.core.prefs b/portfolio/org.eclipse.egf.eclipse.resources.mgt/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..0b93a46
--- /dev/null
+++ b/portfolio/org.eclipse.egf.eclipse.resources.mgt/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Tue Jan 26 14:14:14 CET 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/portfolio/org.eclipse.egf.eclipse.resources.mgt/META-INF/MANIFEST.MF b/portfolio/org.eclipse.egf.eclipse.resources.mgt/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..3dab43d
--- /dev/null
+++ b/portfolio/org.eclipse.egf.eclipse.resources.mgt/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-Vendor: %providerName
+Bundle-ClassPath: .
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.egf.eclipse.resources.mgt;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
+Require-Bundle:
+ org.eclipse.egf.model.ftask;visibility:=reexport
+Bundle-Activator:
+ org.eclipse.egf.eclipse.resources.mgt.Activator
+Export-Package:
+ org.eclipse.egf.eclipse.resources.mgt
diff --git a/portfolio/org.eclipse.egf.eclipse.resources.mgt/about.html b/portfolio/org.eclipse.egf.eclipse.resources.mgt/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/portfolio/org.eclipse.egf.eclipse.resources.mgt/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/portfolio/org.eclipse.egf.eclipse.resources.mgt/build.properties b/portfolio/org.eclipse.egf.eclipse.resources.mgt/build.properties
new file mode 100644
index 0000000..6527c25
--- /dev/null
+++ b/portfolio/org.eclipse.egf.eclipse.resources.mgt/build.properties
@@ -0,0 +1,22 @@
+##
+# 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
+##
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ .settings/,\
+ fcs/,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html
+src.includes = about.html,\
+ .settings/,\
+ .svn/
diff --git a/portfolio/org.eclipse.egf.eclipse.resources.mgt/fcs/Resources.fcore b/portfolio/org.eclipse.egf.eclipse.resources.mgt/fcs/Resources.fcore
new file mode 100644
index 0000000..7473f6c
--- /dev/null
+++ b/portfolio/org.eclipse.egf.eclipse.resources.mgt/fcs/Resources.fcore
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1"
+ xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:ftask="http://www.eclipse.org/egf/1.0.0/ftask"
+ xmlns:types="http://www.eclipse.org/egf/1.0.0/types">
+ <ftask:Task xmi:id="_d5v1IAqCEd-JA8Js2pdQ0g" description="Create an eclipse project. Does nothing if the project already exists. Open it if it exists but is closed."
+ name="CreateProject" kind="java" implementation="org.eclipse.egf.eclipse.resources.mgt.CreateProjectTask">
+ <contractContainer xmi:id="_1v2SIAqDEd-JA8Js2pdQ0g">
+ <contracts xmi:id="_1_fQoAqDEd-JA8Js2pdQ0g" description="Name of the project to be created."
+ name="name" mandatory="true">
+ <type xmi:type="types:TypeString" xmi:id="_2wOKAAqDEd-JA8Js2pdQ0g"/>
+ </contracts>
+ <contracts xmi:id="_1YyAgAqEEd-JA8Js2pdQ0g" description="Path of the project. Returns a string representation of this path which uses the platform-dependent path separator defined by java.io.File."
+ name="path" mode="Out">
+ <type xmi:type="types:TypeString" xmi:id="_2c5I4AqEEd-JA8Js2pdQ0g"/>
+ </contracts>
+ </contractContainer>
+ </ftask:Task>
+ <ftask:Task xmi:id="_bLHVECakEd-RhP-A_BvFzw" name="CreateJavaProject" kind="java"
+ implementation="org.eclipse.egf.eclipse.resources.mgt.CreateJavaProjectTask">
+ <contractContainer xmi:id="_FbHXACalEd-RhP-A_BvFzw">
+ <contracts xmi:id="_Fs2AMCalEd-RhP-A_BvFzw" name="name" mandatory="true">
+ <type xmi:type="types:TypeString" xmi:id="_H7ELQCalEd-RhP-A_BvFzw"/>
+ </contracts>
+ <contracts xmi:id="_VDCuICalEd-RhP-A_BvFzw" name="execution.environment">
+ <type xmi:type="types:TypeString" xmi:id="_V4FfwCalEd-RhP-A_BvFzw" value="J2SE-1.5"/>
+ </contracts>
+ </contractContainer>
+ </ftask:Task>
+</xmi:XMI>
diff --git a/portfolio/org.eclipse.egf.eclipse.resources.mgt/plugin.properties b/portfolio/org.eclipse.egf.eclipse.resources.mgt/plugin.properties
new file mode 100644
index 0000000..1d55350
--- /dev/null
+++ b/portfolio/org.eclipse.egf.eclipse.resources.mgt/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 Eclipse Resources Management (Incubation)
+providerName=Eclipse Modeling Project
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.eclipse.resources.mgt/plugin.xml b/portfolio/org.eclipse.egf.eclipse.resources.mgt/plugin.xml
new file mode 100644
index 0000000..7629f66
--- /dev/null
+++ b/portfolio/org.eclipse.egf.eclipse.resources.mgt/plugin.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<!--
+ 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="fcs/Resources.fcore">
+ </fcore>
+ </extension>
+
+</plugin>
diff --git a/portfolio/org.eclipse.egf.eclipse.resources.mgt/src/org/eclipse/egf/eclipse/resources/mgt/Activator.java b/portfolio/org.eclipse.egf.eclipse.resources.mgt/src/org/eclipse/egf/eclipse/resources/mgt/Activator.java
new file mode 100644
index 0000000..abc22d6
--- /dev/null
+++ b/portfolio/org.eclipse.egf.eclipse.resources.mgt/src/org/eclipse/egf/eclipse/resources/mgt/Activator.java
@@ -0,0 +1,54 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.eclipse.resources.mgt;
+
+import org.eclipse.egf.common.activator.EGFAbstractPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * @author Matthieu Helleboid
+ *
+ */
+public class Activator extends EGFAbstractPlugin {
+
+ /**
+ * Shared instance.
+ */
+ protected static EGFAbstractPlugin __plugin;
+
+ /**
+ * Get shared instance.
+ *
+ * @return
+ */
+ public static EGFAbstractPlugin getDefault() {
+ return __plugin;
+ }
+
+ @Override
+ public void start(BundleContext context_p) throws Exception {
+ super.start(context_p);
+ __plugin = this;
+ }
+
+ @Override
+ public void stop(BundleContext context_p) throws Exception {
+ __plugin = null;
+ super.stop(context_p);
+ }
+
+
+}
diff --git a/portfolio/org.eclipse.egf.eclipse.resources.mgt/src/org/eclipse/egf/eclipse/resources/mgt/CreateJavaProjectTask.java b/portfolio/org.eclipse.egf.eclipse.resources.mgt/src/org/eclipse/egf/eclipse/resources/mgt/CreateJavaProjectTask.java
new file mode 100644
index 0000000..baec15b
--- /dev/null
+++ b/portfolio/org.eclipse.egf.eclipse.resources.mgt/src/org/eclipse/egf/eclipse/resources/mgt/CreateJavaProjectTask.java
@@ -0,0 +1,76 @@
+/**
+ *
+ */
+package org.eclipse.egf.eclipse.resources.mgt;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+import org.eclipse.egf.ftask.producer.invocation.ITaskProduction;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.pde.internal.core.ClasspathComputer;
+import org.eclipse.pde.internal.core.util.CoreUtility;
+
+/**
+ * @author Thomas Guiu
+ *
+ */
+public class CreateJavaProjectTask implements ITaskProduction {
+ public static final String PROJECT_CONTRACT = "name";
+ public static final String EXECUTION_ENVIRONMENT_CONTRACT = "execution.environment";
+
+ private static final String DEFAULT_SOURCE_FOLDER = "src";
+
+ public void doExecute(ITaskProductionContext context, IProgressMonitor monitor) throws InvocationException {
+ String projectId = context.getInputValue(PROJECT_CONTRACT, String.class);
+ if (projectId == null || "".equals(projectId))
+ throw new InvocationException("empty project name");
+
+ String ee = context.getInputValue(EXECUTION_ENVIRONMENT_CONTRACT, String.class);
+ if (ee == null || "".equals(ee))
+ throw new InvocationException("no execution envirronment");
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ IProject project = root.getProject(projectId);
+
+ try {
+ if (!project.exists())
+ CoreUtility.createProject(project, root.getRawLocation(), monitor);
+ project.open(monitor);
+ // CoreUtility.addNatureToProject(project, PDE.PLUGIN_NATURE, null);
+ CoreUtility.addNatureToProject(project, JavaCore.NATURE_ID, monitor);
+ CoreUtility.createFolder(project.getFolder(DEFAULT_SOURCE_FOLDER));
+
+ // set up classpath
+ IJavaProject javaProject = JavaCore.create(project);
+ // Set output folder
+ IPath path = project.getFullPath().append("bin");
+ javaProject.setOutputLocation(path, monitor);
+
+ IClasspathEntry[] entries = new IClasspathEntry[3];
+ entries[0] = JavaCore.newSourceEntry(project.getProject().getFullPath().append(DEFAULT_SOURCE_FOLDER));
+ // entries[1] =
+ // JavaCore.newSourceEntry(project.getProject().getFullPath().append(GENERATED_SOURCE_FOLDER));
+ ClasspathComputer.setComplianceOptions(javaProject, ee);
+ entries[1] = ClasspathComputer.createJREEntry(ee);
+ entries[2] = ClasspathComputer.createContainerEntry();
+ javaProject.setRawClasspath(entries, monitor);
+
+ } catch (CoreException e) {
+ throw new InvocationException(e);
+ }
+ }
+
+ public void postExecute(ITaskProductionContext productionContext, IProgressMonitor monitor) throws InvocationException {
+ }
+
+ public void preExecute(ITaskProductionContext productionContext, IProgressMonitor monitor) throws InvocationException {
+ }
+
+}
diff --git a/portfolio/org.eclipse.egf.eclipse.resources.mgt/src/org/eclipse/egf/eclipse/resources/mgt/CreateProjectTask.java b/portfolio/org.eclipse.egf.eclipse.resources.mgt/src/org/eclipse/egf/eclipse/resources/mgt/CreateProjectTask.java
new file mode 100644
index 0000000..f65944d
--- /dev/null
+++ b/portfolio/org.eclipse.egf.eclipse.resources.mgt/src/org/eclipse/egf/eclipse/resources/mgt/CreateProjectTask.java
@@ -0,0 +1,63 @@
+/**
+ * <copyright>
+ *
+ * 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.eclipse.resources.mgt;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+import org.eclipse.egf.ftask.producer.invocation.ITaskProduction;
+
+/**
+ * @author Matthieu Helleboid
+ *
+ */
+public class CreateProjectTask implements ITaskProduction {
+
+ private IProject project;
+
+ public void doExecute(ITaskProductionContext productionContext, IProgressMonitor monitor) throws InvocationException {
+ if (!project.exists()) {
+ try {
+ project.create(monitor);
+ } catch (CoreException e) {
+ Activator.getDefault().logError(e);
+ }
+ }
+ if (project.exists()) {
+ if (!project.isOpen()) {
+ try {
+ project.open(monitor);
+ } catch (CoreException e) {
+ Activator.getDefault().logError(e);
+ }
+ }
+
+ productionContext.setOutputValue("path", project.getLocation().toOSString()); //$NON-NLS-1$
+ }
+ }
+
+ public void postExecute(ITaskProductionContext productionContext, IProgressMonitor monitor) throws InvocationException {
+ }
+
+ public void preExecute(ITaskProductionContext productionContext, IProgressMonitor monitor) throws InvocationException {
+ String name = productionContext.getInputValue("name", String.class); //$NON-NLS-1$
+ project = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
+ }
+
+}
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/.classpath b/portfolio/org.eclipse.egf.emf.docgen.html/.classpath
new file mode 100644
index 0000000..f701972
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="generated"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/.project b/portfolio/org.eclipse.egf.emf.docgen.html/.project
new file mode 100644
index 0000000..291b015
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.emf.docgen.html</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.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.egf.core.EGFNature</nature>
+ </natures>
+</projectDescription>
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/.settings/org.eclipse.core.resources.prefs b/portfolio/org.eclipse.egf.emf.docgen.html/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..743390a
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:50:17 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/.settings/org.eclipse.jdt.core.prefs b/portfolio/org.eclipse.egf.emf.docgen.html/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..be8cdd3
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Fri Feb 12 15:14:15 CET 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/portfolio/org.eclipse.egf.emf.docgen.html/META-INF/MANIFEST.MF b/portfolio/org.eclipse.egf.emf.docgen.html/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..e89b4b0
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.emf.docgen.html;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: .
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle:
+ org.eclipse.egf.model.ftask;visibility:=reexport,
+ org.eclipse.egf.pattern;visibility:=reexport,
+ org.eclipse.egf.pattern.ftask;visibility:=reexport
+Export-Package:
+ org.eclipse.egf.emf.docgen.html,
+ org.eclipse.egf.emf.docgen.html.reporter,
+ org.eclipse.egf.emf.docgen.html.util
+Bundle-ActivationPolicy: lazy
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/about.html b/portfolio/org.eclipse.egf.emf.docgen.html/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/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/portfolio/org.eclipse.egf.emf.docgen.html/build.properties b/portfolio/org.eclipse.egf.emf.docgen.html/build.properties
new file mode 100644
index 0000000..0e0d3a5
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/build.properties
@@ -0,0 +1,22 @@
+##
+# 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
+##
+
+source.. = src/,\
+ generated/
+output.. = bin/
+bin.includes = META-INF/,\
+ egf/,\
+ .,\
+ plugin.properties,\
+ plugin.xml,\
+ templates/,\
+ about.html
+src.includes = about.html
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/egf/EmfDocGenHtml.fcore b/portfolio/org.eclipse.egf.emf.docgen.html/egf/EmfDocGenHtml.fcore
new file mode 100644
index 0000000..5820ee9
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/egf/EmfDocGenHtml.fcore
@@ -0,0 +1,320 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1"
+ xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" 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" xmlns:types="http://www.eclipse.org/egf/1.0.0/types">
+ <fcore:FactoryComponent xmi:id="_BxjIkAG0Ed-7fNNmMjB2jQ" description="This factory component aims at generating an html document from an ecore emf model"
+ name="EmfDocGenHtml">
+ <contractContainer xmi:id="_6hXAgApbEd-pyqf4uNW3tw">
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_Yp4VcAprEd-7fqY_JLtg2w"
+ description="Ecore domain model" name="domain" mandatory="true" invocationContracts="#_bk2SAAnMEd-O5f4UVi0CIA">
+ <type xmi:type="domain:TypeDomainURI" xmi:id="_gHUXYAprEd-7fqY_JLtg2w"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_7NKWkApbEd-pyqf4uNW3tw"
+ description="Project where the result of the emf document generation is located"
+ name="projectName" mandatory="true" invocationContracts="#_WDoX0ApeEd-pyqf4uNW3tw #_b3IpoAsxEd-3ke60vt4llw">
+ <type xmi:type="types:TypeString" xmi:id="_-fRnkApbEd-pyqf4uNW3tw"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_AvXa4ApcEd-pyqf4uNW3tw"
+ description="Project folder where the result of the emf document generation is located"
+ name="outputFolder" invocationContracts="#_arHgUApeEd-pyqf4uNW3tw">
+ <type xmi:type="types:TypeString" xmi:id="_FV0BkApcEd-pyqf4uNW3tw" value="output"/>
+ </contracts>
+ </contractContainer>
+ <viewpointContainer xmi:id="_K1qNYAG0Ed-7fNNmMjB2jQ">
+ <viewpoints xmi:type="pattern:PatternViewpoint" xmi:id="_MFOX0AG0Ed-7fNNmMjB2jQ">
+ <libraries xmi:id="_XP8doAazEd-6kIajn4nnRQ" name="object.docgen.html">
+ <elements xmi:type="pattern:Pattern" xmi:id="_kXoFkAazEd-6kIajn4nnRQ" description=""
+ name="ObjectDocGen" headerMethod="#_kXoFkQazEd-6kIajn4nnRQ" footerMethod="#_kXoFlAazEd-6kIajn4nnRQ"
+ initMethod="#_kXoFkgazEd-6kIajn4nnRQ">
+ <methods xmi:id="_kXoFkQazEd-6kIajn4nnRQ" name="header" patternFilePath="templates/pattern._kXoFkAazEd-6kIajn4nnRQ/method._kXoFkQazEd-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_kXoFkgazEd-6kIajn4nnRQ" name="init" patternFilePath="templates/pattern._kXoFkAazEd-6kIajn4nnRQ/method._kXoFkgazEd-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_kXoFkwazEd-6kIajn4nnRQ" name="body" patternFilePath="templates/pattern._kXoFkAazEd-6kIajn4nnRQ/method._kXoFkwazEd-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_kXoFlAazEd-6kIajn4nnRQ" name="footer" patternFilePath="templates/pattern._kXoFkAazEd-6kIajn4nnRQ/method._kXoFlAazEd-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_UL7-cAbREd-6kIajn4nnRQ" name="fileHeader" patternFilePath="templates/pattern._kXoFkAazEd-6kIajn4nnRQ/method._UL7-cAbREd-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_U9Z3oAbREd-6kIajn4nnRQ" name="fileFooter" patternFilePath="templates/pattern._kXoFkAazEd-6kIajn4nnRQ/method._U9Z3oAbREd-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_gvTcsAezEd-6kIajn4nnRQ" name="setSpecificVariables"
+ patternFilePath="templates/pattern._kXoFkAazEd-6kIajn4nnRQ/method._gvTcsAezEd-6kIajn4nnRQ.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_kXoFlQazEd-6kIajn4nnRQ"
+ called="#_kXoFkwazEd-6kIajn4nnRQ"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_kXoFlgazEd-6kIajn4nnRQ"
+ name="JET"/>
+ <variables xmi:id="_gw3xIAc-Ed-6kIajn4nnRQ" name="_Title" type="java.lang.String"/>
+ <variables xmi:id="_Jn2XwAeZEd-6kIajn4nnRQ" name="_copyright" type="java.lang.String"/>
+ </elements>
+ </libraries>
+ <libraries xmi:id="_hLRJMAaxEd-6kIajn4nnRQ" name="emf.docgen.html">
+ <elements xmi:type="pattern:Pattern" xmi:id="_K0k3MAa1Ed-6kIajn4nnRQ" description=" "
+ name="EClassDocGen" headerMethod="#_K0k3MQa1Ed-6kIajn4nnRQ" footerMethod="#_K0k3NAa1Ed-6kIajn4nnRQ"
+ superPattern="#_G-Qs8Aa1Ed-6kIajn4nnRQ" initMethod="#_K0k3Mga1Ed-6kIajn4nnRQ">
+ <methods xmi:id="_K0k3MQa1Ed-6kIajn4nnRQ" name="header" patternFilePath="templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._K0k3MQa1Ed-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_K0k3Mga1Ed-6kIajn4nnRQ" name="init" patternFilePath="templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._K0k3Mga1Ed-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_K0k3Mwa1Ed-6kIajn4nnRQ" name="body" patternFilePath="templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._K0k3Mwa1Ed-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_K0k3NAa1Ed-6kIajn4nnRQ" name="footer" patternFilePath="templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._K0k3NAa1Ed-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_hbnLIAbZEd-6kIajn4nnRQ" name="writeEAttributes" patternFilePath="templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._hbnLIAbZEd-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_c5ZJ4AbpEd-6kIajn4nnRQ" name="writeEOperations" patternFilePath="templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._c5ZJ4AbpEd-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_lTjW8AbiEd-6kIajn4nnRQ" name="writeEReferences" patternFilePath="templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._lTjW8AbiEd-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_zu6s8AblEd-6kIajn4nnRQ" name="writeSuperTypes" patternFilePath="templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._zu6s8AblEd-6kIajn4nnRQ.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_K0k3NQa1Ed-6kIajn4nnRQ"
+ called="#_K0k3Mwa1Ed-6kIajn4nnRQ"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_K0k3Nga1Ed-6kIajn4nnRQ"
+ name="JET"/>
+ </elements>
+ <elements xmi:type="pattern:Pattern" xmi:id="_G-Qs8Aa1Ed-6kIajn4nnRQ" name="EClassifierDocGen"
+ headerMethod="#_G-Qs8Qa1Ed-6kIajn4nnRQ" footerMethod="#_G-Qs9Aa1Ed-6kIajn4nnRQ"
+ superPattern="#_8Jp64Aa0Ed-6kIajn4nnRQ" initMethod="#_G-Qs8ga1Ed-6kIajn4nnRQ">
+ <methods xmi:id="_G-Qs8Qa1Ed-6kIajn4nnRQ" name="header" patternFilePath="templates/pattern._G-Qs8Aa1Ed-6kIajn4nnRQ/method._G-Qs8Qa1Ed-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_G-Qs8ga1Ed-6kIajn4nnRQ" name="init" patternFilePath="templates/pattern._G-Qs8Aa1Ed-6kIajn4nnRQ/method._G-Qs8ga1Ed-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_G-Qs8wa1Ed-6kIajn4nnRQ" name="body" patternFilePath="templates/pattern._G-Qs8Aa1Ed-6kIajn4nnRQ/method._G-Qs8wa1Ed-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_G-Qs9Aa1Ed-6kIajn4nnRQ" name="footer" patternFilePath="templates/pattern._G-Qs8Aa1Ed-6kIajn4nnRQ/method._G-Qs9Aa1Ed-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_VZrkEAe6Ed-6kIajn4nnRQ" name="writeEPackageReference"
+ patternFilePath="templates/pattern._G-Qs8Aa1Ed-6kIajn4nnRQ/method._VZrkEAe6Ed-6kIajn4nnRQ.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_G-Qs9Qa1Ed-6kIajn4nnRQ"
+ called="#_G-Qs8wa1Ed-6kIajn4nnRQ"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_G-Qs9ga1Ed-6kIajn4nnRQ"
+ name="JET"/>
+ </elements>
+ <elements xmi:type="pattern:Pattern" xmi:id="_JJGK8Ae0Ed-6kIajn4nnRQ" name="EDataTypeDocGen"
+ headerMethod="#_JJGK8Qe0Ed-6kIajn4nnRQ" footerMethod="#_JJGK9Ae0Ed-6kIajn4nnRQ"
+ superPattern="#_G-Qs8Aa1Ed-6kIajn4nnRQ" initMethod="#_JJGK8ge0Ed-6kIajn4nnRQ">
+ <methods xmi:id="_JJGK8Qe0Ed-6kIajn4nnRQ" name="header" patternFilePath="templates/pattern._JJGK8Ae0Ed-6kIajn4nnRQ/method._JJGK8Qe0Ed-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_JJGK8ge0Ed-6kIajn4nnRQ" name="init" patternFilePath="templates/pattern._JJGK8Ae0Ed-6kIajn4nnRQ/method._JJGK8ge0Ed-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_JJGK8we0Ed-6kIajn4nnRQ" name="body" patternFilePath="templates/pattern._JJGK8Ae0Ed-6kIajn4nnRQ/method._JJGK8we0Ed-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_JJGK9Ae0Ed-6kIajn4nnRQ" name="footer" patternFilePath="templates/pattern._JJGK8Ae0Ed-6kIajn4nnRQ/method._JJGK9Ae0Ed-6kIajn4nnRQ.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_JJGK9Qe0Ed-6kIajn4nnRQ"
+ called="#_JJGK8we0Ed-6kIajn4nnRQ"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_JJGK9ge0Ed-6kIajn4nnRQ"
+ name="JET"/>
+ </elements>
+ <elements xmi:type="pattern:Pattern" xmi:id="_Y2B94Ae0Ed-6kIajn4nnRQ" name="EEnumDocGen"
+ headerMethod="#_Y2B94Qe0Ed-6kIajn4nnRQ" footerMethod="#_Y2B95Ae0Ed-6kIajn4nnRQ"
+ superPattern="#_JJGK8Ae0Ed-6kIajn4nnRQ" initMethod="#_Y2B94ge0Ed-6kIajn4nnRQ">
+ <methods xmi:id="_Y2B94Qe0Ed-6kIajn4nnRQ" name="header" patternFilePath="templates/pattern._Y2B94Ae0Ed-6kIajn4nnRQ/method._Y2B94Qe0Ed-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_Y2B94ge0Ed-6kIajn4nnRQ" name="init" patternFilePath="templates/pattern._Y2B94Ae0Ed-6kIajn4nnRQ/method._Y2B94ge0Ed-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_Y2B94we0Ed-6kIajn4nnRQ" name="body" patternFilePath="templates/pattern._Y2B94Ae0Ed-6kIajn4nnRQ/method._Y2B94we0Ed-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_Y2B95Ae0Ed-6kIajn4nnRQ" name="footer" patternFilePath="templates/pattern._Y2B94Ae0Ed-6kIajn4nnRQ/method._Y2B95Ae0Ed-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_mELvUAe2Ed-6kIajn4nnRQ" name="writeEEnumLiteral" patternFilePath="templates/pattern._Y2B94Ae0Ed-6kIajn4nnRQ/method._mELvUAe2Ed-6kIajn4nnRQ.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_Y2B95Qe0Ed-6kIajn4nnRQ"
+ called="#_Y2B94we0Ed-6kIajn4nnRQ"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_Y2B95ge0Ed-6kIajn4nnRQ"
+ name="JET"/>
+ </elements>
+ <elements xmi:type="pattern:Pattern" xmi:id="_0wZOUAa0Ed-6kIajn4nnRQ" description=""
+ name="EModelElementDocGen" headerMethod="#_0wZOUQa0Ed-6kIajn4nnRQ" footerMethod="#_0wZOVAa0Ed-6kIajn4nnRQ"
+ superPattern="#_HABc8Aa0Ed-6kIajn4nnRQ" initMethod="#_0wZOUga0Ed-6kIajn4nnRQ">
+ <methods xmi:id="_0wZOUQa0Ed-6kIajn4nnRQ" name="header" patternFilePath="templates/pattern._0wZOUAa0Ed-6kIajn4nnRQ/method._0wZOUQa0Ed-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_0wZOUga0Ed-6kIajn4nnRQ" name="init" patternFilePath="templates/pattern._0wZOUAa0Ed-6kIajn4nnRQ/method._0wZOUga0Ed-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_0wZOUwa0Ed-6kIajn4nnRQ" name="body" patternFilePath="templates/pattern._0wZOUAa0Ed-6kIajn4nnRQ/method._0wZOUwa0Ed-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_0wZOVAa0Ed-6kIajn4nnRQ" name="footer" patternFilePath="templates/pattern._0wZOUAa0Ed-6kIajn4nnRQ/method._0wZOVAa0Ed-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_YI5ZYAqZEd-RmqToXpY29g" name="writeEAnnotations" patternFilePath="templates/pattern._0wZOUAa0Ed-6kIajn4nnRQ/method._YI5ZYAqZEd-RmqToXpY29g.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_0wZOVQa0Ed-6kIajn4nnRQ"
+ called="#_0wZOUwa0Ed-6kIajn4nnRQ"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_0wZOVga0Ed-6kIajn4nnRQ"
+ name="JET"/>
+ </elements>
+ <elements xmi:type="pattern:Pattern" xmi:id="_8Jp64Aa0Ed-6kIajn4nnRQ" name="ENamedElementDocGen"
+ headerMethod="#_8Jp64Qa0Ed-6kIajn4nnRQ" footerMethod="#_8Jp65Aa0Ed-6kIajn4nnRQ"
+ superPattern="#_0wZOUAa0Ed-6kIajn4nnRQ" initMethod="#_8Jp64ga0Ed-6kIajn4nnRQ">
+ <methods xmi:id="_8Jp64Qa0Ed-6kIajn4nnRQ" name="header" patternFilePath="templates/pattern._8Jp64Aa0Ed-6kIajn4nnRQ/method._8Jp64Qa0Ed-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_8Jp64ga0Ed-6kIajn4nnRQ" name="init" patternFilePath="templates/pattern._8Jp64Aa0Ed-6kIajn4nnRQ/method._8Jp64ga0Ed-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_8Jp64wa0Ed-6kIajn4nnRQ" name="body" patternFilePath="templates/pattern._8Jp64Aa0Ed-6kIajn4nnRQ/method._8Jp64wa0Ed-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_8Jp65Aa0Ed-6kIajn4nnRQ" name="footer" patternFilePath="templates/pattern._8Jp64Aa0Ed-6kIajn4nnRQ/method._8Jp65Aa0Ed-6kIajn4nnRQ.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_8Jp65Qa0Ed-6kIajn4nnRQ"
+ called="#_8Jp64wa0Ed-6kIajn4nnRQ"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_8Jp65ga0Ed-6kIajn4nnRQ"
+ name="JET"/>
+ </elements>
+ <elements xmi:type="pattern:Pattern" xmi:id="_HABc8Aa0Ed-6kIajn4nnRQ" name="EObjectDocGen"
+ headerMethod="#_HABc8Qa0Ed-6kIajn4nnRQ" footerMethod="#_HABc9Aa0Ed-6kIajn4nnRQ"
+ superPattern="#_kXoFkAazEd-6kIajn4nnRQ" initMethod="#_HABc8ga0Ed-6kIajn4nnRQ">
+ <methods xmi:id="_HABc8Qa0Ed-6kIajn4nnRQ" name="header" patternFilePath="templates/pattern._HABc8Aa0Ed-6kIajn4nnRQ/method._HABc8Qa0Ed-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_HABc8ga0Ed-6kIajn4nnRQ" name="init" patternFilePath="templates/pattern._HABc8Aa0Ed-6kIajn4nnRQ/method._HABc8ga0Ed-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_HABc8wa0Ed-6kIajn4nnRQ" name="body" patternFilePath="templates/pattern._HABc8Aa0Ed-6kIajn4nnRQ/method._HABc8wa0Ed-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_HABc9Aa0Ed-6kIajn4nnRQ" name="footer" patternFilePath="templates/pattern._HABc8Aa0Ed-6kIajn4nnRQ/method._HABc9Aa0Ed-6kIajn4nnRQ.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_HABc9Qa0Ed-6kIajn4nnRQ"
+ called="#_HABc8wa0Ed-6kIajn4nnRQ"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_HABc9ga0Ed-6kIajn4nnRQ"
+ name="JET"/>
+ <variables xmi:id="_rfYmkAqREd-o4MG7iLHReg" name="_element" type="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ </elements>
+ <elements xmi:type="pattern:Pattern" xmi:id="_ChgNwAa1Ed-6kIajn4nnRQ" description=""
+ name="EPackageDocGen" headerMethod="#_ChgNwQa1Ed-6kIajn4nnRQ" footerMethod="#_ChgNxAa1Ed-6kIajn4nnRQ"
+ superPattern="#_8Jp64Aa0Ed-6kIajn4nnRQ" initMethod="#_ChgNwga1Ed-6kIajn4nnRQ">
+ <methods xmi:id="_ChgNwQa1Ed-6kIajn4nnRQ" name="header" patternFilePath="templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._ChgNwQa1Ed-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_ChgNwga1Ed-6kIajn4nnRQ" name="init" patternFilePath="templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._ChgNwga1Ed-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_ChgNwwa1Ed-6kIajn4nnRQ" name="body" patternFilePath="templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._ChgNwwa1Ed-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_ChgNxAa1Ed-6kIajn4nnRQ" name="footer" patternFilePath="templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._ChgNxAa1Ed-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_rImoUAbuEd-6kIajn4nnRQ" name="writeEClasses" patternFilePath="templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._rImoUAbuEd-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_3yCh0AheEd-6kIajn4nnRQ" name="writeEDataType" patternFilePath="templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._3yCh0AheEd-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_5-QhwAheEd-6kIajn4nnRQ" name="writeEEnum" patternFilePath="templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._5-QhwAheEd-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_XJctwAhYEd-6kIajn4nnRQ" name="writeESubpackages" patternFilePath="templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._XJctwAhYEd-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_9IqvoAhbEd-6kIajn4nnRQ" name="writeEPackageReference"
+ patternFilePath="templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._9IqvoAhbEd-6kIajn4nnRQ.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_ChgNxQa1Ed-6kIajn4nnRQ"
+ called="#_ChgNwwa1Ed-6kIajn4nnRQ"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_ChgNxga1Ed-6kIajn4nnRQ"
+ name="JET"/>
+ </elements>
+ </libraries>
+ <libraries xmi:id="_jKxAIAbPEd-6kIajn4nnRQ" name="emf.docgen.html.forStrategy">
+ <elements xmi:type="pattern:Pattern" xmi:id="_ouOkgAbWEd-6kIajn4nnRQ" description=" "
+ name="ClassReport" headerMethod="#_ouOkgQbWEd-6kIajn4nnRQ" footerMethod="#_ouOkhAbWEd-6kIajn4nnRQ"
+ superPattern="#_K0k3MAa1Ed-6kIajn4nnRQ" initMethod="#_ouOkggbWEd-6kIajn4nnRQ">
+ <methods xmi:id="_ouOkgQbWEd-6kIajn4nnRQ" name="header" patternFilePath="templates/pattern._ouOkgAbWEd-6kIajn4nnRQ/method._ouOkgQbWEd-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_ouOkggbWEd-6kIajn4nnRQ" name="init" patternFilePath="templates/pattern._ouOkgAbWEd-6kIajn4nnRQ/method._ouOkggbWEd-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_ouOkgwbWEd-6kIajn4nnRQ" name="body" patternFilePath="templates/pattern._ouOkgAbWEd-6kIajn4nnRQ/method._ouOkgwbWEd-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_ouOkhAbWEd-6kIajn4nnRQ" name="footer" patternFilePath="templates/pattern._ouOkgAbWEd-6kIajn4nnRQ/method._ouOkhAbWEd-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_FWeXUAbXEd-6kIajn4nnRQ" name="setVariable" patternFilePath="templates/pattern._ouOkgAbWEd-6kIajn4nnRQ/method._FWeXUAbXEd-6kIajn4nnRQ.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_RU1mwAbXEd-6kIajn4nnRQ"
+ called="#_FWeXUAbXEd-6kIajn4nnRQ"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_82nssAezEd-6kIajn4nnRQ"
+ called="#_gvTcsAezEd-6kIajn4nnRQ"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_QYfTQAbXEd-6kIajn4nnRQ"
+ called="#_UL7-cAbREd-6kIajn4nnRQ"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_NNcmMAqeEd-RmqToXpY29g"
+ called="#_YI5ZYAqZEd-RmqToXpY29g"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_s4kDsAbmEd-6kIajn4nnRQ"
+ called="#_zu6s8AblEd-6kIajn4nnRQ"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_WGjh8AbaEd-6kIajn4nnRQ"
+ called="#_hbnLIAbZEd-6kIajn4nnRQ"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_VfDG8AbjEd-6kIajn4nnRQ"
+ called="#_lTjW8AbiEd-6kIajn4nnRQ"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_8FUIcAbrEd-6kIajn4nnRQ"
+ called="#_c5ZJ4AbpEd-6kIajn4nnRQ"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_pcZ2EAe7Ed-6kIajn4nnRQ"
+ called="#_VZrkEAe6Ed-6kIajn4nnRQ"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_TNiNwAbXEd-6kIajn4nnRQ"
+ called="#_U9Z3oAbREd-6kIajn4nnRQ"/>
+ <parameters xmi:id="_5eNv4AbWEd-6kIajn4nnRQ" name="element" type="http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_ouOkhgbWEd-6kIajn4nnRQ"
+ name="JET"/>
+ </elements>
+ <elements xmi:type="pattern:Pattern" xmi:id="_1_qTUAhgEd-6kIajn4nnRQ" description=""
+ name="DataTypeReport" headerMethod="#_1_qTUQhgEd-6kIajn4nnRQ" footerMethod="#_1_qTVAhgEd-6kIajn4nnRQ"
+ superPattern="#_JJGK8Ae0Ed-6kIajn4nnRQ" initMethod="#_1_qTUghgEd-6kIajn4nnRQ">
+ <methods xmi:id="_1_qTUQhgEd-6kIajn4nnRQ" name="header" patternFilePath="templates/pattern._1_qTUAhgEd-6kIajn4nnRQ/method._1_qTUQhgEd-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_1_qTUghgEd-6kIajn4nnRQ" name="init" patternFilePath="templates/pattern._1_qTUAhgEd-6kIajn4nnRQ/method._1_qTUghgEd-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_1_qTUwhgEd-6kIajn4nnRQ" name="body" patternFilePath="templates/pattern._1_qTUAhgEd-6kIajn4nnRQ/method._1_qTUwhgEd-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_1_qTVAhgEd-6kIajn4nnRQ" name="footer" patternFilePath="templates/pattern._1_qTUAhgEd-6kIajn4nnRQ/method._1_qTVAhgEd-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_0ZrsoAhjEd-3P_wTpqyVSA" name="setVariable" patternFilePath="templates/pattern._1_qTUAhgEd-6kIajn4nnRQ/method._0ZrsoAhjEd-3P_wTpqyVSA.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_P3Tp8AhlEd-3P_wTpqyVSA"
+ called="#_0ZrsoAhjEd-3P_wTpqyVSA"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_UCep4AhlEd-3P_wTpqyVSA"
+ called="#_gvTcsAezEd-6kIajn4nnRQ"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_Wig9sAhlEd-3P_wTpqyVSA"
+ called="#_UL7-cAbREd-6kIajn4nnRQ"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_aSR0AAhlEd-3P_wTpqyVSA"
+ called="#_VZrkEAe6Ed-6kIajn4nnRQ"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_XgqA8AhlEd-3P_wTpqyVSA"
+ called="#_U9Z3oAbREd-6kIajn4nnRQ"/>
+ <parameters xmi:id="_O95yMAhkEd-3P_wTpqyVSA" name="element" type="http://www.eclipse.org/emf/2002/Ecore#//EDataType"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_1_qTVghgEd-6kIajn4nnRQ"
+ name="JET"/>
+ </elements>
+ <elements xmi:type="pattern:Pattern" xmi:id="_xhMiAAeyEd-6kIajn4nnRQ" description=" "
+ name="EnumerationReport" headerMethod="#_xhMiAQeyEd-6kIajn4nnRQ" footerMethod="#_xhMiBAeyEd-6kIajn4nnRQ"
+ superPattern="#_Y2B94Ae0Ed-6kIajn4nnRQ" initMethod="#_xhMiAgeyEd-6kIajn4nnRQ">
+ <methods xmi:id="_xhMiAQeyEd-6kIajn4nnRQ" name="header" patternFilePath="templates/pattern._xhMiAAeyEd-6kIajn4nnRQ/method._xhMiAQeyEd-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_xhMiAgeyEd-6kIajn4nnRQ" name="init" patternFilePath="templates/pattern._xhMiAAeyEd-6kIajn4nnRQ/method._xhMiAgeyEd-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_xhMiAweyEd-6kIajn4nnRQ" name="body" patternFilePath="templates/pattern._xhMiAAeyEd-6kIajn4nnRQ/method._xhMiAweyEd-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_xhMiBAeyEd-6kIajn4nnRQ" name="footer" patternFilePath="templates/pattern._xhMiAAeyEd-6kIajn4nnRQ/method._xhMiBAeyEd-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_lJca0Ae1Ed-6kIajn4nnRQ" name="setVariable" patternFilePath="templates/pattern._xhMiAAeyEd-6kIajn4nnRQ/method._lJca0Ae1Ed-6kIajn4nnRQ.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_nNBcIAe1Ed-6kIajn4nnRQ"
+ called="#_lJca0Ae1Ed-6kIajn4nnRQ"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_zHXHMAe1Ed-6kIajn4nnRQ"
+ called="#_gvTcsAezEd-6kIajn4nnRQ"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_1uQQ8Ae1Ed-6kIajn4nnRQ"
+ called="#_UL7-cAbREd-6kIajn4nnRQ"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_dsz_QAe3Ed-6kIajn4nnRQ"
+ called="#_mELvUAe2Ed-6kIajn4nnRQ"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_t3PCoAe7Ed-6kIajn4nnRQ"
+ called="#_VZrkEAe6Ed-6kIajn4nnRQ"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_2bjb0Ae1Ed-6kIajn4nnRQ"
+ called="#_U9Z3oAbREd-6kIajn4nnRQ"/>
+ <parameters xmi:id="_rGbzIAe0Ed-6kIajn4nnRQ" name="element" type="http://www.eclipse.org/emf/2002/Ecore#//EEnum"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_xhMiBgeyEd-6kIajn4nnRQ"
+ name="JET"/>
+ </elements>
+ <elements xmi:type="pattern:Pattern" xmi:id="_zCuXUAbPEd-6kIajn4nnRQ" description=" "
+ name="PackageReport" headerMethod="#_zCuXUQbPEd-6kIajn4nnRQ" footerMethod="#_zCuXVAbPEd-6kIajn4nnRQ"
+ superPattern="#_ChgNwAa1Ed-6kIajn4nnRQ" initMethod="#_zCuXUgbPEd-6kIajn4nnRQ">
+ <methods xmi:id="_zCuXUQbPEd-6kIajn4nnRQ" name="header" patternFilePath="templates/pattern._zCuXUAbPEd-6kIajn4nnRQ/method._zCuXUQbPEd-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_zCuXUgbPEd-6kIajn4nnRQ" name="init" patternFilePath="templates/pattern._zCuXUAbPEd-6kIajn4nnRQ/method._zCuXUgbPEd-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_zCuXUwbPEd-6kIajn4nnRQ" name="body" patternFilePath="templates/pattern._zCuXUAbPEd-6kIajn4nnRQ/method._zCuXUwbPEd-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_zCuXVAbPEd-6kIajn4nnRQ" name="footer" patternFilePath="templates/pattern._zCuXUAbPEd-6kIajn4nnRQ/method._zCuXVAbPEd-6kIajn4nnRQ.pt"/>
+ <methods xmi:id="_zbC7QAbQEd-6kIajn4nnRQ" name="setVariable" patternFilePath="templates/pattern._zCuXUAbPEd-6kIajn4nnRQ/method._zbC7QAbQEd-6kIajn4nnRQ.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_tAjHkAbREd-6kIajn4nnRQ"
+ called="#_zbC7QAbQEd-6kIajn4nnRQ"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_wifooAezEd-6kIajn4nnRQ"
+ called="#_gvTcsAezEd-6kIajn4nnRQ"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_vH2LQAbREd-6kIajn4nnRQ"
+ called="#_UL7-cAbREd-6kIajn4nnRQ"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_DZtioAqbEd-RmqToXpY29g"
+ called="#_YI5ZYAqZEd-RmqToXpY29g"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_nD3RIAhaEd-6kIajn4nnRQ"
+ called="#_XJctwAhYEd-6kIajn4nnRQ"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_45xnQAbwEd-6kIajn4nnRQ"
+ called="#_rImoUAbuEd-6kIajn4nnRQ"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_KeTMoAhfEd-6kIajn4nnRQ"
+ called="#_3yCh0AheEd-6kIajn4nnRQ"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_MIGcAAhfEd-6kIajn4nnRQ"
+ called="#_5-QhwAheEd-6kIajn4nnRQ"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_dghnwAhcEd-6kIajn4nnRQ"
+ called="#_9IqvoAhbEd-6kIajn4nnRQ"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_wbchIAbREd-6kIajn4nnRQ"
+ called="#_U9Z3oAbREd-6kIajn4nnRQ"/>
+ <orchestration xmi:type="pattern:BackCall" xmi:id="_aOrBMRI7Ed-15fWsecEMDA"/>
+ <parameters xmi:id="_loet0AbREd-6kIajn4nnRQ" name="element" type="http://www.eclipse.org/emf/2002/Ecore#//EPackage"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_zCuXVgbPEd-6kIajn4nnRQ"
+ name="JET"/>
+ </elements>
+ </libraries>
+ </viewpoints>
+ </viewpointContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_7kDnYAG6Ed-Z36BN7TtDTg">
+ <invocations xmi:id="_KUocMAsxEd-3ke60vt4llw" description="This step ensures that the target project is created or open."
+ name="Ensure project existence" invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.eclipse.resources.mgt/fcs/Resources.fcore#_d5v1IAqCEd-JA8Js2pdQ0g">
+ <invocationContractContainer xmi:id="_aRXlsAsxEd-3ke60vt4llw">
+ <invocationContracts xmi:id="_b3IpoAsxEd-3ke60vt4llw" factoryComponentContract="#_7NKWkApbEd-pyqf4uNW3tw"
+ invokedContract="platform:/plugin/org.eclipse.egf.eclipse.resources.mgt/fcs/Resources.fcore#_1_fQoAqDEd-JA8Js2pdQ0g"/>
+ </invocationContractContainer>
+ </invocations>
+ <invocations xmi:id="_8fNoEAG6Ed-Z36BN7TtDTg" description="The html document is generated. The output folder in the target project is created when it does not exist."
+ name="Create the html document" invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.emf.docgen.html/egf/ModelDrivenPatternStrategy.fcore#_h96TwAUUEd-UW6M01HV7DA">
+ <invocationContractContainer xmi:id="_bHfnoAnMEd-O5f4UVi0CIA">
+ <invocationContracts xmi:id="_bk2SAAnMEd-O5f4UVi0CIA" factoryComponentContract="#_Yp4VcAprEd-7fqY_JLtg2w"
+ invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_DgB2IP6fEd64XaYPo3s6sPg"/>
+ <invocationContracts xmi:id="_ffoskAnMEd-O5f4UVi0CIA" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_nz1HkSCaEd-Sse0r9LJWbA">
+ <type xmi:type="pattern:TypePatternList" xmi:id="_9Hd6cCHxEd-V4KH4GeEy-w"
+ elements="#_jKxAIAbPEd-6kIajn4nnRQ"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_GGjH8AnNEd-O5f4UVi0CIA" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_L6JSwAHAEd-4faJMEplCjxw">
+ <type xmi:type="pattern:TypePatternExecutionReporter" xmi:id="_H380IAnNEd-O5f4UVi0CIA"
+ value="org.eclipse.egf.emf.docgen.html.reporter.PatternReporter"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_WDoX0ApeEd-pyqf4uNW3tw" factoryComponentContract="#_7NKWkApbEd-pyqf4uNW3tw"
+ invokedContract="platform:/plugin/org.eclipse.egf.emf.docgen.html/egf/ModelDrivenPatternStrategy.fcore#_Fi1fAApeEd-pyqf4uNW3tw"/>
+ <invocationContracts xmi:id="_arHgUApeEd-pyqf4uNW3tw" factoryComponentContract="#_AvXa4ApcEd-pyqf4uNW3tw"
+ invokedContract="platform:/plugin/org.eclipse.egf.emf.docgen.html/egf/ModelDrivenPatternStrategy.fcore#_K7Wb0ApeEd-pyqf4uNW3tw"/>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+ </fcore:FactoryComponent>
+ <ftask:Task xmi:id="_yw92cBurEd-jaIqWGhF8eQ" description="" name="EmfDocProductionContextFromGenModel"
+ kind="java" implementation="org.eclipse.egf.emf.docgen.html.EmfDocProductionContextFromGenModel">
+ <contractContainer xmi:id="_AZaCEBusEd-jaIqWGhF8eQ">
+ <contracts xmi:id="_A4ZrMBusEd-jaIqWGhF8eQ" name="genModelURI" mandatory="true">
+ <type xmi:type="domain:TypeDomainURI" xmi:id="_C-NhIBusEd-jaIqWGhF8eQ"/>
+ </contracts>
+ <contracts xmi:id="_Do1LcBusEd-jaIqWGhF8eQ" name="docEcoreURI" mandatory="true"
+ mode="Out">
+ <type xmi:type="domain:TypeDomainURI" xmi:id="_IUx9MBusEd-jaIqWGhF8eQ"/>
+ </contracts>
+ <contracts xmi:id="_EAYIwBusEd-jaIqWGhF8eQ" name="docProjectName" mandatory="true"
+ mode="Out">
+ <type xmi:type="types:TypeString" xmi:id="_Qc1CYBusEd-jaIqWGhF8eQ"/>
+ </contracts>
+ </contractContainer>
+ </ftask:Task>
+</xmi:XMI>
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/egf/ModelDrivenPatternStrategy.fcore b/portfolio/org.eclipse.egf.emf.docgen.html/egf/ModelDrivenPatternStrategy.fcore
new file mode 100644
index 0000000..de1f47b
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/egf/ModelDrivenPatternStrategy.fcore
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ftask:Task xmi:version="2.1"
+ xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:ftask="http://www.eclipse.org/egf/1.0.0/ftask"
+ xmlns:types="http://www.eclipse.org/egf/1.0.0/types" xmi:id="_h96TwAUUEd-UW6M01HV7DA"
+ name="Model driven pattern strategy task - Doc Gen" superTask="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_8FZ3aof6eEd64XYPo3s6sPg">
+ <contractContainer xmi:id="_sbuWcAUUEd-UW6M01HV7DA">
+ <contracts xmi:id="_Fi1fAApeEd-pyqf4uNW3tw" name="projectName" mandatory="true">
+ <type xmi:type="types:TypeString" xmi:id="_H9gxsApeEd-pyqf4uNW3tw"/>
+ </contracts>
+ <contracts xmi:id="_K7Wb0ApeEd-pyqf4uNW3tw" name="outputFolder" mandatory="true">
+ <type xmi:type="types:TypeString" xmi:id="_PnKqsApeEd-pyqf4uNW3tw"/>
+ </contracts>
+ </contractContainer>
+</ftask:Task>
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/EClassDocGen.java b/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/EClassDocGen.java
new file mode 100644
index 0000000..affe8b3
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/EClassDocGen.java
@@ -0,0 +1,233 @@
+package emf.docgen.html;
+
+import org.eclipse.egf.emf.docgen.html.util.*;
+import org.eclipse.emf.common.util.*;
+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 EClassDocGen extends emf.docgen.html.EClassifierDocGen {
+ protected static String nl;
+ public static synchronized EClassDocGen create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ EClassDocGen result = new EClassDocGen();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "// Class body contents";
+ protected final String TEXT_2 = NL;
+ protected final String TEXT_3 = NL + "\t<h2>Attributes</h2>" + NL + "\t\t<table border=1 cellspacing=\"0\" width=\"100%\">" + NL + "\t\t<tr>" + NL + "\t\t\t<th align=left>Name</th>" + NL + "\t\t\t<th>Bounds</th>" + NL + "\t\t\t<th>Type</th>" + NL + "\t\t\t<th>Changeable</th>" + NL + "\t\t\t<th>Volatile</th>" + NL + "\t\t\t<th>Transient</th>" + NL + "\t\t\t<th>Derived</th>" + NL + "\t\t\t<th>Ordered</th>" + NL + "\t\t\t<th>Unique</th>" + NL + "\t\t</tr>" + NL + "\t";
+ protected final String TEXT_4 = NL + "\t\t<tr>" + NL + " \t\t\t<td align=left><b>";
+ protected final String TEXT_5 = "</b></td>" + NL + " \t\t\t<td align=center>";
+ protected final String TEXT_6 = " </td>" + NL + " \t\t\t<td align=left>";
+ protected final String TEXT_7 = "</td>" + NL + " \t\t\t<td align=center>";
+ protected final String TEXT_8 = "</td>" + NL + " \t\t\t<td align=center>";
+ protected final String TEXT_9 = "</td>" + NL + " \t\t\t<td align=center>";
+ protected final String TEXT_10 = "</td>" + NL + " \t\t\t<td align=center>";
+ protected final String TEXT_11 = "</td>" + NL + " \t\t\t<td align=center>";
+ protected final String TEXT_12 = "</td>" + NL + " \t\t\t<td align=center>";
+ protected final String TEXT_13 = "</td>" + NL + " \t\t</tr>" + NL + "\t";
+ protected final String TEXT_14 = NL + "\t</table>";
+ protected final String TEXT_15 = NL;
+ protected final String TEXT_16 = NL + "\t<h2>Operations</h2>" + NL + "\t\t<table border=1 cellspacing=\"0\" width=\"100%\">" + NL + "\t\t<tr>" + NL + "\t\t\t<th align=left>Name</th>" + NL + "\t\t\t<th>Bounds</th>" + NL + "\t\t\t<th>Return</th>" + NL + "\t\t\t<th>Parameter(s)</th>" + NL + "\t\t\t<th>Required</th>" + NL + "\t\t\t<th>Ordered</th>" + NL + "\t\t\t<th>Unique</th>" + NL + "\t\t</tr>" + NL + "\t";
+ protected final String TEXT_17 = NL + "\t\t<tr>" + NL + " \t\t\t<td align=left><b>";
+ protected final String TEXT_18 = "</b></td>" + NL + " \t\t\t<td align=center>";
+ protected final String TEXT_19 = "</td>" + NL + " \t\t\t<td align=center>" + NL + " \t\t\t\t";
+ protected final String TEXT_20 = NL + " \t\t\t\t";
+ protected final String TEXT_21 = NL + " \t\t\t\t";
+ protected final String TEXT_22 = NL + " \t\t\t\t";
+ protected final String TEXT_23 = NL + " \t\t\t\t";
+ protected final String TEXT_24 = NL + " \t\t\t</td>" + NL + "\t\t\t<td align=left>" + NL + "\t\t\t\t";
+ protected final String TEXT_25 = NL + "\t\t\t\t\t<p>";
+ protected final String TEXT_26 = " - ";
+ protected final String TEXT_27 = "</p>" + NL + "\t\t\t\t";
+ protected final String TEXT_28 = NL + "\t\t\t</td>" + NL + " \t\t\t<td align=center>";
+ protected final String TEXT_29 = "</td>" + NL + " \t\t\t<td align=center>";
+ protected final String TEXT_30 = "</td>" + NL + " \t\t\t<td align=center>";
+ protected final String TEXT_31 = "</td>" + NL + "" + NL + " \t\t</tr>" + NL + "" + NL + "" + NL + "\t";
+ protected final String TEXT_32 = NL + "\t</table>";
+ protected final String TEXT_33 = NL;
+ protected final String TEXT_34 = NL + "\t<h2>References</h2>" + NL + "\t\t<table border=1 cellspacing=\"0\" width=\"100%\">" + NL + "\t\t<tr>" + NL + "\t\t\t<th align=left>Name</th>" + NL + "\t\t\t<th>Bounds</th>" + NL + "\t\t\t<th>Type</th>" + NL + "\t\t\t<th>Containment</th>" + NL + "\t\t\t<th>Changeable</th>" + NL + "\t\t\t<th>Derived</th>" + NL + "\t\t\t<th>Required</th>" + NL + "\t\t\t<th>Ordered</th>" + NL + "\t\t\t<th>Unique</th>" + NL + "\t\t</tr>" + NL + "\t";
+ protected final String TEXT_35 = NL + "\t\t<tr>" + NL + "\t \t\t<td align=left><b>";
+ protected final String TEXT_36 = "</b></td>" + NL + " \t\t\t<td align=center>";
+ protected final String TEXT_37 = "</td>" + NL + " \t\t\t<td align=left>";
+ protected final String TEXT_38 = "</td>" + NL + " \t\t\t<td align=center>";
+ protected final String TEXT_39 = "</td>" + NL + " \t\t\t<td align=center>";
+ protected final String TEXT_40 = "</td>" + NL + " \t\t\t<td align=center>";
+ protected final String TEXT_41 = "</td>" + NL + " \t\t\t<td align=center>";
+ protected final String TEXT_42 = "</td>" + NL + " \t\t\t<td align=center>";
+ protected final String TEXT_43 = "</td>" + NL + " \t\t\t<td align=center>";
+ protected final String TEXT_44 = "</td>" + NL + " \t\t</tr>" + NL + "\t";
+ protected final String TEXT_45 = NL + "\t</table>";
+ protected final String TEXT_46 = NL;
+ protected final String TEXT_47 = NL + "\t<p>SuperClasses:" + NL + "\t";
+ protected final String TEXT_48 = NL + "\t\t<a href=\"";
+ protected final String TEXT_49 = "\">";
+ protected final String TEXT_50 = "</a>" + NL + "\t";
+ protected final String TEXT_51 = NL;
+ protected final String TEXT_52 = NL;
+
+ public EClassDocGen()
+ {
+ //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;
+
+ orchestration(ctx);
+ if (ctx.useReporter()){
+ ctx.getReporter().executionFinished(ctx.getExecutionBuffer().toString(), ctx);
+ ctx.clearBuffer();}
+
+ stringBuffer.append(TEXT_51);
+ stringBuffer.append(TEXT_52);
+ return stringBuffer.toString();
+ }
+public String orchestration(PatternContext ctx) throws Exception {
+InternalPatternContext ictx = (InternalPatternContext)ctx;
+int index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_body(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+return loop;
+}
+
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ }
+ protected void method_writeEAttributes(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ EList<EAttribute> attributes = ((EClass) _element).getEAllAttributes();
+ stringBuffer.append(TEXT_2);
+ if (attributes.size() > 0) {
+ stringBuffer.append(TEXT_3);
+ for (EAttribute _EAttribute : attributes) {
+ stringBuffer.append(TEXT_4);
+ stringBuffer.append( EmfHtmlDocGen.getName(_EAttribute) );
+ stringBuffer.append(TEXT_5);
+ stringBuffer.append( EmfHtmlDocGen.getBounds(_EAttribute) );
+ stringBuffer.append(TEXT_6);
+ stringBuffer.append( EmfHtmlDocGen.getName(_EAttribute.getEAttributeType()) );
+ stringBuffer.append(TEXT_7);
+ stringBuffer.append( _EAttribute.isChangeable() );
+ stringBuffer.append(TEXT_8);
+ stringBuffer.append( _EAttribute.isVolatile() );
+ stringBuffer.append(TEXT_9);
+ stringBuffer.append( _EAttribute.isTransient() );
+ stringBuffer.append(TEXT_10);
+ stringBuffer.append( _EAttribute.isDerived() );
+ stringBuffer.append(TEXT_11);
+ stringBuffer.append( _EAttribute.isOrdered() );
+ stringBuffer.append(TEXT_12);
+ stringBuffer.append( _EAttribute.isUnique() );
+ stringBuffer.append(TEXT_13);
+ } // end for
+ stringBuffer.append(TEXT_14);
+ } // end if
+ }
+ protected void method_writeEOperations(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ EList<EOperation> operations = ((EClass) _element).getEAllOperations();
+ stringBuffer.append(TEXT_15);
+ if (operations.size() > 0) {
+ stringBuffer.append(TEXT_16);
+ for (EOperation _EOperation : operations) {
+ stringBuffer.append(TEXT_17);
+ stringBuffer.append( EmfHtmlDocGen.getName(_EOperation) );
+ stringBuffer.append(TEXT_18);
+ stringBuffer.append( EmfHtmlDocGen.getBounds(_EOperation) );
+ stringBuffer.append(TEXT_19);
+ if (_EOperation.getEType() != null) {
+ stringBuffer.append(TEXT_20);
+ stringBuffer.append( _EOperation.getEType().getName() );
+ stringBuffer.append(TEXT_21);
+ }
+ else {
+ stringBuffer.append(TEXT_22);
+ stringBuffer.append( "-");
+ stringBuffer.append(TEXT_23);
+ }
+ stringBuffer.append(TEXT_24);
+ for (EParameter _EParameter : _EOperation.getEParameters()) {
+ stringBuffer.append(TEXT_25);
+ stringBuffer.append( EmfHtmlDocGen.getName(_EParameter) );
+ stringBuffer.append(TEXT_26);
+ stringBuffer.append( EmfHtmlDocGen.getName(_EParameter.getEType()) );
+ stringBuffer.append(TEXT_27);
+ } // end for
+ stringBuffer.append(TEXT_28);
+ stringBuffer.append( _EOperation.isRequired() );
+ stringBuffer.append(TEXT_29);
+ stringBuffer.append( _EOperation.isOrdered() );
+ stringBuffer.append(TEXT_30);
+ stringBuffer.append( _EOperation.isUnique() );
+ stringBuffer.append(TEXT_31);
+ } // end for
+ stringBuffer.append(TEXT_32);
+ } // end if
+ }
+ protected void method_writeEReferences(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ EList<EReference> references = ((EClass) _element).getEAllReferences();
+ stringBuffer.append(TEXT_33);
+ if (references.size() > 0) {
+ stringBuffer.append(TEXT_34);
+ for (EReference _EReference : references) {
+ stringBuffer.append(TEXT_35);
+ stringBuffer.append( EmfHtmlDocGen.getName(_EReference) );
+ stringBuffer.append(TEXT_36);
+ stringBuffer.append( EmfHtmlDocGen.getBounds(_EReference) );
+ stringBuffer.append(TEXT_37);
+ stringBuffer.append( EmfHtmlDocGen.getName(_EReference.getEReferenceType()) );
+ stringBuffer.append(TEXT_38);
+ stringBuffer.append( _EReference.isContainment() );
+ stringBuffer.append(TEXT_39);
+ stringBuffer.append( _EReference.isChangeable() );
+ stringBuffer.append(TEXT_40);
+ stringBuffer.append( _EReference.isDerived() );
+ stringBuffer.append(TEXT_41);
+ stringBuffer.append( _EReference.isRequired() );
+ stringBuffer.append(TEXT_42);
+ stringBuffer.append( _EReference.isOrdered() );
+ stringBuffer.append(TEXT_43);
+ stringBuffer.append( _EReference.isUnique() );
+ stringBuffer.append(TEXT_44);
+ } // end for
+ stringBuffer.append(TEXT_45);
+ } // end if
+ }
+ protected void method_writeSuperTypes(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ EList<EClass> superTypes = ((EClass) _element).getESuperTypes();
+ stringBuffer.append(TEXT_46);
+ if (superTypes.size() > 0) {
+ stringBuffer.append(TEXT_47);
+ for (EClass _SuperEClass : superTypes) {
+ stringBuffer.append(TEXT_48);
+ stringBuffer.append( EmfHtmlDocGen.getHtmlFileName(_SuperEClass));
+ stringBuffer.append(TEXT_49);
+ stringBuffer.append( EmfHtmlDocGen.getName(_SuperEClass));
+ stringBuffer.append(TEXT_50);
+ } // end for
+ } // end if
+ }
+ }
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/EClassifierDocGen.java b/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/EClassifierDocGen.java
new file mode 100644
index 0000000..c9d9714
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/EClassifierDocGen.java
@@ -0,0 +1,80 @@
+package emf.docgen.html;
+
+import org.eclipse.egf.emf.docgen.html.util.*;
+import org.eclipse.emf.common.util.*;
+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 EClassifierDocGen extends emf.docgen.html.ENamedElementDocGen {
+ protected static String nl;
+ public static synchronized EClassifierDocGen create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ EClassifierDocGen result = new EClassifierDocGen();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "//default content";
+ protected final String TEXT_2 = NL + "<p><i>back to </i> <a href=\"";
+ protected final String TEXT_3 = "\">";
+ protected final String TEXT_4 = "</a> </p>";
+ protected final String TEXT_5 = NL;
+ protected final String TEXT_6 = NL;
+
+ public EClassifierDocGen()
+ {
+ //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;
+
+ orchestration(ctx);
+ if (ctx.useReporter()){
+ ctx.getReporter().executionFinished(ctx.getExecutionBuffer().toString(), ctx);
+ ctx.clearBuffer();}
+
+ stringBuffer.append(TEXT_5);
+ stringBuffer.append(TEXT_6);
+ return stringBuffer.toString();
+ }
+public String orchestration(PatternContext ctx) throws Exception {
+InternalPatternContext ictx = (InternalPatternContext)ctx;
+int index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_body(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+return loop;
+}
+
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ }
+ protected void method_writeEPackageReference(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ EPackage pOwner = ((EClassifier) _element).getEPackage();
+ stringBuffer.append(TEXT_2);
+ stringBuffer.append( EmfHtmlDocGen.getHtmlFileName(pOwner));
+ stringBuffer.append(TEXT_3);
+ stringBuffer.append( EmfHtmlDocGen.getName(pOwner) );
+ stringBuffer.append(TEXT_4);
+ }
+ }
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/EDataTypeDocGen.java b/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/EDataTypeDocGen.java
new file mode 100644
index 0000000..32f0ffd
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/EDataTypeDocGen.java
@@ -0,0 +1,66 @@
+package emf.docgen.html;
+
+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 EDataTypeDocGen extends emf.docgen.html.EClassifierDocGen {
+ protected static String nl;
+ public static synchronized EDataTypeDocGen create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ EDataTypeDocGen result = new EDataTypeDocGen();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "//default content";
+ protected final String TEXT_2 = NL;
+ protected final String TEXT_3 = NL;
+
+ public EDataTypeDocGen()
+ {
+ //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;
+
+ 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 index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_body(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+return loop;
+}
+
+
+ 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/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/EEnumDocGen.java b/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/EEnumDocGen.java
new file mode 100644
index 0000000..196ab6d
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/EEnumDocGen.java
@@ -0,0 +1,90 @@
+package emf.docgen.html;
+
+import org.eclipse.egf.emf.docgen.html.util.*;
+import org.eclipse.emf.common.util.*;
+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 EEnumDocGen extends emf.docgen.html.EDataTypeDocGen {
+ protected static String nl;
+ public static synchronized EEnumDocGen create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ EEnumDocGen result = new EEnumDocGen();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "//default content";
+ protected final String TEXT_2 = NL;
+ protected final String TEXT_3 = NL + "\t<h2>Enum Literals</h2>" + NL + "\t\t<table border=1 cellspacing=\"0\" width=\"100%\">" + NL + "\t\t<tr>" + NL + "\t\t\t<th align=left>Name</th>" + NL + "\t\t\t<th>Value</th>" + NL + "\t\t</tr>" + NL + "\t";
+ protected final String TEXT_4 = NL + "\t\t<tr>" + NL + " \t\t\t<td align=left><b>";
+ protected final String TEXT_5 = "</b></td>" + NL + " \t\t\t<td align=center>";
+ protected final String TEXT_6 = "</td>" + NL + " \t\t</tr>" + NL + "\t";
+ protected final String TEXT_7 = NL + "\t</table>";
+ protected final String TEXT_8 = NL;
+ protected final String TEXT_9 = NL;
+
+ public EEnumDocGen()
+ {
+ //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;
+
+ orchestration(ctx);
+ if (ctx.useReporter()){
+ ctx.getReporter().executionFinished(ctx.getExecutionBuffer().toString(), ctx);
+ ctx.clearBuffer();}
+
+ stringBuffer.append(TEXT_8);
+ stringBuffer.append(TEXT_9);
+ return stringBuffer.toString();
+ }
+public String orchestration(PatternContext ctx) throws Exception {
+InternalPatternContext ictx = (InternalPatternContext)ctx;
+int index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_body(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+return loop;
+}
+
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ }
+ protected void method_writeEEnumLiteral(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ EList<EEnumLiteral> enumLiterals = ((EEnum) _element).getELiterals();
+ stringBuffer.append(TEXT_2);
+ if (enumLiterals.size() > 0) {
+ stringBuffer.append(TEXT_3);
+ for (EEnumLiteral _EEnumLiteral : enumLiterals) {
+ stringBuffer.append(TEXT_4);
+ stringBuffer.append( EmfHtmlDocGen.getName(_EEnumLiteral) );
+ stringBuffer.append(TEXT_5);
+ stringBuffer.append( _EEnumLiteral.getValue() );
+ stringBuffer.append(TEXT_6);
+ } // end for
+ stringBuffer.append(TEXT_7);
+ } // end if
+ }
+ }
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/EModelElementDocGen.java b/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/EModelElementDocGen.java
new file mode 100644
index 0000000..f205f7b
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/EModelElementDocGen.java
@@ -0,0 +1,95 @@
+package emf.docgen.html;
+
+import org.eclipse.egf.emf.docgen.html.util.*;
+import org.eclipse.emf.common.util.*;
+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 EModelElementDocGen extends emf.docgen.html.EObjectDocGen {
+ protected static String nl;
+ public static synchronized EModelElementDocGen create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ EModelElementDocGen result = new EModelElementDocGen();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "//default content";
+ protected final String TEXT_2 = NL;
+ protected final String TEXT_3 = NL + "\t<p>";
+ protected final String TEXT_4 = "</p>";
+ protected final String TEXT_5 = NL;
+ protected final String TEXT_6 = NL;
+
+ public EModelElementDocGen()
+ {
+ //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;
+
+ orchestration(ctx);
+ if (ctx.useReporter()){
+ ctx.getReporter().executionFinished(ctx.getExecutionBuffer().toString(), ctx);
+ ctx.clearBuffer();}
+
+ stringBuffer.append(TEXT_5);
+ stringBuffer.append(TEXT_6);
+ return stringBuffer.toString();
+ }
+public String orchestration(PatternContext ctx) throws Exception {
+InternalPatternContext ictx = (InternalPatternContext)ctx;
+int index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_body(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+return loop;
+}
+
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ }
+ protected void method_writeEAnnotations(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+
+String result = new String();
+
+for (EAnnotation annotation : ((EModelElement) _element).getEAnnotations()) {
+
+ if (annotation.getSource() == "http://www.eclipse.org/emf/2002/GenModel"
+ || annotation.getSource() == "http://www.eclipse.org/egf/2010/GenDoc") {
+ for (Map.Entry<String, String> detail : annotation.getDetails().entrySet()) {
+ if (detail.getKey()== "documentation" && detail.getValue() != "") {
+ result = result + detail.getValue();
+ }
+ }
+ }
+}
+
+ stringBuffer.append(TEXT_2);
+ if (result.length() > 0) {
+ stringBuffer.append(TEXT_3);
+ stringBuffer.append( result );
+ stringBuffer.append(TEXT_4);
+ } // end if
+ }
+ }
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/ENamedElementDocGen.java b/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/ENamedElementDocGen.java
new file mode 100644
index 0000000..02e5061
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/ENamedElementDocGen.java
@@ -0,0 +1,66 @@
+package emf.docgen.html;
+
+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 ENamedElementDocGen extends emf.docgen.html.EModelElementDocGen {
+ protected static String nl;
+ public static synchronized ENamedElementDocGen create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ ENamedElementDocGen result = new ENamedElementDocGen();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "//default content";
+ protected final String TEXT_2 = NL;
+ protected final String TEXT_3 = NL;
+
+ public ENamedElementDocGen()
+ {
+ //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;
+
+ 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 index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_body(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+return loop;
+}
+
+
+ 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/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/EObjectDocGen.java b/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/EObjectDocGen.java
new file mode 100644
index 0000000..ec82af4
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/EObjectDocGen.java
@@ -0,0 +1,67 @@
+package emf.docgen.html;
+
+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 EObjectDocGen extends object.docgen.html.ObjectDocGen {
+ protected static String nl;
+ public static synchronized EObjectDocGen create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ EObjectDocGen result = new EObjectDocGen();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "//default content";
+ protected final String TEXT_2 = NL;
+ protected final String TEXT_3 = NL;
+
+ public EObjectDocGen()
+ {
+ //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;
+
+ 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 index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_body(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+return loop;
+}
+
+protected org.eclipse.emf.ecore.EObject _element = null;
+
+ 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/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/EPackageDocGen.java b/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/EPackageDocGen.java
new file mode 100644
index 0000000..dc5c61a
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/EPackageDocGen.java
@@ -0,0 +1,178 @@
+package emf.docgen.html;
+
+import org.eclipse.egf.emf.docgen.html.util.*;
+import org.eclipse.emf.common.util.*;
+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 EPackageDocGen extends emf.docgen.html.ENamedElementDocGen {
+ protected static String nl;
+ public static synchronized EPackageDocGen create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ EPackageDocGen result = new EPackageDocGen();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "//default content";
+ protected final String TEXT_2 = NL;
+ protected final String TEXT_3 = NL + "\t<h2>Classes</h2>" + NL + "\t<ul>" + NL + "\t";
+ protected final String TEXT_4 = NL + "\t\t" + NL + "\t\t<li>" + NL + "\t\t\t<a href=\"";
+ protected final String TEXT_5 = "\">";
+ protected final String TEXT_6 = "</a>" + NL + "\t\t</li>" + NL + "\t";
+ protected final String TEXT_7 = NL + "\t</ul>";
+ protected final String TEXT_8 = NL;
+ protected final String TEXT_9 = NL + "\t<h2>Data Type</h2>" + NL + "\t<ul>" + NL + "\t";
+ protected final String TEXT_10 = NL + "\t\t" + NL + "\t\t<li>" + NL + "\t\t\t<a href=\"";
+ protected final String TEXT_11 = "\">";
+ protected final String TEXT_12 = "</a>" + NL + "\t\t</li>" + NL + "\t";
+ protected final String TEXT_13 = NL + "\t</ul>";
+ protected final String TEXT_14 = NL;
+ protected final String TEXT_15 = NL + "\t<h2>Enumerations</h2>" + NL + "\t<ul>" + NL + "\t";
+ protected final String TEXT_16 = NL + "\t\t" + NL + "\t\t<li>" + NL + "\t\t\t<a href=\"";
+ protected final String TEXT_17 = "\">";
+ protected final String TEXT_18 = "</a>" + NL + "\t\t</li>" + NL + "\t";
+ protected final String TEXT_19 = NL + "\t</ul>";
+ protected final String TEXT_20 = NL;
+ protected final String TEXT_21 = NL + "\t<h2>SubPackages</h2>" + NL + "\t<ul>" + NL + "\t";
+ protected final String TEXT_22 = NL + "\t\t<li>" + NL + "\t\t\t<a href=\"";
+ protected final String TEXT_23 = "\">";
+ protected final String TEXT_24 = "</a>" + NL + "\t\t</li>" + NL + "\t";
+ protected final String TEXT_25 = NL + "\t</ul>";
+ protected final String TEXT_26 = NL;
+ protected final String TEXT_27 = NL + "\t<p><i>back to </i> <a href=\"";
+ protected final String TEXT_28 = "\">";
+ protected final String TEXT_29 = "</a> </p>";
+ protected final String TEXT_30 = NL;
+ protected final String TEXT_31 = NL;
+
+ public EPackageDocGen()
+ {
+ //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;
+
+ orchestration(ctx);
+ if (ctx.useReporter()){
+ ctx.getReporter().executionFinished(ctx.getExecutionBuffer().toString(), ctx);
+ ctx.clearBuffer();}
+
+ stringBuffer.append(TEXT_30);
+ stringBuffer.append(TEXT_31);
+ return stringBuffer.toString();
+ }
+public String orchestration(PatternContext ctx) throws Exception {
+InternalPatternContext ictx = (InternalPatternContext)ctx;
+int index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_body(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+return loop;
+}
+
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ }
+ protected void method_writeEClasses(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ EList<EClassifier> cclassifiers = ((EPackage) _element).getEClassifiers();
+ stringBuffer.append(TEXT_2);
+ if (cclassifiers.size() > 0) {
+ stringBuffer.append(TEXT_3);
+ for (EClassifier _EClassifier : cclassifiers) {
+ if (_EClassifier instanceof EClass) {
+ stringBuffer.append(TEXT_4);
+ stringBuffer.append( EmfHtmlDocGen.getHtmlFileName(_EClassifier));
+ stringBuffer.append(TEXT_5);
+ stringBuffer.append( EmfHtmlDocGen.getName(_EClassifier));
+ stringBuffer.append(TEXT_6);
+ }
+ } // end for
+ stringBuffer.append(TEXT_7);
+ } // end if
+ }
+ protected void method_writeEDataType(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ EList<EClassifier> dclassifiers = ((EPackage) _element).getEClassifiers();
+ stringBuffer.append(TEXT_8);
+ if (dclassifiers.size() > 0) {
+ stringBuffer.append(TEXT_9);
+ for (EClassifier _EClassifier : dclassifiers) {
+ if (_EClassifier instanceof EDataType && ! (_EClassifier instanceof EEnum)) {
+ stringBuffer.append(TEXT_10);
+ stringBuffer.append( EmfHtmlDocGen.getHtmlFileName(_EClassifier));
+ stringBuffer.append(TEXT_11);
+ stringBuffer.append( EmfHtmlDocGen.getName(_EClassifier));
+ stringBuffer.append(TEXT_12);
+ }
+ } // end for
+ stringBuffer.append(TEXT_13);
+ } // end if
+ }
+ protected void method_writeEEnum(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ EList<EClassifier> eclassifiers = ((EPackage) _element).getEClassifiers();
+ stringBuffer.append(TEXT_14);
+ if (eclassifiers.size() > 0) {
+ stringBuffer.append(TEXT_15);
+ for (EClassifier _EClassifier : eclassifiers) {
+ if (_EClassifier instanceof EEnum) {
+ stringBuffer.append(TEXT_16);
+ stringBuffer.append( EmfHtmlDocGen.getHtmlFileName(_EClassifier));
+ stringBuffer.append(TEXT_17);
+ stringBuffer.append( EmfHtmlDocGen.getName(_EClassifier));
+ stringBuffer.append(TEXT_18);
+ }
+ } // end for
+ stringBuffer.append(TEXT_19);
+ } // end if
+ }
+ protected void method_writeESubpackages(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ EList<EPackage> packages = ((EPackage) _element).getESubpackages();
+ stringBuffer.append(TEXT_20);
+ if (packages.size() > 0) {
+ stringBuffer.append(TEXT_21);
+ for (EPackage _package : packages) {
+ stringBuffer.append(TEXT_22);
+ stringBuffer.append( EmfHtmlDocGen.getHtmlFileName(_package));
+ stringBuffer.append(TEXT_23);
+ stringBuffer.append( EmfHtmlDocGen.getName(_package));
+ stringBuffer.append(TEXT_24);
+ } // end for
+ stringBuffer.append(TEXT_25);
+ } // end if
+ }
+ protected void method_writeEPackageReference(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ EPackage pOwner = ((EPackage) _element).getESuperPackage();
+ stringBuffer.append(TEXT_26);
+ if (pOwner != null) {
+ stringBuffer.append(TEXT_27);
+ stringBuffer.append( EmfHtmlDocGen.getHtmlFileName(pOwner));
+ stringBuffer.append(TEXT_28);
+ stringBuffer.append( EmfHtmlDocGen.getName(pOwner) );
+ stringBuffer.append(TEXT_29);
+ }
+ }
+ }
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/forStrategy/ClassReport.java b/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/forStrategy/ClassReport.java
new file mode 100644
index 0000000..e9e5f7a
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/forStrategy/ClassReport.java
@@ -0,0 +1,123 @@
+package emf.docgen.html.forStrategy;
+
+import java.util.*;
+import java.util.Map.Entry;
+import org.eclipse.emf.ecore.*;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.egf.model.pattern.*;
+import org.eclipse.egf.pattern.execution.*;
+import org.eclipse.egf.pattern.query.*;
+import org.eclipse.egf.emf.docgen.html.util.*;
+
+public class ClassReport extends emf.docgen.html.EClassDocGen {
+ protected static String nl;
+ public static synchronized ClassReport create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ ClassReport result = new ClassReport();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "<p>Description of ";
+ protected final String TEXT_2 = "</p>";
+ protected final String TEXT_3 = NL;
+ protected final String TEXT_4 = NL;
+
+ public ClassReport()
+ {
+ //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> elementList = null;
+//this pattern can only be called by another (i.e. it's not an entry point in execution)
+
+
+for (Object elementParameter : elementList ) {
+
+this.element = (org.eclipse.emf.ecore.EClass)elementParameter;
+
+
+ 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 index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_setVariable(ictx.getBuffer(), ictx);
+
+method_setSpecificVariables(ictx.getBuffer(), ictx);
+
+method_fileHeader(ictx.getBuffer(), ictx);
+
+method_writeEAnnotations(ictx.getBuffer(), ictx);
+
+method_writeSuperTypes(ictx.getBuffer(), ictx);
+
+method_writeEAttributes(ictx.getBuffer(), ictx);
+
+method_writeEReferences(ictx.getBuffer(), ictx);
+
+method_writeEOperations(ictx.getBuffer(), ictx);
+
+method_writeEPackageReference(ictx.getBuffer(), ictx);
+
+method_fileFooter(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+if (ictx.useReporter()){
+ ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));
+ Map<String, Object> parameterValues = new HashMap<String, Object>();
+ parameterValues.put("element", this.element);
+ ictx.getReporter().loopFinished(loop, ictx, parameterValues);
+ ictx.clearBuffer();}
+return loop;
+}
+
+protected org.eclipse.emf.ecore.EClass element = null;
+public void set_element(org.eclipse.emf.ecore.EClass object) {
+this.element = object;
+}
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append( element.getName() );
+ stringBuffer.append(TEXT_2);
+ }
+ protected void method_setVariable(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+
+ // Set Object variables
+ _Title = element.getName() + " Class";
+
+ // Set EObject variables
+ _element = element;
+
+ }
+ }
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/forStrategy/DataTypeReport.java b/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/forStrategy/DataTypeReport.java
new file mode 100644
index 0000000..65f075b
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/forStrategy/DataTypeReport.java
@@ -0,0 +1,108 @@
+package emf.docgen.html.forStrategy;
+
+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.*;
+import org.eclipse.egf.emf.docgen.html.util.*;
+
+public class DataTypeReport extends emf.docgen.html.EDataTypeDocGen {
+ protected static String nl;
+ public static synchronized DataTypeReport create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ DataTypeReport result = new DataTypeReport();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "//default content";
+ protected final String TEXT_2 = NL;
+ protected final String TEXT_3 = NL;
+
+ public DataTypeReport()
+ {
+ //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> elementList = null;
+//this pattern can only be called by another (i.e. it's not an entry point in execution)
+
+
+for (Object elementParameter : elementList ) {
+
+this.element = (org.eclipse.emf.ecore.EDataType)elementParameter;
+
+
+ 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 index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_setVariable(ictx.getBuffer(), ictx);
+
+method_setSpecificVariables(ictx.getBuffer(), ictx);
+
+method_fileHeader(ictx.getBuffer(), ictx);
+
+method_writeEPackageReference(ictx.getBuffer(), ictx);
+
+method_fileFooter(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+if (ictx.useReporter()){
+ ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));
+ Map<String, Object> parameterValues = new HashMap<String, Object>();
+ parameterValues.put("element", this.element);
+ ictx.getReporter().loopFinished(loop, ictx, parameterValues);
+ ictx.clearBuffer();}
+return loop;
+}
+
+protected org.eclipse.emf.ecore.EDataType element = null;
+public void set_element(org.eclipse.emf.ecore.EDataType object) {
+this.element = object;
+}
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ }
+ protected void method_setVariable(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+
+ // Set Object variables
+ _Title = element.getName() + " Package";
+
+ // Set EObject variables
+ _element = element;
+
+ }
+ }
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/forStrategy/EnumerationReport.java b/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/forStrategy/EnumerationReport.java
new file mode 100644
index 0000000..e23e3f5
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/forStrategy/EnumerationReport.java
@@ -0,0 +1,111 @@
+package emf.docgen.html.forStrategy;
+
+import java.util.*;
+import org.eclipse.emf.ecore.*;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.egf.model.pattern.*;
+import org.eclipse.egf.pattern.execution.*;
+import org.eclipse.egf.pattern.query.*;
+import org.eclipse.egf.emf.docgen.html.util.*;
+
+public class EnumerationReport extends emf.docgen.html.EEnumDocGen {
+ protected static String nl;
+ public static synchronized EnumerationReport create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ EnumerationReport result = new EnumerationReport();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "//default content";
+ protected final String TEXT_2 = NL;
+ protected final String TEXT_3 = NL;
+
+ public EnumerationReport()
+ {
+ //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> elementList = null;
+//this pattern can only be called by another (i.e. it's not an entry point in execution)
+
+
+for (Object elementParameter : elementList ) {
+
+this.element = (org.eclipse.emf.ecore.EEnum)elementParameter;
+
+
+ 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 index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_setVariable(ictx.getBuffer(), ictx);
+
+method_setSpecificVariables(ictx.getBuffer(), ictx);
+
+method_fileHeader(ictx.getBuffer(), ictx);
+
+method_writeEEnumLiteral(ictx.getBuffer(), ictx);
+
+method_writeEPackageReference(ictx.getBuffer(), ictx);
+
+method_fileFooter(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+if (ictx.useReporter()){
+ ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));
+ Map<String, Object> parameterValues = new HashMap<String, Object>();
+ parameterValues.put("element", this.element);
+ ictx.getReporter().loopFinished(loop, ictx, parameterValues);
+ ictx.clearBuffer();}
+return loop;
+}
+
+protected org.eclipse.emf.ecore.EEnum element = null;
+public void set_element(org.eclipse.emf.ecore.EEnum object) {
+this.element = object;
+}
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ }
+ protected void method_setVariable(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+
+ // Set Object variables
+ _Title = element.getName() + " Enumeration";
+
+ // Set EObject variables
+ _element = element;
+
+ }
+ }
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/forStrategy/PackageReport.java b/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/forStrategy/PackageReport.java
new file mode 100644
index 0000000..f5a6c46
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/generated/emf/docgen/html/forStrategy/PackageReport.java
@@ -0,0 +1,132 @@
+package emf.docgen.html.forStrategy;
+
+import java.util.*;
+import java.util.Map.Entry;
+import org.eclipse.emf.ecore.*;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.egf.model.pattern.*;
+import org.eclipse.egf.pattern.execution.*;
+import org.eclipse.egf.pattern.query.*;
+import org.eclipse.egf.emf.docgen.html.util.*;
+
+public class PackageReport extends emf.docgen.html.EPackageDocGen {
+ protected static String nl;
+ public static synchronized PackageReport create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ PackageReport result = new PackageReport();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "<p>Package description of ";
+ protected final String TEXT_2 = "</p>";
+ protected final String TEXT_3 = NL;
+ protected final String TEXT_4 = NL;
+
+ public PackageReport()
+ {
+ //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> elementList = null;
+//this pattern can only be called by another (i.e. it's not an entry point in execution)
+
+
+for (Object elementParameter : elementList ) {
+
+this.element = (org.eclipse.emf.ecore.EPackage)elementParameter;
+
+
+ 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 index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_setVariable(ictx.getBuffer(), ictx);
+
+method_setSpecificVariables(ictx.getBuffer(), ictx);
+
+method_fileHeader(ictx.getBuffer(), ictx);
+
+method_writeEAnnotations(ictx.getBuffer(), ictx);
+
+method_writeESubpackages(ictx.getBuffer(), ictx);
+
+method_writeEClasses(ictx.getBuffer(), ictx);
+
+method_writeEDataType(ictx.getBuffer(), ictx);
+
+method_writeEEnum(ictx.getBuffer(), ictx);
+
+method_writeEPackageReference(ictx.getBuffer(), ictx);
+
+method_fileFooter(ictx.getBuffer(), ictx);
+ {
+final Map<String, Object> parameters = new HashMap<String, Object>();
+index = ictx.getBuffer().length();
+ictx.getExecutionBuffer().append(ictx.getBuffer());
+parameters.put("element", this.element);
+CallbackContext ctx_callback = new CallbackContext(ictx);
+CallHelper.callBack(ctx_callback, parameters);
+}
+
+
+String loop = ictx.getBuffer().toString();
+if (ictx.useReporter()){
+ ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));
+ Map<String, Object> parameterValues = new HashMap<String, Object>();
+ parameterValues.put("element", this.element);
+ ictx.getReporter().loopFinished(loop, ictx, parameterValues);
+ ictx.clearBuffer();}
+return loop;
+}
+
+protected org.eclipse.emf.ecore.EPackage element = null;
+public void set_element(org.eclipse.emf.ecore.EPackage object) {
+this.element = object;
+}
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append( element.getName() );
+ stringBuffer.append(TEXT_2);
+ }
+ protected void method_setVariable(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+
+ // Set Object variables
+ _Title = element.getName() + " Package";
+
+ // Set EObject variables
+ _element = element;
+
+ }
+ }
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/generated/object/docgen/html/ObjectDocGen.java b/portfolio/org.eclipse.egf.emf.docgen.html/generated/object/docgen/html/ObjectDocGen.java
new file mode 100644
index 0000000..45e763f
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/generated/object/docgen/html/ObjectDocGen.java
@@ -0,0 +1,94 @@
+package object.docgen.html;
+
+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 ObjectDocGen
+{
+ protected static String nl;
+ public static synchronized ObjectDocGen create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ ObjectDocGen result = new ObjectDocGen();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "//default content";
+ protected final String TEXT_2 = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">" + NL + "<html>" + NL + "<head>" + NL + "<title>";
+ protected final String TEXT_3 = "</title>" + NL + "</HEAD>" + NL + "" + NL + "<BODY BGCOLOR=\"#ffffff\">" + NL + "" + NL + "<h1 class=\"Head\">";
+ protected final String TEXT_4 = "</h1>";
+ protected final String TEXT_5 = "\t<br/>" + NL + "\t<p><i>";
+ protected final String TEXT_6 = "</i></p>" + NL + "</body>" + NL + "</html>";
+ protected final String TEXT_7 = NL;
+ protected final String TEXT_8 = NL;
+
+ public ObjectDocGen()
+ {
+ //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;
+
+ orchestration(ctx);
+ if (ctx.useReporter()){
+ ctx.getReporter().executionFinished(ctx.getExecutionBuffer().toString(), ctx);
+ ctx.clearBuffer();}
+
+ stringBuffer.append(TEXT_7);
+ stringBuffer.append(TEXT_8);
+ return stringBuffer.toString();
+ }
+public String orchestration(PatternContext ctx) throws Exception {
+InternalPatternContext ictx = (InternalPatternContext)ctx;
+int index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_body(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+return loop;
+}
+
+protected java.lang.String _Title = null;
+protected java.lang.String _copyright = null;
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ }
+ protected void method_fileHeader(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_2);
+ stringBuffer.append( _Title );
+ stringBuffer.append(TEXT_3);
+ stringBuffer.append( _Title );
+ stringBuffer.append(TEXT_4);
+ }
+ protected void method_fileFooter(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_5);
+ stringBuffer.append(_copyright);
+ stringBuffer.append(TEXT_6);
+ }
+ protected void method_setSpecificVariables(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+
+ _copyright = "";
+
+ }
+ }
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/plugin.properties b/portfolio/org.eclipse.egf.emf.docgen.html/plugin.properties
new file mode 100644
index 0000000..25e6424
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/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 EMF Documentation Generator (Incubation)
+providerName=Eclipse Modeling Project
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/plugin.xml b/portfolio/org.eclipse.egf.emf.docgen.html/plugin.xml
new file mode 100644
index 0000000..850aede
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/plugin.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<!--
+ 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/ModelDrivenPatternStrategy.fcore">
+ </fcore>
+ <fcore
+ id="egf/EmfDocGenHtml.fcore">
+ </fcore>
+ </extension>
+
+</plugin>
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/src/.jet b/portfolio/org.eclipse.egf.emf.docgen.html/src/.jet
new file mode 100644
index 0000000..313c4d4
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/src/.jet
@@ -0,0 +1,5 @@
+<%@ jet package="html.modelview" class="myPattern" imports="java.util.* org.eclipse.emf.ecore.* org.eclipse.egf.model.pattern.* org.eclipse.egf.pattern.execution.* org.eclipse.egf.pattern.query.*" %>
+<%// add initialisation of the pattern variables (declaration has been already done).%>
+
+//default content
+
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/src/org/eclipse/egf/emf/docgen/html/EmfDocProductionContextFromGenModel.java b/portfolio/org.eclipse.egf.emf.docgen.html/src/org/eclipse/egf/emf/docgen/html/EmfDocProductionContextFromGenModel.java
new file mode 100644
index 0000000..d34a3b1
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/src/org/eclipse/egf/emf/docgen/html/EmfDocProductionContextFromGenModel.java
@@ -0,0 +1,54 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 2009 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.emf.docgen.html;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+import org.eclipse.egf.ftask.producer.invocation.ITaskProduction;
+import org.eclipse.egf.model.domain.DomainFactory;
+import org.eclipse.egf.model.domain.DomainURI;
+import org.eclipse.emf.codegen.ecore.genmodel.GenModel;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+
+/**
+ * @author Matthieu Helleboid
+ *
+ */
+public class EmfDocProductionContextFromGenModel implements ITaskProduction {
+
+ public void doExecute(ITaskProductionContext productionContext, IProgressMonitor monitor) throws InvocationException {
+ URI genModelURI = productionContext.getInputValue("genModelURI", URI.class);
+
+ ResourceSetImpl resourceSet = new ResourceSetImpl();
+ Resource genModelResource = resourceSet.getResource(genModelURI, true);
+ GenModel genModel = (GenModel) genModelResource.getContents().get(0);
+
+ URI ecoreURI = genModelURI.trimSegments(1).appendSegment(genModel.getForeignModel().get(0));
+
+ productionContext.setOutputValue("docEcoreURI", ecoreURI);
+ productionContext.setOutputValue("docProjectName", genModel.getModelPluginID() + ".doc");
+ }
+
+ public void postExecute(ITaskProductionContext productionContext, IProgressMonitor monitor) throws InvocationException {
+ }
+
+ public void preExecute(ITaskProductionContext productionContext, IProgressMonitor monitor) throws InvocationException {
+ }
+
+}
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/src/org/eclipse/egf/emf/docgen/html/reporter/PatternReporter.java b/portfolio/org.eclipse.egf.emf.docgen.html/src/org/eclipse/egf/emf/docgen/html/reporter/PatternReporter.java
new file mode 100644
index 0000000..4ab0bb5
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/src/org/eclipse/egf/emf/docgen/html/reporter/PatternReporter.java
@@ -0,0 +1,94 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.emf.docgen.html.reporter;
+
+import java.io.ByteArrayInputStream;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.egf.emf.docgen.html.util.EmfHtmlDocGenConstants;
+import org.eclipse.egf.model.pattern.PatternContext;
+import org.eclipse.egf.model.pattern.PatternExecutionReporter;
+import org.eclipse.emf.ecore.ENamedElement;
+
+/**
+ * @author Benoit Langlois
+ *
+ */
+
+public class PatternReporter implements PatternExecutionReporter {
+
+ private static final String HTML_FILE_EXTENSION = EmfHtmlDocGenConstants.HTML_FILE_EXTENSION;
+ private static final String PROJECT_NAME_CONTRACT = "projectName"; //$NON-NLS-1$
+ private static final String OUTPUT_FOLDER_CONTRACT = "outputFolder"; //$NON-NLS-1$
+ private static final String ELEMENT_PATTERN_PARAMETER = "element"; //$NON-NLS-1$
+
+ public void executionFinished(String output, PatternContext context) {
+ }
+
+ public void loopFinished(String output, PatternContext context, Map<String, Object> parameterValues) {
+
+ // Get Task parameters
+ String projectName = (String) context.getValue(PROJECT_NAME_CONTRACT);
+ String outputFolder = (String) context.getValue(OUTPUT_FOLDER_CONTRACT);
+ ENamedElement anENamedElement = (ENamedElement) parameterValues.get(ELEMENT_PATTERN_PARAMETER);
+
+ // Write pattern output contents in file for a loop instance (e.g.,
+ // EClass, EPackage)
+ ByteArrayInputStream outputContent = new ByteArrayInputStream(output.getBytes());
+ try {
+ IFile file = getFile(anENamedElement, projectName, outputFolder);
+ if (file.exists())
+ file.setContents(outputContent, true, false, null);
+ else
+ file.create(outputContent, true, null);
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ /*
+ * Get file where output contents is written
+ */
+ public IFile getFile(ENamedElement anENamedElement, String projectName, String outputFolder) throws CoreException {
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ IProject project = root.getProject(projectName);
+
+ // build the class resource path
+ IPath path = new Path(""); //$NON-NLS-1$
+
+ for (String member : outputFolder.split("\\.|/|\\\\")) { //$NON-NLS-1$
+ path = path.append(member);
+ IFolder folder = project.getFolder(path);
+ if (!folder.exists())
+ folder.create(true, true, null);
+ }
+
+ path = path.append(anENamedElement.getName() + anENamedElement.eClass().getName());
+ path = path.addFileExtension(HTML_FILE_EXTENSION);
+
+ return project.getFile(path);
+ }
+
+}
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/src/org/eclipse/egf/emf/docgen/html/util/EmfHtmlDocGen.java b/portfolio/org.eclipse.egf.emf.docgen.html/src/org/eclipse/egf/emf/docgen/html/util/EmfHtmlDocGen.java
new file mode 100644
index 0000000..a209b37
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/src/org/eclipse/egf/emf/docgen/html/util/EmfHtmlDocGen.java
@@ -0,0 +1,87 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.emf.docgen.html.util;
+
+import org.eclipse.emf.ecore.ENamedElement;
+import org.eclipse.emf.ecore.ETypedElement;
+
+/**
+ * @author Benoit Langlois
+ *
+ */
+
+public class EmfHtmlDocGen {
+
+ private static final String UNKNOWN_ELEMENT = "unknown"; //$NON-NLS-1$
+
+ /**
+ * Provides the lower and upper bounds separated by a dash character
+ *
+ * @param element
+ * ETypedElement
+ * @return
+ */
+ public static String getBounds(ETypedElement element) {
+ String upperBound;
+
+ if (element.getUpperBound() == -1)
+ upperBound = "*"; //$NON-NLS-1$
+ else
+ upperBound = "" + element.getUpperBound(); //$NON-NLS-1$
+
+ return element.getLowerBound() + "-" + upperBound; //$NON-NLS-1$
+ }
+
+ /**
+ * Provides the name of an ENamedElement
+ *
+ * @param element
+ * @return
+ */
+ public static String getName(ENamedElement element) {
+ String value = EmfHtmlDocGenConstants.EMPTY_STRING;
+
+ if (element == null)
+ return value;
+
+ if (element.getName().trim().length() > 0)
+ return element.getName();
+
+ return value;
+ }
+
+ /**
+ * Provides the html file name
+ *
+ * @param element
+ * @return
+ */
+ public static String getHtmlFileName(ENamedElement element) {
+
+ StringBuffer value = new StringBuffer();
+
+ if (element == null || (element.getName().trim().length() == 0)) {
+ value.append(UNKNOWN_ELEMENT);
+ } else {
+ value.append(getName(element));
+ }
+
+ value.append(element.eClass().getName()).append(EmfHtmlDocGenConstants.DOT_STRING).append(EmfHtmlDocGenConstants.HTML_FILE_EXTENSION);
+
+ return value.toString();
+ }
+
+}
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/src/org/eclipse/egf/emf/docgen/html/util/EmfHtmlDocGenConstants.java b/portfolio/org.eclipse.egf.emf.docgen.html/src/org/eclipse/egf/emf/docgen/html/util/EmfHtmlDocGenConstants.java
new file mode 100644
index 0000000..193e305
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/src/org/eclipse/egf/emf/docgen/html/util/EmfHtmlDocGenConstants.java
@@ -0,0 +1,103 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.emf.docgen.html.util;
+
+/**
+ * @author Benoit Langlois
+ */
+
+public interface EmfHtmlDocGenConstants {
+
+
+ /**
+ * Empty string constant.
+ */
+ public static final String EMPTY_STRING = ""; //$NON-NLS-1$
+
+ /**
+ * TAB character.
+ */
+ public static final char TAB_CHARACTER = '\t';
+
+ /**
+ * Slash character.
+ */
+ public static final char SLASH_CHARACTER = '/';
+
+ /**
+ * Dot character.
+ */
+ public static final char DOT_CHARACTER = '.';
+
+ /**
+ * Dot String.
+ */
+ public static final String DOT_STRING = "."; //$NON-NLS-1$
+
+ /**
+ * Comma character.
+ */
+ public static final char COMMA_CHARACTER = ',';
+
+ /**
+ * Semicolon character.
+ */
+ public static final char SEMICOLON_CHARACTER = ';';
+
+ /**
+ * Colon character.
+ */
+ public static final char COLON_CHARACTER = ':';
+
+ /**
+ * White space character.
+ */
+ public static final char WHITE_SPACE_CHARACTER = ' ';
+
+ /**
+ * End of line character.
+ */
+ public static final char EOL_CHARACTER = '\n';
+
+ /**
+ * Quote character.
+ */
+ public static final char QUOTE_CHARACTER = '"';
+
+ /**
+ * Call method prefix, that is go for the parameters (the real prefix being
+ * the method name).
+ */
+ public static final char PARENTHESIS_OPEN_CHARACTER = '(';
+
+ /**
+ * Call method suffix, that is, close parameters list, but do not end call.
+ */
+ public static final char PARENTHESIS_CLOSE_CHARACTER = ')';
+
+ /**
+ * Underscore character.
+ */
+ public static final char UNDERSCORE_CHARACTER = '_';
+
+ /**
+ * Line separator.
+ */
+ public static final String LINE_SEPARATOR = System.getProperty("line.separator"); //$NON-NLS-1$
+
+
+ /**
+ * Html File extension
+ */
+ public static final String HTML_FILE_EXTENSION = "html"; //$NON-NLS-1$
+
+
+}
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._0wZOUAa0Ed-6kIajn4nnRQ/method._0wZOUQa0Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._0wZOUAa0Ed-6kIajn4nnRQ/method._0wZOUQa0Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..92f90d8
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._0wZOUAa0Ed-6kIajn4nnRQ/method._0wZOUQa0Ed-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<%@ jet package="emf.docgen.html" class="EModelElementDocGen" imports="org.eclipse.egf.emf.docgen.html.util.* org.eclipse.emf.common.util.* 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/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._0wZOUAa0Ed-6kIajn4nnRQ/method._0wZOUga0Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._0wZOUAa0Ed-6kIajn4nnRQ/method._0wZOUga0Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._0wZOUAa0Ed-6kIajn4nnRQ/method._0wZOUga0Ed-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._0wZOUAa0Ed-6kIajn4nnRQ/method._0wZOUwa0Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._0wZOUAa0Ed-6kIajn4nnRQ/method._0wZOUwa0Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..8d16cca
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._0wZOUAa0Ed-6kIajn4nnRQ/method._0wZOUwa0Ed-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+//default content
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._0wZOUAa0Ed-6kIajn4nnRQ/method._0wZOVAa0Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._0wZOUAa0Ed-6kIajn4nnRQ/method._0wZOVAa0Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._0wZOUAa0Ed-6kIajn4nnRQ/method._0wZOVAa0Ed-6kIajn4nnRQ.pt
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._0wZOUAa0Ed-6kIajn4nnRQ/method._YI5ZYAqZEd-RmqToXpY29g.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._0wZOUAa0Ed-6kIajn4nnRQ/method._YI5ZYAqZEd-RmqToXpY29g.pt
new file mode 100644
index 0000000..c55c16c
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._0wZOUAa0Ed-6kIajn4nnRQ/method._YI5ZYAqZEd-RmqToXpY29g.pt
@@ -0,0 +1,19 @@
+<%
+String result = new String();
+
+for (EAnnotation annotation : ((EModelElement) _element).getEAnnotations()) {
+
+ if (annotation.getSource() == "http://www.eclipse.org/emf/2002/GenModel"
+ || annotation.getSource() == "http://www.eclipse.org/egf/2010/GenDoc") {
+ for (Map.Entry<String, String> detail : annotation.getDetails().entrySet()) {
+ if (detail.getKey()== "documentation" && detail.getValue() != "") {
+ result = result + detail.getValue();
+ }
+ }
+ }
+}
+%>
+
+<% if (result.length() > 0) {%>
+ <p><%= result %></p>
+<% } // end if %>
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._1_qTUAhgEd-6kIajn4nnRQ/method._0ZrsoAhjEd-3P_wTpqyVSA.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._1_qTUAhgEd-6kIajn4nnRQ/method._0ZrsoAhjEd-3P_wTpqyVSA.pt
new file mode 100644
index 0000000..14e2118
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._1_qTUAhgEd-6kIajn4nnRQ/method._0ZrsoAhjEd-3P_wTpqyVSA.pt
@@ -0,0 +1,7 @@
+<%
+ // Set Object variables
+ _Title = element.getName() + " Package";
+
+ // Set EObject variables
+ _element = element;
+%>
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._1_qTUAhgEd-6kIajn4nnRQ/method._1_qTUQhgEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._1_qTUAhgEd-6kIajn4nnRQ/method._1_qTUQhgEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..903e744
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._1_qTUAhgEd-6kIajn4nnRQ/method._1_qTUQhgEd-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<%@ jet package="emf.docgen.html.forStrategy" class="DataTypeReport" imports="java.util.* org.eclipse.emf.ecore.* org.eclipse.egf.model.pattern.* org.eclipse.egf.pattern.execution.* org.eclipse.egf.pattern.query.* org.eclipse.egf.emf.docgen.html.util.*" %>
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._1_qTUAhgEd-6kIajn4nnRQ/method._1_qTUghgEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._1_qTUAhgEd-6kIajn4nnRQ/method._1_qTUghgEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._1_qTUAhgEd-6kIajn4nnRQ/method._1_qTUghgEd-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._1_qTUAhgEd-6kIajn4nnRQ/method._1_qTUwhgEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._1_qTUAhgEd-6kIajn4nnRQ/method._1_qTUwhgEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..8d16cca
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._1_qTUAhgEd-6kIajn4nnRQ/method._1_qTUwhgEd-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+//default content
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._1_qTUAhgEd-6kIajn4nnRQ/method._1_qTVAhgEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._1_qTUAhgEd-6kIajn4nnRQ/method._1_qTVAhgEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._1_qTUAhgEd-6kIajn4nnRQ/method._1_qTVAhgEd-6kIajn4nnRQ.pt
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._8Jp64Aa0Ed-6kIajn4nnRQ/method._7N9awAbMEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._8Jp64Aa0Ed-6kIajn4nnRQ/method._7N9awAbMEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..da36e4b
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._8Jp64Aa0Ed-6kIajn4nnRQ/method._7N9awAbMEd-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<% ENamedElement _ENamedElementGenDoc = null; %>
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._8Jp64Aa0Ed-6kIajn4nnRQ/method._8Jp64Qa0Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._8Jp64Aa0Ed-6kIajn4nnRQ/method._8Jp64Qa0Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..f250806
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._8Jp64Aa0Ed-6kIajn4nnRQ/method._8Jp64Qa0Ed-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<%@ jet package="emf.docgen.html" class="ENamedElementDocGen" imports="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/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._8Jp64Aa0Ed-6kIajn4nnRQ/method._8Jp64ga0Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._8Jp64Aa0Ed-6kIajn4nnRQ/method._8Jp64ga0Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._8Jp64Aa0Ed-6kIajn4nnRQ/method._8Jp64ga0Ed-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._8Jp64Aa0Ed-6kIajn4nnRQ/method._8Jp64wa0Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._8Jp64Aa0Ed-6kIajn4nnRQ/method._8Jp64wa0Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..8d16cca
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._8Jp64Aa0Ed-6kIajn4nnRQ/method._8Jp64wa0Ed-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+//default content
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._8Jp64Aa0Ed-6kIajn4nnRQ/method._8Jp65Aa0Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._8Jp64Aa0Ed-6kIajn4nnRQ/method._8Jp65Aa0Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._8Jp64Aa0Ed-6kIajn4nnRQ/method._8Jp65Aa0Ed-6kIajn4nnRQ.pt
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._8Jp64Aa0Ed-6kIajn4nnRQ/method._cF4dkAbOEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._8Jp64Aa0Ed-6kIajn4nnRQ/method._cF4dkAbOEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..d56f9b5
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._8Jp64Aa0Ed-6kIajn4nnRQ/method._cF4dkAbOEd-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<% _Title = _ENamedElementGenDoc.getName(); %>
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._3yCh0AheEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._3yCh0AheEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..32e91bf
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._3yCh0AheEd-6kIajn4nnRQ.pt
@@ -0,0 +1,15 @@
+<% EList<EClassifier> dclassifiers = ((EPackage) _element).getEClassifiers();%>
+
+<% if (dclassifiers.size() > 0) { %>
+ <h2>Data Type</h2>
+ <ul>
+ <% for (EClassifier _EClassifier : dclassifiers) {
+ if (_EClassifier instanceof EDataType && ! (_EClassifier instanceof EEnum)) { %>
+
+ <li>
+ <a href="<%= EmfHtmlDocGen.getHtmlFileName(_EClassifier)%>"><%= EmfHtmlDocGen.getName(_EClassifier)%></a>
+ </li>
+ <% }
+ } // end for%>
+ </ul>
+<% } // end if %>
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._5-QhwAheEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._5-QhwAheEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..00e7aa3
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._5-QhwAheEd-6kIajn4nnRQ.pt
@@ -0,0 +1,15 @@
+<% EList<EClassifier> eclassifiers = ((EPackage) _element).getEClassifiers();%>
+
+<% if (eclassifiers.size() > 0) { %>
+ <h2>Enumerations</h2>
+ <ul>
+ <% for (EClassifier _EClassifier : eclassifiers) {
+ if (_EClassifier instanceof EEnum) { %>
+
+ <li>
+ <a href="<%= EmfHtmlDocGen.getHtmlFileName(_EClassifier)%>"><%= EmfHtmlDocGen.getName(_EClassifier)%></a>
+ </li>
+ <% }
+ } // end for%>
+ </ul>
+<% } // end if %>
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._9IqvoAhbEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._9IqvoAhbEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..9417308
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._9IqvoAhbEd-6kIajn4nnRQ.pt
@@ -0,0 +1,5 @@
+<% EPackage pOwner = ((EPackage) _element).getESuperPackage(); %>
+
+<% if (pOwner != null) { %>
+ <p><i>back to </i> <a href="<%= EmfHtmlDocGen.getHtmlFileName(pOwner)%>"><%= EmfHtmlDocGen.getName(pOwner) %></a> </p>
+<% } %>
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._ChgNwQa1Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._ChgNwQa1Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..998f19e
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._ChgNwQa1Ed-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<%@ jet package="emf.docgen.html" class="EPackageDocGen" imports="org.eclipse.egf.emf.docgen.html.util.* org.eclipse.emf.common.util.* 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/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._ChgNwga1Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._ChgNwga1Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._ChgNwga1Ed-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._ChgNwwa1Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._ChgNwwa1Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..8d16cca
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._ChgNwwa1Ed-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+//default content
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._ChgNxAa1Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._ChgNxAa1Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._ChgNxAa1Ed-6kIajn4nnRQ.pt
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._JSTm0AbvEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._JSTm0AbvEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..6a881b3
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._JSTm0AbvEd-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<% EPackage _EPackage = null; %>
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._XJctwAhYEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._XJctwAhYEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..5bd5f9b
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._XJctwAhYEd-6kIajn4nnRQ.pt
@@ -0,0 +1,12 @@
+<% EList<EPackage> packages = ((EPackage) _element).getESubpackages();%>
+
+<% if (packages.size() > 0) { %>
+ <h2>SubPackages</h2>
+ <ul>
+ <% for (EPackage _package : packages) { %>
+ <li>
+ <a href="<%= EmfHtmlDocGen.getHtmlFileName(_package)%>"><%= EmfHtmlDocGen.getName(_package)%></a>
+ </li>
+ <%} // end for%>
+ </ul>
+<% } // end if %>
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._rImoUAbuEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._rImoUAbuEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..ec06c61
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ChgNwAa1Ed-6kIajn4nnRQ/method._rImoUAbuEd-6kIajn4nnRQ.pt
@@ -0,0 +1,15 @@
+<% EList<EClassifier> cclassifiers = ((EPackage) _element).getEClassifiers();%>
+
+<% if (cclassifiers.size() > 0) { %>
+ <h2>Classes</h2>
+ <ul>
+ <% for (EClassifier _EClassifier : cclassifiers) {
+ if (_EClassifier instanceof EClass) { %>
+
+ <li>
+ <a href="<%= EmfHtmlDocGen.getHtmlFileName(_EClassifier)%>"><%= EmfHtmlDocGen.getName(_EClassifier)%></a>
+ </li>
+ <% }
+ } // end for%>
+ </ul>
+<% } // end if %>
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._G-Qs8Aa1Ed-6kIajn4nnRQ/method._G-Qs8Qa1Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._G-Qs8Aa1Ed-6kIajn4nnRQ/method._G-Qs8Qa1Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..8d8effa
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._G-Qs8Aa1Ed-6kIajn4nnRQ/method._G-Qs8Qa1Ed-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<%@ jet package="emf.docgen.html" class="EClassifierDocGen" imports="org.eclipse.egf.emf.docgen.html.util.* org.eclipse.emf.common.util.* 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/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._G-Qs8Aa1Ed-6kIajn4nnRQ/method._G-Qs8ga1Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._G-Qs8Aa1Ed-6kIajn4nnRQ/method._G-Qs8ga1Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._G-Qs8Aa1Ed-6kIajn4nnRQ/method._G-Qs8ga1Ed-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._G-Qs8Aa1Ed-6kIajn4nnRQ/method._G-Qs8wa1Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._G-Qs8Aa1Ed-6kIajn4nnRQ/method._G-Qs8wa1Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..8d16cca
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._G-Qs8Aa1Ed-6kIajn4nnRQ/method._G-Qs8wa1Ed-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+//default content
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._G-Qs8Aa1Ed-6kIajn4nnRQ/method._G-Qs9Aa1Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._G-Qs8Aa1Ed-6kIajn4nnRQ/method._G-Qs9Aa1Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._G-Qs8Aa1Ed-6kIajn4nnRQ/method._G-Qs9Aa1Ed-6kIajn4nnRQ.pt
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._G-Qs8Aa1Ed-6kIajn4nnRQ/method._VZrkEAe6Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._G-Qs8Aa1Ed-6kIajn4nnRQ/method._VZrkEAe6Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..dc997da
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._G-Qs8Aa1Ed-6kIajn4nnRQ/method._VZrkEAe6Ed-6kIajn4nnRQ.pt
@@ -0,0 +1,2 @@
+<% EPackage pOwner = ((EClassifier) _element).getEPackage(); %>
+<p><i>back to </i> <a href="<%= EmfHtmlDocGen.getHtmlFileName(pOwner)%>"><%= EmfHtmlDocGen.getName(pOwner) %></a> </p>
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._HABc8Aa0Ed-6kIajn4nnRQ/method._HABc8Qa0Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._HABc8Aa0Ed-6kIajn4nnRQ/method._HABc8Qa0Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..8774288
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._HABc8Aa0Ed-6kIajn4nnRQ/method._HABc8Qa0Ed-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<%@ jet package="emf.docgen.html" class="EObjectDocGen" imports="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/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._HABc8Aa0Ed-6kIajn4nnRQ/method._HABc8ga0Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._HABc8Aa0Ed-6kIajn4nnRQ/method._HABc8ga0Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._HABc8Aa0Ed-6kIajn4nnRQ/method._HABc8ga0Ed-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._HABc8Aa0Ed-6kIajn4nnRQ/method._HABc8wa0Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._HABc8Aa0Ed-6kIajn4nnRQ/method._HABc8wa0Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..8d16cca
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._HABc8Aa0Ed-6kIajn4nnRQ/method._HABc8wa0Ed-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+//default content
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._HABc8Aa0Ed-6kIajn4nnRQ/method._HABc9Aa0Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._HABc8Aa0Ed-6kIajn4nnRQ/method._HABc9Aa0Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._HABc8Aa0Ed-6kIajn4nnRQ/method._HABc9Aa0Ed-6kIajn4nnRQ.pt
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._HABc8Aa0Ed-6kIajn4nnRQ/method._P9WKsAqNEd-o4MG7iLHReg.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._HABc8Aa0Ed-6kIajn4nnRQ/method._P9WKsAqNEd-o4MG7iLHReg.pt
new file mode 100644
index 0000000..7d7c89e
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._HABc8Aa0Ed-6kIajn4nnRQ/method._P9WKsAqNEd-o4MG7iLHReg.pt
@@ -0,0 +1,18 @@
+<%
+String result = new String();
+
+for (EAnnotation annotation : _element.getEAnnotations()) {
+
+ if (annotation.getSource() == "http://www.eclipse.org/emf/2002/GenModel") {
+ for (EMap detail : _element.getDetails()) {
+ if (detail.getKey ("documentation") != "") {
+ result = result + detail.getValue();
+ }
+ }
+ }
+}
+%>
+
+<% if (result.size() > 0) {
+ <p><%= result %></p>
+<% } // end if %>
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._JJGK8Ae0Ed-6kIajn4nnRQ/method._JJGK8Qe0Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._JJGK8Ae0Ed-6kIajn4nnRQ/method._JJGK8Qe0Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..55ba22c
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._JJGK8Ae0Ed-6kIajn4nnRQ/method._JJGK8Qe0Ed-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<%@ jet package="emf.docgen.html" class="EDataTypeDocGen" imports="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/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._JJGK8Ae0Ed-6kIajn4nnRQ/method._JJGK8ge0Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._JJGK8Ae0Ed-6kIajn4nnRQ/method._JJGK8ge0Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._JJGK8Ae0Ed-6kIajn4nnRQ/method._JJGK8ge0Ed-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._JJGK8Ae0Ed-6kIajn4nnRQ/method._JJGK8we0Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._JJGK8Ae0Ed-6kIajn4nnRQ/method._JJGK8we0Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..8d16cca
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._JJGK8Ae0Ed-6kIajn4nnRQ/method._JJGK8we0Ed-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+//default content
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._JJGK8Ae0Ed-6kIajn4nnRQ/method._JJGK9Ae0Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._JJGK8Ae0Ed-6kIajn4nnRQ/method._JJGK9Ae0Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._JJGK8Ae0Ed-6kIajn4nnRQ/method._JJGK9Ae0Ed-6kIajn4nnRQ.pt
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._GqA7cAbaEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._GqA7cAbaEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..68f5884
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._GqA7cAbaEd-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<p>Class description of <%= _EClass.getName() %></p>
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._K0k3MQa1Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._K0k3MQa1Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..57533ec
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._K0k3MQa1Ed-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<%@ jet package="emf.docgen.html" class="EClassDocGen" imports="org.eclipse.egf.emf.docgen.html.util.* org.eclipse.emf.common.util.* 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/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._K0k3Mga1Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._K0k3Mga1Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._K0k3Mga1Ed-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._K0k3Mwa1Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._K0k3Mwa1Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..acda79e
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._K0k3Mwa1Ed-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+// Class body contents
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._K0k3NAa1Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._K0k3NAa1Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._K0k3NAa1Ed-6kIajn4nnRQ.pt
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._c5ZJ4AbpEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._c5ZJ4AbpEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..ebd66e8
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._c5ZJ4AbpEd-6kIajn4nnRQ.pt
@@ -0,0 +1,41 @@
+<% EList<EOperation> operations = ((EClass) _element).getEAllOperations();%>
+
+<% if (operations.size() > 0) { %>
+ <h2>Operations</h2>
+ <table border=1 cellspacing="0" width="100%">
+ <tr>
+ <th align=left>Name</th>
+ <th>Bounds</th>
+ <th>Return</th>
+ <th>Parameter(s)</th>
+ <th>Required</th>
+ <th>Ordered</th>
+ <th>Unique</th>
+ </tr>
+ <% for (EOperation _EOperation : operations) { %>
+ <tr>
+ <td align=left><b><%= EmfHtmlDocGen.getName(_EOperation) %></b></td>
+ <td align=center><%= EmfHtmlDocGen.getBounds(_EOperation) %></td>
+ <td align=center>
+ <% if (_EOperation.getEType() != null) {%>
+ <%= _EOperation.getEType().getName() %>
+ <% }
+ else {%>
+ <%= "-"%>
+ <%}%>
+ </td>
+ <td align=left>
+ <% for (EParameter _EParameter : _EOperation.getEParameters()) { %>
+ <p><%= EmfHtmlDocGen.getName(_EParameter) %> - <%= EmfHtmlDocGen.getName(_EParameter.getEType()) %></p>
+ <%} // end for%>
+ </td>
+ <td align=center><%= _EOperation.isRequired() %></td>
+ <td align=center><%= _EOperation.isOrdered() %></td>
+ <td align=center><%= _EOperation.isUnique() %></td>
+
+ </tr>
+
+
+ <%} // end for%>
+ </table>
+<% } // end if %>
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._hbnLIAbZEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._hbnLIAbZEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..4e89b52
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._hbnLIAbZEd-6kIajn4nnRQ.pt
@@ -0,0 +1,31 @@
+<% EList<EAttribute> attributes = ((EClass) _element).getEAllAttributes();%>
+
+<% if (attributes.size() > 0) { %>
+ <h2>Attributes</h2>
+ <table border=1 cellspacing="0" width="100%">
+ <tr>
+ <th align=left>Name</th>
+ <th>Bounds</th>
+ <th>Type</th>
+ <th>Changeable</th>
+ <th>Volatile</th>
+ <th>Transient</th>
+ <th>Derived</th>
+ <th>Ordered</th>
+ <th>Unique</th>
+ </tr>
+ <% for (EAttribute _EAttribute : attributes) { %>
+ <tr>
+ <td align=left><b><%= EmfHtmlDocGen.getName(_EAttribute) %></b></td>
+ <td align=center><%= EmfHtmlDocGen.getBounds(_EAttribute) %> </td>
+ <td align=left><%= EmfHtmlDocGen.getName(_EAttribute.getEAttributeType()) %></td>
+ <td align=center><%= _EAttribute.isChangeable() %></td>
+ <td align=center><%= _EAttribute.isVolatile() %></td>
+ <td align=center><%= _EAttribute.isTransient() %></td>
+ <td align=center><%= _EAttribute.isDerived() %></td>
+ <td align=center><%= _EAttribute.isOrdered() %></td>
+ <td align=center><%= _EAttribute.isUnique() %></td>
+ </tr>
+ <%} // end for%>
+ </table>
+<% } // end if %>
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._lTjW8AbiEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._lTjW8AbiEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..c67bd95
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._lTjW8AbiEd-6kIajn4nnRQ.pt
@@ -0,0 +1,31 @@
+<% EList<EReference> references = ((EClass) _element).getEAllReferences();%>
+
+<% if (references.size() > 0) { %>
+ <h2>References</h2>
+ <table border=1 cellspacing="0" width="100%">
+ <tr>
+ <th align=left>Name</th>
+ <th>Bounds</th>
+ <th>Type</th>
+ <th>Containment</th>
+ <th>Changeable</th>
+ <th>Derived</th>
+ <th>Required</th>
+ <th>Ordered</th>
+ <th>Unique</th>
+ </tr>
+ <% for (EReference _EReference : references) { %>
+ <tr>
+ <td align=left><b><%= EmfHtmlDocGen.getName(_EReference) %></b></td>
+ <td align=center><%= EmfHtmlDocGen.getBounds(_EReference) %></td>
+ <td align=left><%= EmfHtmlDocGen.getName(_EReference.getEReferenceType()) %></td>
+ <td align=center><%= _EReference.isContainment() %></td>
+ <td align=center><%= _EReference.isChangeable() %></td>
+ <td align=center><%= _EReference.isDerived() %></td>
+ <td align=center><%= _EReference.isRequired() %></td>
+ <td align=center><%= _EReference.isOrdered() %></td>
+ <td align=center><%= _EReference.isUnique() %></td>
+ </tr>
+ <%} // end for%>
+ </table>
+<% } // end if %>
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._mdgiQAbaEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._mdgiQAbaEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..9f7fc99
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._mdgiQAbaEd-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<% EClass _EClass = null; %>
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._zu6s8AblEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._zu6s8AblEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..90216f9
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._K0k3MAa1Ed-6kIajn4nnRQ/method._zu6s8AblEd-6kIajn4nnRQ.pt
@@ -0,0 +1,8 @@
+<% EList<EClass> superTypes = ((EClass) _element).getESuperTypes();%>
+
+<% if (superTypes.size() > 0) { %>
+ <p>SuperClasses:
+ <% for (EClass _SuperEClass : superTypes) { %>
+ <a href="<%= EmfHtmlDocGen.getHtmlFileName(_SuperEClass)%>"><%= EmfHtmlDocGen.getName(_SuperEClass)%></a>
+ <%} // end for%>
+<% } // end if %>
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._Y2B94Ae0Ed-6kIajn4nnRQ/method._Y2B94Qe0Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._Y2B94Ae0Ed-6kIajn4nnRQ/method._Y2B94Qe0Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..0847761
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._Y2B94Ae0Ed-6kIajn4nnRQ/method._Y2B94Qe0Ed-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<%@ jet package="emf.docgen.html" class="EEnumDocGen" imports="org.eclipse.egf.emf.docgen.html.util.* org.eclipse.emf.common.util.* 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/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._Y2B94Ae0Ed-6kIajn4nnRQ/method._Y2B94ge0Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._Y2B94Ae0Ed-6kIajn4nnRQ/method._Y2B94ge0Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._Y2B94Ae0Ed-6kIajn4nnRQ/method._Y2B94ge0Ed-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._Y2B94Ae0Ed-6kIajn4nnRQ/method._Y2B94we0Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._Y2B94Ae0Ed-6kIajn4nnRQ/method._Y2B94we0Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..8d16cca
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._Y2B94Ae0Ed-6kIajn4nnRQ/method._Y2B94we0Ed-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+//default content
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._Y2B94Ae0Ed-6kIajn4nnRQ/method._Y2B95Ae0Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._Y2B94Ae0Ed-6kIajn4nnRQ/method._Y2B95Ae0Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._Y2B94Ae0Ed-6kIajn4nnRQ/method._Y2B95Ae0Ed-6kIajn4nnRQ.pt
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._Y2B94Ae0Ed-6kIajn4nnRQ/method._mELvUAe2Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._Y2B94Ae0Ed-6kIajn4nnRQ/method._mELvUAe2Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..8de32c6
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._Y2B94Ae0Ed-6kIajn4nnRQ/method._mELvUAe2Ed-6kIajn4nnRQ.pt
@@ -0,0 +1,17 @@
+<% EList<EEnumLiteral> enumLiterals = ((EEnum) _element).getELiterals();%>
+
+<% if (enumLiterals.size() > 0) { %>
+ <h2>Enum Literals</h2>
+ <table border=1 cellspacing="0" width="100%">
+ <tr>
+ <th align=left>Name</th>
+ <th>Value</th>
+ </tr>
+ <% for (EEnumLiteral _EEnumLiteral : enumLiterals) { %>
+ <tr>
+ <td align=left><b><%= EmfHtmlDocGen.getName(_EEnumLiteral) %></b></td>
+ <td align=center><%= _EEnumLiteral.getValue() %></td>
+ </tr>
+ <%} // end for%>
+ </table>
+<% } // end if %>
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._h6tXMAazEd-6kIajn4nnRQ/method._h6tXMQazEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._h6tXMAazEd-6kIajn4nnRQ/method._h6tXMQazEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..1851b19
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._h6tXMAazEd-6kIajn4nnRQ/method._h6tXMQazEd-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<%@ jet package="object.view.docgen.html" class="myPattern" imports="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/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._h6tXMAazEd-6kIajn4nnRQ/method._h6tXMgazEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._h6tXMAazEd-6kIajn4nnRQ/method._h6tXMgazEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._h6tXMAazEd-6kIajn4nnRQ/method._h6tXMgazEd-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._h6tXMAazEd-6kIajn4nnRQ/method._h6tXMwazEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._h6tXMAazEd-6kIajn4nnRQ/method._h6tXMwazEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..8d16cca
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._h6tXMAazEd-6kIajn4nnRQ/method._h6tXMwazEd-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+//default content
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._h6tXMAazEd-6kIajn4nnRQ/method._h6tXNAazEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._h6tXMAazEd-6kIajn4nnRQ/method._h6tXNAazEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._h6tXMAazEd-6kIajn4nnRQ/method._h6tXNAazEd-6kIajn4nnRQ.pt
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._kXoFkAazEd-6kIajn4nnRQ/method._U9Z3oAbREd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._kXoFkAazEd-6kIajn4nnRQ/method._U9Z3oAbREd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..daaa5fe
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._kXoFkAazEd-6kIajn4nnRQ/method._U9Z3oAbREd-6kIajn4nnRQ.pt
@@ -0,0 +1,4 @@
+ <br/>
+ <p><i><%=_copyright%></i></p>
+</body>
+</html>
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._kXoFkAazEd-6kIajn4nnRQ/method._UL7-cAbREd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._kXoFkAazEd-6kIajn4nnRQ/method._UL7-cAbREd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..2121412
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._kXoFkAazEd-6kIajn4nnRQ/method._UL7-cAbREd-6kIajn4nnRQ.pt
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title><%= _Title %></title>
+</HEAD>
+
+<BODY BGCOLOR="#ffffff">
+
+<h1 class="Head"><%= _Title %></h1>
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._kXoFkAazEd-6kIajn4nnRQ/method._gvTcsAezEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._kXoFkAazEd-6kIajn4nnRQ/method._gvTcsAezEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..c595401
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._kXoFkAazEd-6kIajn4nnRQ/method._gvTcsAezEd-6kIajn4nnRQ.pt
@@ -0,0 +1,3 @@
+<%
+ _copyright = "";
+%>
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._kXoFkAazEd-6kIajn4nnRQ/method._kXoFkQazEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._kXoFkAazEd-6kIajn4nnRQ/method._kXoFkQazEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..2d64991
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._kXoFkAazEd-6kIajn4nnRQ/method._kXoFkQazEd-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<%@ jet package="object.docgen.html" class="ObjectDocGen" imports="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/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._kXoFkAazEd-6kIajn4nnRQ/method._kXoFkgazEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._kXoFkAazEd-6kIajn4nnRQ/method._kXoFkgazEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._kXoFkAazEd-6kIajn4nnRQ/method._kXoFkgazEd-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._kXoFkAazEd-6kIajn4nnRQ/method._kXoFkwazEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._kXoFkAazEd-6kIajn4nnRQ/method._kXoFkwazEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..8d16cca
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._kXoFkAazEd-6kIajn4nnRQ/method._kXoFkwazEd-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+//default content
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._kXoFkAazEd-6kIajn4nnRQ/method._kXoFlAazEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._kXoFkAazEd-6kIajn4nnRQ/method._kXoFlAazEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._kXoFkAazEd-6kIajn4nnRQ/method._kXoFlAazEd-6kIajn4nnRQ.pt
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._kXoFkAazEd-6kIajn4nnRQ/method._vhf-MAbNEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._kXoFkAazEd-6kIajn4nnRQ/method._vhf-MAbNEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..6fa2db2
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._kXoFkAazEd-6kIajn4nnRQ/method._vhf-MAbNEd-6kIajn4nnRQ.pt
@@ -0,0 +1,3 @@
+<%
+// String _Title = new String();
+%>
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ouOkgAbWEd-6kIajn4nnRQ/method._FWeXUAbXEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ouOkgAbWEd-6kIajn4nnRQ/method._FWeXUAbXEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..217c8e5
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ouOkgAbWEd-6kIajn4nnRQ/method._FWeXUAbXEd-6kIajn4nnRQ.pt
@@ -0,0 +1,7 @@
+<%
+ // Set Object variables
+ _Title = element.getName() + " Class";
+
+ // Set EObject variables
+ _element = element;
+%>
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ouOkgAbWEd-6kIajn4nnRQ/method._mljdMAeZEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ouOkgAbWEd-6kIajn4nnRQ/method._mljdMAeZEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..9f71602
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ouOkgAbWEd-6kIajn4nnRQ/method._mljdMAeZEd-6kIajn4nnRQ.pt
@@ -0,0 +1,4 @@
+<%
+ // Set Object variables
+ _copyright = "Copyright (c) 2010 The Eclipse Foundation. All Rights Reserved.";
+%>
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ouOkgAbWEd-6kIajn4nnRQ/method._ouOkgQbWEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ouOkgAbWEd-6kIajn4nnRQ/method._ouOkgQbWEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..e550af6
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ouOkgAbWEd-6kIajn4nnRQ/method._ouOkgQbWEd-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<%@ jet package="emf.docgen.html.forStrategy" class="ClassReport" imports="java.util.* java.util.Map.Entry org.eclipse.emf.ecore.* org.eclipse.emf.common.util.EList org.eclipse.egf.model.pattern.* org.eclipse.egf.pattern.execution.* org.eclipse.egf.pattern.query.* org.eclipse.egf.emf.docgen.html.util.*" %>
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ouOkgAbWEd-6kIajn4nnRQ/method._ouOkggbWEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ouOkgAbWEd-6kIajn4nnRQ/method._ouOkggbWEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ouOkgAbWEd-6kIajn4nnRQ/method._ouOkggbWEd-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ouOkgAbWEd-6kIajn4nnRQ/method._ouOkgwbWEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ouOkgAbWEd-6kIajn4nnRQ/method._ouOkgwbWEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..d2d3249
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ouOkgAbWEd-6kIajn4nnRQ/method._ouOkgwbWEd-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<p>Description of <%= element.getName() %></p>
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ouOkgAbWEd-6kIajn4nnRQ/method._ouOkhAbWEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ouOkgAbWEd-6kIajn4nnRQ/method._ouOkhAbWEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._ouOkgAbWEd-6kIajn4nnRQ/method._ouOkhAbWEd-6kIajn4nnRQ.pt
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._xhMiAAeyEd-6kIajn4nnRQ/method._lJca0Ae1Ed-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._xhMiAAeyEd-6kIajn4nnRQ/method._lJca0Ae1Ed-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..eddc362
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._xhMiAAeyEd-6kIajn4nnRQ/method._lJca0Ae1Ed-6kIajn4nnRQ.pt
@@ -0,0 +1,7 @@
+<%
+ // Set Object variables
+ _Title = element.getName() + " Enumeration";
+
+ // Set EObject variables
+ _element = element;
+%>
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._xhMiAAeyEd-6kIajn4nnRQ/method._xhMiAQeyEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._xhMiAAeyEd-6kIajn4nnRQ/method._xhMiAQeyEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..929384b
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._xhMiAAeyEd-6kIajn4nnRQ/method._xhMiAQeyEd-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<%@ jet package="emf.docgen.html.forStrategy" class="EnumerationReport" imports="java.util.* org.eclipse.emf.ecore.* org.eclipse.emf.common.util.EList org.eclipse.egf.model.pattern.* org.eclipse.egf.pattern.execution.* org.eclipse.egf.pattern.query.* org.eclipse.egf.emf.docgen.html.util.*" %>
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._xhMiAAeyEd-6kIajn4nnRQ/method._xhMiAgeyEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._xhMiAAeyEd-6kIajn4nnRQ/method._xhMiAgeyEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._xhMiAAeyEd-6kIajn4nnRQ/method._xhMiAgeyEd-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._xhMiAAeyEd-6kIajn4nnRQ/method._xhMiAweyEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._xhMiAAeyEd-6kIajn4nnRQ/method._xhMiAweyEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..8d16cca
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._xhMiAAeyEd-6kIajn4nnRQ/method._xhMiAweyEd-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+//default content
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._xhMiAAeyEd-6kIajn4nnRQ/method._xhMiBAeyEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._xhMiAAeyEd-6kIajn4nnRQ/method._xhMiBAeyEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._xhMiAAeyEd-6kIajn4nnRQ/method._xhMiBAeyEd-6kIajn4nnRQ.pt
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._zCuXUAbPEd-6kIajn4nnRQ/method._KmUo0AeyEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._zCuXUAbPEd-6kIajn4nnRQ/method._KmUo0AeyEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..9f71602
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._zCuXUAbPEd-6kIajn4nnRQ/method._KmUo0AeyEd-6kIajn4nnRQ.pt
@@ -0,0 +1,4 @@
+<%
+ // Set Object variables
+ _copyright = "Copyright (c) 2010 The Eclipse Foundation. All Rights Reserved.";
+%>
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._zCuXUAbPEd-6kIajn4nnRQ/method._zCuXUQbPEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._zCuXUAbPEd-6kIajn4nnRQ/method._zCuXUQbPEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..bce0b7d
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._zCuXUAbPEd-6kIajn4nnRQ/method._zCuXUQbPEd-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<%@ jet package="emf.docgen.html.forStrategy" class="PackageReport" imports="java.util.* java.util.Map.Entry org.eclipse.emf.ecore.* org.eclipse.emf.common.util.EList org.eclipse.egf.model.pattern.* org.eclipse.egf.pattern.execution.* org.eclipse.egf.pattern.query.* org.eclipse.egf.emf.docgen.html.util.*" %>
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._zCuXUAbPEd-6kIajn4nnRQ/method._zCuXUgbPEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._zCuXUAbPEd-6kIajn4nnRQ/method._zCuXUgbPEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._zCuXUAbPEd-6kIajn4nnRQ/method._zCuXUgbPEd-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._zCuXUAbPEd-6kIajn4nnRQ/method._zCuXUwbPEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._zCuXUAbPEd-6kIajn4nnRQ/method._zCuXUwbPEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..af87e6b
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._zCuXUAbPEd-6kIajn4nnRQ/method._zCuXUwbPEd-6kIajn4nnRQ.pt
@@ -0,0 +1 @@
+<p>Package description of <%= element.getName() %></p>
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._zCuXUAbPEd-6kIajn4nnRQ/method._zCuXVAbPEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._zCuXUAbPEd-6kIajn4nnRQ/method._zCuXVAbPEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._zCuXUAbPEd-6kIajn4nnRQ/method._zCuXVAbPEd-6kIajn4nnRQ.pt
diff --git a/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._zCuXUAbPEd-6kIajn4nnRQ/method._zbC7QAbQEd-6kIajn4nnRQ.pt b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._zCuXUAbPEd-6kIajn4nnRQ/method._zbC7QAbQEd-6kIajn4nnRQ.pt
new file mode 100644
index 0000000..14e2118
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.docgen.html/templates/pattern._zCuXUAbPEd-6kIajn4nnRQ/method._zbC7QAbQEd-6kIajn4nnRQ.pt
@@ -0,0 +1,7 @@
+<%
+ // Set Object variables
+ _Title = element.getName() + " Package";
+
+ // Set EObject variables
+ _element = element;
+%>
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.wrapper.ui/.classpath b/portfolio/org.eclipse.egf.emf.wrapper.ui/.classpath
new file mode 100644
index 0000000..2d1a430
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.wrapper.ui/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/portfolio/org.eclipse.egf.emf.wrapper.ui/.project b/portfolio/org.eclipse.egf.emf.wrapper.ui/.project
new file mode 100644
index 0000000..09a0db3
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.wrapper.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.emf.wrapper.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/portfolio/org.eclipse.egf.emf.wrapper.ui/.settings/org.eclipse.core.resources.prefs b/portfolio/org.eclipse.egf.emf.wrapper.ui/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..6487171
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.wrapper.ui/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:50:52 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/portfolio/org.eclipse.egf.emf.wrapper.ui/.settings/org.eclipse.jdt.core.prefs b/portfolio/org.eclipse.egf.emf.wrapper.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..fbd1967
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.wrapper.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Tue Jan 19 10:46:23 CET 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/portfolio/org.eclipse.egf.emf.wrapper.ui/META-INF/MANIFEST.MF b/portfolio/org.eclipse.egf.emf.wrapper.ui/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..474879c
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.wrapper.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-Vendor: %providerName
+Bundle-ClassPath: .
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.egf.emf.wrapper.ui;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-Activator: org.eclipse.egf.emf.wrapper.ui.Activator
+Require-Bundle:
+ org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.egf.emf.wrapper,
+ org.eclipse.egf.model.editor,
+ org.eclipse.egf.core.ui
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.egf.emf.wrapper.ui
diff --git a/portfolio/org.eclipse.egf.emf.wrapper.ui/about.html b/portfolio/org.eclipse.egf.emf.wrapper.ui/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.wrapper.ui/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/portfolio/org.eclipse.egf.emf.wrapper.ui/build.properties b/portfolio/org.eclipse.egf.emf.wrapper.ui/build.properties
new file mode 100644
index 0000000..146a439
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.wrapper.ui/build.properties
@@ -0,0 +1,18 @@
+##
+# 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
+##
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.properties,\
+ plugin.xml
+src.includes = about.html
diff --git a/portfolio/org.eclipse.egf.emf.wrapper.ui/plugin.properties b/portfolio/org.eclipse.egf.emf.wrapper.ui/plugin.properties
new file mode 100644
index 0000000..3c990b7
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.wrapper.ui/plugin.properties
@@ -0,0 +1,14 @@
+##
+# 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 EMF Wrapper UI (Incubation)
+providerName=Eclipse Modeling Project
+_UI_GenerateFcoreFile_label = Create EMF Wrapper
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.wrapper.ui/plugin.xml b/portfolio/org.eclipse.egf.emf.wrapper.ui/plugin.xml
new file mode 100644
index 0000000..5db3cf3
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.wrapper.ui/plugin.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+ <extension point="org.eclipse.ui.popupMenus">
+ <objectContribution id="generateFcoreFileContribution" objectClass="org.eclipse.core.resources.IFile" nameFilter="*.genmodel">
+ <action
+ class="org.eclipse.egf.emf.wrapper.ui.CreateFcoreAction"
+ enablesFor="1"
+ id="generateFcoreFile"
+ label="%_UI_GenerateFcoreFile_label"
+ menubarPath="additions">
+ </action>
+ </objectContribution>
+ </extension>
+</plugin>
diff --git a/portfolio/org.eclipse.egf.emf.wrapper.ui/src/org/eclipse/egf/emf/wrapper/l10n/EMFWrapperMessages.java b/portfolio/org.eclipse.egf.emf.wrapper.ui/src/org/eclipse/egf/emf/wrapper/l10n/EMFWrapperMessages.java
new file mode 100644
index 0000000..472a990
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.wrapper.ui/src/org/eclipse/egf/emf/wrapper/l10n/EMFWrapperMessages.java
@@ -0,0 +1,32 @@
+/**
+ *
+ * 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
+ *
+ */
+package org.eclipse.egf.emf.wrapper.l10n;
+
+import org.eclipse.osgi.util.NLS;
+
+public class EMFWrapperMessages {
+
+ private static final String BUNDLE_NAME = "org.eclipse.egf.emf.wrapper.l10n.messages"; //$NON-NLS-1$
+
+ private EMFWrapperMessages() {
+ // Do not instantiate
+ }
+
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, EMFWrapperMessages.class);
+ }
+
+ public static String CreateFcoreFileWizard_Create_EMF_Wrapper;
+
+}
diff --git a/portfolio/org.eclipse.egf.emf.wrapper.ui/src/org/eclipse/egf/emf/wrapper/l10n/messages.properties b/portfolio/org.eclipse.egf.emf.wrapper.ui/src/org/eclipse/egf/emf/wrapper/l10n/messages.properties
new file mode 100644
index 0000000..beab72c
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.wrapper.ui/src/org/eclipse/egf/emf/wrapper/l10n/messages.properties
@@ -0,0 +1,12 @@
+##
+# 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
+##
+
+CreateFcoreFileWizard_Create_EMF_Wrapper= Create an EMF Wrapper
diff --git a/portfolio/org.eclipse.egf.emf.wrapper.ui/src/org/eclipse/egf/emf/wrapper/ui/Activator.java b/portfolio/org.eclipse.egf.emf.wrapper.ui/src/org/eclipse/egf/emf/wrapper/ui/Activator.java
new file mode 100644
index 0000000..84483d8
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.wrapper.ui/src/org/eclipse/egf/emf/wrapper/ui/Activator.java
@@ -0,0 +1,62 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.emf.wrapper.ui;
+
+import org.eclipse.egf.common.ui.activator.EGFAbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends EGFAbstractUIPlugin {
+
+ // The shared instance
+ private static Activator _plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ // Nothing to do
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ _plugin = this;
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ _plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return _plugin;
+ }
+
+}
diff --git a/portfolio/org.eclipse.egf.emf.wrapper.ui/src/org/eclipse/egf/emf/wrapper/ui/CreateFcoreAction.java b/portfolio/org.eclipse.egf.emf.wrapper.ui/src/org/eclipse/egf/emf/wrapper/ui/CreateFcoreAction.java
new file mode 100644
index 0000000..2272cbe
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.wrapper.ui/src/org/eclipse/egf/emf/wrapper/ui/CreateFcoreAction.java
@@ -0,0 +1,60 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.emf.wrapper.ui;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IActionDelegate;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchWindow;
+
+public class CreateFcoreAction implements IActionDelegate {
+
+ private ISelection _selection;
+
+ public void run(IAction action) {
+ if (action.isEnabled()) {
+ if (_selection instanceof IStructuredSelection) {
+ IStructuredSelection structuredSelection = (IStructuredSelection) _selection;
+ if (structuredSelection.size() == 1) {
+ if (structuredSelection.getFirstElement() instanceof IFile) {
+ IFile input = (IFile) structuredSelection.getFirstElement();
+ CreateFcoreFileWizard wizard = new CreateFcoreFileWizard(input);
+ wizard.init(getWorkbench(), structuredSelection);
+ final WizardDialog dialog = new WizardDialog(getShell(), wizard);
+ dialog.create();
+ dialog.open();
+ }
+ }
+ }
+ }
+ }
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ _selection = selection;
+ }
+
+ private Shell getShell() {
+ return getActiveWorkbenchWindow().getShell();
+ }
+
+ private IWorkbenchWindow getActiveWorkbenchWindow() {
+ return getWorkbench().getActiveWorkbenchWindow();
+ }
+
+ private IWorkbench getWorkbench() {
+ return Activator.getDefault().getWorkbench();
+ }
+}
diff --git a/portfolio/org.eclipse.egf.emf.wrapper.ui/src/org/eclipse/egf/emf/wrapper/ui/CreateFcoreFileWizard.java b/portfolio/org.eclipse.egf.emf.wrapper.ui/src/org/eclipse/egf/emf/wrapper/ui/CreateFcoreFileWizard.java
new file mode 100644
index 0000000..01fb28f
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.wrapper.ui/src/org/eclipse/egf/emf/wrapper/ui/CreateFcoreFileWizard.java
@@ -0,0 +1,135 @@
+package org.eclipse.egf.emf.wrapper.ui;
+
+import java.io.IOException;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.egf.common.ui.helper.ThrowableHandler;
+import org.eclipse.egf.core.pde.tools.ConvertProjectOperation;
+import org.eclipse.egf.emf.wrapper.CreateFcoreUtil;
+import org.eclipse.egf.emf.wrapper.l10n.EMFWrapperMessages;
+import org.eclipse.egf.model.fcore.presentation.FcoreModelWizard;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.part.ISetSelectionTarget;
+
+public class CreateFcoreFileWizard extends FcoreModelWizard {
+
+ private IFile _genModel;
+
+ public CreateFcoreFileWizard(IFile genModel) {
+ _genModel = genModel;
+ }
+
+ @Override
+ public void addPage(IWizardPage page) {
+ if (page == newFileCreationPage)
+ super.addPage(page);
+ }
+
+ @Override
+ public void addPages() {
+ super.addPages();
+ newFileCreationPage.setFileName(getFileName());
+ }
+
+ @Override
+ public boolean performFinish() {
+
+ // Nothing to do
+ if (_genModel == null) {
+ return true;
+ }
+
+ final Throwable[] throwable = new Throwable[1];
+ final IFile fcore = getFcore();
+
+ // Convert and Process current Project
+ WorkspaceModifyOperation convertOperation = new ConvertProjectOperation(_genModel.getProject(), false, false) {
+ @Override
+ public List<String> addDependencies() {
+ return Collections.emptyList();
+ }
+
+ @Override
+ public List<String> addSourceFolders() {
+ return Collections.emptyList();
+ }
+ };
+ try {
+ getContainer().run(false, false, convertOperation);
+ } catch (Throwable t) {
+ throwable[0] = t;
+ }
+
+ // Save resource
+ if (throwable[0] == null) {
+ WorkspaceModifyOperation operation = new WorkspaceModifyOperation() {
+ @Override
+ protected void execute(IProgressMonitor monitor) {
+ try {
+ SubMonitor.convert(monitor, EMFWrapperMessages.CreateFcoreFileWizard_Create_EMF_Wrapper, 1000);
+ try {
+ new CreateFcoreUtil().createFcoreFile(_genModel, fcore);
+ } catch (IOException ioe) {
+ throwable[0] = ioe;
+ }
+ } finally {
+ monitor.done();
+ }
+ }
+ };
+ try {
+ getContainer().run(false, true, operation);
+ } catch (Throwable t) {
+ throwable[0] = t;
+ }
+ }
+
+ // Select the new file resource in the current view.
+ if (throwable[0] == null) {
+ IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow();
+ IWorkbenchPage page = workbenchWindow.getActivePage();
+ final IWorkbenchPart activePart = page.getActivePart();
+ if (activePart instanceof ISetSelectionTarget) {
+ final ISelection targetSelection = new StructuredSelection(_genModel);
+ getShell().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ ((ISetSelectionTarget) activePart).selectReveal(targetSelection);
+ }
+ });
+ }
+ // Open an editor on the new file.
+ try {
+ page.openEditor(new FileEditorInput(fcore), workbench.getEditorRegistry().getDefaultEditor(fcore.getFullPath().toString()).getId());
+ } catch (Throwable t) {
+ throwable[0] = t;
+ }
+ }
+
+ // Display errors if any
+ if (throwable[0] != null && throwable[0] instanceof InterruptedException == false) {
+ ThrowableHandler.handleThrowable(Activator.getDefault().getPluginID(), throwable[0]);
+ return false;
+ }
+
+ return true;
+ }
+
+ private String getFileName() {
+ return _genModel.getFullPath().removeFileExtension().addFileExtension(FILE_EXTENSIONS.get(0)).lastSegment();
+ }
+
+ private IFile getFcore() {
+ return _genModel.getProject().getFile(newFileCreationPage.getContainerFullPath().removeFirstSegments(1).append(newFileCreationPage.getFileName()));
+ }
+}
diff --git a/portfolio/org.eclipse.egf.emf.wrapper/.classpath b/portfolio/org.eclipse.egf.emf.wrapper/.classpath
new file mode 100644
index 0000000..2d1a430
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.wrapper/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/portfolio/org.eclipse.egf.emf.wrapper/.project b/portfolio/org.eclipse.egf.emf.wrapper/.project
new file mode 100644
index 0000000..9e304d8
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.wrapper/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.emf.wrapper</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/portfolio/org.eclipse.egf.emf.wrapper/.settings/org.eclipse.core.resources.prefs b/portfolio/org.eclipse.egf.emf.wrapper/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..f3f83e7
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.wrapper/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Feb 15 16:50:43 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/portfolio/org.eclipse.egf.emf.wrapper/.settings/org.eclipse.jdt.core.prefs b/portfolio/org.eclipse.egf.emf.wrapper/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..642a10d
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.wrapper/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Mon Jan 11 16:57:55 CET 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/portfolio/org.eclipse.egf.emf.wrapper/META-INF/MANIFEST.MF b/portfolio/org.eclipse.egf.emf.wrapper/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..dcc9dc7
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.wrapper/META-INF/MANIFEST.MF
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-Vendor: %providerName
+Bundle-ClassPath: .
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.egf.emf.wrapper;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-Activator: org.eclipse.egf.emf.wrapper.Activator
+Require-Bundle:
+ org.eclipse.core.runtime,
+ org.eclipse.egf.model.ftask;visibility:=reexport,
+ org.eclipse.egf.core;visibility:=reexport,
+ org.eclipse.egf.model;visibility:=reexport,
+ org.eclipse.egf.model.fprod;visibility:=reexport
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package:
+ org.eclipse.egf.emf.wrapper
diff --git a/portfolio/org.eclipse.egf.emf.wrapper/about.html b/portfolio/org.eclipse.egf.emf.wrapper/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.wrapper/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/portfolio/org.eclipse.egf.emf.wrapper/build.properties b/portfolio/org.eclipse.egf.emf.wrapper/build.properties
new file mode 100644
index 0000000..2bdc0d4
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.wrapper/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ fcs/,\
+ about.html,\
+ plugin.xml,\
+ plugin.properties
+src.includes = about.html
diff --git a/portfolio/org.eclipse.egf.emf.wrapper/fcs/EMF_Wrapper.fcore b/portfolio/org.eclipse.egf.emf.wrapper/fcs/EMF_Wrapper.fcore
new file mode 100644
index 0000000..8be6c33
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.wrapper/fcs/EMF_Wrapper.fcore
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.1"
+ xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" 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">
+ <fcore:FactoryComponent xmi:id="_9LH9AAEkEd-sEofCqqFtwA" description="" name="EMF Wrapper">
+ <contractContainer xmi:id="_0uayAAQ7Ed-C2pVDwEnEWQ">
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_1Cin4AQ7Ed-C2pVDwEnEWQ"
+ name="genModelURI" mandatory="true" invocationContracts="#_BjtG0AElEd-sEofCqqFtwA #_MELb8gElEd-sEofCqqFtwA #_MUtyUgElEd-sEofCqqFtwA #_0Hs_QgElEd-sEofCqqFtwA">
+ <type xmi:type="domain:TypeDomainURI" xmi:id="_4_aGEAQ7Ed-C2pVDwEnEWQ"/>
+ </contracts>
+ </contractContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="__u4TMAEkEd-sEofCqqFtwA">
+ <invocations xmi:id="_AbloMAElEd-sEofCqqFtwA" invokedActivity="#_E0utcP-KEd6BleG0RKg98A">
+ <invocationContractContainer xmi:id="_A5-0YAElEd-sEofCqqFtwA">
+ <invocationContracts xmi:id="_BjtG0AElEd-sEofCqqFtwA" factoryComponentContract="#_1Cin4AQ7Ed-C2pVDwEnEWQ"
+ invokedContract="#_GjcSAP-KEd6BleG0RKg98A"/>
+ </invocationContractContainer>
+ </invocations>
+ <invocations xmi:id="_MELb8AElEd-sEofCqqFtwA" invokedActivity="#_o5wBQADyEd-IF6GN14qe5g">
+ <invocationContractContainer xmi:id="_MELb8QElEd-sEofCqqFtwA">
+ <invocationContracts xmi:id="_MELb8gElEd-sEofCqqFtwA" factoryComponentContract="#_1Cin4AQ7Ed-C2pVDwEnEWQ"
+ invokedContract="#_x4zwsAEjEd-sEofCqqFtwA"/>
+ </invocationContractContainer>
+ </invocations>
+ <invocations xmi:id="_MUtyUAElEd-sEofCqqFtwA" invokedActivity="#_tWWIYADyEd-IF6GN14qe5g">
+ <invocationContractContainer xmi:id="_MUtyUQElEd-sEofCqqFtwA">
+ <invocationContracts xmi:id="_MUtyUgElEd-sEofCqqFtwA" factoryComponentContract="#_1Cin4AQ7Ed-C2pVDwEnEWQ"
+ invokedContract="#_xzsdcQDyEd-IF6GN14qe5g"/>
+ </invocationContractContainer>
+ </invocations>
+ <invocations xmi:id="_0Hs_QAElEd-sEofCqqFtwA" invokedActivity="#_tv0_YADyEd-IF6GN14qe5g">
+ <invocationContractContainer xmi:id="_0Hs_QQElEd-sEofCqqFtwA">
+ <invocationContracts xmi:id="_0Hs_QgElEd-sEofCqqFtwA" factoryComponentContract="#_1Cin4AQ7Ed-C2pVDwEnEWQ"
+ invokedContract="#_x7JJQQDyEd-IF6GN14qe5g"/>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+ </fcore:FactoryComponent>
+ <ftask:Task xmi:id="_E0utcP-KEd6BleG0RKg98A" name="EMF Model Wrapper" kind="java" implementation="org.eclipse.egf.emf.wrapper.EgfEmfModelTask">
+ <contractContainer xmi:id="_GSdPsP-KEd6BleG0RKg98A">
+ <contracts xmi:id="_GjcSAP-KEd6BleG0RKg98A" name="genModelURI" mandatory="true">
+ <type xmi:type="domain:TypeDomainURI" xmi:id="_HNTuYP-KEd6BleG0RKg98A"/>
+ </contracts>
+ </contractContainer>
+ </ftask:Task>
+ <ftask:Task xmi:id="_o5wBQADyEd-IF6GN14qe5g" name="EMF Edit Wrapper" kind="java" implementation="org.eclipse.egf.emf.wrapper.EgfEmfEditTask">
+ <contractContainer xmi:id="_xm7WgAEjEd-sEofCqqFtwA">
+ <contracts xmi:id="_x4zwsAEjEd-sEofCqqFtwA" name="genModelURI" mandatory="true">
+ <type xmi:type="domain:TypeDomainURI" xmi:id="_z3wwsAEjEd-sEofCqqFtwA"/>
+ </contracts>
+ </contractContainer>
+ </ftask:Task>
+ <ftask:Task xmi:id="_tWWIYADyEd-IF6GN14qe5g" name="EMF Editor Wrapper" kind="java" implementation="org.eclipse.egf.emf.wrapper.EgfEmfEditorTask">
+ <contractContainer xmi:id="_xzsdcADyEd-IF6GN14qe5g">
+ <contracts xmi:id="_xzsdcQDyEd-IF6GN14qe5g" name="genModelURI" mandatory="true">
+ <type xmi:type="domain:TypeDomainURI" xmi:id="_xzsdcgDyEd-IF6GN14qe5g"/>
+ </contracts>
+ </contractContainer>
+ </ftask:Task>
+ <ftask:Task xmi:id="_tv0_YADyEd-IF6GN14qe5g" name="EMF Test Wrapper" kind="java" implementation="org.eclipse.egf.emf.wrapper.EgfEmfTestTask">
+ <contractContainer xmi:id="_x7JJQADyEd-IF6GN14qe5g">
+ <contracts xmi:id="_x7JJQQDyEd-IF6GN14qe5g" name="genModelURI" mandatory="true">
+ <type xmi:type="domain:TypeDomainURI" xmi:id="_x7JJQgDyEd-IF6GN14qe5g"/>
+ </contracts>
+ </contractContainer>
+ </ftask:Task>
+</xmi:XMI>
diff --git a/portfolio/org.eclipse.egf.emf.wrapper/plugin.properties b/portfolio/org.eclipse.egf.emf.wrapper/plugin.properties
new file mode 100644
index 0000000..ce540cc
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.wrapper/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 EMF Wrapper (Incubation)
+providerName=Eclipse Modeling Project
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.wrapper/plugin.xml b/portfolio/org.eclipse.egf.emf.wrapper/plugin.xml
new file mode 100644
index 0000000..50baead
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.wrapper/plugin.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension
+ point="org.eclipse.egf.core.fcore">
+ <fcore
+ id="fcs/EMF_Wrapper.fcore">
+ </fcore>
+ </extension>
+
+
+</plugin>
diff --git a/portfolio/org.eclipse.egf.emf.wrapper/src/org/eclipse/egf/emf/wrapper/Activator.java b/portfolio/org.eclipse.egf.emf.wrapper/src/org/eclipse/egf/emf/wrapper/Activator.java
new file mode 100644
index 0000000..57fa455
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.wrapper/src/org/eclipse/egf/emf/wrapper/Activator.java
@@ -0,0 +1,62 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.emf.wrapper;
+
+import org.eclipse.egf.common.activator.EGFAbstractPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends EGFAbstractPlugin {
+
+ // The shared instance
+ private static Activator _plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ // Nothing to do
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ _plugin = this;
+ }
+
+ /**
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ _plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return _plugin;
+ }
+
+}
diff --git a/portfolio/org.eclipse.egf.emf.wrapper/src/org/eclipse/egf/emf/wrapper/CreateFcoreUtil.java b/portfolio/org.eclipse.egf.emf.wrapper/src/org/eclipse/egf/emf/wrapper/CreateFcoreUtil.java
new file mode 100644
index 0000000..3fb488a
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.wrapper/src/org/eclipse/egf/emf/wrapper/CreateFcoreUtil.java
@@ -0,0 +1,227 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.emf.wrapper;
+
+import java.io.IOException;
+import java.util.Collections;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.egf.core.EGFCorePlugin;
+import org.eclipse.egf.model.domain.DomainFactory;
+import org.eclipse.egf.model.domain.DomainURI;
+import org.eclipse.egf.model.domain.DomainViewpoint;
+import org.eclipse.egf.model.domain.TypeDomainURI;
+import org.eclipse.egf.model.fcore.Contract;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.model.fcore.FactoryComponentContract;
+import org.eclipse.egf.model.fcore.FcoreFactory;
+import org.eclipse.egf.model.fcore.InvocationContract;
+import org.eclipse.egf.model.fcore.InvocationContractContainer;
+import org.eclipse.egf.model.fcore.ViewpointContainer;
+import org.eclipse.egf.model.fprod.FprodFactory;
+import org.eclipse.egf.model.fprod.ProductionPlan;
+import org.eclipse.egf.model.fprod.ProductionPlanInvocation;
+import org.eclipse.egf.model.ftask.Task;
+import org.eclipse.egf.model.types.TypeString;
+import org.eclipse.egf.model.types.TypesFactory;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+
+public class CreateFcoreUtil {
+
+ public void createFcoreFile(IFile genModelFile, IFile fcore) throws IOException {
+
+ final IOException[] ioExceptions = new IOException[1];
+
+ // Retrieve our editing domain
+ final TransactionalEditingDomain editingDomain = TransactionalEditingDomain.Registry.INSTANCE.getEditingDomain(EGFCorePlugin.EDITING_DOMAIN_ID);
+
+ // Feed our URIConverter
+ URI platformPluginURI = URI.createPlatformPluginURI(fcore.getFullPath().toString(), false);
+ URI platformResourceURI = URI.createPlatformResourceURI(fcore.getFullPath().toString(), true);
+ editingDomain.getResourceSet().getURIConverter().getURIMap().put(platformPluginURI, platformResourceURI);
+
+ URI genModelURI = URI.createPlatformResourceURI(genModelFile.getFullPath().toString(), true);
+ // Create a resource for this file.
+ final Resource fcoreResource = editingDomain.getResourceSet().createResource(platformPluginURI);
+
+ // Load target fcores
+ URI emfWrapperResourceURI = URI.createPlatformPluginURI("/org.eclipse.egf.emf.wrapper/fcs/EMF_Wrapper.fcore", true); //$NON-NLS-1$
+ Resource emfWrapperResource = editingDomain.getResourceSet().getResource(emfWrapperResourceURI, true);
+ URI emfDocGenHtmlResourceURI = URI.createPlatformPluginURI("/org.eclipse.egf.emf.docgen.html/egf/EmfDocGenHtml.fcore", true); //$NON-NLS-1$
+ Resource emfDocGenHtmlResource = editingDomain.getResourceSet().getResource(emfDocGenHtmlResourceURI, true);
+
+ // Create Factory Component
+ final FactoryComponent factoryComponent = FcoreFactory.eINSTANCE.createFactoryComponent();
+ factoryComponent.setName(genModelFile.getName() + " EMF Wrapper"); //$NON-NLS-1$
+
+ // Create viewpoint container
+ ViewpointContainer viewpointContainer = FcoreFactory.eINSTANCE.createViewpointContainer();
+ factoryComponent.setViewpointContainer(viewpointContainer);
+
+ // Create domainviewpoint
+ DomainViewpoint domainViewpoint = DomainFactory.eINSTANCE.createDomainViewpoint();
+ viewpointContainer.getViewpoints().add(domainViewpoint);
+
+ // Create Genmodel domain
+ DomainURI genModelDomainURI = DomainFactory.eINSTANCE.createDomainURI();
+ genModelDomainURI.setUri(genModelURI);
+ domainViewpoint.getDomains().add(genModelDomainURI);
+
+ // Create production plan
+ ProductionPlan productionPlan = FprodFactory.eINSTANCE.createProductionPlan();
+ factoryComponent.setOrchestration(productionPlan);
+
+ // Use independant tasks or the complete factory component
+ boolean splitted = true;
+
+ if (splitted) {
+ // Create Emf Wrapper tasks invocations
+ createTaskInvocation("_E0utcP-KEd6BleG0RKg98A", "_GjcSAP-KEd6BleG0RKg98A", emfWrapperResource, productionPlan, genModelDomainURI); //$NON-NLS-1$ //$NON-NLS-2$
+ createTaskInvocation("_o5wBQADyEd-IF6GN14qe5g", "_x4zwsAEjEd-sEofCqqFtwA", emfWrapperResource, productionPlan, genModelDomainURI); //$NON-NLS-1$ //$NON-NLS-2$
+ createTaskInvocation("_tWWIYADyEd-IF6GN14qe5g", "_xzsdcQDyEd-IF6GN14qe5g", emfWrapperResource, productionPlan, genModelDomainURI); //$NON-NLS-1$ //$NON-NLS-2$
+ createTaskInvocation("_tv0_YADyEd-IF6GN14qe5g", "_x7JJQQDyEd-IF6GN14qe5g", emfWrapperResource, productionPlan, genModelDomainURI); //$NON-NLS-1$ //$NON-NLS-2$
+ } else {
+ FactoryComponent targetFactoryComponent = (FactoryComponent) emfWrapperResource.getEObject("_9LH9AAEkEd-sEofCqqFtwA"); //$NON-NLS-1$
+ ProductionPlanInvocation productionPlanInvocation = FprodFactory.eINSTANCE.createProductionPlanInvocation();
+ productionPlan.getInvocations().add(productionPlanInvocation);
+ productionPlanInvocation.setInvokedActivity(targetFactoryComponent);
+
+ InvocationContractContainer invocationContractContainer = FcoreFactory.eINSTANCE.createInvocationContractContainer();
+ productionPlanInvocation.setInvocationContractContainer(invocationContractContainer);
+
+ FactoryComponentContract targetFactoryComponentContract = (FactoryComponentContract) emfWrapperResource.getEObject("_1Cin4AQ7Ed-C2pVDwEnEWQ"); //$NON-NLS-1$
+ InvocationContract invocationContract = FcoreFactory.eINSTANCE.createInvocationContract();
+ invocationContractContainer.getInvocationContracts().add(invocationContract);
+ invocationContract.setInvokedContract(targetFactoryComponentContract);
+
+ TypeDomainURI typeDomainURI = DomainFactory.eINSTANCE.createTypeDomainURI();
+ typeDomainURI.setDomain(genModelDomainURI);
+ invocationContract.setType(typeDomainURI);
+ }
+
+ // Create emf doc html generation
+ createEmfDocGenHtmlInvocation(emfWrapperResource, emfDocGenHtmlResource, productionPlan, genModelDomainURI);
+
+ // Add factory component to the contents.
+ editingDomain.getCommandStack().execute(new RecordingCommand(editingDomain) {
+ @Override
+ protected void doExecute() {
+ fcoreResource.getContents().add(factoryComponent);
+ }
+ });
+
+ // save fcore
+ try {
+ editingDomain.runExclusive(new Runnable() {
+ public void run() {
+ try {
+ fcoreResource.save(Collections.EMPTY_MAP);
+ } catch (IOException ioe) {
+ ioExceptions[0] = ioe;
+ }
+ }
+ });
+ } catch (InterruptedException ie) {
+ return;
+ }
+
+ // Rethrow exception if any
+ if (ioExceptions[0] != null) {
+ throw ioExceptions[0];
+ }
+
+ return;
+
+ }
+
+ private void createEmfDocGenHtmlInvocation(Resource emfWrapperResource, Resource emfDocGenHtmlResource, ProductionPlan productionPlan, DomainURI genModelDomainURI) {
+ // Task EmfDocProductionContextFromGenModel
+ Task task = (Task) emfDocGenHtmlResource.getEObject("_yw92cBurEd-jaIqWGhF8eQ"); //$NON-NLS-1$
+ ProductionPlanInvocation taskProductionPlanInvocation = FprodFactory.eINSTANCE.createProductionPlanInvocation();
+ productionPlan.getInvocations().add(taskProductionPlanInvocation);
+ taskProductionPlanInvocation.setInvokedActivity(task);
+
+ InvocationContractContainer taskInvocationContractContainer = FcoreFactory.eINSTANCE.createInvocationContractContainer();
+ taskProductionPlanInvocation.setInvocationContractContainer(taskInvocationContractContainer);
+
+ Contract taskContract1 = (Contract) emfDocGenHtmlResource.getEObject("_A4ZrMBusEd-jaIqWGhF8eQ"); //$NON-NLS-1$
+ InvocationContract taskInvocationContract1 = FcoreFactory.eINSTANCE.createInvocationContract();
+ taskInvocationContractContainer.getInvocationContracts().add(taskInvocationContract1);
+ taskInvocationContract1.setInvokedContract(taskContract1);
+ TypeDomainURI typeDomainURI = DomainFactory.eINSTANCE.createTypeDomainURI();
+ typeDomainURI.setDomain(genModelDomainURI);
+ taskInvocationContract1.setType(typeDomainURI);
+
+ Contract taskContract2 = (Contract) emfDocGenHtmlResource.getEObject("_Do1LcBusEd-jaIqWGhF8eQ"); //$NON-NLS-1$
+ InvocationContract taskInvocationContract2 = FcoreFactory.eINSTANCE.createInvocationContract();
+ taskInvocationContractContainer.getInvocationContracts().add(taskInvocationContract2);
+ taskInvocationContract2.setInvokedContract(taskContract2);
+
+ Contract taskContract3 = (Contract) emfDocGenHtmlResource.getEObject("_EAYIwBusEd-jaIqWGhF8eQ"); //$NON-NLS-1$
+ InvocationContract taskInvocationContract3 = FcoreFactory.eINSTANCE.createInvocationContract();
+ taskInvocationContractContainer.getInvocationContracts().add(taskInvocationContract3);
+ taskInvocationContract3.setInvokedContract(taskContract3);
+
+ // FC EmfDocGenHtml
+ FactoryComponent fc = (FactoryComponent) emfDocGenHtmlResource.getEObject("_BxjIkAG0Ed-7fNNmMjB2jQ"); //$NON-NLS-1$
+ ProductionPlanInvocation fcProductionPlanInvocation = FprodFactory.eINSTANCE.createProductionPlanInvocation();
+ productionPlan.getInvocations().add(fcProductionPlanInvocation);
+ fcProductionPlanInvocation.setInvokedActivity(fc);
+
+ InvocationContractContainer invocationContractContainer = FcoreFactory.eINSTANCE.createInvocationContractContainer();
+ fcProductionPlanInvocation.setInvocationContractContainer(invocationContractContainer);
+
+ FactoryComponentContract fcContract1 = (FactoryComponentContract) emfDocGenHtmlResource.getEObject("_Yp4VcAprEd-7fqY_JLtg2w"); //$NON-NLS-1$
+ InvocationContract fcInvocationContract1 = FcoreFactory.eINSTANCE.createInvocationContract();
+ invocationContractContainer.getInvocationContracts().add(fcInvocationContract1);
+ fcInvocationContract1.setInvokedContract(fcContract1);
+
+ FactoryComponentContract fcContract2 = (FactoryComponentContract) emfDocGenHtmlResource.getEObject("_7NKWkApbEd-pyqf4uNW3tw"); //$NON-NLS-1$
+ InvocationContract fcInvocationContract2 = FcoreFactory.eINSTANCE.createInvocationContract();
+ invocationContractContainer.getInvocationContracts().add(fcInvocationContract2);
+ fcInvocationContract2.setInvokedContract(fcContract2);
+
+ FactoryComponentContract fcContract3 = (FactoryComponentContract) emfDocGenHtmlResource.getEObject("_AvXa4ApcEd-pyqf4uNW3tw"); //$NON-NLS-1$
+ InvocationContract fcInvocationContract3 = FcoreFactory.eINSTANCE.createInvocationContract();
+ invocationContractContainer.getInvocationContracts().add(fcInvocationContract3);
+ fcInvocationContract3.setInvokedContract(fcContract3);
+ TypeString typeString = TypesFactory.eINSTANCE.createTypeString();
+ typeString.setValue("html"); //$NON-NLS-1$
+ fcInvocationContract3.setType(typeString);
+
+ // Assign source
+ fcInvocationContract1.setSourceInvocationContract(taskInvocationContract2);
+ fcInvocationContract2.setSourceInvocationContract(taskInvocationContract3);
+
+ }
+
+ private void createTaskInvocation(String targetTaskId, String targetTaskContract, Resource targetActivityResource, ProductionPlan productionPlan, DomainURI genModelDomainURI) {
+ Task modelTask = (Task) targetActivityResource.getEObject(targetTaskId);
+ ProductionPlanInvocation productionPlanInvocation = FprodFactory.eINSTANCE.createProductionPlanInvocation();
+ productionPlan.getInvocations().add(productionPlanInvocation);
+ productionPlanInvocation.setInvokedActivity(modelTask);
+
+ InvocationContractContainer invocationContractContainer = FcoreFactory.eINSTANCE.createInvocationContractContainer();
+ productionPlanInvocation.setInvocationContractContainer(invocationContractContainer);
+
+ Contract targetContract = (Contract) targetActivityResource.getEObject(targetTaskContract);
+ InvocationContract invocationContract = FcoreFactory.eINSTANCE.createInvocationContract();
+ invocationContractContainer.getInvocationContracts().add(invocationContract);
+ invocationContract.setInvokedContract(targetContract);
+
+ TypeDomainURI typeDomainURI = DomainFactory.eINSTANCE.createTypeDomainURI();
+ typeDomainURI.setDomain(genModelDomainURI);
+ invocationContract.setType(typeDomainURI);
+ }
+}
diff --git a/portfolio/org.eclipse.egf.emf.wrapper/src/org/eclipse/egf/emf/wrapper/EgfEmfAbstractTask.java b/portfolio/org.eclipse.egf.emf.wrapper/src/org/eclipse/egf/emf/wrapper/EgfEmfAbstractTask.java
new file mode 100644
index 0000000..d76e430
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.wrapper/src/org/eclipse/egf/emf/wrapper/EgfEmfAbstractTask.java
@@ -0,0 +1,65 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.emf.wrapper;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+import org.eclipse.egf.ftask.producer.invocation.ITaskProduction;
+import org.eclipse.emf.codegen.ecore.generator.Generator;
+import org.eclipse.emf.codegen.ecore.genmodel.GenModel;
+import org.eclipse.emf.codegen.ecore.genmodel.util.GenModelUtil;
+import org.eclipse.emf.common.util.BasicMonitor;
+import org.eclipse.emf.common.util.Monitor;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+
+public abstract class EgfEmfAbstractTask implements ITaskProduction {
+
+ private Resource _resource;
+
+ private GenModel _genModel;
+
+ public EgfEmfAbstractTask() {
+ super();
+ }
+
+ public void preExecute(ITaskProductionContext productionContext, IProgressMonitor monitor) throws InvocationException {
+ _resource = new ResourceSetImpl().getResource(productionContext.getInputValue("genModelURI", URI.class), true); //$NON-NLS-1$
+ }
+
+ public void doExecute(ITaskProductionContext productionContext, IProgressMonitor monitor) throws InvocationException {
+ // TODO have a look at GeneratorUIUtil
+ // TODO handle diagnostics and status
+ _genModel = (GenModel) _resource.getContents().get(0);
+ _genModel.reconcile();
+ _genModel.setCanGenerate(true);
+ _genModel.setValidateModel(true);
+ _genModel.diagnose();
+ _genModel.validate();
+ Generator generator = GenModelUtil.createGenerator(_genModel);
+ for (String projectType : getProjectTypeList()) {
+ Monitor emfMonitor = BasicMonitor.toMonitor(new SubProgressMonitor(monitor, 100));
+ generator.generate(_genModel, projectType, emfMonitor);
+ }
+ }
+
+ public void postExecute(ITaskProductionContext productionContext, IProgressMonitor monitor) throws InvocationException {
+ _resource.unload();
+ }
+
+ protected abstract ArrayList<String> getProjectTypeList();
+
+}
\ No newline at end of file
diff --git a/portfolio/org.eclipse.egf.emf.wrapper/src/org/eclipse/egf/emf/wrapper/EgfEmfAllTask.java b/portfolio/org.eclipse.egf.emf.wrapper/src/org/eclipse/egf/emf/wrapper/EgfEmfAllTask.java
new file mode 100644
index 0000000..600beb3
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.wrapper/src/org/eclipse/egf/emf/wrapper/EgfEmfAllTask.java
@@ -0,0 +1,29 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.emf.wrapper;
+
+import java.util.ArrayList;
+
+import org.eclipse.emf.codegen.ecore.genmodel.generator.GenBaseGeneratorAdapter;
+
+public class EgfEmfAllTask extends EgfEmfAbstractTask {
+
+ @Override
+ protected ArrayList<String> getProjectTypeList() {
+ ArrayList<String> projectTypeList = new ArrayList<String>();
+ projectTypeList.add(GenBaseGeneratorAdapter.MODEL_PROJECT_TYPE);
+ projectTypeList.add(GenBaseGeneratorAdapter.EDIT_PROJECT_TYPE);
+ projectTypeList.add(GenBaseGeneratorAdapter.EDITOR_PROJECT_TYPE);
+ projectTypeList.add(GenBaseGeneratorAdapter.TESTS_PROJECT_TYPE);
+ return projectTypeList;
+ }
+
+}
diff --git a/portfolio/org.eclipse.egf.emf.wrapper/src/org/eclipse/egf/emf/wrapper/EgfEmfEditTask.java b/portfolio/org.eclipse.egf.emf.wrapper/src/org/eclipse/egf/emf/wrapper/EgfEmfEditTask.java
new file mode 100644
index 0000000..427d441
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.wrapper/src/org/eclipse/egf/emf/wrapper/EgfEmfEditTask.java
@@ -0,0 +1,26 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.emf.wrapper;
+
+import java.util.ArrayList;
+
+import org.eclipse.emf.codegen.ecore.genmodel.generator.GenBaseGeneratorAdapter;
+
+public class EgfEmfEditTask extends EgfEmfAbstractTask {
+
+ @Override
+ protected ArrayList<String> getProjectTypeList() {
+ ArrayList<String> projectTypeList = new ArrayList<String>();
+ projectTypeList.add(GenBaseGeneratorAdapter.EDIT_PROJECT_TYPE);
+ return projectTypeList;
+ }
+
+}
diff --git a/portfolio/org.eclipse.egf.emf.wrapper/src/org/eclipse/egf/emf/wrapper/EgfEmfEditorTask.java b/portfolio/org.eclipse.egf.emf.wrapper/src/org/eclipse/egf/emf/wrapper/EgfEmfEditorTask.java
new file mode 100644
index 0000000..95d7e27
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.wrapper/src/org/eclipse/egf/emf/wrapper/EgfEmfEditorTask.java
@@ -0,0 +1,26 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.emf.wrapper;
+
+import java.util.ArrayList;
+
+import org.eclipse.emf.codegen.ecore.genmodel.generator.GenBaseGeneratorAdapter;
+
+public class EgfEmfEditorTask extends EgfEmfAbstractTask {
+
+ @Override
+ protected ArrayList<String> getProjectTypeList() {
+ ArrayList<String> projectTypeList = new ArrayList<String>();
+ projectTypeList.add(GenBaseGeneratorAdapter.EDITOR_PROJECT_TYPE);
+ return projectTypeList;
+ }
+
+}
diff --git a/portfolio/org.eclipse.egf.emf.wrapper/src/org/eclipse/egf/emf/wrapper/EgfEmfModelTask.java b/portfolio/org.eclipse.egf.emf.wrapper/src/org/eclipse/egf/emf/wrapper/EgfEmfModelTask.java
new file mode 100644
index 0000000..6bcf601
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.wrapper/src/org/eclipse/egf/emf/wrapper/EgfEmfModelTask.java
@@ -0,0 +1,26 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.emf.wrapper;
+
+import java.util.ArrayList;
+
+import org.eclipse.emf.codegen.ecore.genmodel.generator.GenBaseGeneratorAdapter;
+
+public class EgfEmfModelTask extends EgfEmfAbstractTask {
+
+ @Override
+ protected ArrayList<String> getProjectTypeList() {
+ ArrayList<String> projectTypeList = new ArrayList<String>();
+ projectTypeList.add(GenBaseGeneratorAdapter.MODEL_PROJECT_TYPE);
+ return projectTypeList;
+ }
+
+}
diff --git a/portfolio/org.eclipse.egf.emf.wrapper/src/org/eclipse/egf/emf/wrapper/EgfEmfTestTask.java b/portfolio/org.eclipse.egf.emf.wrapper/src/org/eclipse/egf/emf/wrapper/EgfEmfTestTask.java
new file mode 100644
index 0000000..01fed69
--- /dev/null
+++ b/portfolio/org.eclipse.egf.emf.wrapper/src/org/eclipse/egf/emf/wrapper/EgfEmfTestTask.java
@@ -0,0 +1,26 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.emf.wrapper;
+
+import java.util.ArrayList;
+
+import org.eclipse.emf.codegen.ecore.genmodel.generator.GenBaseGeneratorAdapter;
+
+public class EgfEmfTestTask extends EgfEmfAbstractTask {
+
+ @Override
+ protected ArrayList<String> getProjectTypeList() {
+ ArrayList<String> projectTypeList = new ArrayList<String>();
+ projectTypeList.add(GenBaseGeneratorAdapter.TESTS_PROJECT_TYPE);
+ return projectTypeList;
+ }
+
+}
diff --git a/portfolio/org.eclipse.egf.portfolio.eclipse.util/.classpath b/portfolio/org.eclipse.egf.portfolio.eclipse.util/.classpath
new file mode 100644
index 0000000..45f024e
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.eclipse.util/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/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/portfolio/org.eclipse.egf.portfolio.eclipse.util/.project b/portfolio/org.eclipse.egf.portfolio.eclipse.util/.project
new file mode 100644
index 0000000..82d46a3
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.eclipse.util/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.portfolio.eclipse.util</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/portfolio/org.eclipse.egf.portfolio.eclipse.util/.settings/org.eclipse.jdt.core.prefs b/portfolio/org.eclipse.egf.portfolio.eclipse.util/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..f1e6046
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.eclipse.util/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Thu Feb 25 21:39:11 CET 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/portfolio/org.eclipse.egf.portfolio.eclipse.util/META-INF/MANIFEST.MF b/portfolio/org.eclipse.egf.portfolio.eclipse.util/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..714f1f8
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.eclipse.util/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.portfolio.eclipse.util;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.egf.util.Activator
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle:
+ org.eclipse.core.runtime,
+ org.eclipse.egf.model.ftask
+Export-Package:
+ org.eclipse.egf.util
+Bundle-ActivationPolicy: lazy
diff --git a/portfolio/org.eclipse.egf.portfolio.eclipse.util/about.html b/portfolio/org.eclipse.egf.portfolio.eclipse.util/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.eclipse.util/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/portfolio/org.eclipse.egf.portfolio.eclipse.util/build.properties b/portfolio/org.eclipse.egf.portfolio.eclipse.util/build.properties
new file mode 100644
index 0000000..5b381aa
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.eclipse.util/build.properties
@@ -0,0 +1,20 @@
+##
+# 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
+##
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ egf/,\
+ plugin.properties,\
+ plugin.xml,\
+ about.html,\
+ templates/
+src.includes = about.html
diff --git a/portfolio/org.eclipse.egf.portfolio.eclipse.util/egf/projectPolicies.fcore b/portfolio/org.eclipse.egf.portfolio.eclipse.util/egf/projectPolicies.fcore
new file mode 100644
index 0000000..75e5c22
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.eclipse.util/egf/projectPolicies.fcore
@@ -0,0 +1,236 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" 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:types="http://www.eclipse.org/egf/1.0.0/types">
+ <fcore:FactoryComponent xmi:id="_w-GuwCJbEd-1iJf80lotFg" description="Populate the plugin contents"
+ name="plugin.files.generation">
+ <contractContainer xmi:id="_SFBvgCJgEd-QbLE3s54hPw">
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_T7Mm8CJgEd-QbLE3s54hPw"
+ description="Project where the file is generated" name="targetProjetName"
+ mandatory="true" invocationContracts="#_Z7pGdSJgEd-QbLE3s54hPw #_m5CxBSJgEd-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_T7Mm8SJgEd-QbLE3s54hPw" value=""/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_8_sT4CK0Ed-QbLE3s54hPw"
+ description="Project where the file is generated" name="providerName" invocationContracts="#_LkzjICK1Ed-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_8_sT4SK0Ed-QbLE3s54hPw" value="Undefined Provider Name"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_GeBPgCK1Ed-QbLE3s54hPw"
+ description="Project where the file is generated" name="pluginName" invocationContracts="#_P7AuYCK1Ed-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_GeBPgSK1Ed-QbLE3s54hPw" value="Undefined Plugin Name"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_Ulh7wCLAEd-QbLE3s54hPw"
+ name="copyright" invocationContracts="#_FIoBgCLDEd-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_W-jooCLAEd-QbLE3s54hPw" value="Undefined Copyright"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_Zn_JACLAEd-QbLE3s54hPw"
+ name="contributors" invocationContracts="#_IJJzQCLDEd-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_bauR8CLAEd-QbLE3s54hPw" value="Undefined Contributors"/>
+ </contracts>
+ </contractContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_W16EkCJgEd-QbLE3s54hPw">
+ <invocations xmi:id="_Z7pGcCJgEd-QbLE3s54hPw" invokedActivity="#_zuYCgCJREd-1iJf80lotFg">
+ <invocationContractContainer xmi:id="_Z7pGcSJgEd-QbLE3s54hPw">
+ <invocationContracts xmi:id="_Z7pGdSJgEd-QbLE3s54hPw" factoryComponentContract="#_T7Mm8CJgEd-QbLE3s54hPw"
+ invokedContract="#_87cZkCJSEd-1iJf80lotFg"/>
+ </invocationContractContainer>
+ </invocations>
+ <invocations xmi:id="_m5CxACJgEd-QbLE3s54hPw" invokedActivity="#_nDSg4CJaEd-1iJf80lotFg">
+ <invocationContractContainer xmi:id="_m5CxASJgEd-QbLE3s54hPw">
+ <invocationContracts xmi:id="_m5CxBSJgEd-QbLE3s54hPw" factoryComponentContract="#_T7Mm8CJgEd-QbLE3s54hPw"
+ invokedContract="#_HRnCgSJbEd-1iJf80lotFg"/>
+ <invocationContracts xmi:id="_LkzjICK1Ed-QbLE3s54hPw" factoryComponentContract="#_8_sT4CK0Ed-QbLE3s54hPw"
+ invokedContract="#_GtymUCK0Ed-QbLE3s54hPw"/>
+ <invocationContracts xmi:id="_P7AuYCK1Ed-QbLE3s54hPw" factoryComponentContract="#_GeBPgCK1Ed-QbLE3s54hPw"
+ invokedContract="#_SZYDsCK0Ed-QbLE3s54hPw"/>
+ <invocationContracts xmi:id="_FIoBgCLDEd-QbLE3s54hPw" factoryComponentContract="#_Ulh7wCLAEd-QbLE3s54hPw"
+ invokedContract="#_1njLMCLAEd-QbLE3s54hPw"/>
+ <invocationContracts xmi:id="_IJJzQCLDEd-QbLE3s54hPw" factoryComponentContract="#_Zn_JACLAEd-QbLE3s54hPw"
+ invokedContract="#_1njLMiLAEd-QbLE3s54hPw"/>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+ </fcore:FactoryComponent>
+ <fcore:FactoryComponent xmi:id="_zuYCgCJREd-1iJf80lotFg" description="Generation of the Eclipse license about.html file"
+ name="eclipseabout.generation">
+ <contractContainer xmi:id="_8VvrgCJSEd-1iJf80lotFg">
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_oALfkCJdEd-1iJf80lotFg"
+ description="Source project of the reference file" name="sourceProjectName"
+ invocationContracts="#_ZL3kciJiEd-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_8SgwUCJdEd-1iJf80lotFg" value="org.eclipse.egf.portfolio.eclipse.util"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="__MenECJdEd-1iJf80lotFg"
+ description="Source folder of the reference file" name="sourceFolderName"
+ invocationContracts="#_ZL3kcyJiEd-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_Erso0CJeEd-1iJf80lotFg" value="templates"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_nJ9z0CJeEd-1iJf80lotFg"
+ description="Source file name" name="sourceFileName" invocationContracts="#_ZL3kdCJiEd-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_nJ9z0SJeEd-1iJf80lotFg" value="about.html"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_87cZkCJSEd-1iJf80lotFg"
+ description="Project where the file is generated" name="targetProjetName"
+ mandatory="true" invocationContracts="#_ZL3kdSJiEd-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_IUHiACJTEd-1iJf80lotFg" value=""/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_o9eH4CJVEd-1iJf80lotFg"
+ description="Folder where the file is generated" name="targetFolderName"
+ invocationContracts="#_ZL3kdiJiEd-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_s9njkCJVEd-1iJf80lotFg" value=""/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_svcOkCJeEd-1iJf80lotFg"
+ description="Target file name" name="targetFileName" invocationContracts="#_ZL3kdyJiEd-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_svcOkSJeEd-1iJf80lotFg" value="about.html"/>
+ </contracts>
+ </contractContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_m_A-gCJSEd-1iJf80lotFg">
+ <invocations xmi:id="_ZL3kcCJiEd-QbLE3s54hPw" invokedActivity="fcore:FactoryComponent platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_qIpEECJhEd-QbLE3s54hPw">
+ <invocationContractContainer xmi:id="_ZL3kcSJiEd-QbLE3s54hPw">
+ <invocationContracts xmi:id="_ZL3kciJiEd-QbLE3s54hPw" factoryComponentContract="#_oALfkCJdEd-1iJf80lotFg"
+ invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_wnMb4SJhEd-QbLE3s54hPw"/>
+ <invocationContracts xmi:id="_ZL3kcyJiEd-QbLE3s54hPw" factoryComponentContract="#__MenECJdEd-1iJf80lotFg"
+ invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_wnMb4yJhEd-QbLE3s54hPw"/>
+ <invocationContracts xmi:id="_ZL3kdCJiEd-QbLE3s54hPw" factoryComponentContract="#_nJ9z0CJeEd-1iJf80lotFg"
+ invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_wnMb5SJhEd-QbLE3s54hPw"/>
+ <invocationContracts xmi:id="_ZL3kdSJiEd-QbLE3s54hPw" factoryComponentContract="#_87cZkCJSEd-1iJf80lotFg"
+ invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_wnMb5yJhEd-QbLE3s54hPw"/>
+ <invocationContracts xmi:id="_ZL3kdiJiEd-QbLE3s54hPw" factoryComponentContract="#_o9eH4CJVEd-1iJf80lotFg"
+ invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_wnMb6SJhEd-QbLE3s54hPw"/>
+ <invocationContracts xmi:id="_ZL3kdyJiEd-QbLE3s54hPw" factoryComponentContract="#_svcOkCJeEd-1iJf80lotFg"
+ invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_wnMb6yJhEd-QbLE3s54hPw"/>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+ </fcore:FactoryComponent>
+ <fcore:FactoryComponent xmi:id="_nDSg4CJaEd-1iJf80lotFg" description="Generation of the plugin.properties file"
+ name="plugin.properties.generation">
+ <contractContainer xmi:id="_HRnCgCJbEd-1iJf80lotFg">
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_mywYQSJfEd-QbLE3s54hPw"
+ description="Source project of the reference file" name="sourceProjectName"
+ invocationContracts="#_MHZswiJbEd-1iJf80lotFg">
+ <type xmi:type="types:TypeString" xmi:id="_mywYQiJfEd-QbLE3s54hPw" value="org.eclipse.egf.portfolio.eclipse.util"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_mywYQyJfEd-QbLE3s54hPw"
+ description="Source folder of the reference file" name="sourceFolderName"
+ invocationContracts="#_MHZsxCJbEd-1iJf80lotFg">
+ <type xmi:type="types:TypeString" xmi:id="_mywYRCJfEd-QbLE3s54hPw" value="templates"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_mywYRSJfEd-QbLE3s54hPw"
+ description="Source file name" name="sourceFileName" invocationContracts="#_MHZsxiJbEd-1iJf80lotFg">
+ <type xmi:type="types:TypeString" xmi:id="_mywYRiJfEd-QbLE3s54hPw" value="plugin.properties"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_HRnCgSJbEd-1iJf80lotFg"
+ description="Project where the file is generated" name="targetProjetName"
+ mandatory="true" invocationContracts="#_MHZszCJbEd-1iJf80lotFg">
+ <type xmi:type="types:TypeString" xmi:id="_HRnCgiJbEd-1iJf80lotFg" value=""/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_HRnCgyJbEd-1iJf80lotFg"
+ description="Folder where the file is generated" name="targetFolderName"
+ invocationContracts="#_MHZszSJbEd-1iJf80lotFg">
+ <type xmi:type="types:TypeString" xmi:id="_HRnChCJbEd-1iJf80lotFg" value=""/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_mywYRyJfEd-QbLE3s54hPw"
+ description="Target file name" name="targetFileName" invocationContracts="#_MHZsziJbEd-1iJf80lotFg">
+ <type xmi:type="types:TypeString" xmi:id="_mywYSCJfEd-QbLE3s54hPw" value="plugin.properties"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_GtymUCK0Ed-QbLE3s54hPw"
+ name="providerName" invocationContracts="#_nRDvJCKyEd-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_HftLcCK0Ed-QbLE3s54hPw" value="Undefined Provider Name"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_SZYDsCK0Ed-QbLE3s54hPw"
+ name="pluginName" invocationContracts="#_di2ShCK0Ed-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_SZYDsSK0Ed-QbLE3s54hPw" value="Undefined Plugin Name"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_1njLMCLAEd-QbLE3s54hPw"
+ name="copyright" invocationContracts="#_NcPIZSLBEd-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_1njLMSLAEd-QbLE3s54hPw" value="Undefined Copyright"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_1njLMiLAEd-QbLE3s54hPw"
+ name="contributors" invocationContracts="#_u7efVSLBEd-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_1njLMyLAEd-QbLE3s54hPw" value="Undefined Contributors"/>
+ </contracts>
+ </contractContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_JqovYCJbEd-1iJf80lotFg">
+ <invocations xmi:id="_MHZswCJbEd-1iJf80lotFg" name="Read plugin properties"
+ invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_4N3NwCIeEd-yj8XsBx2_pg">
+ <invocationContractContainer xmi:id="_MHZswSJbEd-1iJf80lotFg">
+ <invocationContracts xmi:id="_MHZswiJbEd-1iJf80lotFg" factoryComponentContract="#_mywYQSJfEd-QbLE3s54hPw"
+ invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_IxEr8yIgEd-yj8XsBx2_pg"/>
+ <invocationContracts xmi:id="_MHZsxCJbEd-1iJf80lotFg" factoryComponentContract="#_mywYQyJfEd-QbLE3s54hPw"
+ invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_IxEr9SIgEd-yj8XsBx2_pg"/>
+ <invocationContracts xmi:id="_MHZsxiJbEd-1iJf80lotFg" factoryComponentContract="#_mywYRSJfEd-QbLE3s54hPw"
+ invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_IxEr9yIgEd-yj8XsBx2_pg"/>
+ <invocationContracts xmi:id="_MHZsyCJbEd-1iJf80lotFg" targetInvocationContract="#_nRDvIiKyEd-QbLE3s54hPw"
+ invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_IxEr8SIgEd-yj8XsBx2_pg">
+ <type xmi:type="types:TypeString" xmi:id="_MHZsySJbEd-1iJf80lotFg"/>
+ </invocationContracts>
+ </invocationContractContainer>
+ </invocations>
+ <invocations xmi:id="_nRDvICKyEd-QbLE3s54hPw" name="Change provider name" invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.portfolio.type/egf/stringManagement.fcore#_Hz4MACKxEd-QbLE3s54hPw">
+ <invocationContractContainer xmi:id="_nRDvISKyEd-QbLE3s54hPw">
+ <invocationContracts xmi:id="_nRDvIiKyEd-QbLE3s54hPw" sourceInvocationContract="#_MHZsyCJbEd-1iJf80lotFg"
+ invokedContract="platform:/plugin/org.eclipse.egf.portfolio.type/egf/stringManagement.fcore#_WtGqECKxEd-QbLE3s54hPw"/>
+ <invocationContracts xmi:id="_nRDvIyKyEd-QbLE3s54hPw" invokedContract="platform:/plugin/org.eclipse.egf.portfolio.type/egf/stringManagement.fcore#_cbOqgCKxEd-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_sNGyYCKyEd-QbLE3s54hPw" value="<%providerName%>"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_nRDvJCKyEd-QbLE3s54hPw" factoryComponentContract="#_GtymUCK0Ed-QbLE3s54hPw"
+ invokedContract="platform:/plugin/org.eclipse.egf.portfolio.type/egf/stringManagement.fcore#_qzqvsCKxEd-QbLE3s54hPw"/>
+ <invocationContracts xmi:id="_nRDvJSKyEd-QbLE3s54hPw" targetInvocationContract="#_di2SgiK0Ed-QbLE3s54hPw"
+ invokedContract="platform:/plugin/org.eclipse.egf.portfolio.type/egf/stringManagement.fcore#_l-eiYCKxEd-QbLE3s54hPw"/>
+ </invocationContractContainer>
+ </invocations>
+ <invocations xmi:id="_di2SgCK0Ed-QbLE3s54hPw" name="Change plugin name" invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.portfolio.type/egf/stringManagement.fcore#_Hz4MACKxEd-QbLE3s54hPw">
+ <invocationContractContainer xmi:id="_di2SgSK0Ed-QbLE3s54hPw">
+ <invocationContracts xmi:id="_di2SgiK0Ed-QbLE3s54hPw" sourceInvocationContract="#_nRDvJSKyEd-QbLE3s54hPw"
+ invokedContract="platform:/plugin/org.eclipse.egf.portfolio.type/egf/stringManagement.fcore#_WtGqECKxEd-QbLE3s54hPw"/>
+ <invocationContracts xmi:id="_di2SgyK0Ed-QbLE3s54hPw" invokedContract="platform:/plugin/org.eclipse.egf.portfolio.type/egf/stringManagement.fcore#_cbOqgCKxEd-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_vSdu4CK0Ed-QbLE3s54hPw" value="<%pluginName%>"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_di2ShCK0Ed-QbLE3s54hPw" factoryComponentContract="#_SZYDsCK0Ed-QbLE3s54hPw"
+ invokedContract="platform:/plugin/org.eclipse.egf.portfolio.type/egf/stringManagement.fcore#_qzqvsCKxEd-QbLE3s54hPw"/>
+ <invocationContracts xmi:id="_di2ShiK0Ed-QbLE3s54hPw" targetInvocationContract="#_NcPIYiLBEd-QbLE3s54hPw"
+ invokedContract="platform:/plugin/org.eclipse.egf.portfolio.type/egf/stringManagement.fcore#_l-eiYCKxEd-QbLE3s54hPw"/>
+ </invocationContractContainer>
+ </invocations>
+ <invocations xmi:id="_NcPIYCLBEd-QbLE3s54hPw" name="Change copyright" invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.portfolio.type/egf/stringManagement.fcore#_Hz4MACKxEd-QbLE3s54hPw">
+ <invocationContractContainer xmi:id="_NcPIYSLBEd-QbLE3s54hPw">
+ <invocationContracts xmi:id="_NcPIYiLBEd-QbLE3s54hPw" sourceInvocationContract="#_di2ShiK0Ed-QbLE3s54hPw"
+ invokedContract="platform:/plugin/org.eclipse.egf.portfolio.type/egf/stringManagement.fcore#_WtGqECKxEd-QbLE3s54hPw"/>
+ <invocationContracts xmi:id="_NcPIYyLBEd-QbLE3s54hPw" invokedContract="platform:/plugin/org.eclipse.egf.portfolio.type/egf/stringManagement.fcore#_cbOqgCKxEd-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_NcPIZCLBEd-QbLE3s54hPw" value="<%copyright%>"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_NcPIZSLBEd-QbLE3s54hPw" factoryComponentContract="#_1njLMCLAEd-QbLE3s54hPw"
+ invokedContract="platform:/plugin/org.eclipse.egf.portfolio.type/egf/stringManagement.fcore#_qzqvsCKxEd-QbLE3s54hPw"/>
+ <invocationContracts xmi:id="_NcPIZiLBEd-QbLE3s54hPw" targetInvocationContract="#_u7efUiLBEd-QbLE3s54hPw"
+ invokedContract="platform:/plugin/org.eclipse.egf.portfolio.type/egf/stringManagement.fcore#_l-eiYCKxEd-QbLE3s54hPw"/>
+ </invocationContractContainer>
+ </invocations>
+ <invocations xmi:id="_u7efUCLBEd-QbLE3s54hPw" name="Change contributors" invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.portfolio.type/egf/stringManagement.fcore#_Hz4MACKxEd-QbLE3s54hPw">
+ <invocationContractContainer xmi:id="_u7efUSLBEd-QbLE3s54hPw">
+ <invocationContracts xmi:id="_u7efUiLBEd-QbLE3s54hPw" sourceInvocationContract="#_NcPIZiLBEd-QbLE3s54hPw"
+ invokedContract="platform:/plugin/org.eclipse.egf.portfolio.type/egf/stringManagement.fcore#_WtGqECKxEd-QbLE3s54hPw"/>
+ <invocationContracts xmi:id="_u7efUyLBEd-QbLE3s54hPw" invokedContract="platform:/plugin/org.eclipse.egf.portfolio.type/egf/stringManagement.fcore#_cbOqgCKxEd-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_u7efVCLBEd-QbLE3s54hPw" value="<%contributors%>"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_u7efVSLBEd-QbLE3s54hPw" factoryComponentContract="#_1njLMiLAEd-QbLE3s54hPw"
+ invokedContract="platform:/plugin/org.eclipse.egf.portfolio.type/egf/stringManagement.fcore#_qzqvsCKxEd-QbLE3s54hPw"/>
+ <invocationContracts xmi:id="_u7efViLBEd-QbLE3s54hPw" targetInvocationContract="#_MHZs0CJbEd-1iJf80lotFg"
+ invokedContract="platform:/plugin/org.eclipse.egf.portfolio.type/egf/stringManagement.fcore#_l-eiYCKxEd-QbLE3s54hPw"/>
+ </invocationContractContainer>
+ </invocations>
+ <invocations xmi:id="_MHZsyiJbEd-1iJf80lotFg" name="Read plugin properties"
+ invokedActivity="fcore:FactoryComponent platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_gYv1wCH9Ed-c_qcjB49Qng">
+ <invocationContractContainer xmi:id="_MHZsyyJbEd-1iJf80lotFg">
+ <invocationContracts xmi:id="_MHZszCJbEd-1iJf80lotFg" factoryComponentContract="#_HRnCgSJbEd-1iJf80lotFg"
+ invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_JqxnACITEd-c_qcjB49Qng"/>
+ <invocationContracts xmi:id="_MHZszSJbEd-1iJf80lotFg" factoryComponentContract="#_HRnCgyJbEd-1iJf80lotFg"
+ invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_PXjjoCITEd-c_qcjB49Qng"/>
+ <invocationContracts xmi:id="_MHZsziJbEd-1iJf80lotFg" factoryComponentContract="#_mywYRyJfEd-QbLE3s54hPw"
+ invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_XPODcCITEd-c_qcjB49Qng"/>
+ <invocationContracts xmi:id="_MHZs0CJbEd-1iJf80lotFg" sourceInvocationContract="#_u7efViLBEd-QbLE3s54hPw"
+ invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_0rJLYCISEd-c_qcjB49Qng"/>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+ </fcore:FactoryComponent>
+</xmi:XMI>
diff --git a/portfolio/org.eclipse.egf.portfolio.eclipse.util/egf/projectPoliciesExample.fcore b/portfolio/org.eclipse.egf.portfolio.eclipse.util/egf/projectPoliciesExample.fcore
new file mode 100644
index 0000000..1296d26
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.eclipse.util/egf/projectPoliciesExample.fcore
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<fcore:FactoryComponent xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:fcore="http://www.eclipse.org/egf/1.0.0/fcore"
+ xmlns:fprod="http://www.eclipse.org/egf/1.0.0/fprod" xmlns:types="http://www.eclipse.org/egf/1.0.0/types" xmi:id="_WqNeYCLCEd-QbLE3s54hPw"
+ name="projectPoliciesExample">
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_lHkf0CLCEd-QbLE3s54hPw">
+ <invocations xmi:id="_nPBUgCLCEd-QbLE3s54hPw" invokedActivity="fcore:FactoryComponent platform:/plugin/org.eclipse.egf.portfolio.eclipse.util/egf/projectPolicies.fcore#_w-GuwCJbEd-1iJf80lotFg">
+ <invocationContractContainer xmi:id="_nPBUgSLCEd-QbLE3s54hPw">
+ <invocationContracts xmi:id="_nPBUgiLCEd-QbLE3s54hPw" invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.eclipse.util/egf/projectPolicies.fcore#_T7Mm8CJgEd-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_rEvo4CLCEd-QbLE3s54hPw" value="test.project"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_nPBUgyLCEd-QbLE3s54hPw" invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.eclipse.util/egf/projectPolicies.fcore#_8_sT4CK0Ed-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_vZT1YCLCEd-QbLE3s54hPw" value="Eclipse Modeling Project"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_nPBUhCLCEd-QbLE3s54hPw" invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.eclipse.util/egf/projectPolicies.fcore#_GeBPgCK1Ed-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_xjcKoCLCEd-QbLE3s54hPw" value="EGF Test (Incubation)"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_nPBUhSLCEd-QbLE3s54hPw" invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.eclipse.util/egf/projectPolicies.fcore#_Ulh7wCLAEd-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_0AWR8CLCEd-QbLE3s54hPw" value="Copyright (c) 2009-2010 Thales Corporate Services S.A.S."/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_nPBUhiLCEd-QbLE3s54hPw" invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.eclipse.util/egf/projectPolicies.fcore#_Zn_JACLAEd-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_2PQZgCLCEd-QbLE3s54hPw" value="Thales Corporate Services S.A.S - initial API and implementation"/>
+ </invocationContracts>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+</fcore:FactoryComponent>
diff --git a/portfolio/org.eclipse.egf.portfolio.eclipse.util/plugin.properties b/portfolio/org.eclipse.egf.portfolio.eclipse.util/plugin.properties
new file mode 100644
index 0000000..f6a8235
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.eclipse.util/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 Portfolio Eclipse Util (Incubation)
+providerName=Eclipse Modeling Project
diff --git a/portfolio/org.eclipse.egf.portfolio.eclipse.util/plugin.xml b/portfolio/org.eclipse.egf.portfolio.eclipse.util/plugin.xml
new file mode 100644
index 0000000..059da58
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.eclipse.util/plugin.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<!--
+ 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/projectPolicies.fcore">
+ </fcore>
+ <fcore
+ id="egf/projectPoliciesExample.fcore">
+ </fcore>
+ </extension>
+
+
+</plugin>
diff --git a/portfolio/org.eclipse.egf.portfolio.eclipse.util/src/org/eclipse/egf/util/Activator.java b/portfolio/org.eclipse.egf.portfolio.eclipse.util/src/org/eclipse/egf/util/Activator.java
new file mode 100644
index 0000000..c8ed4d4
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.eclipse.util/src/org/eclipse/egf/util/Activator.java
@@ -0,0 +1,50 @@
+package org.eclipse.egf.util;
+
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends Plugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.egf.util";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/portfolio/org.eclipse.egf.portfolio.eclipse.util/templates/about.html b/portfolio/org.eclipse.egf.portfolio.eclipse.util/templates/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.eclipse.util/templates/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/portfolio/org.eclipse.egf.portfolio.eclipse.util/templates/plugin.properties b/portfolio/org.eclipse.egf.portfolio.eclipse.util/templates/plugin.properties
new file mode 100644
index 0000000..bc81c0e
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.eclipse.util/templates/plugin.properties
@@ -0,0 +1,13 @@
+##
+# Copyright (c) <%copyright%>
+# 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:
+# <%contributors%>
+##
+
+pluginName=<%pluginName%>
+providerName=<%providerName%>
diff --git a/portfolio/org.eclipse.egf.portfolio.file.resources/.classpath b/portfolio/org.eclipse.egf.portfolio.file.resources/.classpath
new file mode 100644
index 0000000..45f024e
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.file.resources/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/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/portfolio/org.eclipse.egf.portfolio.file.resources/.project b/portfolio/org.eclipse.egf.portfolio.file.resources/.project
new file mode 100644
index 0000000..4c043a9
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.file.resources/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.portfolio.file.resources</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/portfolio/org.eclipse.egf.portfolio.file.resources/.settings/org.eclipse.jdt.core.prefs b/portfolio/org.eclipse.egf.portfolio.file.resources/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..e099e88
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.file.resources/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Thu Feb 25 10:44:04 CET 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/portfolio/org.eclipse.egf.portfolio.file.resources/META-INF/MANIFEST.MF b/portfolio/org.eclipse.egf.portfolio.file.resources/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..e19693c
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.file.resources/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.portfolio.file.resources;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.egf.portfolio.file.resources.EGFFileResourcesActivator
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle:
+ org.eclipse.egf.model.ftask;visibility:=reexport
+Export-Package:
+ org.eclipse.egf.portfolio.file.resources
diff --git a/portfolio/org.eclipse.egf.portfolio.file.resources/about.html b/portfolio/org.eclipse.egf.portfolio.file.resources/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.file.resources/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/portfolio/org.eclipse.egf.portfolio.file.resources/build.properties b/portfolio/org.eclipse.egf.portfolio.file.resources/build.properties
new file mode 100644
index 0000000..7d8add5
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.file.resources/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ egf/,\
+ plugin.xml,\
+ about.html,\
+ plugin.properties
+src.includes = about.html
diff --git a/portfolio/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore b/portfolio/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore
new file mode 100644
index 0000000..ff57d64
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" 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:types="http://www.eclipse.org/egf/1.0.0/types">
+ <ftask:Task xmi:id="_as2OcCHzEd-tJpgH4Pk1Xw" description="This task aims at writing specified contents in a file"
+ name="eclipse.file.write.task" kind="java" implementation="org.eclipse.egf.portfolio.file.resources.WriteFileTask">
+ <contractContainer xmi:id="_UKdDASH0Ed-c_qcjB49Qng">
+ <contracts xmi:id="_lOB0kCH7Ed-c_qcjB49Qng" description="Contents to be written"
+ name="contents">
+ <type xmi:type="types:TypeString" xmi:id="_5XSB0CH7Ed-c_qcjB49Qng"/>
+ </contracts>
+ <contracts xmi:id="_ErxN0CH8Ed-c_qcjB49Qng" description="Eclipse project name"
+ name="projectName">
+ <type xmi:type="types:TypeString" xmi:id="_ErxN0SH8Ed-c_qcjB49Qng" description=""
+ value="myproject"/>
+ </contracts>
+ <contracts xmi:id="_L2STwCH8Ed-c_qcjB49Qng" description="Folder in the project name. The folder contains either the '.', '/' or '\' separators for sub-folders"
+ name="folder">
+ <type xmi:type="types:TypeString" xmi:id="_L2STwSH8Ed-c_qcjB49Qng"/>
+ </contracts>
+ <contracts xmi:id="_MHHlECH8Ed-c_qcjB49Qng" description="File name" name="fileName">
+ <type xmi:type="types:TypeString" xmi:id="_MHHlESH8Ed-c_qcjB49Qng" value="undefined"/>
+ </contracts>
+ <contracts xmi:id="_oKaQsCH8Ed-c_qcjB49Qng" description="true means append mode else creation mode"
+ name="appendMode">
+ <type xmi:type="types:TypeBoolean" xmi:id="_zGdukCH8Ed-c_qcjB49Qng" value="false"/>
+ </contracts>
+ </contractContainer>
+ </ftask:Task>
+ <fcore:FactoryComponent xmi:id="_gYv1wCH9Ed-c_qcjB49Qng" name="eclipse.file.write.fc">
+ <contractContainer xmi:id="_IQet4CIAEd-c_qcjB49Qng">
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_JqxnACITEd-c_qcjB49Qng"
+ description="Eclipse project name" name="projectName" invocationContracts="#_jWvQ4yH9Ed-c_qcjB49Qng #_SWkVoiIXEd-yj8XsBx2_pg">
+ <type xmi:type="types:TypeString" xmi:id="_MPSLICITEd-c_qcjB49Qng" value="myproject"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_PXjjoCITEd-c_qcjB49Qng"
+ description="Folder in the project name. The folder contains either the '.', '/' or '\' separators for sub-folders"
+ name="folder" invocationContracts="#_jWvQ5CH9Ed-c_qcjB49Qng">
+ <type xmi:type="types:TypeString" xmi:id="_UYYZMCITEd-c_qcjB49Qng" value=""/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_XPODcCITEd-c_qcjB49Qng"
+ description="File name" name="fileName" invocationContracts="#_jWvQ5SH9Ed-c_qcjB49Qng">
+ <type xmi:type="types:TypeString" xmi:id="_Y5BS0CITEd-c_qcjB49Qng" value="undefined"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_af_QoCITEd-c_qcjB49Qng"
+ description="true means append mode else creation mode" name="appendMode"
+ invocationContracts="#_jWvQ5iH9Ed-c_qcjB49Qng">
+ <type xmi:type="types:TypeBoolean" xmi:id="_eUNwMCITEd-c_qcjB49Qng" value="false"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_0rJLYCISEd-c_qcjB49Qng"
+ description="Contents to be written" name="contents" invocationContracts="#_jWvQ4iH9Ed-c_qcjB49Qng">
+ <type xmi:type="types:TypeString" xmi:id="_91W4MCISEd-c_qcjB49Qng" value=""/>
+ </contracts>
+ </contractContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_hSaosCH9Ed-c_qcjB49Qng">
+ <invocations xmi:id="_SWkVoCIXEd-yj8XsBx2_pg" invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.eclipse.resources.mgt/fcs/Resources.fcore#_d5v1IAqCEd-JA8Js2pdQ0g">
+ <invocationContractContainer xmi:id="_SWkVoSIXEd-yj8XsBx2_pg">
+ <invocationContracts xmi:id="_SWkVoiIXEd-yj8XsBx2_pg" factoryComponentContract="#_JqxnACITEd-c_qcjB49Qng"
+ invokedContract="platform:/plugin/org.eclipse.egf.eclipse.resources.mgt/fcs/Resources.fcore#_1_fQoAqDEd-JA8Js2pdQ0g"/>
+ <invocationContracts xmi:id="_SWkVoyIXEd-yj8XsBx2_pg" invokedContract="platform:/plugin/org.eclipse.egf.eclipse.resources.mgt/fcs/Resources.fcore#_1YyAgAqEEd-JA8Js2pdQ0g"/>
+ </invocationContractContainer>
+ </invocations>
+ <invocations xmi:id="_jWvQ4CH9Ed-c_qcjB49Qng" invokedActivity="#_as2OcCHzEd-tJpgH4Pk1Xw">
+ <invocationContractContainer xmi:id="_jWvQ4SH9Ed-c_qcjB49Qng">
+ <invocationContracts xmi:id="_jWvQ4iH9Ed-c_qcjB49Qng" factoryComponentContract="#_0rJLYCISEd-c_qcjB49Qng"
+ invokedContract="#_lOB0kCH7Ed-c_qcjB49Qng"/>
+ <invocationContracts xmi:id="_jWvQ4yH9Ed-c_qcjB49Qng" factoryComponentContract="#_JqxnACITEd-c_qcjB49Qng"
+ invokedContract="#_ErxN0CH8Ed-c_qcjB49Qng"/>
+ <invocationContracts xmi:id="_jWvQ5CH9Ed-c_qcjB49Qng" factoryComponentContract="#_PXjjoCITEd-c_qcjB49Qng"
+ invokedContract="#_L2STwCH8Ed-c_qcjB49Qng"/>
+ <invocationContracts xmi:id="_jWvQ5SH9Ed-c_qcjB49Qng" factoryComponentContract="#_XPODcCITEd-c_qcjB49Qng"
+ invokedContract="#_MHHlECH8Ed-c_qcjB49Qng"/>
+ <invocationContracts xmi:id="_jWvQ5iH9Ed-c_qcjB49Qng" factoryComponentContract="#_af_QoCITEd-c_qcjB49Qng"
+ invokedContract="#_oKaQsCH8Ed-c_qcjB49Qng"/>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+ </fcore:FactoryComponent>
+ <ftask:Task xmi:id="_4N3NwCIeEd-yj8XsBx2_pg" description="This task aims at reading file contents"
+ name="eclipse.file.read.task" kind="java" implementation="org.eclipse.egf.portfolio.file.resources.ReadFileTask">
+ <contractContainer xmi:id="_IxEr8CIgEd-yj8XsBx2_pg">
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_IxEr8yIgEd-yj8XsBx2_pg"
+ description="Eclipse project name" name="projectName">
+ <type xmi:type="types:TypeString" xmi:id="_IxEr9CIgEd-yj8XsBx2_pg" value="myproject"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_IxEr9SIgEd-yj8XsBx2_pg"
+ description="Folder in the project name. The folder contains either the '.', '/' or '\' separators for sub-folders"
+ name="folder">
+ <type xmi:type="types:TypeString" xmi:id="_IxEr9iIgEd-yj8XsBx2_pg" value=""/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_IxEr9yIgEd-yj8XsBx2_pg"
+ description="File name" name="fileName">
+ <type xmi:type="types:TypeString" xmi:id="_IxEr-CIgEd-yj8XsBx2_pg" value="undefined"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_IxEr8SIgEd-yj8XsBx2_pg"
+ description="Contents to read" name="contents" mode="Out">
+ <type xmi:type="types:TypeString" xmi:id="_IxEr8iIgEd-yj8XsBx2_pg" value=""/>
+ </contracts>
+ </contractContainer>
+ </ftask:Task>
+ <ftask:Task xmi:id="_yen8kSIqEd-1iJf80lotFg" description="This task aims at deleting file"
+ name="eclipse.file.delete.task" kind="java" implementation="org.eclipse.egf.portfolio.file.resources.DeleteFileTask">
+ <contractContainer xmi:id="_7gygoCIqEd-1iJf80lotFg">
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_7gygoSIqEd-1iJf80lotFg"
+ description="Eclipse project name" name="projectName">
+ <type xmi:type="types:TypeString" xmi:id="_7gygoiIqEd-1iJf80lotFg" value="myproject"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_7gygoyIqEd-1iJf80lotFg"
+ description="Folder in the project name. The folder contains either the '.', '/' or '\' separators for sub-folders"
+ name="folder">
+ <type xmi:type="types:TypeString" xmi:id="_7gygpCIqEd-1iJf80lotFg" value=""/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_7gygpSIqEd-1iJf80lotFg"
+ description="File name" name="fileName">
+ <type xmi:type="types:TypeString" xmi:id="_7gygpiIqEd-1iJf80lotFg" value="undefined"/>
+ </contracts>
+ </contractContainer>
+ </ftask:Task>
+ <ftask:Task xmi:id="_HtWVYCIxEd-1iJf80lotFg" description="This task aims at renaming a file"
+ name="eclipse.file.rename.task" kind="java" implementation="org.eclipse.egf.portfolio.file.resources.RenameFileTask">
+ <contractContainer xmi:id="_Oun_wCIxEd-1iJf80lotFg">
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_Oun_wSIxEd-1iJf80lotFg"
+ description="Eclipse project name" name="projectName">
+ <type xmi:type="types:TypeString" xmi:id="_Oun_wiIxEd-1iJf80lotFg" value="myproject"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_Oun_wyIxEd-1iJf80lotFg"
+ description="Folder in the project name. The folder contains either the '.', '/' or '\' separators for sub-folders"
+ name="folder">
+ <type xmi:type="types:TypeString" xmi:id="_Oun_xCIxEd-1iJf80lotFg" value=""/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_Oun_xSIxEd-1iJf80lotFg"
+ description="File name" name="fileName">
+ <type xmi:type="types:TypeString" xmi:id="_Oun_xiIxEd-1iJf80lotFg" value="undefined"/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_zOhrUCIxEd-1iJf80lotFg"
+ description="New folder" name="newFolder">
+ <type xmi:type="types:TypeString" xmi:id="_zOhrUSIxEd-1iJf80lotFg" value=""/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_QwRHYCIxEd-1iJf80lotFg"
+ description="New file name" name="newFileName">
+ <type xmi:type="types:TypeString" xmi:id="_QwRHYSIxEd-1iJf80lotFg" value="newUndefined"/>
+ </contracts>
+ </contractContainer>
+ </ftask:Task>
+ <fcore:FactoryComponent xmi:id="_qIpEECJhEd-QbLE3s54hPw" name="eclipse.file.copy.fc">
+ <contractContainer xmi:id="_wnMb4CJhEd-QbLE3s54hPw">
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_wnMb4SJhEd-QbLE3s54hPw"
+ description="Source project of the reference file" name="sourceProjectName"
+ mandatory="true" invocationContracts="#_wnMb8CJhEd-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_wnMb4iJhEd-QbLE3s54hPw" value=""/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_wnMb4yJhEd-QbLE3s54hPw"
+ description="Source folder of the reference file" name="sourceFolderName"
+ invocationContracts="#_wnMb8SJhEd-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_wnMb5CJhEd-QbLE3s54hPw" value=""/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_wnMb5SJhEd-QbLE3s54hPw"
+ description="Source file name" name="sourceFileName" mandatory="true" invocationContracts="#_wnMb8iJhEd-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_wnMb5iJhEd-QbLE3s54hPw" value=""/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_wnMb5yJhEd-QbLE3s54hPw"
+ description="Project where the file is copied" name="targetProjetName" mandatory="true"
+ invocationContracts="#_wnMb9yJhEd-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_wnMb6CJhEd-QbLE3s54hPw" value=""/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_wnMb6SJhEd-QbLE3s54hPw"
+ description="Folder where the file is generated" name="targetFolderName"
+ invocationContracts="#_wnMb-CJhEd-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_wnMb6iJhEd-QbLE3s54hPw" value=""/>
+ </contracts>
+ <contracts xmi:type="fcore:FactoryComponentContract" xmi:id="_wnMb6yJhEd-QbLE3s54hPw"
+ description="Target file name" name="targetFileName" mandatory="true" invocationContracts="#_wnMb-SJhEd-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_wnMb7CJhEd-QbLE3s54hPw" value=""/>
+ </contracts>
+ </contractContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_wnMb7SJhEd-QbLE3s54hPw">
+ <invocations xmi:id="_wnMb7iJhEd-QbLE3s54hPw" invokedActivity="#_4N3NwCIeEd-yj8XsBx2_pg">
+ <invocationContractContainer xmi:id="_wnMb7yJhEd-QbLE3s54hPw">
+ <invocationContracts xmi:id="_wnMb8CJhEd-QbLE3s54hPw" factoryComponentContract="#_wnMb4SJhEd-QbLE3s54hPw"
+ invokedContract="#_IxEr8yIgEd-yj8XsBx2_pg"/>
+ <invocationContracts xmi:id="_wnMb8SJhEd-QbLE3s54hPw" factoryComponentContract="#_wnMb4yJhEd-QbLE3s54hPw"
+ invokedContract="#_IxEr9SIgEd-yj8XsBx2_pg"/>
+ <invocationContracts xmi:id="_wnMb8iJhEd-QbLE3s54hPw" factoryComponentContract="#_wnMb5SJhEd-QbLE3s54hPw"
+ invokedContract="#_IxEr9yIgEd-yj8XsBx2_pg"/>
+ <invocationContracts xmi:id="_wnMb8yJhEd-QbLE3s54hPw" targetInvocationContract="#_wnMb-iJhEd-QbLE3s54hPw"
+ invokedContract="#_IxEr8SIgEd-yj8XsBx2_pg">
+ <type xmi:type="types:TypeString" xmi:id="_wnMb9CJhEd-QbLE3s54hPw"/>
+ </invocationContracts>
+ </invocationContractContainer>
+ </invocations>
+ <invocations xmi:id="_wnMb9SJhEd-QbLE3s54hPw" invokedActivity="#_gYv1wCH9Ed-c_qcjB49Qng">
+ <invocationContractContainer xmi:id="_wnMb9iJhEd-QbLE3s54hPw">
+ <invocationContracts xmi:id="_wnMb9yJhEd-QbLE3s54hPw" factoryComponentContract="#_wnMb5yJhEd-QbLE3s54hPw"
+ invokedContract="#_JqxnACITEd-c_qcjB49Qng"/>
+ <invocationContracts xmi:id="_wnMb-CJhEd-QbLE3s54hPw" factoryComponentContract="#_wnMb6SJhEd-QbLE3s54hPw"
+ invokedContract="#_PXjjoCITEd-c_qcjB49Qng"/>
+ <invocationContracts xmi:id="_wnMb-SJhEd-QbLE3s54hPw" factoryComponentContract="#_wnMb6yJhEd-QbLE3s54hPw"
+ invokedContract="#_XPODcCITEd-c_qcjB49Qng"/>
+ <invocationContracts xmi:id="_wnMb-iJhEd-QbLE3s54hPw" sourceInvocationContract="#_wnMb8yJhEd-QbLE3s54hPw"
+ invokedContract="#_0rJLYCISEd-c_qcjB49Qng"/>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+ </fcore:FactoryComponent>
+</xmi:XMI>
diff --git a/portfolio/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagementExample.fcore b/portfolio/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagementExample.fcore
new file mode 100644
index 0000000..934f5a2
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagementExample.fcore
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<fcore:FactoryComponent xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" 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:types="http://www.eclipse.org/egf/1.0.0/types" xmi:id="_fYQfwSIWEd-yj8XsBx2_pg"
+ name="eclipse.file.example">
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_g7yvECIWEd-yj8XsBx2_pg">
+ <invocations xmi:id="_654dMCIgEd-yj8XsBx2_pg" name="Read about.html" invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_4N3NwCIeEd-yj8XsBx2_pg">
+ <invocationContractContainer xmi:id="_654dMSIgEd-yj8XsBx2_pg">
+ <invocationContracts xmi:id="_654dMiIgEd-yj8XsBx2_pg" invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_IxEr8yIgEd-yj8XsBx2_pg">
+ <type xmi:type="types:TypeString" xmi:id="_H0mnMCIhEd-yj8XsBx2_pg" value="org.eclipse.egf.portfolio.eclipse.util"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_654dMyIgEd-yj8XsBx2_pg" invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_IxEr9SIgEd-yj8XsBx2_pg">
+ <type xmi:type="types:TypeString" xmi:id="_LaOqECIhEd-yj8XsBx2_pg" value="templates"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_654dNCIgEd-yj8XsBx2_pg" invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_IxEr9yIgEd-yj8XsBx2_pg">
+ <type xmi:type="types:TypeString" xmi:id="_MUpD4CIhEd-yj8XsBx2_pg" value="about.html"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_654dNSIgEd-yj8XsBx2_pg" targetInvocationContract="#_icgT4iIWEd-yj8XsBx2_pg"
+ invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_IxEr8SIgEd-yj8XsBx2_pg">
+ <type xmi:type="types:TypeString" xmi:id="_O_jyACIhEd-yj8XsBx2_pg"/>
+ </invocationContracts>
+ </invocationContractContainer>
+ </invocations>
+ <invocations xmi:id="_icgT4CIWEd-yj8XsBx2_pg" name="Write about.html in test.project/tmp"
+ invokedActivity="fcore:FactoryComponent platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_gYv1wCH9Ed-c_qcjB49Qng">
+ <invocationContractContainer xmi:id="_icgT4SIWEd-yj8XsBx2_pg">
+ <invocationContracts xmi:id="_icgT4iIWEd-yj8XsBx2_pg" sourceInvocationContract="#_654dNSIgEd-yj8XsBx2_pg"
+ invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_0rJLYCISEd-c_qcjB49Qng"/>
+ <invocationContracts xmi:id="_icgT4yIWEd-yj8XsBx2_pg" invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_JqxnACITEd-c_qcjB49Qng">
+ <type xmi:type="types:TypeString" xmi:id="_oZYiACIWEd-yj8XsBx2_pg" value="test.project"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_icgT5CIWEd-yj8XsBx2_pg" invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_PXjjoCITEd-c_qcjB49Qng">
+ <type xmi:type="types:TypeString" xmi:id="_qgrlsCIWEd-yj8XsBx2_pg" value="tmp"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_icgT5SIWEd-yj8XsBx2_pg" invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_XPODcCITEd-c_qcjB49Qng">
+ <type xmi:type="types:TypeString" xmi:id="_sC4YQCIWEd-yj8XsBx2_pg" value="about_fileWrite.html"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_icgT5iIWEd-yj8XsBx2_pg" invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_af_QoCITEd-c_qcjB49Qng">
+ <type xmi:type="types:TypeBoolean" xmi:id="_uRou0CIWEd-yj8XsBx2_pg" value="false"/>
+ </invocationContracts>
+ </invocationContractContainer>
+ </invocations>
+ <invocations xmi:id="_RCGtACIrEd-1iJf80lotFg" name="Delete dummy file" invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_yen8kSIqEd-1iJf80lotFg">
+ <invocationContractContainer xmi:id="_RCGtASIrEd-1iJf80lotFg">
+ <invocationContracts xmi:id="_RCGtAiIrEd-1iJf80lotFg" invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_7gygoSIqEd-1iJf80lotFg">
+ <type xmi:type="types:TypeString" xmi:id="_VAUPACIrEd-1iJf80lotFg" value="test.project"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_RCGtAyIrEd-1iJf80lotFg" invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_7gygoyIqEd-1iJf80lotFg">
+ <type xmi:type="types:TypeString" xmi:id="_YISskCIrEd-1iJf80lotFg" value="tmp"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_RCGtBCIrEd-1iJf80lotFg" invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_7gygpSIqEd-1iJf80lotFg">
+ <type xmi:type="types:TypeString" xmi:id="_ZpTMUCIrEd-1iJf80lotFg" value="dummy.txt"/>
+ </invocationContracts>
+ </invocationContractContainer>
+ </invocations>
+ <invocations xmi:id="_R8VW0CK-Ed-QbLE3s54hPw" name="Write about.html in test.project"
+ invokedActivity="fcore:FactoryComponent platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_qIpEECJhEd-QbLE3s54hPw">
+ <invocationContractContainer xmi:id="_R8VW0SK-Ed-QbLE3s54hPw">
+ <invocationContracts xmi:id="_R8VW0iK-Ed-QbLE3s54hPw" invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_wnMb4SJhEd-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_UsBQMCK-Ed-QbLE3s54hPw" value="org.eclipse.egf.portfolio.eclipse.util"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_R8VW0yK-Ed-QbLE3s54hPw" invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_wnMb4yJhEd-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_B3I_cCK_Ed-QbLE3s54hPw" value="templates"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_R8VW1CK-Ed-QbLE3s54hPw" invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_wnMb5SJhEd-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_EbgZoCK_Ed-QbLE3s54hPw" value="about.html"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_R8VW1SK-Ed-QbLE3s54hPw" invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_wnMb5yJhEd-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_G3hJECK_Ed-QbLE3s54hPw" value="test.project"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_R8VW1iK-Ed-QbLE3s54hPw" invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_wnMb6SJhEd-QbLE3s54hPw"/>
+ <invocationContracts xmi:id="_R8VW1yK-Ed-QbLE3s54hPw" invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.portfolio.file.resources/egf/eclipseFileManagement.fcore#_wnMb6yJhEd-QbLE3s54hPw">
+ <type xmi:type="types:TypeString" xmi:id="_Ju8pMCK_Ed-QbLE3s54hPw" value="about_fileCopy.html"/>
+ </invocationContracts>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+</fcore:FactoryComponent>
diff --git a/portfolio/org.eclipse.egf.portfolio.file.resources/plugin.properties b/portfolio/org.eclipse.egf.portfolio.file.resources/plugin.properties
new file mode 100644
index 0000000..f12ba23
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.file.resources/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 Portfolio File Management (Incubation)
+providerName=Eclipse Modeling Project
diff --git a/portfolio/org.eclipse.egf.portfolio.file.resources/plugin.xml b/portfolio/org.eclipse.egf.portfolio.file.resources/plugin.xml
new file mode 100644
index 0000000..778ac31
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.file.resources/plugin.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<!--
+ 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/eclipseFileManagement.fcore"
+ />
+ <fcore
+ id="egf/eclipseFileManagementExample.fcore"
+ />
+ </extension>
+
+</plugin>
diff --git a/portfolio/org.eclipse.egf.portfolio.file.resources/src/org/eclipse/egf/portfolio/file/resources/DeleteFileTask.java b/portfolio/org.eclipse.egf.portfolio.file.resources/src/org/eclipse/egf/portfolio/file/resources/DeleteFileTask.java
new file mode 100644
index 0000000..cb11a65
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.file.resources/src/org/eclipse/egf/portfolio/file/resources/DeleteFileTask.java
@@ -0,0 +1,57 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.portfolio.file.resources;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+import org.eclipse.egf.ftask.producer.invocation.ITaskProduction;
+
+
+/**
+ * @author Benoit Langlois
+ *
+ */
+public class DeleteFileTask implements ITaskProduction {
+
+ public void preExecute(ITaskProductionContext productionContext,
+ IProgressMonitor monitor) throws InvocationException {
+ // Nothing to do
+ }
+
+ public void doExecute(ITaskProductionContext productionContext,
+ IProgressMonitor monitor) throws InvocationException {
+ String projectName = productionContext.getInputValue(FileConstants.PROJECT_NAME_CONTRACT, String.class);
+ String folder = productionContext.getInputValue(FileConstants.FOLDER_CONTRACT, String.class);
+ String fileName = productionContext.getInputValue(FileConstants.FILE_NAME_CONTRACT, String.class);
+
+ try {
+ IFile file = FileUtil.getExistingFile(projectName, folder, fileName);
+ if (file.exists()) {
+ file.delete(false, true, null);
+ }
+ } catch (Exception e) {
+ EGFFileResourcesActivator.getDefault().logError(e);
+ }
+ }
+
+ public void postExecute(ITaskProductionContext productionContext,
+ IProgressMonitor monitor) throws InvocationException {
+ // Nothing to do
+ }
+
+}
diff --git a/portfolio/org.eclipse.egf.portfolio.file.resources/src/org/eclipse/egf/portfolio/file/resources/EGFFileResourcesActivator.java b/portfolio/org.eclipse.egf.portfolio.file.resources/src/org/eclipse/egf/portfolio/file/resources/EGFFileResourcesActivator.java
new file mode 100644
index 0000000..dee889d
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.file.resources/src/org/eclipse/egf/portfolio/file/resources/EGFFileResourcesActivator.java
@@ -0,0 +1,58 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.portfolio.file.resources;
+
+import org.eclipse.egf.common.activator.EGFAbstractPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * @author Benoit Langlois
+ */
+public class EGFFileResourcesActivator extends EGFAbstractPlugin {
+
+ /**
+ * Plug-in unique instance.
+ */
+ private static EGFFileResourcesActivator __plugin;
+
+ /**
+ * Get activator shared instance.
+ *
+ * @return
+ */
+ public static EGFFileResourcesActivator getDefault() {
+ return __plugin;
+ }
+
+ /**
+ * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ __plugin = this;
+ }
+
+ /**
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ __plugin = null;
+ super.stop(context);
+ }
+
+}
diff --git a/portfolio/org.eclipse.egf.portfolio.file.resources/src/org/eclipse/egf/portfolio/file/resources/FileConstants.java b/portfolio/org.eclipse.egf.portfolio.file.resources/src/org/eclipse/egf/portfolio/file/resources/FileConstants.java
new file mode 100644
index 0000000..410b784
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.file.resources/src/org/eclipse/egf/portfolio/file/resources/FileConstants.java
@@ -0,0 +1,60 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.portfolio.file.resources;
+
+/**
+ * @author Benoit Langlois
+ */
+
+public interface FileConstants {
+
+
+ /**
+ * File contents task contract
+ */
+ public static final String CONTENTS_NAME_CONTRACT = "contents"; //$NON-NLS-1$
+
+ /**
+ * Project Name task contract
+ */
+ public static final String PROJECT_NAME_CONTRACT = "projectName"; //$NON-NLS-1$
+
+ /**
+ * Folder task contract
+ */
+ public static final String FOLDER_CONTRACT = "folder"; //$NON-NLS-1$
+
+ /**
+ * New folder task contract
+ */
+ public static final String NEW_FOLDER_CONTRACT = "newFolder"; //$NON-NLS-1$
+
+ /**
+ * File Name task contract
+ */
+ public static final String FILE_NAME_CONTRACT = "fileName"; //$NON-NLS-1$
+
+ /**
+ * New file Name task contract
+ */
+ public static final String NEW_FILE_NAME_CONTRACT = "newFileName"; //$NON-NLS-1$
+
+ /**
+ * Append Mode task contract
+ */
+ public static final String APPEND_MODE_CONTRACT = "appendMode"; //$NON-NLS-1$
+
+}
diff --git a/portfolio/org.eclipse.egf.portfolio.file.resources/src/org/eclipse/egf/portfolio/file/resources/FileUtil.java b/portfolio/org.eclipse.egf.portfolio.file.resources/src/org/eclipse/egf/portfolio/file/resources/FileUtil.java
new file mode 100644
index 0000000..76b8d84
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.file.resources/src/org/eclipse/egf/portfolio/file/resources/FileUtil.java
@@ -0,0 +1,78 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 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
+ *
+ * </copyright>
+ */
+package org.eclipse.egf.portfolio.file.resources;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+
+/**
+ * @author Benoit Langlois
+ *
+ */
+public class FileUtil {
+
+ /*
+ * Get existing file
+ */
+ public static IFile getExistingFile(String projectName, String folder, String fileName) {
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ IProject project = root.getProject(projectName);
+
+ IPath path = new Path(""); //$NON-NLS-1$
+
+ if (folder != null && folder.trim().length() > 0)
+ for (String member : folder.split("\\.|/|\\\\")) { //$NON-NLS-1$
+ path = path.append(member);
+ IFolder aFolder = project.getFolder(path);
+ if (!aFolder.exists())
+ return null;
+ }
+
+ path = path.append(fileName);
+
+ return project.getFile(path);
+ }
+
+ /*
+ * Get file where contents is to be written
+ * Not existing folders are created
+ */
+ public static IFile getNewFile(String projectName, String folder, String fileName) throws CoreException {
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ IProject project = root.getProject(projectName);
+
+ // build the class resource path
+ IPath path = new Path(""); //$NON-NLS-1$
+
+ if (folder != null && folder.trim().length() > 0)
+ for (String member : folder.split("\\.|/|\\\\")) { //$NON-NLS-1$
+ path = path.append(member);
+ IFolder aFolder = project.getFolder(path);
+ if (!aFolder.exists())
+ aFolder.create(true, true, null);
+ }
+
+ path = path.append(fileName);
+
+ return project.getFile(path);
+ }
+
+}
diff --git a/portfolio/org.eclipse.egf.portfolio.file.resources/src/org/eclipse/egf/portfolio/file/resources/ReadFileTask.java b/portfolio/org.eclipse.egf.portfolio.file.resources/src/org/eclipse/egf/portfolio/file/resources/ReadFileTask.java
new file mode 100644
index 0000000..945df6f
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.file.resources/src/org/eclipse/egf/portfolio/file/resources/ReadFileTask.java
@@ -0,0 +1,81 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.portfolio.file.resources;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+import org.eclipse.egf.ftask.producer.invocation.ITaskProduction;
+
+
+/**
+ * @author Benoit Langlois
+ *
+ */
+public class ReadFileTask implements ITaskProduction {
+
+ public void preExecute(ITaskProductionContext productionContext,
+ IProgressMonitor monitor) throws InvocationException {
+ // Nothing to do
+ }
+
+ public void doExecute(ITaskProductionContext productionContext,
+ IProgressMonitor monitor) throws InvocationException {
+ String contents = new String();
+ String projectName = productionContext.getInputValue(FileConstants.PROJECT_NAME_CONTRACT, String.class);
+ String folder = productionContext.getInputValue(FileConstants.FOLDER_CONTRACT, String.class);
+ String fileName = productionContext.getInputValue(FileConstants.FILE_NAME_CONTRACT, String.class);
+
+ BufferedReader bufferedReader = null;
+ try {
+ IFile file = FileUtil.getExistingFile(projectName, folder, fileName);
+ if (file.exists()) {
+ StringBuffer stringBuffer = new StringBuffer();
+ bufferedReader = new BufferedReader(new InputStreamReader(file.getContents()));
+ String line = null;
+ while ((line = bufferedReader.readLine()) != null) {
+ stringBuffer.append(line);
+ stringBuffer.append("\n"); //$NON-NLS-1$
+ }
+ contents = stringBuffer.toString();
+ }
+ } catch (Exception e) {
+ EGFFileResourcesActivator.getDefault().logError(e);
+ } finally {
+ if (bufferedReader != null) {
+ try {
+ bufferedReader.close();
+ } catch (IOException e) {
+ EGFFileResourcesActivator.getDefault().logError(e);
+ }
+ }
+ }
+
+ productionContext.setOutputValue(FileConstants.CONTENTS_NAME_CONTRACT, contents);
+
+ }
+
+ public void postExecute(ITaskProductionContext productionContext,
+ IProgressMonitor monitor) throws InvocationException {
+ // Nothing to do
+ }
+
+}
diff --git a/portfolio/org.eclipse.egf.portfolio.file.resources/src/org/eclipse/egf/portfolio/file/resources/RenameFileTask.java b/portfolio/org.eclipse.egf.portfolio.file.resources/src/org/eclipse/egf/portfolio/file/resources/RenameFileTask.java
new file mode 100644
index 0000000..79d105f
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.file.resources/src/org/eclipse/egf/portfolio/file/resources/RenameFileTask.java
@@ -0,0 +1,63 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.portfolio.file.resources;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+import org.eclipse.egf.ftask.producer.invocation.ITaskProduction;
+
+
+/**
+ * @author Benoit Langlois
+ *
+ */
+public class RenameFileTask implements ITaskProduction {
+
+ public void preExecute(ITaskProductionContext productionContext,
+ IProgressMonitor monitor) throws InvocationException {
+ // Nothing to do
+ }
+
+ public void doExecute(ITaskProductionContext productionContext,
+ IProgressMonitor monitor) throws InvocationException {
+ String projectName = productionContext.getInputValue(FileConstants.PROJECT_NAME_CONTRACT, String.class);
+ String folder = productionContext.getInputValue(FileConstants.FOLDER_CONTRACT, String.class);
+ String fileName = productionContext.getInputValue(FileConstants.FILE_NAME_CONTRACT, String.class);
+ String newFolder = productionContext.getInputValue(FileConstants.NEW_FOLDER_CONTRACT, String.class);
+ String newFileName = productionContext.getInputValue(FileConstants.NEW_FILE_NAME_CONTRACT, String.class);
+
+ // Not implemented
+// try {
+// IFile file = FileUtil.getExistingFile(projectName, folder, fileName);
+// if (file.exists()) {
+// IFile newFile = FileUtil.getExistingFile(projectName, folder, newFileName);
+// if (newFile.exists()) {
+// newFile.delete(false, false, null);
+// }
+// ...
+// }
+// } catch (Exception e) {
+// EGFFileResourcesActivator.getDefault().logError(e);
+// }
+ }
+
+ public void postExecute(ITaskProductionContext productionContext,
+ IProgressMonitor monitor) throws InvocationException {
+ // Nothing to do
+ }
+
+}
diff --git a/portfolio/org.eclipse.egf.portfolio.file.resources/src/org/eclipse/egf/portfolio/file/resources/WriteFileTask.java b/portfolio/org.eclipse.egf.portfolio.file.resources/src/org/eclipse/egf/portfolio/file/resources/WriteFileTask.java
new file mode 100644
index 0000000..a58acfd
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.file.resources/src/org/eclipse/egf/portfolio/file/resources/WriteFileTask.java
@@ -0,0 +1,73 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.portfolio.file.resources;
+
+import java.io.ByteArrayInputStream;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+import org.eclipse.egf.ftask.producer.invocation.ITaskProduction;
+
+
+/**
+ * @author Benoit Langlois
+ *
+ */
+public class WriteFileTask implements ITaskProduction {
+
+ public void preExecute(ITaskProductionContext productionContext,
+ IProgressMonitor monitor) throws InvocationException {
+ // Nothing done
+ }
+
+ public void doExecute(ITaskProductionContext productionContext,
+ IProgressMonitor monitor) throws InvocationException {
+
+ String contents = productionContext.getInputValue(FileConstants.CONTENTS_NAME_CONTRACT, String.class);
+ String projectName = productionContext.getInputValue(FileConstants.PROJECT_NAME_CONTRACT, String.class);
+ String folder = productionContext.getInputValue(FileConstants.FOLDER_CONTRACT, String.class);
+ String fileName = productionContext.getInputValue(FileConstants.FILE_NAME_CONTRACT, String.class);
+ Boolean appendMode = productionContext.getInputValue(FileConstants.APPEND_MODE_CONTRACT, Boolean.class);
+
+ ByteArrayInputStream fileContents = new ByteArrayInputStream(contents.getBytes());
+ try {
+ IFile file = FileUtil.getNewFile(projectName, folder, fileName);
+ if (file.exists()) {
+ if (appendMode == true) {
+ file.appendContents(fileContents, false, false, null);
+ }
+ else {
+ file.setContents(fileContents, true, false, null);
+ }
+ }
+ else {
+ file.create(fileContents, true, null);
+ }
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ public void postExecute(ITaskProductionContext productionContext,
+ IProgressMonitor monitor) throws InvocationException {
+ // Nothing done
+ }
+
+}
diff --git a/portfolio/org.eclipse.egf.portfolio.type/.classpath b/portfolio/org.eclipse.egf.portfolio.type/.classpath
new file mode 100644
index 0000000..45f024e
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.type/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/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/portfolio/org.eclipse.egf.portfolio.type/.project b/portfolio/org.eclipse.egf.portfolio.type/.project
new file mode 100644
index 0000000..7d8acf3
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.type/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.portfolio.type</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/portfolio/org.eclipse.egf.portfolio.type/.settings/org.eclipse.jdt.core.prefs b/portfolio/org.eclipse.egf.portfolio.type/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..9427cf6
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.type/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Thu Feb 25 21:05:35 CET 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/portfolio/org.eclipse.egf.portfolio.type/META-INF/MANIFEST.MF b/portfolio/org.eclipse.egf.portfolio.type/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..7ea610e
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.type/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.portfolio.type;singleton:=true
+Bundle-Version: 0.2.3.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.egf.portfolio.type.Activator
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle:
+ org.eclipse.core.runtime,
+ org.eclipse.egf.model.ftask;visibility:=reexport
+Export-Package:
+ org.eclipse.egf.portfolio.type
+Bundle-ActivationPolicy: lazy
diff --git a/portfolio/org.eclipse.egf.portfolio.type/about.html b/portfolio/org.eclipse.egf.portfolio.type/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.type/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/portfolio/org.eclipse.egf.portfolio.type/build.properties b/portfolio/org.eclipse.egf.portfolio.type/build.properties
new file mode 100644
index 0000000..409ea5e
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.type/build.properties
@@ -0,0 +1,19 @@
+##
+# 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
+##
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.properties,\
+ egf/,\
+ plugin.xml
+src.includes = about.html
diff --git a/portfolio/org.eclipse.egf.portfolio.type/egf/stringManagement.fcore b/portfolio/org.eclipse.egf.portfolio.type/egf/stringManagement.fcore
new file mode 100644
index 0000000..7868b19
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.type/egf/stringManagement.fcore
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ftask:Task xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:ftask="http://www.eclipse.org/egf/1.0.0/ftask"
+ xmlns:types="http://www.eclipse.org/egf/1.0.0/types" xmi:id="_Hz4MACKxEd-QbLE3s54hPw"
+ description="String replace" name="string.replace" kind="java" implementation="org.eclipse.egf.portfolio.type.StringReplaceTask">
+ <contractContainer xmi:id="_WaU4ACKxEd-QbLE3s54hPw">
+ <contracts xmi:id="_WtGqECKxEd-QbLE3s54hPw" description="In value" name="inValue"
+ mandatory="true">
+ <type xmi:type="types:TypeString" xmi:id="_bVCegCKxEd-QbLE3s54hPw"/>
+ </contracts>
+ <contracts xmi:id="_cbOqgCKxEd-QbLE3s54hPw" description="Regular expression" name="regex"
+ mandatory="true">
+ <type xmi:type="types:TypeString" xmi:id="_cbOqgSKxEd-QbLE3s54hPw"/>
+ </contracts>
+ <contracts xmi:id="_qzqvsCKxEd-QbLE3s54hPw" description="Replacement value" name="replacement"
+ mandatory="true">
+ <type xmi:type="types:TypeString" xmi:id="_qzqvsSKxEd-QbLE3s54hPw"/>
+ </contracts>
+ <contracts xmi:id="_RsC5ECKzEd-QbLE3s54hPw" description="Occurrence: first, to replace first occurrence, or all, to replace all occurrences. When empty, all occurrences are replaced"
+ name="occurrence">
+ <type xmi:type="types:TypeString" xmi:id="_f2CSkCKzEd-QbLE3s54hPw" value="all"/>
+ </contracts>
+ <contracts xmi:id="_l-eiYCKxEd-QbLE3s54hPw" description="Out value" name="outValue"
+ mandatory="true" mode="Out">
+ <type xmi:type="types:TypeString" xmi:id="_l-eiYSKxEd-QbLE3s54hPw"/>
+ </contracts>
+ </contractContainer>
+</ftask:Task>
diff --git a/portfolio/org.eclipse.egf.portfolio.type/plugin.properties b/portfolio/org.eclipse.egf.portfolio.type/plugin.properties
new file mode 100644
index 0000000..ca82de5
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.type/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 Portfolio Type Management (Incubation)
+providerName=Eclipse Modeling Project
diff --git a/portfolio/org.eclipse.egf.portfolio.type/plugin.xml b/portfolio/org.eclipse.egf.portfolio.type/plugin.xml
new file mode 100644
index 0000000..8785ae7
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.type/plugin.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<!--
+ 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/stringManagement.fcore">
+ </fcore>
+ </extension>
+
+
+</plugin>
diff --git a/portfolio/org.eclipse.egf.portfolio.type/src/org/eclipse/egf/portfolio/type/Activator.java b/portfolio/org.eclipse.egf.portfolio.type/src/org/eclipse/egf/portfolio/type/Activator.java
new file mode 100644
index 0000000..18b2cb6
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.type/src/org/eclipse/egf/portfolio/type/Activator.java
@@ -0,0 +1,45 @@
+package org.eclipse.egf.portfolio.type;
+
+import org.eclipse.egf.common.activator.EGFAbstractPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends EGFAbstractPlugin {
+
+ // The shared instance
+ private static Activator _plugin;
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ _plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ _plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return _plugin;
+ }
+
+}
diff --git a/portfolio/org.eclipse.egf.portfolio.type/src/org/eclipse/egf/portfolio/type/StringReplaceTask.java b/portfolio/org.eclipse.egf.portfolio.type/src/org/eclipse/egf/portfolio/type/StringReplaceTask.java
new file mode 100644
index 0000000..5b20d0e
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.type/src/org/eclipse/egf/portfolio/type/StringReplaceTask.java
@@ -0,0 +1,62 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.portfolio.type;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.ftask.producer.context.ITaskProductionContext;
+import org.eclipse.egf.ftask.producer.invocation.ITaskProduction;
+
+/**
+ * @author Benoit Langlois
+ *
+ */
+public class StringReplaceTask implements ITaskProduction {
+
+ private static final String FIRST_VALUE = "first"; //$NON-NLS-1$
+ private static final String ALL_VALUE = "all"; //$NON-NLS-1$
+
+ public void preExecute(ITaskProductionContext productionContext, IProgressMonitor monitor) throws InvocationException {
+ // Nothing to do
+ }
+
+ public void doExecute(ITaskProductionContext productionContext, IProgressMonitor monitor) throws InvocationException {
+ String result = new String();
+ String inValue = productionContext.getInputValue(TypeConstants.IN_VALUE_NAME_CONTRACT, String.class);
+ String occurrenceValue = productionContext.getInputValue(TypeConstants.OCCURRENCE_NAME_CONTRACT, String.class);
+ String regexValue = productionContext.getInputValue(TypeConstants.REGEX_NAME_CONTRACT, String.class);
+ String replacementValue = productionContext.getInputValue(TypeConstants.REPLACEMENT_NAME_CONTRACT, String.class);
+
+ if (inValue != null && inValue.trim().length() > 0) {
+ result = inValue;
+ if (occurrenceValue.equals(FIRST_VALUE)) {
+ result = inValue.replaceFirst(regexValue, replacementValue);
+ } else {
+ if (occurrenceValue.equals(ALL_VALUE)) {
+ result = inValue.replaceAll(regexValue, replacementValue);
+ }
+ }
+ }
+
+ productionContext.setOutputValue(TypeConstants.OUT_VALUE_NAME_CONTRACT, result);
+
+ }
+
+ public void postExecute(ITaskProductionContext productionContext, IProgressMonitor monitor) throws InvocationException {
+ // Nothing to do
+ }
+
+}
diff --git a/portfolio/org.eclipse.egf.portfolio.type/src/org/eclipse/egf/portfolio/type/TypeConstants.java b/portfolio/org.eclipse.egf.portfolio.type/src/org/eclipse/egf/portfolio/type/TypeConstants.java
new file mode 100644
index 0000000..c2292ad
--- /dev/null
+++ b/portfolio/org.eclipse.egf.portfolio.type/src/org/eclipse/egf/portfolio/type/TypeConstants.java
@@ -0,0 +1,56 @@
+/**
+ * <copyright>
+ *
+ * Copyright (c) 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
+ *
+ * </copyright>
+ */
+
+package org.eclipse.egf.portfolio.type;
+
+/**
+ * @author Benoit Langlois
+ */
+
+public interface TypeConstants {
+
+
+ /**
+ * Contents task contract
+ */
+ public static final String CONTENTS_NAME_CONTRACT = "contents"; //$NON-NLS-1$
+
+ /**
+ * In value task contract
+ */
+ public static final String IN_VALUE_NAME_CONTRACT = "inValue"; //$NON-NLS-1$
+
+ /**
+ * Out value task contract
+ */
+ public static final String OUT_VALUE_NAME_CONTRACT = "outValue"; //$NON-NLS-1$
+
+ /**
+ * Regular expression task contract
+ */
+ public static final String REGEX_NAME_CONTRACT = "regex"; //$NON-NLS-1$
+
+ /**
+ * Replacement task contract
+ */
+ public static final String REPLACEMENT_NAME_CONTRACT = "replacement"; //$NON-NLS-1$
+
+ /**
+ * Occurrence task contract
+ */
+ public static final String OCCURRENCE_NAME_CONTRACT = "occurrence"; //$NON-NLS-1$
+
+
+}
diff --git a/tests/org.eclipse.egf.core.test.model.edit/.classpath b/tests/org.eclipse.egf.core.test.model.edit/.classpath
new file mode 100644
index 0000000..45f024e
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.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/tests/org.eclipse.egf.core.test.model.edit/.project b/tests/org.eclipse.egf.core.test.model.edit/.project
new file mode 100644
index 0000000..4c06048
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.core.test.model.edit</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/org.eclipse.egf.core.test.model.edit/.settings/org.eclipse.core.resources.prefs b/tests/org.eclipse.egf.core.test.model.edit/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..d2b4e70
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Wed Feb 17 16:14:32 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/tests/org.eclipse.egf.core.test.model.edit/META-INF/MANIFEST.MF b/tests/org.eclipse.egf.core.test.model.edit/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..7365b74
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.core.test.model.edit;singleton:=true
+Bundle-Version: 0.2.2.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: test.provider.TestEditPlugin$Implementation
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: test.provider
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.egf.core.test.model;visibility:=reexport,
+ org.eclipse.emf.edit;visibility:=reexport,
+ org.eclipse.egf.model.edit;bundle-version="0.2.0";visibility:=reexport
+Bundle-ActivationPolicy: lazy
diff --git a/tests/org.eclipse.egf.core.test.model.edit/about.html b/tests/org.eclipse.egf.core.test.model.edit/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/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/tests/org.eclipse.egf.core.test.model.edit/build.properties b/tests/org.eclipse.egf.core.test.model.edit/build.properties
new file mode 100644
index 0000000..b3ea932
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/build.properties
@@ -0,0 +1,20 @@
+##
+# 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
+##
+
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ icons/,\
+ .,\
+ plugin.properties,\
+ about.html,\
+ plugin.xml
+src.includes = about.html
diff --git a/tests/org.eclipse.egf.core.test.model.edit/icons/full/ctool16/CreateTestCase_result_ConsoleOutputTestResult.gif b/tests/org.eclipse.egf.core.test.model.edit/icons/full/ctool16/CreateTestCase_result_ConsoleOutputTestResult.gif
new file mode 100644
index 0000000..cb3d509
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/icons/full/ctool16/CreateTestCase_result_ConsoleOutputTestResult.gif
Binary files differ
diff --git a/tests/org.eclipse.egf.core.test.model.edit/icons/full/ctool16/CreateTestCase_result_ExceptionTestResult.gif b/tests/org.eclipse.egf.core.test.model.edit/icons/full/ctool16/CreateTestCase_result_ExceptionTestResult.gif
new file mode 100644
index 0000000..2397f66
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/icons/full/ctool16/CreateTestCase_result_ExceptionTestResult.gif
Binary files differ
diff --git a/tests/org.eclipse.egf.core.test.model.edit/icons/full/ctool16/CreateTestCase_result_FileOutputTestResult.gif b/tests/org.eclipse.egf.core.test.model.edit/icons/full/ctool16/CreateTestCase_result_FileOutputTestResult.gif
new file mode 100644
index 0000000..f576b4f
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/icons/full/ctool16/CreateTestCase_result_FileOutputTestResult.gif
Binary files differ
diff --git a/tests/org.eclipse.egf.core.test.model.edit/icons/full/ctool16/CreateTestCase_result_ValidationErrorTestResult.gif b/tests/org.eclipse.egf.core.test.model.edit/icons/full/ctool16/CreateTestCase_result_ValidationErrorTestResult.gif
new file mode 100644
index 0000000..d39e9f1
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/icons/full/ctool16/CreateTestCase_result_ValidationErrorTestResult.gif
Binary files differ
diff --git a/tests/org.eclipse.egf.core.test.model.edit/icons/full/ctool16/CreateTestSuite_tests_EGFTestCase.gif b/tests/org.eclipse.egf.core.test.model.edit/icons/full/ctool16/CreateTestSuite_tests_EGFTestCase.gif
new file mode 100644
index 0000000..e292d2a
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/icons/full/ctool16/CreateTestSuite_tests_EGFTestCase.gif
Binary files differ
diff --git a/tests/org.eclipse.egf.core.test.model.edit/icons/full/ctool16/CreateTestSuite_tests_TestCase.gif b/tests/org.eclipse.egf.core.test.model.edit/icons/full/ctool16/CreateTestSuite_tests_TestCase.gif
new file mode 100644
index 0000000..c1f6bdf
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/icons/full/ctool16/CreateTestSuite_tests_TestCase.gif
Binary files differ
diff --git a/tests/org.eclipse.egf.core.test.model.edit/icons/full/ctool16/CreateTestSuite_tests_TestSuite.gif b/tests/org.eclipse.egf.core.test.model.edit/icons/full/ctool16/CreateTestSuite_tests_TestSuite.gif
new file mode 100644
index 0000000..c31e7a2
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/icons/full/ctool16/CreateTestSuite_tests_TestSuite.gif
Binary files differ
diff --git a/tests/org.eclipse.egf.core.test.model.edit/icons/full/obj16/ConsoleOutputTestResult.gif b/tests/org.eclipse.egf.core.test.model.edit/icons/full/obj16/ConsoleOutputTestResult.gif
new file mode 100644
index 0000000..9041598
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/icons/full/obj16/ConsoleOutputTestResult.gif
Binary files differ
diff --git a/tests/org.eclipse.egf.core.test.model.edit/icons/full/obj16/EGFTestCase.gif b/tests/org.eclipse.egf.core.test.model.edit/icons/full/obj16/EGFTestCase.gif
new file mode 100644
index 0000000..45731fe
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/icons/full/obj16/EGFTestCase.gif
Binary files differ
diff --git a/tests/org.eclipse.egf.core.test.model.edit/icons/full/obj16/ExceptionTestResult.gif b/tests/org.eclipse.egf.core.test.model.edit/icons/full/obj16/ExceptionTestResult.gif
new file mode 100644
index 0000000..cb1755a
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/icons/full/obj16/ExceptionTestResult.gif
Binary files differ
diff --git a/tests/org.eclipse.egf.core.test.model.edit/icons/full/obj16/FileOutputTestResult.gif b/tests/org.eclipse.egf.core.test.model.edit/icons/full/obj16/FileOutputTestResult.gif
new file mode 100644
index 0000000..c4fb30e
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/icons/full/obj16/FileOutputTestResult.gif
Binary files differ
diff --git a/tests/org.eclipse.egf.core.test.model.edit/icons/full/obj16/TestCase.gif b/tests/org.eclipse.egf.core.test.model.edit/icons/full/obj16/TestCase.gif
new file mode 100644
index 0000000..9041598
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/icons/full/obj16/TestCase.gif
Binary files differ
diff --git a/tests/org.eclipse.egf.core.test.model.edit/icons/full/obj16/TestResult.gif b/tests/org.eclipse.egf.core.test.model.edit/icons/full/obj16/TestResult.gif
new file mode 100644
index 0000000..136e3b2
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/icons/full/obj16/TestResult.gif
Binary files differ
diff --git a/tests/org.eclipse.egf.core.test.model.edit/icons/full/obj16/TestSuite.gif b/tests/org.eclipse.egf.core.test.model.edit/icons/full/obj16/TestSuite.gif
new file mode 100644
index 0000000..35ef84e
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/icons/full/obj16/TestSuite.gif
Binary files differ
diff --git a/tests/org.eclipse.egf.core.test.model.edit/icons/full/obj16/ValidationErrorTestResult.gif b/tests/org.eclipse.egf.core.test.model.edit/icons/full/obj16/ValidationErrorTestResult.gif
new file mode 100644
index 0000000..48e3cf2
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/icons/full/obj16/ValidationErrorTestResult.gif
Binary files differ
diff --git a/tests/org.eclipse.egf.core.test.model.edit/plugin.properties b/tests/org.eclipse.egf.core.test.model.edit/plugin.properties
new file mode 100644
index 0000000..cd3a30d
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/plugin.properties
@@ -0,0 +1,49 @@
+
+# <copyright>
+# </copyright>
+#
+# $Id$
+
+pluginName = Test Edit Support
+providerName = www.example.org
+
+_UI_CreateChild_text = {0}
+_UI_CreateChild_text2 = {1} {0}
+_UI_CreateChild_text3 = {1}
+_UI_CreateChild_tooltip = Create New {0} Under {1} Feature
+_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}.
+_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent.
+
+_UI_PropertyDescriptor_description = The {0} of the {1}
+
+_UI_Test_type = Test
+_UI_TestSuite_type = Suite
+_UI_TestCase_type = Case
+_UI_TestResult_type = Result
+_UI_ExceptionTestResult_type = Exception Test Result
+_UI_ValidationErrorTestResult_type = Validation Error Test Result
+_UI_ConsoleOutputTestResult_type = Console Output Test Result
+_UI_Unknown_type = Object
+
+_UI_Unknown_datatype= Value
+
+_UI_Test_name_feature = Name
+_UI_TestSuite_tests_feature = Tests
+_UI_TestCase_activity_feature = Activity
+_UI_TestCase_result_feature = Result
+_UI_ExceptionTestResult_exceptionClass_feature = Exception Class
+_UI_ExceptionTestResult_exceptionMessage_feature = Exception Message
+_UI_ValidationErrorTestResult_severity_feature = Severity
+_UI_ConsoleOutputTestResult_text_feature = Text
+_UI_Unknown_feature = Unspecified
+
+_UI_ValidationErrorSeverity_INFO_literal = INFO
+_UI_ValidationErrorSeverity_WARNING_literal = WARNING
+_UI_ValidationErrorSeverity_ERROR_literal = ERROR
+_UI_EGFTestCase_type = EGF Test Case
+_UI_EGFTestCase_activity_feature = Activity
+_UI_FileOutputTestResult_type = File Output Test Result
+_UI_FileOutputTestResult_iFilePath_feature = IFile Path
+_UI_FileOutputTestResult_text_feature = Text
+_UI_OutputTestResult_type = Output Test Result
+_UI_OutputTestResult_text_feature = Text
diff --git a/tests/org.eclipse.egf.core.test.model.edit/plugin.xml b/tests/org.eclipse.egf.core.test.model.edit/plugin.xml
new file mode 100644
index 0000000..178e3e7
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/plugin.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ <copyright>
+ </copyright>
+
+ $Id$
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+ <factory
+ uri="http://www.eclipse.org/egf/1.0.0/test"
+ class="test.provider.TestItemProviderAdapterFactory"
+ supportedTypes=
+ "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
+ org.eclipse.emf.edit.provider.IStructuredItemContentProvider
+ org.eclipse.emf.edit.provider.ITreeItemContentProvider
+ org.eclipse.emf.edit.provider.IItemLabelProvider
+ org.eclipse.emf.edit.provider.IItemPropertySource"/>
+ </extension>
+
+</plugin>
diff --git a/tests/org.eclipse.egf.core.test.model.edit/src/test/provider/ConsoleOutputTestResultItemProvider.java b/tests/org.eclipse.egf.core.test.model.edit/src/test/provider/ConsoleOutputTestResultItemProvider.java
new file mode 100644
index 0000000..a6f7c9f
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/src/test/provider/ConsoleOutputTestResultItemProvider.java
@@ -0,0 +1,118 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import test.ConsoleOutputTestResult;
+import test.TestPackage;
+
+/**
+ * This is the item provider adapter for a {@link test.ConsoleOutputTestResult} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ConsoleOutputTestResultItemProvider
+ extends OutputTestResultItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ConsoleOutputTestResultItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns ConsoleOutputTestResult.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ConsoleOutputTestResult"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = crop(((ConsoleOutputTestResult)object).getText());
+ return label == null || label.length() == 0 ?
+ getString("_UI_ConsoleOutputTestResult_type") :
+ getString("_UI_ConsoleOutputTestResult_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/tests/org.eclipse.egf.core.test.model.edit/src/test/provider/EGFTestCaseItemProvider.java b/tests/org.eclipse.egf.core.test.model.edit/src/test/provider/EGFTestCaseItemProvider.java
new file mode 100644
index 0000000..820e666
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/src/test/provider/EGFTestCaseItemProvider.java
@@ -0,0 +1,139 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import test.EGFTestCase;
+import test.TestPackage;
+
+/**
+ * This is the item provider adapter for a {@link test.EGFTestCase} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class EGFTestCaseItemProvider
+ extends TestCaseItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EGFTestCaseItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addActivityPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Activity feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addActivityPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_EGFTestCase_activity_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_EGFTestCase_activity_feature", "_UI_EGFTestCase_type"),
+ TestPackage.Literals.EGF_TEST_CASE__ACTIVITY,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This returns EGFTestCase.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/EGFTestCase"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((EGFTestCase)object).getName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_EGFTestCase_type") :
+ getString("_UI_EGFTestCase_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/tests/org.eclipse.egf.core.test.model.edit/src/test/provider/ExceptionTestResultItemProvider.java b/tests/org.eclipse.egf.core.test.model.edit/src/test/provider/ExceptionTestResultItemProvider.java
new file mode 100644
index 0000000..25849e8
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/src/test/provider/ExceptionTestResultItemProvider.java
@@ -0,0 +1,172 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import test.ExceptionTestResult;
+import test.TestPackage;
+
+/**
+ * This is the item provider adapter for a {@link test.ExceptionTestResult} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ExceptionTestResultItemProvider
+ extends TestResultItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ExceptionTestResultItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addExceptionClassPropertyDescriptor(object);
+ addExceptionMessagePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Exception Class feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addExceptionClassPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ExceptionTestResult_exceptionClass_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ExceptionTestResult_exceptionClass_feature", "_UI_ExceptionTestResult_type"),
+ TestPackage.Literals.EXCEPTION_TEST_RESULT__EXCEPTION_CLASS,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Exception Message feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addExceptionMessagePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ExceptionTestResult_exceptionMessage_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ExceptionTestResult_exceptionMessage_feature", "_UI_ExceptionTestResult_type"),
+ TestPackage.Literals.EXCEPTION_TEST_RESULT__EXCEPTION_MESSAGE,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns ExceptionTestResult.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ExceptionTestResult"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ Class labelValue = ((ExceptionTestResult)object).getExceptionClass();
+ String label = labelValue == null ? null : labelValue.toString();
+ return label == null || label.length() == 0 ?
+ getString("_UI_ExceptionTestResult_type") :
+ getString("_UI_ExceptionTestResult_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(ExceptionTestResult.class)) {
+ case TestPackage.EXCEPTION_TEST_RESULT__EXCEPTION_CLASS:
+ case TestPackage.EXCEPTION_TEST_RESULT__EXCEPTION_MESSAGE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/tests/org.eclipse.egf.core.test.model.edit/src/test/provider/FileOutputTestResultItemProvider.java b/tests/org.eclipse.egf.core.test.model.edit/src/test/provider/FileOutputTestResultItemProvider.java
new file mode 100644
index 0000000..2eff405
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/src/test/provider/FileOutputTestResultItemProvider.java
@@ -0,0 +1,150 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import test.FileOutputTestResult;
+import test.TestPackage;
+
+/**
+ * This is the item provider adapter for a {@link test.FileOutputTestResult} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class FileOutputTestResultItemProvider
+ extends OutputTestResultItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FileOutputTestResultItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addIFilePathPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the IFile Path feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addIFilePathPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_FileOutputTestResult_iFilePath_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_FileOutputTestResult_iFilePath_feature", "_UI_FileOutputTestResult_type"),
+ TestPackage.Literals.FILE_OUTPUT_TEST_RESULT__IFILE_PATH,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns FileOutputTestResult.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/FileOutputTestResult"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = crop(((FileOutputTestResult)object).getText());
+ return label == null || label.length() == 0 ?
+ getString("_UI_FileOutputTestResult_type") :
+ getString("_UI_FileOutputTestResult_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(FileOutputTestResult.class)) {
+ case TestPackage.FILE_OUTPUT_TEST_RESULT__IFILE_PATH:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/tests/org.eclipse.egf.core.test.model.edit/src/test/provider/OutputTestResultItemProvider.java b/tests/org.eclipse.egf.core.test.model.edit/src/test/provider/OutputTestResultItemProvider.java
new file mode 100644
index 0000000..4ce4845
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/src/test/provider/OutputTestResultItemProvider.java
@@ -0,0 +1,136 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import test.OutputTestResult;
+import test.TestPackage;
+
+/**
+ * This is the item provider adapter for a {@link test.OutputTestResult} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class OutputTestResultItemProvider
+ extends TestResultItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public OutputTestResultItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addTextPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Text feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addTextPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_OutputTestResult_text_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_OutputTestResult_text_feature", "_UI_OutputTestResult_type"),
+ TestPackage.Literals.OUTPUT_TEST_RESULT__TEXT,
+ true,
+ true,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = crop(((OutputTestResult)object).getText());
+ return label == null || label.length() == 0 ?
+ getString("_UI_OutputTestResult_type") :
+ getString("_UI_OutputTestResult_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(OutputTestResult.class)) {
+ case TestPackage.OUTPUT_TEST_RESULT__TEXT:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/tests/org.eclipse.egf.core.test.model.edit/src/test/provider/TestCaseItemProvider.java b/tests/org.eclipse.egf.core.test.model.edit/src/test/provider/TestCaseItemProvider.java
new file mode 100644
index 0000000..3c4977a
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/src/test/provider/TestCaseItemProvider.java
@@ -0,0 +1,216 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import test.TestCase;
+import test.TestFactory;
+import test.TestPackage;
+
+/**
+ * This is the item provider adapter for a {@link test.TestCase} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TestCaseItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TestCaseItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addNamePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Test_name_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Test_name_feature", "_UI_Test_type"),
+ TestPackage.Literals.TEST__NAME,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(TestPackage.Literals.TEST_CASE__RESULT);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns TestCase.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/TestCase"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((TestCase)object).getName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_TestCase_type") :
+ getString("_UI_TestCase_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(TestCase.class)) {
+ case TestPackage.TEST_CASE__NAME:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case TestPackage.TEST_CASE__RESULT:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (TestPackage.Literals.TEST_CASE__RESULT,
+ TestFactory.eINSTANCE.createExceptionTestResult()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (TestPackage.Literals.TEST_CASE__RESULT,
+ TestFactory.eINSTANCE.createValidationErrorTestResult()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (TestPackage.Literals.TEST_CASE__RESULT,
+ TestFactory.eINSTANCE.createConsoleOutputTestResult()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (TestPackage.Literals.TEST_CASE__RESULT,
+ TestFactory.eINSTANCE.createFileOutputTestResult()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return TestEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/tests/org.eclipse.egf.core.test.model.edit/src/test/provider/TestEditPlugin.java b/tests/org.eclipse.egf.core.test.model.edit/src/test/provider/TestEditPlugin.java
new file mode 100644
index 0000000..90d16b1
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/src/test/provider/TestEditPlugin.java
@@ -0,0 +1,96 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test.provider;
+
+import org.eclipse.egf.model.edit.EGFModelEditPlugin;
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.provider.EcoreEditPlugin;
+
+/**
+ * This is the central singleton for the Test edit plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class TestEditPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final TestEditPlugin INSTANCE = new TestEditPlugin();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TestEditPlugin() {
+ super
+ (new ResourceLocator [] {
+ EcoreEditPlugin.INSTANCE,
+ EGFModelEditPlugin.INSTANCE,
+ });
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends EclipsePlugin {
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.egf.core.test.model.edit/src/test/provider/TestItemProviderAdapterFactory.java b/tests/org.eclipse.egf.core.test.model.edit/src/test/provider/TestItemProviderAdapterFactory.java
new file mode 100644
index 0000000..1d0f5a5
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/src/test/provider/TestItemProviderAdapterFactory.java
@@ -0,0 +1,323 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import test.util.TestAdapterFactory;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TestItemProviderAdapterFactory extends TestAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
+ /**
+ * This keeps track of the root adapter factory that delegates to this adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ComposedAdapterFactory parentAdapterFactory;
+
+ /**
+ * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+ /**
+ * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+ /**
+ * This constructs an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TestItemProviderAdapterFactory() {
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ supportedTypes.add(IItemPropertySource.class);
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link test.TestSuite} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TestSuiteItemProvider testSuiteItemProvider;
+
+ /**
+ * This creates an adapter for a {@link test.TestSuite}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createTestSuiteAdapter() {
+ if (testSuiteItemProvider == null) {
+ testSuiteItemProvider = new TestSuiteItemProvider(this);
+ }
+
+ return testSuiteItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link test.ExceptionTestResult} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ExceptionTestResultItemProvider exceptionTestResultItemProvider;
+
+ /**
+ * This creates an adapter for a {@link test.ExceptionTestResult}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createExceptionTestResultAdapter() {
+ if (exceptionTestResultItemProvider == null) {
+ exceptionTestResultItemProvider = new ExceptionTestResultItemProvider(this);
+ }
+
+ return exceptionTestResultItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link test.ValidationErrorTestResult} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ValidationErrorTestResultItemProvider validationErrorTestResultItemProvider;
+
+ /**
+ * This creates an adapter for a {@link test.ValidationErrorTestResult}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createValidationErrorTestResultAdapter() {
+ if (validationErrorTestResultItemProvider == null) {
+ validationErrorTestResultItemProvider = new ValidationErrorTestResultItemProvider(this);
+ }
+
+ return validationErrorTestResultItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link test.ConsoleOutputTestResult} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ConsoleOutputTestResultItemProvider consoleOutputTestResultItemProvider;
+
+ /**
+ * This creates an adapter for a {@link test.ConsoleOutputTestResult}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createConsoleOutputTestResultAdapter() {
+ if (consoleOutputTestResultItemProvider == null) {
+ consoleOutputTestResultItemProvider = new ConsoleOutputTestResultItemProvider(this);
+ }
+
+ return consoleOutputTestResultItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link test.EGFTestCase} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EGFTestCaseItemProvider egfTestCaseItemProvider;
+
+/**
+ * This creates an adapter for a {@link test.EGFTestCase}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createEGFTestCaseAdapter() {
+ if (egfTestCaseItemProvider == null) {
+ egfTestCaseItemProvider = new EGFTestCaseItemProvider(this);
+ }
+
+ return egfTestCaseItemProvider;
+ }
+
+/**
+ * This keeps track of the one adapter used for all {@link test.FileOutputTestResult} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected FileOutputTestResultItemProvider fileOutputTestResultItemProvider;
+
+/**
+ * This creates an adapter for a {@link test.FileOutputTestResult}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createFileOutputTestResultAdapter() {
+ if (fileOutputTestResultItemProvider == null) {
+ fileOutputTestResultItemProvider = new FileOutputTestResultItemProvider(this);
+ }
+
+ return fileOutputTestResultItemProvider;
+ }
+
+/**
+ * This returns the root adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ComposeableAdapterFactory getRootAdapterFactory() {
+ return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+ }
+
+ /**
+ * This sets the composed adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
+ this.parentAdapterFactory = parentAdapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return supportedTypes.contains(type) || super.isFactoryForType(type);
+ }
+
+ /**
+ * This implementation substitutes the factory itself as the key for the adapter.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter adapt(Notifier notifier, Object type) {
+ return super.adapt(notifier, this);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object adapt(Object object, Object type) {
+ if (isFactoryForType(type)) {
+ Object adapter = super.adapt(object, type);
+ if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter))) {
+ return adapter;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * This adds a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void addListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void fireNotifyChanged(Notification notification) {
+ changeNotifier.fireNotifyChanged(notification);
+
+ if (parentAdapterFactory != null) {
+ parentAdapterFactory.fireNotifyChanged(notification);
+ }
+ }
+
+ /**
+ * This disposes all of the item providers created by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void dispose() {
+ if (testSuiteItemProvider != null) testSuiteItemProvider.dispose();
+ if (exceptionTestResultItemProvider != null) exceptionTestResultItemProvider.dispose();
+ if (validationErrorTestResultItemProvider != null) validationErrorTestResultItemProvider.dispose();
+ if (consoleOutputTestResultItemProvider != null) consoleOutputTestResultItemProvider.dispose();
+ if (egfTestCaseItemProvider != null) egfTestCaseItemProvider.dispose();
+ if (fileOutputTestResultItemProvider != null) fileOutputTestResultItemProvider.dispose();
+ }
+
+}
diff --git a/tests/org.eclipse.egf.core.test.model.edit/src/test/provider/TestResultItemProvider.java b/tests/org.eclipse.egf.core.test.model.edit/src/test/provider/TestResultItemProvider.java
new file mode 100644
index 0000000..7f25d07
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/src/test/provider/TestResultItemProvider.java
@@ -0,0 +1,123 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+
+/**
+ * This is the item provider adapter for a {@link test.TestResult} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TestResultItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TestResultItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This returns TestResult.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/TestResult"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_TestResult_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return TestEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/tests/org.eclipse.egf.core.test.model.edit/src/test/provider/TestSuiteItemProvider.java b/tests/org.eclipse.egf.core.test.model.edit/src/test/provider/TestSuiteItemProvider.java
new file mode 100644
index 0000000..1effc44
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/src/test/provider/TestSuiteItemProvider.java
@@ -0,0 +1,207 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import test.TestFactory;
+import test.TestPackage;
+import test.TestSuite;
+
+/**
+ * This is the item provider adapter for a {@link test.TestSuite} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TestSuiteItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TestSuiteItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addNamePropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Test_name_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Test_name_feature", "_UI_Test_type"),
+ TestPackage.Literals.TEST__NAME,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(TestPackage.Literals.TEST_SUITE__TESTS);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns TestSuite.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/TestSuite"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((TestSuite)object).getName();
+ return label == null || label.length() == 0 ?
+ getString("_UI_TestSuite_type") :
+ getString("_UI_TestSuite_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(TestSuite.class)) {
+ case TestPackage.TEST_SUITE__NAME:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case TestPackage.TEST_SUITE__TESTS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (TestPackage.Literals.TEST_SUITE__TESTS,
+ TestFactory.eINSTANCE.createTestSuite()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (TestPackage.Literals.TEST_SUITE__TESTS,
+ TestFactory.eINSTANCE.createEGFTestCase()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return TestEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/tests/org.eclipse.egf.core.test.model.edit/src/test/provider/ValidationErrorTestResultItemProvider.java b/tests/org.eclipse.egf.core.test.model.edit/src/test/provider/ValidationErrorTestResultItemProvider.java
new file mode 100644
index 0000000..1b9ae0c
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.edit/src/test/provider/ValidationErrorTestResultItemProvider.java
@@ -0,0 +1,149 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import test.TestPackage;
+import test.ValidationErrorSeverity;
+import test.ValidationErrorTestResult;
+
+/**
+ * This is the item provider adapter for a {@link test.ValidationErrorTestResult} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ValidationErrorTestResultItemProvider
+ extends TestResultItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ValidationErrorTestResultItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addSeverityPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Severity feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addSeverityPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ValidationErrorTestResult_severity_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ValidationErrorTestResult_severity_feature", "_UI_ValidationErrorTestResult_type"),
+ TestPackage.Literals.VALIDATION_ERROR_TEST_RESULT__SEVERITY,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns ValidationErrorTestResult.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ValidationErrorTestResult"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ ValidationErrorSeverity labelValue = ((ValidationErrorTestResult)object).getSeverity();
+ String label = labelValue == null ? null : labelValue.toString();
+ return label == null || label.length() == 0 ?
+ getString("_UI_ValidationErrorTestResult_type") :
+ getString("_UI_ValidationErrorTestResult_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(ValidationErrorTestResult.class)) {
+ case TestPackage.VALIDATION_ERROR_TEST_RESULT__SEVERITY:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/tests/org.eclipse.egf.core.test.model.editor/.classpath b/tests/org.eclipse.egf.core.test.model.editor/.classpath
new file mode 100644
index 0000000..45f024e
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.editor/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/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/tests/org.eclipse.egf.core.test.model.editor/.project b/tests/org.eclipse.egf.core.test.model.editor/.project
new file mode 100644
index 0000000..2d34a74
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.editor/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.core.test.model.editor</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/org.eclipse.egf.core.test.model.editor/.settings/org.eclipse.core.resources.prefs b/tests/org.eclipse.egf.core.test.model.editor/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..f52602d
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.editor/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Wed Feb 17 16:14:40 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/tests/org.eclipse.egf.core.test.model.editor/META-INF/MANIFEST.MF b/tests/org.eclipse.egf.core.test.model.editor/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..4e28084
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.editor/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.core.test.model.editor;singleton:=true
+Bundle-Version: 0.2.2.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: test.presentation.TestEditorPlugin$Implementation
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: test.presentation
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.core.resources;visibility:=reexport,
+ org.eclipse.egf.core.test.model.edit;visibility:=reexport,
+ org.eclipse.emf.ecore.xmi;visibility:=reexport,
+ org.eclipse.emf.edit.ui;visibility:=reexport,
+ org.eclipse.ui.ide;visibility:=reexport
+Bundle-ActivationPolicy: lazy
diff --git a/tests/org.eclipse.egf.core.test.model.editor/about.html b/tests/org.eclipse.egf.core.test.model.editor/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.editor/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/tests/org.eclipse.egf.core.test.model.editor/build.properties b/tests/org.eclipse.egf.core.test.model.editor/build.properties
new file mode 100644
index 0000000..b3ea932
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.editor/build.properties
@@ -0,0 +1,20 @@
+##
+# 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
+##
+
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ icons/,\
+ .,\
+ plugin.properties,\
+ about.html,\
+ plugin.xml
+src.includes = about.html
diff --git a/tests/org.eclipse.egf.core.test.model.editor/icons/full/obj16/TestModelFile.gif b/tests/org.eclipse.egf.core.test.model.editor/icons/full/obj16/TestModelFile.gif
new file mode 100644
index 0000000..bde5220
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.editor/icons/full/obj16/TestModelFile.gif
Binary files differ
diff --git a/tests/org.eclipse.egf.core.test.model.editor/icons/full/wizban/NewTest.gif b/tests/org.eclipse.egf.core.test.model.editor/icons/full/wizban/NewTest.gif
new file mode 100644
index 0000000..8d32497
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.editor/icons/full/wizban/NewTest.gif
Binary files differ
diff --git a/tests/org.eclipse.egf.core.test.model.editor/plugin.properties b/tests/org.eclipse.egf.core.test.model.editor/plugin.properties
new file mode 100644
index 0000000..e12e637
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.editor/plugin.properties
@@ -0,0 +1,57 @@
+
+# <copyright>
+# </copyright>
+#
+# $Id$
+
+pluginName = Test Editor
+providerName = www.example.org
+
+_UI_TestEditor_menu = &Test Editor
+
+_UI_CreateChild_menu_item = &New Child
+_UI_CreateSibling_menu_item = N&ew Sibling
+
+_UI_ShowPropertiesView_menu_item = Show &Properties View
+_UI_RefreshViewer_menu_item = &Refresh
+
+_UI_SelectionPage_label = Selection
+_UI_ParentPage_label = Parent
+_UI_ListPage_label = List
+_UI_TreePage_label = Tree
+_UI_TablePage_label = Table
+_UI_TreeWithColumnsPage_label = Tree with Columns
+_UI_ObjectColumn_label = Object
+_UI_SelfColumn_label = Self
+
+_UI_NoObjectSelected = Selected Nothing
+_UI_SingleObjectSelected = Selected Object: {0}
+_UI_MultiObjectSelected = Selected {0} Objects
+
+_UI_OpenEditorError_label = Open Editor
+
+_UI_Wizard_category = Example EMF Model Creation Wizards
+
+_UI_CreateModelError_message = Problems encountered in file "{0}"
+
+_UI_TestModelWizard_label = Test Model
+_UI_TestModelWizard_description = Create a new Test model
+
+_UI_TestEditor_label = Test Model Editor
+
+_UI_TestEditorFilenameDefaultBase = My
+_UI_TestEditorFilenameExtensions = test
+
+_UI_Wizard_label = New
+
+_WARN_FilenameExtension = The file name must end in ''.{0}''
+_WARN_FilenameExtensions = The file name must have one of the following extensions: {0}
+
+_UI_ModelObject = &Model Object
+_UI_XMLEncoding = &XML Encoding
+_UI_XMLEncodingChoices = UTF-8 ASCII UTF-16 UTF-16BE UTF-16LE ISO-8859-1
+_UI_Wizard_initial_object_description = Select a model object to create
+
+_UI_FileConflict_label = File Conflict
+_WARN_FileConflict = There are unsaved changes that conflict with changes made outside the editor. Do you wish to discard this editor's changes?
+
diff --git a/tests/org.eclipse.egf.core.test.model.editor/plugin.xml b/tests/org.eclipse.egf.core.test.model.editor/plugin.xml
new file mode 100644
index 0000000..e07cd39
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.editor/plugin.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ <copyright>
+ </copyright>
+
+ $Id$
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.ui.newWizards">
+ <category
+ id="org.eclipse.emf.ecore.Wizard.category.ID"
+ name="%_UI_Wizard_category"/>
+ <wizard
+ id="test.presentation.TestModelWizardID"
+ name="%_UI_TestModelWizard_label"
+ class="test.presentation.TestModelWizard"
+ category="org.eclipse.emf.ecore.Wizard.category.ID"
+ icon="icons/full/obj16/TestModelFile.gif">
+ <description>%_UI_TestModelWizard_description</description>
+ <selection class="org.eclipse.core.resources.IResource"/>
+ </wizard>
+ </extension>
+
+ <extension point="org.eclipse.ui.editors">
+ <editor
+ id="test.presentation.TestEditorID"
+ name="%_UI_TestEditor_label"
+ icon="icons/full/obj16/TestModelFile.gif"
+ extensions="test"
+ class="test.presentation.TestEditor"
+ contributorClass="test.presentation.TestActionBarContributor">
+ </editor>
+ </extension>
+
+</plugin>
diff --git a/tests/org.eclipse.egf.core.test.model.editor/src/test/presentation/TestActionBarContributor.java b/tests/org.eclipse.egf.core.test.model.editor/src/test/presentation/TestActionBarContributor.java
new file mode 100644
index 0000000..8234ab0
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.editor/src/test/presentation/TestActionBarContributor.java
@@ -0,0 +1,427 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test.presentation;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.ui.viewer.IViewerProvider;
+
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
+
+import org.eclipse.emf.edit.ui.action.ControlAction;
+import org.eclipse.emf.edit.ui.action.CreateChildAction;
+import org.eclipse.emf.edit.ui.action.CreateSiblingAction;
+import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
+import org.eclipse.emf.edit.ui.action.LoadResourceAction;
+import org.eclipse.emf.edit.ui.action.ValidateAction;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.ActionContributionItem;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.IContributionManager;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.action.SubContributionItem;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.Viewer;
+
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PartInitException;
+
+/**
+ * This is the action bar contributor for the Test model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TestActionBarContributor
+ extends EditingDomainActionBarContributor
+ implements ISelectionChangedListener {
+ /**
+ * This keeps track of the active editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IEditorPart activeEditorPart;
+
+ /**
+ * This keeps track of the current selection provider.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ISelectionProvider selectionProvider;
+
+ /**
+ * This action opens the Properties view.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IAction showPropertiesViewAction =
+ new Action(TestEditorPlugin.INSTANCE.getString("_UI_ShowPropertiesView_menu_item")) {
+ @Override
+ public void run() {
+ try {
+ getPage().showView("org.eclipse.ui.views.PropertySheet");
+ }
+ catch (PartInitException exception) {
+ TestEditorPlugin.INSTANCE.log(exception);
+ }
+ }
+ };
+
+ /**
+ * This action refreshes the viewer of the current editor if the editor
+ * implements {@link org.eclipse.emf.common.ui.viewer.IViewerProvider}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IAction refreshViewerAction =
+ new Action(TestEditorPlugin.INSTANCE.getString("_UI_RefreshViewer_menu_item")) {
+ @Override
+ public boolean isEnabled() {
+ return activeEditorPart instanceof IViewerProvider;
+ }
+
+ @Override
+ public void run() {
+ if (activeEditorPart instanceof IViewerProvider) {
+ Viewer viewer = ((IViewerProvider)activeEditorPart).getViewer();
+ if (viewer != null) {
+ viewer.refresh();
+ }
+ }
+ }
+ };
+
+ /**
+ * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateChildAction} corresponding to each descriptor
+ * generated for the current selection by the item provider.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<IAction> createChildActions;
+
+ /**
+ * This is the menu manager into which menu contribution items should be added for CreateChild actions.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IMenuManager createChildMenuManager;
+
+ /**
+ * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} corresponding to each descriptor
+ * generated for the current selection by the item provider.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<IAction> createSiblingActions;
+
+ /**
+ * This is the menu manager into which menu contribution items should be added for CreateSibling actions.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IMenuManager createSiblingMenuManager;
+
+ /**
+ * This creates an instance of the contributor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TestActionBarContributor() {
+ super(ADDITIONS_LAST_STYLE);
+ loadResourceAction = new LoadResourceAction();
+ validateAction = new ValidateAction();
+ controlAction = new ControlAction();
+ }
+
+ /**
+ * This adds Separators for editor additions to the tool bar.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void contributeToToolBar(IToolBarManager toolBarManager) {
+ toolBarManager.add(new Separator("test-settings"));
+ toolBarManager.add(new Separator("test-additions"));
+ }
+
+ /**
+ * This adds to the menu bar a menu and some separators for editor additions,
+ * as well as the sub-menus for object creation items.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void contributeToMenu(IMenuManager menuManager) {
+ super.contributeToMenu(menuManager);
+
+ IMenuManager submenuManager = new MenuManager(TestEditorPlugin.INSTANCE.getString("_UI_TestEditor_menu"), "testMenuID");
+ menuManager.insertAfter("additions", submenuManager);
+ submenuManager.add(new Separator("settings"));
+ submenuManager.add(new Separator("actions"));
+ submenuManager.add(new Separator("additions"));
+ submenuManager.add(new Separator("additions-end"));
+
+ // Prepare for CreateChild item addition or removal.
+ //
+ createChildMenuManager = new MenuManager(TestEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item"));
+ submenuManager.insertBefore("additions", createChildMenuManager);
+
+ // Prepare for CreateSibling item addition or removal.
+ //
+ createSiblingMenuManager = new MenuManager(TestEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item"));
+ submenuManager.insertBefore("additions", createSiblingMenuManager);
+
+ // Force an update because Eclipse hides empty menus now.
+ //
+ submenuManager.addMenuListener
+ (new IMenuListener() {
+ public void menuAboutToShow(IMenuManager menuManager) {
+ menuManager.updateAll(true);
+ }
+ });
+
+ addGlobalActions(submenuManager);
+ }
+
+ /**
+ * When the active editor changes, this remembers the change and registers with it as a selection provider.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void setActiveEditor(IEditorPart part) {
+ super.setActiveEditor(part);
+ activeEditorPart = part;
+
+ // Switch to the new selection provider.
+ //
+ if (selectionProvider != null) {
+ selectionProvider.removeSelectionChangedListener(this);
+ }
+ if (part == null) {
+ selectionProvider = null;
+ }
+ else {
+ selectionProvider = part.getSite().getSelectionProvider();
+ selectionProvider.addSelectionChangedListener(this);
+
+ // Fake a selection changed event to update the menus.
+ //
+ if (selectionProvider.getSelection() != null) {
+ selectionChanged(new SelectionChangedEvent(selectionProvider, selectionProvider.getSelection()));
+ }
+ }
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionChangedListener},
+ * handling {@link org.eclipse.jface.viewers.SelectionChangedEvent}s by querying for the children and siblings
+ * that can be added to the selected object and updating the menus accordingly.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void selectionChanged(SelectionChangedEvent event) {
+ // Remove any menu items for old selection.
+ //
+ if (createChildMenuManager != null) {
+ depopulateManager(createChildMenuManager, createChildActions);
+ }
+ if (createSiblingMenuManager != null) {
+ depopulateManager(createSiblingMenuManager, createSiblingActions);
+ }
+
+ // Query the new selection for appropriate new child/sibling descriptors
+ //
+ Collection<?> newChildDescriptors = null;
+ Collection<?> newSiblingDescriptors = null;
+
+ ISelection selection = event.getSelection();
+ if (selection instanceof IStructuredSelection && ((IStructuredSelection)selection).size() == 1) {
+ Object object = ((IStructuredSelection)selection).getFirstElement();
+
+ EditingDomain domain = ((IEditingDomainProvider)activeEditorPart).getEditingDomain();
+
+ newChildDescriptors = domain.getNewChildDescriptors(object, null);
+ newSiblingDescriptors = domain.getNewChildDescriptors(null, object);
+ }
+
+ // Generate actions for selection; populate and redraw the menus.
+ //
+ createChildActions = generateCreateChildActions(newChildDescriptors, selection);
+ createSiblingActions = generateCreateSiblingActions(newSiblingDescriptors, selection);
+
+ if (createChildMenuManager != null) {
+ populateManager(createChildMenuManager, createChildActions, null);
+ createChildMenuManager.update(true);
+ }
+ if (createSiblingMenuManager != null) {
+ populateManager(createSiblingMenuManager, createSiblingActions, null);
+ createSiblingMenuManager.update(true);
+ }
+ }
+
+ /**
+ * This generates a {@link org.eclipse.emf.edit.ui.action.CreateChildAction} for each object in <code>descriptors</code>,
+ * and returns the collection of these actions.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<IAction> generateCreateChildActions(Collection<?> descriptors, ISelection selection) {
+ Collection<IAction> actions = new ArrayList<IAction>();
+ if (descriptors != null) {
+ for (Object descriptor : descriptors) {
+ actions.add(new CreateChildAction(activeEditorPart, selection, descriptor));
+ }
+ }
+ return actions;
+ }
+
+ /**
+ * This generates a {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} for each object in <code>descriptors</code>,
+ * and returns the collection of these actions.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<IAction> generateCreateSiblingActions(Collection<?> descriptors, ISelection selection) {
+ Collection<IAction> actions = new ArrayList<IAction>();
+ if (descriptors != null) {
+ for (Object descriptor : descriptors) {
+ actions.add(new CreateSiblingAction(activeEditorPart, selection, descriptor));
+ }
+ }
+ return actions;
+ }
+
+ /**
+ * This populates the specified <code>manager</code> with {@link org.eclipse.jface.action.ActionContributionItem}s
+ * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection,
+ * by inserting them before the specified contribution item <code>contributionID</code>.
+ * If <code>contributionID</code> is <code>null</code>, they are simply added.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void populateManager(IContributionManager manager, Collection<? extends IAction> actions, String contributionID) {
+ if (actions != null) {
+ for (IAction action : actions) {
+ if (contributionID != null) {
+ manager.insertBefore(contributionID, action);
+ }
+ else {
+ manager.add(action);
+ }
+ }
+ }
+ }
+
+ /**
+ * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s
+ * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void depopulateManager(IContributionManager manager, Collection<? extends IAction> actions) {
+ if (actions != null) {
+ IContributionItem[] items = manager.getItems();
+ for (int i = 0; i < items.length; i++) {
+ // Look into SubContributionItems
+ //
+ IContributionItem contributionItem = items[i];
+ while (contributionItem instanceof SubContributionItem) {
+ contributionItem = ((SubContributionItem)contributionItem).getInnerItem();
+ }
+
+ // Delete the ActionContributionItems with matching action.
+ //
+ if (contributionItem instanceof ActionContributionItem) {
+ IAction action = ((ActionContributionItem)contributionItem).getAction();
+ if (actions.contains(action)) {
+ manager.remove(contributionItem);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * This populates the pop-up menu before it appears.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void menuAboutToShow(IMenuManager menuManager) {
+ super.menuAboutToShow(menuManager);
+ MenuManager submenuManager = null;
+
+ submenuManager = new MenuManager(TestEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item"));
+ populateManager(submenuManager, createChildActions, null);
+ menuManager.insertBefore("edit", submenuManager);
+
+ submenuManager = new MenuManager(TestEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item"));
+ populateManager(submenuManager, createSiblingActions, null);
+ menuManager.insertBefore("edit", submenuManager);
+ }
+
+ /**
+ * This inserts global actions before the "additions-end" separator.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void addGlobalActions(IMenuManager menuManager) {
+ menuManager.insertAfter("additions-end", new Separator("ui-actions"));
+ menuManager.insertAfter("ui-actions", showPropertiesViewAction);
+
+ refreshViewerAction.setEnabled(refreshViewerAction.isEnabled());
+ menuManager.insertAfter("ui-actions", refreshViewerAction);
+
+ super.addGlobalActions(menuManager);
+ }
+
+ /**
+ * This ensures that a delete action will clean up all references to deleted objects.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected boolean removeAllReferencesOnDelete() {
+ return true;
+ }
+
+}
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.model.editor/src/test/presentation/TestEditor.java b/tests/org.eclipse.egf.core.test.model.editor/src/test/presentation/TestEditor.java
new file mode 100644
index 0000000..aabbdec
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.editor/src/test/presentation/TestEditor.java
@@ -0,0 +1,1822 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test.presentation;
+
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.EventObject;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceDeltaVisitor;
+import org.eclipse.core.resources.ResourcesPlugin;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IStatusLineManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ListViewer;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.viewers.TableLayout;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+
+import org.eclipse.swt.SWT;
+
+import org.eclipse.swt.custom.CTabFolder;
+
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.Transfer;
+
+import org.eclipse.swt.events.ControlAdapter;
+import org.eclipse.swt.events.ControlEvent;
+
+import org.eclipse.swt.graphics.Point;
+
+import org.eclipse.swt.layout.FillLayout;
+
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeColumn;
+
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IPartListener;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PartInitException;
+
+import org.eclipse.ui.dialogs.SaveAsDialog;
+
+import org.eclipse.ui.ide.IGotoMarker;
+
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.part.MultiPageEditorPart;
+
+import org.eclipse.ui.views.contentoutline.ContentOutline;
+import org.eclipse.ui.views.contentoutline.ContentOutlinePage;
+import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
+
+import org.eclipse.ui.views.properties.IPropertySheetPage;
+import org.eclipse.ui.views.properties.PropertySheet;
+import org.eclipse.ui.views.properties.PropertySheetPage;
+
+import org.eclipse.emf.common.command.BasicCommandStack;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.common.command.CommandStackListener;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.ui.MarkerHelper;
+import org.eclipse.emf.common.ui.ViewerPane;
+
+import org.eclipse.emf.common.ui.editor.ProblemEditorPart;
+
+import org.eclipse.emf.common.ui.viewer.IViewerProvider;
+
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.URI;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EValidator;
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+
+import org.eclipse.emf.ecore.util.EContentAdapter;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
+
+import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
+
+import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
+
+import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
+
+import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor;
+
+import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter;
+import org.eclipse.emf.edit.ui.dnd.LocalTransfer;
+import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter;
+
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
+import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider;
+
+import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper;
+import org.eclipse.emf.edit.ui.util.EditUIUtil;
+
+import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage;
+
+import test.provider.TestItemProviderAdapterFactory;
+
+import org.eclipse.egf.model.fcore.provider.FcoreItemProviderAdapterFactory;
+import org.eclipse.egf.model.types.provider.TypesItemProviderAdapterFactory;
+import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory;
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
+
+
+/**
+ * This is an example of a Test model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TestEditor
+ extends MultiPageEditorPart
+ implements IEditingDomainProvider, ISelectionProvider, IMenuListener, IViewerProvider, IGotoMarker {
+ /**
+ * This keeps track of the editing domain that is used to track all changes to the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected AdapterFactoryEditingDomain editingDomain;
+
+ /**
+ * This is the one adapter factory used for providing views of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ComposedAdapterFactory adapterFactory;
+
+ /**
+ * This is the content outline page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IContentOutlinePage contentOutlinePage;
+
+ /**
+ * This is a kludge...
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IStatusLineManager contentOutlineStatusLineManager;
+
+ /**
+ * This is the content outline page's viewer.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer contentOutlineViewer;
+
+ /**
+ * This is the property sheet page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PropertySheetPage propertySheetPage;
+
+ /**
+ * This is the viewer that shadows the selection in the content outline.
+ * The parent relation must be correctly defined for this to work.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer selectionViewer;
+
+ /**
+ * This inverts the roll of parent and child in the content provider and show parents as a tree.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer parentViewer;
+
+ /**
+ * This shows how a tree view works.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer treeViewer;
+
+ /**
+ * This shows how a list view works.
+ * A list viewer doesn't support icons.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ListViewer listViewer;
+
+ /**
+ * This shows how a table view works.
+ * A table can be used as a list with icons.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TableViewer tableViewer;
+
+ /**
+ * This shows how a tree view with columns works.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer treeViewerWithColumns;
+
+ /**
+ * This keeps track of the active viewer pane, in the book.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ViewerPane currentViewerPane;
+
+ /**
+ * This keeps track of the active content viewer, which may be either one of the viewers in the pages or the content outline viewer.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Viewer currentViewer;
+
+ /**
+ * This listens to which ever viewer is active.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ISelectionChangedListener selectionChangedListener;
+
+ /**
+ * This keeps track of all the {@link org.eclipse.jface.viewers.ISelectionChangedListener}s that are listening to this editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<ISelectionChangedListener> selectionChangedListeners = new ArrayList<ISelectionChangedListener>();
+
+ /**
+ * This keeps track of the selection of the editor as a whole.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ISelection editorSelection = StructuredSelection.EMPTY;
+
+ /**
+ * The MarkerHelper is responsible for creating workspace resource markers presented
+ * in Eclipse's Problems View.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected MarkerHelper markerHelper = new EditUIMarkerHelper();
+
+ /**
+ * This listens for when the outline becomes active
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IPartListener partListener =
+ new IPartListener() {
+ public void partActivated(IWorkbenchPart p) {
+ if (p instanceof ContentOutline) {
+ if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) {
+ getActionBarContributor().setActiveEditor(TestEditor.this);
+
+ setCurrentViewer(contentOutlineViewer);
+ }
+ }
+ else if (p instanceof PropertySheet) {
+ if (((PropertySheet)p).getCurrentPage() == propertySheetPage) {
+ getActionBarContributor().setActiveEditor(TestEditor.this);
+ handleActivate();
+ }
+ }
+ else if (p == TestEditor.this) {
+ handleActivate();
+ }
+ }
+ public void partBroughtToTop(IWorkbenchPart p) {
+ // Ignore.
+ }
+ public void partClosed(IWorkbenchPart p) {
+ // Ignore.
+ }
+ public void partDeactivated(IWorkbenchPart p) {
+ // Ignore.
+ }
+ public void partOpened(IWorkbenchPart p) {
+ // Ignore.
+ }
+ };
+
+ /**
+ * Resources that have been removed since last activation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Resource> removedResources = new ArrayList<Resource>();
+
+ /**
+ * Resources that have been changed since last activation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Resource> changedResources = new ArrayList<Resource>();
+
+ /**
+ * Resources that have been saved.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Resource> savedResources = new ArrayList<Resource>();
+
+ /**
+ * Map to store the diagnostic associated with a resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Map<Resource, Diagnostic> resourceToDiagnosticMap = new LinkedHashMap<Resource, Diagnostic>();
+
+ /**
+ * Controls whether the problem indication should be updated.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected boolean updateProblemIndication = true;
+
+ /**
+ * Adapter used to update the problem indication when resources are demanded loaded.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EContentAdapter problemIndicationAdapter =
+ new EContentAdapter() {
+ @Override
+ public void notifyChanged(Notification notification) {
+ if (notification.getNotifier() instanceof Resource) {
+ switch (notification.getFeatureID(Resource.class)) {
+ case Resource.RESOURCE__IS_LOADED:
+ case Resource.RESOURCE__ERRORS:
+ case Resource.RESOURCE__WARNINGS: {
+ Resource resource = (Resource)notification.getNotifier();
+ Diagnostic diagnostic = analyzeResourceProblems(resource, null);
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ resourceToDiagnosticMap.put(resource, diagnostic);
+ }
+ else {
+ resourceToDiagnosticMap.remove(resource);
+ }
+
+ if (updateProblemIndication) {
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ updateProblemIndication();
+ }
+ });
+ }
+ break;
+ }
+ }
+ }
+ else {
+ super.notifyChanged(notification);
+ }
+ }
+
+ @Override
+ protected void setTarget(Resource target) {
+ basicSetTarget(target);
+ }
+
+ @Override
+ protected void unsetTarget(Resource target) {
+ basicUnsetTarget(target);
+ }
+ };
+
+ /**
+ * This listens for workspace changes.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IResourceChangeListener resourceChangeListener =
+ new IResourceChangeListener() {
+ public void resourceChanged(IResourceChangeEvent event) {
+ IResourceDelta delta = event.getDelta();
+ try {
+ class ResourceDeltaVisitor implements IResourceDeltaVisitor {
+ protected ResourceSet resourceSet = editingDomain.getResourceSet();
+ protected Collection<Resource> changedResources = new ArrayList<Resource>();
+ protected Collection<Resource> removedResources = new ArrayList<Resource>();
+
+ public boolean visit(IResourceDelta delta) {
+ if (delta.getResource().getType() == IResource.FILE) {
+ if (delta.getKind() == IResourceDelta.REMOVED ||
+ delta.getKind() == IResourceDelta.CHANGED && delta.getFlags() != IResourceDelta.MARKERS) {
+ Resource resource = resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false);
+ if (resource != null) {
+ if (delta.getKind() == IResourceDelta.REMOVED) {
+ removedResources.add(resource);
+ }
+ else if (!savedResources.remove(resource)) {
+ changedResources.add(resource);
+ }
+ }
+ }
+ }
+
+ return true;
+ }
+
+ public Collection<Resource> getChangedResources() {
+ return changedResources;
+ }
+
+ public Collection<Resource> getRemovedResources() {
+ return removedResources;
+ }
+ }
+
+ final ResourceDeltaVisitor visitor = new ResourceDeltaVisitor();
+ delta.accept(visitor);
+
+ if (!visitor.getRemovedResources().isEmpty()) {
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ removedResources.addAll(visitor.getRemovedResources());
+ if (!isDirty()) {
+ getSite().getPage().closeEditor(TestEditor.this, false);
+ }
+ }
+ });
+ }
+
+ if (!visitor.getChangedResources().isEmpty()) {
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ changedResources.addAll(visitor.getChangedResources());
+ if (getSite().getPage().getActiveEditor() == TestEditor.this) {
+ handleActivate();
+ }
+ }
+ });
+ }
+ }
+ catch (CoreException exception) {
+ TestEditorPlugin.INSTANCE.log(exception);
+ }
+ }
+ };
+
+ /**
+ * Handles activation of the editor or it's associated views.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void handleActivate() {
+ // Recompute the read only state.
+ //
+ if (editingDomain.getResourceToReadOnlyMap() != null) {
+ editingDomain.getResourceToReadOnlyMap().clear();
+
+ // Refresh any actions that may become enabled or disabled.
+ //
+ setSelection(getSelection());
+ }
+
+ if (!removedResources.isEmpty()) {
+ if (handleDirtyConflict()) {
+ getSite().getPage().closeEditor(TestEditor.this, false);
+ }
+ else {
+ removedResources.clear();
+ changedResources.clear();
+ savedResources.clear();
+ }
+ }
+ else if (!changedResources.isEmpty()) {
+ changedResources.removeAll(savedResources);
+ handleChangedResources();
+ changedResources.clear();
+ savedResources.clear();
+ }
+ }
+
+ /**
+ * Handles what to do with changed resources on activation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void handleChangedResources() {
+ if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) {
+ if (isDirty()) {
+ changedResources.addAll(editingDomain.getResourceSet().getResources());
+ }
+ editingDomain.getCommandStack().flush();
+
+ updateProblemIndication = false;
+ for (Resource resource : changedResources) {
+ if (resource.isLoaded()) {
+ resource.unload();
+ try {
+ resource.load(Collections.EMPTY_MAP);
+ }
+ catch (IOException exception) {
+ if (!resourceToDiagnosticMap.containsKey(resource)) {
+ resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ }
+ }
+ }
+ }
+
+ if (AdapterFactoryEditingDomain.isStale(editorSelection)) {
+ setSelection(StructuredSelection.EMPTY);
+ }
+
+ updateProblemIndication = true;
+ updateProblemIndication();
+ }
+ }
+
+ /**
+ * Updates the problems indication with the information described in the specified diagnostic.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void updateProblemIndication() {
+ if (updateProblemIndication) {
+ BasicDiagnostic diagnostic =
+ new BasicDiagnostic
+ (Diagnostic.OK,
+ "org.eclipse.egf.core.test.model.editor",
+ 0,
+ null,
+ new Object [] { editingDomain.getResourceSet() });
+ for (Diagnostic childDiagnostic : resourceToDiagnosticMap.values()) {
+ if (childDiagnostic.getSeverity() != Diagnostic.OK) {
+ diagnostic.add(childDiagnostic);
+ }
+ }
+
+ int lastEditorPage = getPageCount() - 1;
+ if (lastEditorPage >= 0 && getEditor(lastEditorPage) instanceof ProblemEditorPart) {
+ ((ProblemEditorPart)getEditor(lastEditorPage)).setDiagnostic(diagnostic);
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ setActivePage(lastEditorPage);
+ }
+ }
+ else if (diagnostic.getSeverity() != Diagnostic.OK) {
+ ProblemEditorPart problemEditorPart = new ProblemEditorPart();
+ problemEditorPart.setDiagnostic(diagnostic);
+ problemEditorPart.setMarkerHelper(markerHelper);
+ try {
+ addPage(++lastEditorPage, problemEditorPart, getEditorInput());
+ setPageText(lastEditorPage, problemEditorPart.getPartName());
+ setActivePage(lastEditorPage);
+ showTabs();
+ }
+ catch (PartInitException exception) {
+ TestEditorPlugin.INSTANCE.log(exception);
+ }
+ }
+
+ if (markerHelper.hasMarkers(editingDomain.getResourceSet())) {
+ markerHelper.deleteMarkers(editingDomain.getResourceSet());
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ try {
+ markerHelper.createMarkers(diagnostic);
+ }
+ catch (CoreException exception) {
+ TestEditorPlugin.INSTANCE.log(exception);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Shows a dialog that asks if conflicting changes should be discarded.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected boolean handleDirtyConflict() {
+ return
+ MessageDialog.openQuestion
+ (getSite().getShell(),
+ getString("_UI_FileConflict_label"),
+ getString("_WARN_FileConflict"));
+ }
+
+ /**
+ * This creates a model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TestEditor() {
+ super();
+ initializeEditingDomain();
+ }
+
+ /**
+ * This sets up the editing domain for the model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void initializeEditingDomain() {
+ // Create an adapter factory that yields item providers.
+ //
+ adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
+
+ adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new TestItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new FcoreItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new TypesItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
+
+ // Create the command stack that will notify this editor as commands are executed.
+ //
+ BasicCommandStack commandStack = new BasicCommandStack();
+
+ // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus.
+ //
+ commandStack.addCommandStackListener
+ (new CommandStackListener() {
+ public void commandStackChanged(final EventObject event) {
+ getContainer().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+
+ // Try to select the affected objects.
+ //
+ Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand();
+ if (mostRecentCommand != null) {
+ setSelectionToViewer(mostRecentCommand.getAffectedObjects());
+ }
+ if (propertySheetPage != null && !propertySheetPage.getControl().isDisposed()) {
+ propertySheetPage.refresh();
+ }
+ }
+ });
+ }
+ });
+
+ // Create the editing domain with a special command stack.
+ //
+ editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap<Resource, Boolean>());
+ }
+
+ /**
+ * This is here for the listener to be able to call it.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void firePropertyChange(int action) {
+ super.firePropertyChange(action);
+ }
+
+ /**
+ * This sets the selection into whichever viewer is active.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSelectionToViewer(Collection<?> collection) {
+ final Collection<?> theSelection = collection;
+ // Make sure it's okay.
+ //
+ if (theSelection != null && !theSelection.isEmpty()) {
+ Runnable runnable =
+ new Runnable() {
+ public void run() {
+ // Try to select the items in the current content viewer of the editor.
+ //
+ if (currentViewer != null) {
+ currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true);
+ }
+ }
+ };
+ getSite().getShell().getDisplay().asyncExec(runnable);
+ }
+ }
+
+ /**
+ * This returns the editing domain as required by the {@link IEditingDomainProvider} interface.
+ * This is important for implementing the static methods of {@link AdapterFactoryEditingDomain}
+ * and for supporting {@link org.eclipse.emf.edit.ui.action.CommandAction}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EditingDomain getEditingDomain() {
+ return editingDomain;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public class ReverseAdapterFactoryContentProvider extends AdapterFactoryContentProvider {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ReverseAdapterFactoryContentProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object [] getElements(Object object) {
+ Object parent = super.getParent(object);
+ return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object [] getChildren(Object object) {
+ Object parent = super.getParent(object);
+ return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean hasChildren(Object object) {
+ Object parent = super.getParent(object);
+ return parent != null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getParent(Object object) {
+ return null;
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCurrentViewerPane(ViewerPane viewerPane) {
+ if (currentViewerPane != viewerPane) {
+ if (currentViewerPane != null) {
+ currentViewerPane.showFocus(false);
+ }
+ currentViewerPane = viewerPane;
+ }
+ setCurrentViewer(currentViewerPane.getViewer());
+ }
+
+ /**
+ * This makes sure that one content viewer, either for the current page or the outline view, if it has focus,
+ * is the current one.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCurrentViewer(Viewer viewer) {
+ // If it is changing...
+ //
+ if (currentViewer != viewer) {
+ if (selectionChangedListener == null) {
+ // Create the listener on demand.
+ //
+ selectionChangedListener =
+ new ISelectionChangedListener() {
+ // This just notifies those things that are affected by the section.
+ //
+ public void selectionChanged(SelectionChangedEvent selectionChangedEvent) {
+ setSelection(selectionChangedEvent.getSelection());
+ }
+ };
+ }
+
+ // Stop listening to the old one.
+ //
+ if (currentViewer != null) {
+ currentViewer.removeSelectionChangedListener(selectionChangedListener);
+ }
+
+ // Start listening to the new one.
+ //
+ if (viewer != null) {
+ viewer.addSelectionChangedListener(selectionChangedListener);
+ }
+
+ // Remember it.
+ //
+ currentViewer = viewer;
+
+ // Set the editors selection based on the current viewer's selection.
+ //
+ setSelection(currentViewer == null ? StructuredSelection.EMPTY : currentViewer.getSelection());
+ }
+ }
+
+ /**
+ * This returns the viewer as required by the {@link IViewerProvider} interface.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Viewer getViewer() {
+ return currentViewer;
+ }
+
+ /**
+ * This creates a context menu for the viewer and adds a listener as well registering the menu for extension.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void createContextMenuFor(StructuredViewer viewer) {
+ MenuManager contextMenu = new MenuManager("#PopUp");
+ contextMenu.add(new Separator("additions"));
+ contextMenu.setRemoveAllWhenShown(true);
+ contextMenu.addMenuListener(this);
+ Menu menu= contextMenu.createContextMenu(viewer.getControl());
+ viewer.getControl().setMenu(menu);
+ getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer));
+
+ int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
+ Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance() };
+ viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer));
+ viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer));
+ }
+
+ /**
+ * This is the method called to load a resource into the editing domain's resource set based on the editor's input.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createModel() {
+ URI resourceURI = EditUIUtil.getURI(getEditorInput());
+ Exception exception = null;
+ Resource resource = null;
+ try {
+ // Load the resource through the editing domain.
+ //
+ resource = editingDomain.getResourceSet().getResource(resourceURI, true);
+ }
+ catch (Exception e) {
+ exception = e;
+ resource = editingDomain.getResourceSet().getResource(resourceURI, false);
+ }
+
+ Diagnostic diagnostic = analyzeResourceProblems(resource, exception);
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ }
+ editingDomain.getResourceSet().eAdapters().add(problemIndicationAdapter);
+ }
+
+ /**
+ * Returns a diagnostic describing the errors and warnings listed in the resource
+ * and the specified exception (if any).
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Diagnostic analyzeResourceProblems(Resource resource, Exception exception) {
+ if (!resource.getErrors().isEmpty() || !resource.getWarnings().isEmpty()) {
+ BasicDiagnostic basicDiagnostic =
+ new BasicDiagnostic
+ (Diagnostic.ERROR,
+ "org.eclipse.egf.core.test.model.editor",
+ 0,
+ getString("_UI_CreateModelError_message", resource.getURI()),
+ new Object [] { exception == null ? (Object)resource : exception });
+ basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true));
+ return basicDiagnostic;
+ }
+ else if (exception != null) {
+ return
+ new BasicDiagnostic
+ (Diagnostic.ERROR,
+ "org.eclipse.egf.core.test.model.editor",
+ 0,
+ getString("_UI_CreateModelError_message", resource.getURI()),
+ new Object[] { exception });
+ }
+ else {
+ return Diagnostic.OK_INSTANCE;
+ }
+ }
+
+ /**
+ * This is the method used by the framework to install your own controls.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void createPages() {
+ // Creates the model from the editor input
+ //
+ createModel();
+
+ // Only creates the other pages if there is something that can be edited
+ //
+ if (!getEditingDomain().getResourceSet().getResources().isEmpty()) {
+ // Create a page for the selection tree view.
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), TestEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ Tree tree = new Tree(composite, SWT.MULTI);
+ TreeViewer newTreeViewer = new TreeViewer(tree);
+ return newTreeViewer;
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+
+ selectionViewer = (TreeViewer)viewerPane.getViewer();
+ selectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+
+ selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ selectionViewer.setInput(editingDomain.getResourceSet());
+ selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
+ viewerPane.setTitle(editingDomain.getResourceSet());
+
+ new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory);
+
+ createContextMenuFor(selectionViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_SelectionPage_label"));
+ }
+
+ // Create a page for the parent tree view.
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), TestEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ Tree tree = new Tree(composite, SWT.MULTI);
+ TreeViewer newTreeViewer = new TreeViewer(tree);
+ return newTreeViewer;
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+
+ parentViewer = (TreeViewer)viewerPane.getViewer();
+ parentViewer.setAutoExpandLevel(30);
+ parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory));
+ parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ createContextMenuFor(parentViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_ParentPage_label"));
+ }
+
+ // This is the page for the list viewer
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), TestEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ return new ListViewer(composite);
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+ listViewer = (ListViewer)viewerPane.getViewer();
+ listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ createContextMenuFor(listViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_ListPage_label"));
+ }
+
+ // This is the page for the tree viewer
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), TestEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ return new TreeViewer(composite);
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+ treeViewer = (TreeViewer)viewerPane.getViewer();
+ treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory);
+
+ createContextMenuFor(treeViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_TreePage_label"));
+ }
+
+ // This is the page for the table viewer.
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), TestEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ return new TableViewer(composite);
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+ tableViewer = (TableViewer)viewerPane.getViewer();
+
+ Table table = tableViewer.getTable();
+ TableLayout layout = new TableLayout();
+ table.setLayout(layout);
+ table.setHeaderVisible(true);
+ table.setLinesVisible(true);
+
+ TableColumn objectColumn = new TableColumn(table, SWT.NONE);
+ layout.addColumnData(new ColumnWeightData(3, 100, true));
+ objectColumn.setText(getString("_UI_ObjectColumn_label"));
+ objectColumn.setResizable(true);
+
+ TableColumn selfColumn = new TableColumn(table, SWT.NONE);
+ layout.addColumnData(new ColumnWeightData(2, 100, true));
+ selfColumn.setText(getString("_UI_SelfColumn_label"));
+ selfColumn.setResizable(true);
+
+ tableViewer.setColumnProperties(new String [] {"a", "b"});
+ tableViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ createContextMenuFor(tableViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_TablePage_label"));
+ }
+
+ // This is the page for the table tree viewer.
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), TestEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ return new TreeViewer(composite);
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+
+ treeViewerWithColumns = (TreeViewer)viewerPane.getViewer();
+
+ Tree tree = treeViewerWithColumns.getTree();
+ tree.setLayoutData(new FillLayout());
+ tree.setHeaderVisible(true);
+ tree.setLinesVisible(true);
+
+ TreeColumn objectColumn = new TreeColumn(tree, SWT.NONE);
+ objectColumn.setText(getString("_UI_ObjectColumn_label"));
+ objectColumn.setResizable(true);
+ objectColumn.setWidth(250);
+
+ TreeColumn selfColumn = new TreeColumn(tree, SWT.NONE);
+ selfColumn.setText(getString("_UI_SelfColumn_label"));
+ selfColumn.setResizable(true);
+ selfColumn.setWidth(200);
+
+ treeViewerWithColumns.setColumnProperties(new String [] {"a", "b"});
+ treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ treeViewerWithColumns.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ createContextMenuFor(treeViewerWithColumns);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_TreeWithColumnsPage_label"));
+ }
+
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ setActivePage(0);
+ }
+ });
+ }
+
+ // Ensures that this editor will only display the page's tab
+ // area if there are more than one page
+ //
+ getContainer().addControlListener
+ (new ControlAdapter() {
+ boolean guard = false;
+ @Override
+ public void controlResized(ControlEvent event) {
+ if (!guard) {
+ guard = true;
+ hideTabs();
+ guard = false;
+ }
+ }
+ });
+
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ updateProblemIndication();
+ }
+ });
+ }
+
+ /**
+ * If there is just one page in the multi-page editor part,
+ * this hides the single tab at the bottom.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void hideTabs() {
+ if (getPageCount() <= 1) {
+ setPageText(0, "");
+ if (getContainer() instanceof CTabFolder) {
+ ((CTabFolder)getContainer()).setTabHeight(1);
+ Point point = getContainer().getSize();
+ getContainer().setSize(point.x, point.y + 6);
+ }
+ }
+ }
+
+ /**
+ * If there is more than one page in the multi-page editor part,
+ * this shows the tabs at the bottom.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void showTabs() {
+ if (getPageCount() > 1) {
+ setPageText(0, getString("_UI_SelectionPage_label"));
+ if (getContainer() instanceof CTabFolder) {
+ ((CTabFolder)getContainer()).setTabHeight(SWT.DEFAULT);
+ Point point = getContainer().getSize();
+ getContainer().setSize(point.x, point.y - 6);
+ }
+ }
+ }
+
+ /**
+ * This is used to track the active viewer.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void pageChange(int pageIndex) {
+ super.pageChange(pageIndex);
+
+ if (contentOutlinePage != null) {
+ handleContentOutlineSelection(contentOutlinePage.getSelection());
+ }
+ }
+
+ /**
+ * This is how the framework determines which interfaces we implement.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public Object getAdapter(Class key) {
+ if (key.equals(IContentOutlinePage.class)) {
+ return showOutlineView() ? getContentOutlinePage() : null;
+ }
+ else if (key.equals(IPropertySheetPage.class)) {
+ return getPropertySheetPage();
+ }
+ else if (key.equals(IGotoMarker.class)) {
+ return this;
+ }
+ else {
+ return super.getAdapter(key);
+ }
+ }
+
+ /**
+ * This accesses a cached version of the content outliner.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IContentOutlinePage getContentOutlinePage() {
+ if (contentOutlinePage == null) {
+ // The content outline is just a tree.
+ //
+ class MyContentOutlinePage extends ContentOutlinePage {
+ @Override
+ public void createControl(Composite parent) {
+ super.createControl(parent);
+ contentOutlineViewer = getTreeViewer();
+ contentOutlineViewer.addSelectionChangedListener(this);
+
+ // Set up the tree viewer.
+ //
+ contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ contentOutlineViewer.setInput(editingDomain.getResourceSet());
+
+ // Make sure our popups work.
+ //
+ createContextMenuFor(contentOutlineViewer);
+
+ if (!editingDomain.getResourceSet().getResources().isEmpty()) {
+ // Select the root object in the view.
+ //
+ contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
+ }
+ }
+
+ @Override
+ public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
+ super.makeContributions(menuManager, toolBarManager, statusLineManager);
+ contentOutlineStatusLineManager = statusLineManager;
+ }
+
+ @Override
+ public void setActionBars(IActionBars actionBars) {
+ super.setActionBars(actionBars);
+ getActionBarContributor().shareGlobalActions(this, actionBars);
+ }
+ }
+
+ contentOutlinePage = new MyContentOutlinePage();
+
+ // Listen to selection so that we can handle it is a special way.
+ //
+ contentOutlinePage.addSelectionChangedListener
+ (new ISelectionChangedListener() {
+ // This ensures that we handle selections correctly.
+ //
+ public void selectionChanged(SelectionChangedEvent event) {
+ handleContentOutlineSelection(event.getSelection());
+ }
+ });
+ }
+
+ return contentOutlinePage;
+ }
+
+ /**
+ * This accesses a cached version of the property sheet.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IPropertySheetPage getPropertySheetPage() {
+ if (propertySheetPage == null) {
+ propertySheetPage =
+ new ExtendedPropertySheetPage(editingDomain) {
+ @Override
+ public void setSelectionToViewer(List<?> selection) {
+ TestEditor.this.setSelectionToViewer(selection);
+ TestEditor.this.setFocus();
+ }
+
+ @Override
+ public void setActionBars(IActionBars actionBars) {
+ super.setActionBars(actionBars);
+ getActionBarContributor().shareGlobalActions(this, actionBars);
+ }
+ };
+ propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
+ }
+
+ return propertySheetPage;
+ }
+
+ /**
+ * This deals with how we want selection in the outliner to affect the other views.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void handleContentOutlineSelection(ISelection selection) {
+ if (currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) {
+ Iterator<?> selectedElements = ((IStructuredSelection)selection).iterator();
+ if (selectedElements.hasNext()) {
+ // Get the first selected element.
+ //
+ Object selectedElement = selectedElements.next();
+
+ // If it's the selection viewer, then we want it to select the same selection as this selection.
+ //
+ if (currentViewerPane.getViewer() == selectionViewer) {
+ ArrayList<Object> selectionList = new ArrayList<Object>();
+ selectionList.add(selectedElement);
+ while (selectedElements.hasNext()) {
+ selectionList.add(selectedElements.next());
+ }
+
+ // Set the selection to the widget.
+ //
+ selectionViewer.setSelection(new StructuredSelection(selectionList));
+ }
+ else {
+ // Set the input to the widget.
+ //
+ if (currentViewerPane.getViewer().getInput() != selectedElement) {
+ currentViewerPane.getViewer().setInput(selectedElement);
+ currentViewerPane.setTitle(selectedElement);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * This is for implementing {@link IEditorPart} and simply tests the command stack.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean isDirty() {
+ return ((BasicCommandStack)editingDomain.getCommandStack()).isSaveNeeded();
+ }
+
+ /**
+ * This is for implementing {@link IEditorPart} and simply saves the model file.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void doSave(IProgressMonitor progressMonitor) {
+ // Save only resources that have actually changed.
+ //
+ final Map<Object, Object> saveOptions = new HashMap<Object, Object>();
+ saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
+
+ // Do the work within an operation because this is a long running activity that modifies the workbench.
+ //
+ WorkspaceModifyOperation operation =
+ new WorkspaceModifyOperation() {
+ // This is the method that gets invoked when the operation runs.
+ //
+ @Override
+ public void execute(IProgressMonitor monitor) {
+ // Save the resources to the file system.
+ //
+ boolean first = true;
+ for (Resource resource : editingDomain.getResourceSet().getResources()) {
+ if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource)) {
+ try {
+ long timeStamp = resource.getTimeStamp();
+ resource.save(saveOptions);
+ if (resource.getTimeStamp() != timeStamp) {
+ savedResources.add(resource);
+ }
+ }
+ catch (Exception exception) {
+ resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ }
+ first = false;
+ }
+ }
+ }
+ };
+
+ updateProblemIndication = false;
+ try {
+ // This runs the options, and shows progress.
+ //
+ new ProgressMonitorDialog(getSite().getShell()).run(true, false, operation);
+
+ // Refresh the necessary state.
+ //
+ ((BasicCommandStack)editingDomain.getCommandStack()).saveIsDone();
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+ }
+ catch (Exception exception) {
+ // Something went wrong that shouldn't.
+ //
+ TestEditorPlugin.INSTANCE.log(exception);
+ }
+ updateProblemIndication = true;
+ updateProblemIndication();
+ }
+
+ /**
+ * This returns whether something has been persisted to the URI of the specified resource.
+ * The implementation uses the URI converter from the editor's resource set to try to open an input stream.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected boolean isPersisted(Resource resource) {
+ boolean result = false;
+ try {
+ InputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI());
+ if (stream != null) {
+ result = true;
+ stream.close();
+ }
+ }
+ catch (IOException e) {
+ // Ignore
+ }
+ return result;
+ }
+
+ /**
+ * This always returns true because it is not currently supported.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean isSaveAsAllowed() {
+ return true;
+ }
+
+ /**
+ * This also changes the editor's input.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void doSaveAs() {
+ SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell());
+ saveAsDialog.open();
+ IPath path = saveAsDialog.getResult();
+ if (path != null) {
+ IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
+ if (file != null) {
+ doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file));
+ }
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void doSaveAs(URI uri, IEditorInput editorInput) {
+ (editingDomain.getResourceSet().getResources().get(0)).setURI(uri);
+ setInputWithNotify(editorInput);
+ setPartName(editorInput.getName());
+ IProgressMonitor progressMonitor =
+ getActionBars().getStatusLineManager() != null ?
+ getActionBars().getStatusLineManager().getProgressMonitor() :
+ new NullProgressMonitor();
+ doSave(progressMonitor);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void gotoMarker(IMarker marker) {
+ try {
+ if (marker.getType().equals(EValidator.MARKER)) {
+ String uriAttribute = marker.getAttribute(EValidator.URI_ATTRIBUTE, null);
+ if (uriAttribute != null) {
+ URI uri = URI.createURI(uriAttribute);
+ EObject eObject = editingDomain.getResourceSet().getEObject(uri, true);
+ if (eObject != null) {
+ setSelectionToViewer(Collections.singleton(editingDomain.getWrapper(eObject)));
+ }
+ }
+ }
+ }
+ catch (CoreException exception) {
+ TestEditorPlugin.INSTANCE.log(exception);
+ }
+ }
+
+ /**
+ * This is called during startup.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void init(IEditorSite site, IEditorInput editorInput) {
+ setSite(site);
+ setInputWithNotify(editorInput);
+ setPartName(editorInput.getName());
+ site.setSelectionProvider(this);
+ site.getPage().addPartListener(partListener);
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void setFocus() {
+ if (currentViewerPane != null) {
+ currentViewerPane.setFocus();
+ }
+ else {
+ getControl(getActivePage()).setFocus();
+ }
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void addSelectionChangedListener(ISelectionChangedListener listener) {
+ selectionChangedListeners.add(listener);
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void removeSelectionChangedListener(ISelectionChangedListener listener) {
+ selectionChangedListeners.remove(listener);
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to return this editor's overall selection.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ISelection getSelection() {
+ return editorSelection;
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to set this editor's overall selection.
+ * Calling this result will notify the listeners.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSelection(ISelection selection) {
+ editorSelection = selection;
+
+ for (ISelectionChangedListener listener : selectionChangedListeners) {
+ listener.selectionChanged(new SelectionChangedEvent(this, selection));
+ }
+ setStatusLineManager(selection);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setStatusLineManager(ISelection selection) {
+ IStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ?
+ contentOutlineStatusLineManager : getActionBars().getStatusLineManager();
+
+ if (statusLineManager != null) {
+ if (selection instanceof IStructuredSelection) {
+ Collection<?> collection = ((IStructuredSelection)selection).toList();
+ switch (collection.size()) {
+ case 0: {
+ statusLineManager.setMessage(getString("_UI_NoObjectSelected"));
+ break;
+ }
+ case 1: {
+ String text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next());
+ statusLineManager.setMessage(getString("_UI_SingleObjectSelected", text));
+ break;
+ }
+ default: {
+ statusLineManager.setMessage(getString("_UI_MultiObjectSelected", Integer.toString(collection.size())));
+ break;
+ }
+ }
+ }
+ else {
+ statusLineManager.setMessage("");
+ }
+ }
+ }
+
+ /**
+ * This looks up a string in the plugin's plugin.properties file.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static String getString(String key) {
+ return TestEditorPlugin.INSTANCE.getString(key);
+ }
+
+ /**
+ * This looks up a string in plugin.properties, making a substitution.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static String getString(String key, Object s1) {
+ return TestEditorPlugin.INSTANCE.getString(key, new Object [] { s1 });
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.action.IMenuListener} to help fill the context menus with contributions from the Edit menu.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void menuAboutToShow(IMenuManager menuManager) {
+ ((IMenuListener)getEditorSite().getActionBarContributor()).menuAboutToShow(menuManager);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EditingDomainActionBarContributor getActionBarContributor() {
+ return (EditingDomainActionBarContributor)getEditorSite().getActionBarContributor();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IActionBars getActionBars() {
+ return getActionBarContributor().getActionBars();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AdapterFactory getAdapterFactory() {
+ return adapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void dispose() {
+ updateProblemIndication = false;
+
+ ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceChangeListener);
+
+ getSite().getPage().removePartListener(partListener);
+
+ adapterFactory.dispose();
+
+ if (getActionBarContributor().getActiveEditor() == this) {
+ getActionBarContributor().setActiveEditor(null);
+ }
+
+ if (propertySheetPage != null) {
+ propertySheetPage.dispose();
+ }
+
+ if (contentOutlinePage != null) {
+ contentOutlinePage.dispose();
+ }
+
+ super.dispose();
+ }
+
+ /**
+ * Returns whether the outline view should be presented to the user.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected boolean showOutlineView() {
+ return true;
+ }
+}
diff --git a/tests/org.eclipse.egf.core.test.model.editor/src/test/presentation/TestEditorPlugin.java b/tests/org.eclipse.egf.core.test.model.editor/src/test/presentation/TestEditorPlugin.java
new file mode 100644
index 0000000..29359cb
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.editor/src/test/presentation/TestEditorPlugin.java
@@ -0,0 +1,97 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test.presentation;
+
+import org.eclipse.egf.model.edit.EGFModelEditPlugin;
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.ui.EclipseUIPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.provider.EcoreEditPlugin;
+
+/**
+ * This is the central singleton for the Test editor plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class TestEditorPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final TestEditorPlugin INSTANCE = new TestEditorPlugin();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TestEditorPlugin() {
+ super
+ (new ResourceLocator [] {
+ EcoreEditPlugin.INSTANCE,
+ EGFModelEditPlugin.INSTANCE,
+ });
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends EclipseUIPlugin {
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.egf.core.test.model.editor/src/test/presentation/TestModelWizard.java b/tests/org.eclipse.egf.core.test.model.editor/src/test/presentation/TestModelWizard.java
new file mode 100644
index 0000000..3998648
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model.editor/src/test/presentation/TestModelWizard.java
@@ -0,0 +1,631 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test.presentation;
+
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.MissingResourceException;
+import java.util.StringTokenizer;
+
+import org.eclipse.emf.common.CommonPlugin;
+
+import org.eclipse.emf.common.util.URI;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.emf.ecore.xmi.XMLResource;
+
+import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+
+import org.eclipse.jface.dialogs.MessageDialog;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.jface.wizard.WizardPage;
+
+import org.eclipse.swt.SWT;
+
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.ModifyEvent;
+
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
+
+import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
+
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.part.ISetSelectionTarget;
+
+import test.TestFactory;
+import test.TestPackage;
+import test.provider.TestEditPlugin;
+
+
+import org.eclipse.core.runtime.Path;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+
+
+/**
+ * This is a simple wizard for creating a new model file.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TestModelWizard extends Wizard implements INewWizard {
+ /**
+ * The supported extensions for created files.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final List<String> FILE_EXTENSIONS =
+ Collections.unmodifiableList(Arrays.asList(TestEditorPlugin.INSTANCE.getString("_UI_TestEditorFilenameExtensions").split("\\s*,\\s*")));
+
+ /**
+ * A formatted list of supported file extensions, suitable for display.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String FORMATTED_FILE_EXTENSIONS =
+ TestEditorPlugin.INSTANCE.getString("_UI_TestEditorFilenameExtensions").replaceAll("\\s*,\\s*", ", ");
+
+ /**
+ * This caches an instance of the model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TestPackage testPackage = TestPackage.eINSTANCE;
+
+ /**
+ * This caches an instance of the model factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TestFactory testFactory = testPackage.getTestFactory();
+
+ /**
+ * This is the file creation page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TestModelWizardNewFileCreationPage newFileCreationPage;
+
+ /**
+ * This is the initial object creation page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TestModelWizardInitialObjectCreationPage initialObjectCreationPage;
+
+ /**
+ * Remember the selection during initialization for populating the default container.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IStructuredSelection selection;
+
+ /**
+ * Remember the workbench during initialization.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IWorkbench workbench;
+
+ /**
+ * Caches the names of the types that can be created as the root object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected List<String> initialObjectNames;
+
+ /**
+ * This just records the information.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ this.workbench = workbench;
+ this.selection = selection;
+ setWindowTitle(TestEditorPlugin.INSTANCE.getString("_UI_Wizard_label"));
+ setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(TestEditorPlugin.INSTANCE.getImage("full/wizban/NewTest")));
+ }
+
+ /**
+ * Returns the names of the types that can be created as the root object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<String> getInitialObjectNames() {
+ if (initialObjectNames == null) {
+ initialObjectNames = new ArrayList<String>();
+ for (EClassifier eClassifier : testPackage.getEClassifiers()) {
+ if (eClassifier instanceof EClass) {
+ EClass eClass = (EClass)eClassifier;
+ if (!eClass.isAbstract()) {
+ initialObjectNames.add(eClass.getName());
+ }
+ }
+ }
+ Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
+ }
+ return initialObjectNames;
+ }
+
+ /**
+ * Create a new model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EObject createInitialModel() {
+ EClass eClass = (EClass)testPackage.getEClassifier(initialObjectCreationPage.getInitialObjectName());
+ EObject rootObject = testFactory.create(eClass);
+ return rootObject;
+ }
+
+ /**
+ * Do the work after everything is specified.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean performFinish() {
+ try {
+ // Remember the file.
+ //
+ final IFile modelFile = getModelFile();
+
+ // Do the work within an operation.
+ //
+ WorkspaceModifyOperation operation =
+ new WorkspaceModifyOperation() {
+ @Override
+ protected void execute(IProgressMonitor progressMonitor) {
+ try {
+ // Create a resource set
+ //
+ ResourceSet resourceSet = new ResourceSetImpl();
+
+ // Get the URI of the model file.
+ //
+ URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true);
+
+ // Create a resource for this file.
+ //
+ Resource resource = resourceSet.createResource(fileURI);
+
+ // Add the initial model object to the contents.
+ //
+ EObject rootObject = createInitialModel();
+ if (rootObject != null) {
+ resource.getContents().add(rootObject);
+ }
+
+ // Save the contents of the resource to the file system.
+ //
+ Map<Object, Object> options = new HashMap<Object, Object>();
+ options.put(XMLResource.OPTION_ENCODING, initialObjectCreationPage.getEncoding());
+ resource.save(options);
+ }
+ catch (Exception exception) {
+ TestEditorPlugin.INSTANCE.log(exception);
+ }
+ finally {
+ progressMonitor.done();
+ }
+ }
+ };
+
+ getContainer().run(false, false, operation);
+
+ // Select the new file resource in the current view.
+ //
+ IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow();
+ IWorkbenchPage page = workbenchWindow.getActivePage();
+ final IWorkbenchPart activePart = page.getActivePart();
+ if (activePart instanceof ISetSelectionTarget) {
+ final ISelection targetSelection = new StructuredSelection(modelFile);
+ getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ ((ISetSelectionTarget)activePart).selectReveal(targetSelection);
+ }
+ });
+ }
+
+ // Open an editor on the new file.
+ //
+ try {
+ page.openEditor
+ (new FileEditorInput(modelFile),
+ workbench.getEditorRegistry().getDefaultEditor(modelFile.getFullPath().toString()).getId());
+ }
+ catch (PartInitException exception) {
+ MessageDialog.openError(workbenchWindow.getShell(), TestEditorPlugin.INSTANCE.getString("_UI_OpenEditorError_label"), exception.getMessage());
+ return false;
+ }
+
+ return true;
+ }
+ catch (Exception exception) {
+ TestEditorPlugin.INSTANCE.log(exception);
+ return false;
+ }
+ }
+
+ /**
+ * This is the one page of the wizard.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public class TestModelWizardNewFileCreationPage extends WizardNewFileCreationPage {
+ /**
+ * Pass in the selection.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TestModelWizardNewFileCreationPage(String pageId, IStructuredSelection selection) {
+ super(pageId, selection);
+ }
+
+ /**
+ * The framework calls this to see if the file is correct.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected boolean validatePage() {
+ if (super.validatePage()) {
+ String extension = new Path(getFileName()).getFileExtension();
+ if (extension == null || !FILE_EXTENSIONS.contains(extension)) {
+ String key = FILE_EXTENSIONS.size() > 1 ? "_WARN_FilenameExtensions" : "_WARN_FilenameExtension";
+ setErrorMessage(TestEditorPlugin.INSTANCE.getString(key, new Object [] { FORMATTED_FILE_EXTENSIONS }));
+ return false;
+ }
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IFile getModelFile() {
+ return ResourcesPlugin.getWorkspace().getRoot().getFile(getContainerFullPath().append(getFileName()));
+ }
+ }
+
+ /**
+ * This is the page where the type of object to create is selected.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public class TestModelWizardInitialObjectCreationPage extends WizardPage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Combo initialObjectField;
+
+ /**
+ * @generated
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ protected List<String> encodings;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Combo encodingField;
+
+ /**
+ * Pass in the selection.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TestModelWizardInitialObjectCreationPage(String pageId) {
+ super(pageId);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createControl(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NONE); {
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 1;
+ layout.verticalSpacing = 12;
+ composite.setLayout(layout);
+
+ GridData data = new GridData();
+ data.verticalAlignment = GridData.FILL;
+ data.grabExcessVerticalSpace = true;
+ data.horizontalAlignment = GridData.FILL;
+ composite.setLayoutData(data);
+ }
+
+ Label containerLabel = new Label(composite, SWT.LEFT);
+ {
+ containerLabel.setText(TestEditorPlugin.INSTANCE.getString("_UI_ModelObject"));
+
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ containerLabel.setLayoutData(data);
+ }
+
+ initialObjectField = new Combo(composite, SWT.BORDER);
+ {
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ data.grabExcessHorizontalSpace = true;
+ initialObjectField.setLayoutData(data);
+ }
+
+ for (String objectName : getInitialObjectNames()) {
+ initialObjectField.add(getLabel(objectName));
+ }
+
+ if (initialObjectField.getItemCount() == 1) {
+ initialObjectField.select(0);
+ }
+ initialObjectField.addModifyListener(validator);
+
+ Label encodingLabel = new Label(composite, SWT.LEFT);
+ {
+ encodingLabel.setText(TestEditorPlugin.INSTANCE.getString("_UI_XMLEncoding"));
+
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ encodingLabel.setLayoutData(data);
+ }
+ encodingField = new Combo(composite, SWT.BORDER);
+ {
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ data.grabExcessHorizontalSpace = true;
+ encodingField.setLayoutData(data);
+ }
+
+ for (String encoding : getEncodings()) {
+ encodingField.add(encoding);
+ }
+
+ encodingField.select(0);
+ encodingField.addModifyListener(validator);
+
+ setPageComplete(validatePage());
+ setControl(composite);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ModifyListener validator =
+ new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ setPageComplete(validatePage());
+ }
+ };
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected boolean validatePage() {
+ return getInitialObjectName() != null && getEncodings().contains(encodingField.getText());
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void setVisible(boolean visible) {
+ super.setVisible(visible);
+ if (visible) {
+ if (initialObjectField.getItemCount() == 1) {
+ initialObjectField.clearSelection();
+ encodingField.setFocus();
+ }
+ else {
+ encodingField.clearSelection();
+ initialObjectField.setFocus();
+ }
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getInitialObjectName() {
+ String label = initialObjectField.getText();
+
+ for (String name : getInitialObjectNames()) {
+ if (getLabel(name).equals(label)) {
+ return name;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getEncoding() {
+ return encodingField.getText();
+ }
+
+ /**
+ * Returns the label for the specified type name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected String getLabel(String typeName) {
+ try {
+ return TestEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type");
+ }
+ catch(MissingResourceException mre) {
+ TestEditorPlugin.INSTANCE.log(mre);
+ }
+ return typeName;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<String> getEncodings() {
+ if (encodings == null) {
+ encodings = new ArrayList<String>();
+ for (StringTokenizer stringTokenizer = new StringTokenizer(TestEditorPlugin.INSTANCE.getString("_UI_XMLEncodingChoices")); stringTokenizer.hasMoreTokens(); ) {
+ encodings.add(stringTokenizer.nextToken());
+ }
+ }
+ return encodings;
+ }
+ }
+
+ /**
+ * The framework calls this to create the contents of the wizard.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void addPages() {
+ // Create a page, set the title, and the initial model file name.
+ //
+ newFileCreationPage = new TestModelWizardNewFileCreationPage("Whatever", selection);
+ newFileCreationPage.setTitle(TestEditorPlugin.INSTANCE.getString("_UI_TestModelWizard_label"));
+ newFileCreationPage.setDescription(TestEditorPlugin.INSTANCE.getString("_UI_TestModelWizard_description"));
+ newFileCreationPage.setFileName(TestEditorPlugin.INSTANCE.getString("_UI_TestEditorFilenameDefaultBase") + "." + FILE_EXTENSIONS.get(0));
+ addPage(newFileCreationPage);
+
+ // Try and get the resource selection to determine a current directory for the file dialog.
+ //
+ if (selection != null && !selection.isEmpty()) {
+ // Get the resource...
+ //
+ Object selectedElement = selection.iterator().next();
+ if (selectedElement instanceof IResource) {
+ // Get the resource parent, if its a file.
+ //
+ IResource selectedResource = (IResource)selectedElement;
+ if (selectedResource.getType() == IResource.FILE) {
+ selectedResource = selectedResource.getParent();
+ }
+
+ // This gives us a directory...
+ //
+ if (selectedResource instanceof IFolder || selectedResource instanceof IProject) {
+ // Set this for the container.
+ //
+ newFileCreationPage.setContainerFullPath(selectedResource.getFullPath());
+
+ // Make up a unique new name here.
+ //
+ String defaultModelBaseFilename = TestEditorPlugin.INSTANCE.getString("_UI_TestEditorFilenameDefaultBase");
+ String defaultModelFilenameExtension = FILE_EXTENSIONS.get(0);
+ String modelFilename = defaultModelBaseFilename + "." + defaultModelFilenameExtension;
+ for (int i = 1; ((IContainer)selectedResource).findMember(modelFilename) != null; ++i) {
+ modelFilename = defaultModelBaseFilename + i + "." + defaultModelFilenameExtension;
+ }
+ newFileCreationPage.setFileName(modelFilename);
+ }
+ }
+ }
+ initialObjectCreationPage = new TestModelWizardInitialObjectCreationPage("Whatever2");
+ initialObjectCreationPage.setTitle(TestEditorPlugin.INSTANCE.getString("_UI_TestModelWizard_label"));
+ initialObjectCreationPage.setDescription(TestEditorPlugin.INSTANCE.getString("_UI_Wizard_initial_object_description"));
+ addPage(initialObjectCreationPage);
+ }
+
+ /**
+ * Get the file from the page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IFile getModelFile() {
+ return newFileCreationPage.getModelFile();
+ }
+
+}
diff --git a/tests/org.eclipse.egf.core.test.model/.classpath b/tests/org.eclipse.egf.core.test.model/.classpath
new file mode 100644
index 0000000..45f024e
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/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/tests/org.eclipse.egf.core.test.model/.project b/tests/org.eclipse.egf.core.test.model/.project
new file mode 100644
index 0000000..81cc817
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.core.test.model</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/org.eclipse.egf.core.test.model/.settings/org.eclipse.core.resources.prefs b/tests/org.eclipse.egf.core.test.model/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..201ff1c
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,4 @@
+#Wed Feb 17 16:14:25 CET 2010
+eclipse.preferences.version=1
+encoding//model/Test.ecorediag=UTF-8
+encoding/about.html=ISO-8859-1
diff --git a/tests/org.eclipse.egf.core.test.model/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.egf.core.test.model/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..07b99ee
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Thu Dec 10 11:30:54 CET 2009
+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/tests/org.eclipse.egf.core.test.model/META-INF/MANIFEST.MF b/tests/org.eclipse.egf.core.test.model/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..da490ae
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.core.test.model;singleton:=true
+Bundle-Version: 0.2.2.qualifier
+Bundle-ClassPath: .
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package:
+ test,
+ test.impl,
+ test.util
+Require-Bundle:
+ org.eclipse.core.runtime,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.egf.model;bundle-version="0.2.0";visibility:=reexport
+Bundle-ActivationPolicy: lazy
diff --git a/tests/org.eclipse.egf.core.test.model/about.html b/tests/org.eclipse.egf.core.test.model/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/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/tests/org.eclipse.egf.core.test.model/build.properties b/tests/org.eclipse.egf.core.test.model/build.properties
new file mode 100644
index 0000000..659b827
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/build.properties
@@ -0,0 +1,20 @@
+##
+# 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
+##
+
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ model/,\
+ .,\
+ plugin.properties,\
+ about.html,\
+ plugin.xml
+src.includes = about.html
diff --git a/tests/org.eclipse.egf.core.test.model/model/Test.ecore b/tests/org.eclipse.egf.core.test.model/model/Test.ecore
new file mode 100644
index 0000000..2e21eaf
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/model/Test.ecore
@@ -0,0 +1,47 @@
+<?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="test"
+ nsURI="http://www.eclipse.org/egf/1.0.0/test" nsPrefix="test">
+ <eClassifiers xsi:type="ecore:EClass" name="Test" abstract="true" interface="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="TestSuite" eSuperTypes="#//Test">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="tests" upperBound="-1"
+ eType="#//Test" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="TestCase" abstract="true" eSuperTypes="#//Test">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="result" eType="#//TestResult"
+ containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="TestResult" abstract="true"/>
+ <eClassifiers xsi:type="ecore:EClass" name="ExceptionTestResult" eSuperTypes="#//TestResult">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="exceptionClass" lowerBound="1">
+ <eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaClass">
+ <eTypeArguments/>
+ </eGenericType>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="exceptionMessage" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ValidationErrorTestResult" eSuperTypes="#//TestResult">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="severity" lowerBound="1"
+ eType="#//ValidationErrorSeverity"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EEnum" name="ValidationErrorSeverity">
+ <eLiterals name="INFO" value="1" literal="INFO"/>
+ <eLiterals name="WARNING" value="2" literal="WARNING"/>
+ <eLiterals name="ERROR" value="4"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ConsoleOutputTestResult" eSuperTypes="#//OutputTestResult"/>
+ <eClassifiers xsi:type="ecore:EClass" name="EGFTestCase" eSuperTypes="#//TestCase">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="activity" lowerBound="1"
+ eType="ecore:EClass ../../org.eclipse.egf.model/model/Fcore.ecore#//Activity"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="FileOutputTestResult" eSuperTypes="#//OutputTestResult">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="iFilePath" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="OutputTestResult" abstract="true" eSuperTypes="#//TestResult">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="text" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/tests/org.eclipse.egf.core.test.model/model/Test.ecorediag b/tests/org.eclipse.egf.core.test.model/model/Test.ecorediag
new file mode 100644
index 0000000..c44fdb8
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/model/Test.ecorediag
@@ -0,0 +1,229 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram 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:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmi:id="_ufib4eZVEd6GYLBvN8WM0A" type="EcoreTools" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_ugSCwOZVEd6GYLBvN8WM0A" type="1001">
+ <children xmi:type="notation:Node" xmi:id="_ugSCw-ZVEd6GYLBvN8WM0A" type="4001"/>
+ <children xmi:type="notation:Node" xmi:id="_ugSCxOZVEd6GYLBvN8WM0A" type="5001">
+ <children xmi:type="notation:Node" xmi:id="_ugSCzOZVEd6GYLBvN8WM0A" type="2001">
+ <element xmi:type="ecore:EAttribute" href="Test.ecore#//Test/name"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ugSCzeZVEd6GYLBvN8WM0A"/>
+ </children>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_ugSCxeZVEd6GYLBvN8WM0A"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ugSCxuZVEd6GYLBvN8WM0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ugSCx-ZVEd6GYLBvN8WM0A"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_ugSCyOZVEd6GYLBvN8WM0A" type="5002">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_ugSCyeZVEd6GYLBvN8WM0A"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ugSCyuZVEd6GYLBvN8WM0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ugSCy-ZVEd6GYLBvN8WM0A"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_ugSCweZVEd6GYLBvN8WM0A" fontColor="4210752" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
+ <element xmi:type="ecore:EClass" href="Test.ecore#//Test"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ugSCwuZVEd6GYLBvN8WM0A" x="60"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_ugSCzuZVEd6GYLBvN8WM0A" type="1001">
+ <children xmi:type="notation:Node" xmi:id="_ugSC0eZVEd6GYLBvN8WM0A" type="4001"/>
+ <children xmi:type="notation:Node" xmi:id="_ugSC0uZVEd6GYLBvN8WM0A" type="5001">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_ugSC0-ZVEd6GYLBvN8WM0A"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ugSC1OZVEd6GYLBvN8WM0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ugSC1eZVEd6GYLBvN8WM0A"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_ugSC1uZVEd6GYLBvN8WM0A" type="5002">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_ugSC1-ZVEd6GYLBvN8WM0A"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ugSC2OZVEd6GYLBvN8WM0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ugSC2eZVEd6GYLBvN8WM0A"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_ugSCz-ZVEd6GYLBvN8WM0A" fontColor="4210752" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
+ <element xmi:type="ecore:EClass" href="Test.ecore#//TestSuite"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ugSC0OZVEd6GYLBvN8WM0A" x="7" y="145"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_ugSC2uZVEd6GYLBvN8WM0A" type="1001">
+ <children xmi:type="notation:Node" xmi:id="_ugSC3eZVEd6GYLBvN8WM0A" type="4001"/>
+ <children xmi:type="notation:Node" xmi:id="_ugSC3uZVEd6GYLBvN8WM0A" type="5001">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_ugSC3-ZVEd6GYLBvN8WM0A"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ugSC4OZVEd6GYLBvN8WM0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ugSC4eZVEd6GYLBvN8WM0A"/>
+ <layoutConstraint xmi:type="notation:Ratio" xmi:id="_Ua7OAOZWEd6GYLBvN8WM0A" value="0.4"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_ugSC4uZVEd6GYLBvN8WM0A" type="5002">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_ugSC4-ZVEd6GYLBvN8WM0A"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ugSC5OZVEd6GYLBvN8WM0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ugSC5eZVEd6GYLBvN8WM0A"/>
+ <layoutConstraint xmi:type="notation:Ratio" xmi:id="_Ua7OAeZWEd6GYLBvN8WM0A" value="0.37142857142857144"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_ugSC2-ZVEd6GYLBvN8WM0A" fontColor="4210752" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
+ <element xmi:type="ecore:EClass" href="Test.ecore#//TestCase"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ugSC3OZVEd6GYLBvN8WM0A" x="169" y="145" width="98" height="72"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_ugbzwOZVEd6GYLBvN8WM0A" type="1001">
+ <children xmi:type="notation:Node" xmi:id="_ugbzw-ZVEd6GYLBvN8WM0A" type="4001"/>
+ <children xmi:type="notation:Node" xmi:id="_ugbzxOZVEd6GYLBvN8WM0A" type="5001">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_ugbzxeZVEd6GYLBvN8WM0A"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ugbzxuZVEd6GYLBvN8WM0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ugbzx-ZVEd6GYLBvN8WM0A"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_ugbzyOZVEd6GYLBvN8WM0A" type="5002">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_ugbzyeZVEd6GYLBvN8WM0A"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ugbzyuZVEd6GYLBvN8WM0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ugbzy-ZVEd6GYLBvN8WM0A"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_ugbzweZVEd6GYLBvN8WM0A" fontColor="4210752" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
+ <element xmi:type="ecore:EClass" href="Test.ecore#//TestResult"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ugbzwuZVEd6GYLBvN8WM0A" x="655" y="5"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_ugbzzOZVEd6GYLBvN8WM0A" type="1001">
+ <children xmi:type="notation:Node" xmi:id="_ugbzz-ZVEd6GYLBvN8WM0A" type="4001"/>
+ <children xmi:type="notation:Node" xmi:id="_ugbz0OZVEd6GYLBvN8WM0A" type="5001">
+ <children xmi:type="notation:Node" xmi:id="_ugbz2OZVEd6GYLBvN8WM0A" type="2001">
+ <element xmi:type="ecore:EAttribute" href="Test.ecore#//ExceptionTestResult/exceptionClass"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ugbz2eZVEd6GYLBvN8WM0A"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_ugbz2uZVEd6GYLBvN8WM0A" type="2001">
+ <element xmi:type="ecore:EAttribute" href="Test.ecore#//ExceptionTestResult/exceptionMessage"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ugbz2-ZVEd6GYLBvN8WM0A"/>
+ </children>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_ugbz0eZVEd6GYLBvN8WM0A"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ugbz0uZVEd6GYLBvN8WM0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ugbz0-ZVEd6GYLBvN8WM0A"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_ugbz1OZVEd6GYLBvN8WM0A" type="5002">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_ugbz1eZVEd6GYLBvN8WM0A"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ugbz1uZVEd6GYLBvN8WM0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ugbz1-ZVEd6GYLBvN8WM0A"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_ugbzzeZVEd6GYLBvN8WM0A" fontColor="4210752" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
+ <element xmi:type="ecore:EClass" href="Test.ecore#//ExceptionTestResult"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ugbzzuZVEd6GYLBvN8WM0A" x="331" y="145"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_ugbz3OZVEd6GYLBvN8WM0A" type="1001">
+ <children xmi:type="notation:Node" xmi:id="_ugbz3-ZVEd6GYLBvN8WM0A" type="4001"/>
+ <children xmi:type="notation:Node" xmi:id="_ugbz4OZVEd6GYLBvN8WM0A" type="5001">
+ <children xmi:type="notation:Node" xmi:id="_ugbz6OZVEd6GYLBvN8WM0A" type="2001">
+ <element xmi:type="ecore:EAttribute" href="Test.ecore#//ValidationErrorTestResult/severity"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ugbz6eZVEd6GYLBvN8WM0A"/>
+ </children>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_ugbz4eZVEd6GYLBvN8WM0A"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ugbz4uZVEd6GYLBvN8WM0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ugbz4-ZVEd6GYLBvN8WM0A"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_ugbz5OZVEd6GYLBvN8WM0A" type="5002">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_ugbz5eZVEd6GYLBvN8WM0A"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ugbz5uZVEd6GYLBvN8WM0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ugbz5-ZVEd6GYLBvN8WM0A"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_ugbz3eZVEd6GYLBvN8WM0A" fontColor="4210752" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
+ <element xmi:type="ecore:EClass" href="Test.ecore#//ValidationErrorTestResult"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ugbz3uZVEd6GYLBvN8WM0A" x="605" y="145"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_ugbz6uZVEd6GYLBvN8WM0A" type="1005">
+ <children xmi:type="notation:Node" xmi:id="_ugbz7eZVEd6GYLBvN8WM0A" type="4010"/>
+ <children xmi:type="notation:Node" xmi:id="_ugbz7uZVEd6GYLBvN8WM0A" type="5008">
+ <children xmi:type="notation:Node" xmi:id="_uglkwOZVEd6GYLBvN8WM0A" type="2006">
+ <element xmi:type="ecore:EEnumLiteral" href="Test.ecore#//ValidationErrorSeverity/INFO"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_uglkweZVEd6GYLBvN8WM0A"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_uglkwuZVEd6GYLBvN8WM0A" type="2006">
+ <element xmi:type="ecore:EEnumLiteral" href="Test.ecore#//ValidationErrorSeverity/WARNING"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_uglkw-ZVEd6GYLBvN8WM0A"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_uglkxOZVEd6GYLBvN8WM0A" type="2006">
+ <element xmi:type="ecore:EEnumLiteral" href="Test.ecore#//ValidationErrorSeverity/ERROR"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_uglkxeZVEd6GYLBvN8WM0A"/>
+ </children>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_ugbz7-ZVEd6GYLBvN8WM0A"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ugbz8OZVEd6GYLBvN8WM0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ugbz8eZVEd6GYLBvN8WM0A"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_ugbz6-ZVEd6GYLBvN8WM0A" fontColor="4210752" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
+ <element xmi:type="ecore:EEnum" href="Test.ecore#//ValidationErrorSeverity"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ugbz7OZVEd6GYLBvN8WM0A" x="605" y="215" width="218" height="98"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_uglkxuZVEd6GYLBvN8WM0A" type="1001">
+ <children xmi:type="notation:Node" xmi:id="_uglkyeZVEd6GYLBvN8WM0A" type="4001"/>
+ <children xmi:type="notation:Node" xmi:id="_uglkyuZVEd6GYLBvN8WM0A" type="5001">
+ <children xmi:type="notation:Node" xmi:id="_uglk0uZVEd6GYLBvN8WM0A" type="2001">
+ <element xmi:type="ecore:EAttribute" href="Test.ecore#//ConsoleOutputTestResult/text"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_uglk0-ZVEd6GYLBvN8WM0A"/>
+ </children>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_uglky-ZVEd6GYLBvN8WM0A"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_uglkzOZVEd6GYLBvN8WM0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_uglkzeZVEd6GYLBvN8WM0A"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_uglkzuZVEd6GYLBvN8WM0A" type="5002">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_uglkz-ZVEd6GYLBvN8WM0A"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_uglk0OZVEd6GYLBvN8WM0A"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_uglk0eZVEd6GYLBvN8WM0A"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_uglkx-ZVEd6GYLBvN8WM0A" fontColor="4210752" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
+ <element xmi:type="ecore:EClass" href="Test.ecore#//ConsoleOutputTestResult"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_uglkyOZVEd6GYLBvN8WM0A" x="884" y="145"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_ufib4uZVEd6GYLBvN8WM0A"/>
+ <element xmi:type="ecore:EPackage" href="Test.ecore#/"/>
+ <edges xmi:type="notation:Edge" xmi:id="_uglk1OZVEd6GYLBvN8WM0A" type="3002" source="_ugSCzuZVEd6GYLBvN8WM0A" target="_ugSCwOZVEd6GYLBvN8WM0A">
+ <children xmi:type="notation:Node" xmi:id="_uglk2OZVEd6GYLBvN8WM0A" type="4011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_uglk2eZVEd6GYLBvN8WM0A" x="-10" y="-10"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_uglk2uZVEd6GYLBvN8WM0A" type="4012">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_uglk2-ZVEd6GYLBvN8WM0A" x="10" y="10"/>
+ </children>
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_uglk1eZVEd6GYLBvN8WM0A" lineColor="4210752"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_uglk1uZVEd6GYLBvN8WM0A" fontColor="4210752" fontHeight="10"/>
+ <element xmi:type="ecore:EReference" href="Test.ecore#//TestSuite/tests"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_uglk1-ZVEd6GYLBvN8WM0A" points="[0, -13, -91, 122]$[0, -135, -91, 0]$[34, -135, -57, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_uhVLrOZVEd6GYLBvN8WM0A" id="(0.19607843137254902,0.3333333333333333)"/>
+ </edges>
+ <edges xmi:type="notation:Edge" xmi:id="_uglk3OZVEd6GYLBvN8WM0A" type="3003" source="_ugSCzuZVEd6GYLBvN8WM0A" target="_ugSCwOZVEd6GYLBvN8WM0A">
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_uglk3eZVEd6GYLBvN8WM0A" routing="Rectilinear" lineColor="4210752"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_uglk3uZVEd6GYLBvN8WM0A"/>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_uglk3-ZVEd6GYLBvN8WM0A" points="[0, 0, -60, 98]$[0, -30, -60, 68]$[63, -30, 3, 68]$[63, -98, 3, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_uhVLquZVEd6GYLBvN8WM0A" id="(0.5,0.0)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_uhVLq-ZVEd6GYLBvN8WM0A" id="(0.49572649572649574,1.0)"/>
+ </edges>
+ <edges xmi:type="notation:Edge" xmi:id="_uguusOZVEd6GYLBvN8WM0A" type="3002" source="_ugSC2uZVEd6GYLBvN8WM0A" target="_ugbzwOZVEd6GYLBvN8WM0A">
+ <children xmi:type="notation:Node" xmi:id="_uguutOZVEd6GYLBvN8WM0A" type="4011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_uguuteZVEd6GYLBvN8WM0A" x="-10" y="-10"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_uguutuZVEd6GYLBvN8WM0A" type="4012">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_uguut-ZVEd6GYLBvN8WM0A" x="10" y="10"/>
+ </children>
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_uguuseZVEd6GYLBvN8WM0A" lineColor="4210752"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_uguusuZVEd6GYLBvN8WM0A" fontColor="4210752" fontHeight="10"/>
+ <element xmi:type="ecore:EReference" href="Test.ecore#//TestCase/result"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_uguus-ZVEd6GYLBvN8WM0A" points="[0, 0, -439, 100]$[0, -100, -439, 0]$[420, -100, -19, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_uhVLoOZVEd6GYLBvN8WM0A" id="(0.6666666666666666,0.0)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_uhVLoeZVEd6GYLBvN8WM0A" id="(0.19607843137254902,1.0)"/>
+ </edges>
+ <edges xmi:type="notation:Edge" xmi:id="_uguuuOZVEd6GYLBvN8WM0A" type="3003" source="_ugSC2uZVEd6GYLBvN8WM0A" target="_ugSCwOZVEd6GYLBvN8WM0A">
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_uguuueZVEd6GYLBvN8WM0A" routing="Rectilinear" lineColor="4210752"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_uguuuuZVEd6GYLBvN8WM0A"/>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_uguuu-ZVEd6GYLBvN8WM0A" points="[20, 0, 77, 98]$[20, -31, 77, 67]$[-57, -31, 0, 67]$[-57, -98, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_uhVLouZVEd6GYLBvN8WM0A" id="(0.3333333333333333,0.0)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_uhVLo-ZVEd6GYLBvN8WM0A" id="(0.7435897435897436,1.0)"/>
+ </edges>
+ <edges xmi:type="notation:Edge" xmi:id="_uguuvOZVEd6GYLBvN8WM0A" type="3003" source="_ugbzzOZVEd6GYLBvN8WM0A" target="_ugbzwOZVEd6GYLBvN8WM0A">
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_uguuveZVEd6GYLBvN8WM0A" routing="Rectilinear" lineColor="4210752"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_uguuvuZVEd6GYLBvN8WM0A"/>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_uguuv-ZVEd6GYLBvN8WM0A" points="[40, 0, -217, 100]$[40, -30, -217, 70]$[238, -30, -19, 70]$[238, -100, -19, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_uhVLpOZVEd6GYLBvN8WM0A" id="(0.5,0.0)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_uhVLpeZVEd6GYLBvN8WM0A" id="(0.39215686274509803,1.0)"/>
+ </edges>
+ <edges xmi:type="notation:Edge" xmi:id="_uguuwOZVEd6GYLBvN8WM0A" type="3003" source="_ugbz3OZVEd6GYLBvN8WM0A" target="_ugbzwOZVEd6GYLBvN8WM0A">
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_uguuweZVEd6GYLBvN8WM0A" routing="Rectilinear" lineColor="4210752"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_uguuwuZVEd6GYLBvN8WM0A"/>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_uguuw-ZVEd6GYLBvN8WM0A" points="[-3, 0, -4, 100]$[-3, -100, -4, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_uhVLqOZVEd6GYLBvN8WM0A" id="(0.4977168949771689,0.0)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_uhVLqeZVEd6GYLBvN8WM0A" id="(0.5980392156862745,1.0)"/>
+ </edges>
+ <edges xmi:type="notation:Edge" xmi:id="_uguuxOZVEd6GYLBvN8WM0A" type="3003" source="_uglkxuZVEd6GYLBvN8WM0A" target="_ugbzwOZVEd6GYLBvN8WM0A">
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_uguuxeZVEd6GYLBvN8WM0A" routing="Rectilinear" lineColor="4210752"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_uguuxuZVEd6GYLBvN8WM0A"/>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_uguux-ZVEd6GYLBvN8WM0A" points="[40, 0, 271, 100]$[40, -29, 271, 71]$[-220, -29, 11, 71]$[-220, -100, 11, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_uhVLpuZVEd6GYLBvN8WM0A" id="(0.5,0.0)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_uhVLp-ZVEd6GYLBvN8WM0A" id="(0.7941176470588235,1.0)"/>
+ </edges>
+</notation:Diagram>
diff --git a/tests/org.eclipse.egf.core.test.model/model/Test.genmodel b/tests/org.eclipse.egf.core.test.model/model/Test.genmodel
new file mode 100644
index 0000000..9c63629
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/model/Test.genmodel
@@ -0,0 +1,42 @@
+<?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.egf.core.test.model/src"
+ modelPluginID="org.eclipse.egf.core.test.model" modelName="Test" importerID="org.eclipse.emf.importer.ecore"
+ complianceLevel="5.0" copyrightFields="false" usedGenPackages="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore ../../org.eclipse.egf.model/model/Fcore.genmodel#//fcore ../../org.eclipse.egf.model/model/Types.genmodel#//types">
+ <foreignModel>Test.ecore</foreignModel>
+ <genPackages prefix="Test" disposableProviderFactory="true" ecorePackage="Test.ecore#/">
+ <genEnums typeSafeEnumCompatible="false" ecoreEnum="Test.ecore#//ValidationErrorSeverity">
+ <genEnumLiterals ecoreEnumLiteral="Test.ecore#//ValidationErrorSeverity/INFO"/>
+ <genEnumLiterals ecoreEnumLiteral="Test.ecore#//ValidationErrorSeverity/WARNING"/>
+ <genEnumLiterals ecoreEnumLiteral="Test.ecore#//ValidationErrorSeverity/ERROR"/>
+ </genEnums>
+ <genClasses image="false" ecoreClass="Test.ecore#//Test">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Test.ecore#//Test/name"/>
+ </genClasses>
+ <genClasses ecoreClass="Test.ecore#//TestSuite">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Test.ecore#//TestSuite/tests"/>
+ </genClasses>
+ <genClasses ecoreClass="Test.ecore#//TestCase">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Test.ecore#//TestCase/result"/>
+ </genClasses>
+ <genClasses ecoreClass="Test.ecore#//TestResult"/>
+ <genClasses ecoreClass="Test.ecore#//ExceptionTestResult">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Test.ecore#//ExceptionTestResult/exceptionClass"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Test.ecore#//ExceptionTestResult/exceptionMessage"/>
+ </genClasses>
+ <genClasses ecoreClass="Test.ecore#//ValidationErrorTestResult">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Test.ecore#//ValidationErrorTestResult/severity"/>
+ </genClasses>
+ <genClasses ecoreClass="Test.ecore#//ConsoleOutputTestResult"/>
+ <genClasses ecoreClass="Test.ecore#//EGFTestCase">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference Test.ecore#//EGFTestCase/activity"/>
+ </genClasses>
+ <genClasses ecoreClass="Test.ecore#//FileOutputTestResult">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute Test.ecore#//FileOutputTestResult/iFilePath"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="Test.ecore#//OutputTestResult">
+ <genFeatures createChild="false" propertyMultiLine="true" ecoreFeature="ecore:EAttribute Test.ecore#//OutputTestResult/text"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/tests/org.eclipse.egf.core.test.model/plugin.properties b/tests/org.eclipse.egf.core.test.model/plugin.properties
new file mode 100644
index 0000000..e305efe
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/plugin.properties
@@ -0,0 +1,8 @@
+
+# <copyright>
+# </copyright>
+#
+# $Id$
+
+pluginName = Test Model
+providerName = www.example.org
diff --git a/tests/org.eclipse.egf.core.test.model/plugin.xml b/tests/org.eclipse.egf.core.test.model/plugin.xml
new file mode 100644
index 0000000..7c6d55f
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/plugin.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ <copyright>
+ </copyright>
+
+ $Id$
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri="http://www.eclipse.org/egf/1.0.0/test"
+ class="test.TestPackage"
+ genModel="model/Test.genmodel"/>
+ </extension>
+
+</plugin>
diff --git a/tests/org.eclipse.egf.core.test.model/src/test/ConsoleOutputTestResult.java b/tests/org.eclipse.egf.core.test.model/src/test/ConsoleOutputTestResult.java
new file mode 100644
index 0000000..575adeb
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/src/test/ConsoleOutputTestResult.java
@@ -0,0 +1,22 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Console Output Test Result</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see test.TestPackage#getConsoleOutputTestResult()
+ * @model
+ * @generated
+ */
+public interface ConsoleOutputTestResult extends OutputTestResult {
+
+} // ConsoleOutputTestResult
diff --git a/tests/org.eclipse.egf.core.test.model/src/test/EGFTestCase.java b/tests/org.eclipse.egf.core.test.model/src/test/EGFTestCase.java
new file mode 100644
index 0000000..5e548df
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/src/test/EGFTestCase.java
@@ -0,0 +1,54 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test;
+
+import org.eclipse.egf.model.fcore.Activity;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>EGF Test Case</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link test.EGFTestCase#getActivity <em>Activity</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see test.TestPackage#getEGFTestCase()
+ * @model
+ * @generated
+ */
+public interface EGFTestCase extends TestCase {
+ /**
+ * Returns the value of the '<em><b>Activity</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Activity</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Activity</em>' reference.
+ * @see #setActivity(Activity)
+ * @see test.TestPackage#getEGFTestCase_Activity()
+ * @model required="true"
+ * @generated
+ */
+ Activity getActivity();
+
+ /**
+ * Sets the value of the '{@link test.EGFTestCase#getActivity <em>Activity</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Activity</em>' reference.
+ * @see #getActivity()
+ * @generated
+ */
+ void setActivity(Activity value);
+
+} // EGFTestCase
diff --git a/tests/org.eclipse.egf.core.test.model/src/test/ExceptionTestResult.java b/tests/org.eclipse.egf.core.test.model/src/test/ExceptionTestResult.java
new file mode 100644
index 0000000..4cb0179
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/src/test/ExceptionTestResult.java
@@ -0,0 +1,80 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Exception Test Result</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link test.ExceptionTestResult#getExceptionClass <em>Exception Class</em>}</li>
+ * <li>{@link test.ExceptionTestResult#getExceptionMessage <em>Exception Message</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see test.TestPackage#getExceptionTestResult()
+ * @model
+ * @generated
+ */
+public interface ExceptionTestResult extends TestResult {
+ /**
+ * Returns the value of the '<em><b>Exception Class</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Exception Class</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Exception Class</em>' attribute.
+ * @see #setExceptionClass(Class)
+ * @see test.TestPackage#getExceptionTestResult_ExceptionClass()
+ * @model required="true"
+ * @generated
+ */
+ Class<?> getExceptionClass();
+
+ /**
+ * Sets the value of the '{@link test.ExceptionTestResult#getExceptionClass <em>Exception Class</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Exception Class</em>' attribute.
+ * @see #getExceptionClass()
+ * @generated
+ */
+ void setExceptionClass(Class<?> value);
+
+ /**
+ * Returns the value of the '<em><b>Exception Message</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Exception Message</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Exception Message</em>' attribute.
+ * @see #setExceptionMessage(String)
+ * @see test.TestPackage#getExceptionTestResult_ExceptionMessage()
+ * @model
+ * @generated
+ */
+ String getExceptionMessage();
+
+ /**
+ * Sets the value of the '{@link test.ExceptionTestResult#getExceptionMessage <em>Exception Message</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Exception Message</em>' attribute.
+ * @see #getExceptionMessage()
+ * @generated
+ */
+ void setExceptionMessage(String value);
+
+} // ExceptionTestResult
diff --git a/tests/org.eclipse.egf.core.test.model/src/test/FileOutputTestResult.java b/tests/org.eclipse.egf.core.test.model/src/test/FileOutputTestResult.java
new file mode 100644
index 0000000..7c6956f
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/src/test/FileOutputTestResult.java
@@ -0,0 +1,54 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>File Output Test Result</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link test.FileOutputTestResult#getIFilePath <em>IFile Path</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see test.TestPackage#getFileOutputTestResult()
+ * @model
+ * @generated
+ */
+public interface FileOutputTestResult extends OutputTestResult {
+ /**
+ * Returns the value of the '<em><b>IFile Path</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>IFile Path</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>IFile Path</em>' attribute.
+ * @see #setIFilePath(String)
+ * @see test.TestPackage#getFileOutputTestResult_IFilePath()
+ * @model required="true"
+ * @generated
+ */
+ String getIFilePath();
+
+ /**
+ * Sets the value of the '{@link test.FileOutputTestResult#getIFilePath <em>IFile Path</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>IFile Path</em>' attribute.
+ * @see #getIFilePath()
+ * @generated
+ */
+ void setIFilePath(String value);
+
+} // FileOutputTestResult
diff --git a/tests/org.eclipse.egf.core.test.model/src/test/OutputTestResult.java b/tests/org.eclipse.egf.core.test.model/src/test/OutputTestResult.java
new file mode 100644
index 0000000..bfb5f30
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/src/test/OutputTestResult.java
@@ -0,0 +1,53 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Output Test Result</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link test.OutputTestResult#getText <em>Text</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see test.TestPackage#getOutputTestResult()
+ * @model abstract="true"
+ * @generated
+ */
+public interface OutputTestResult extends TestResult {
+ /**
+ * Returns the value of the '<em><b>Text</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Text</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Text</em>' attribute.
+ * @see #setText(String)
+ * @see test.TestPackage#getOutputTestResult_Text()
+ * @model required="true"
+ * @generated
+ */
+ String getText();
+
+ /**
+ * Sets the value of the '{@link test.OutputTestResult#getText <em>Text</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Text</em>' attribute.
+ * @see #getText()
+ * @generated
+ */
+ void setText(String value);
+
+} // OutputTestResult
diff --git a/tests/org.eclipse.egf.core.test.model/src/test/Test.java b/tests/org.eclipse.egf.core.test.model/src/test/Test.java
new file mode 100644
index 0000000..a66d13a
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/src/test/Test.java
@@ -0,0 +1,54 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Test</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link test.Test#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see test.TestPackage#getTest()
+ * @model interface="true" abstract="true"
+ * @generated
+ */
+public interface Test extends EObject {
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see test.TestPackage#getTest_Name()
+ * @model required="true"
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link test.Test#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);
+
+} // Test
diff --git a/tests/org.eclipse.egf.core.test.model/src/test/TestCase.java b/tests/org.eclipse.egf.core.test.model/src/test/TestCase.java
new file mode 100644
index 0000000..ddf4bb1
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/src/test/TestCase.java
@@ -0,0 +1,55 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test;
+
+import org.eclipse.egf.model.fcore.Activity;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Case</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link test.TestCase#getResult <em>Result</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see test.TestPackage#getTestCase()
+ * @model abstract="true"
+ * @generated
+ */
+public interface TestCase extends Test {
+
+ /**
+ * Returns the value of the '<em><b>Result</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Result</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Result</em>' containment reference.
+ * @see #setResult(TestResult)
+ * @see test.TestPackage#getTestCase_Result()
+ * @model containment="true"
+ * @generated
+ */
+ TestResult getResult();
+
+ /**
+ * Sets the value of the '{@link test.TestCase#getResult <em>Result</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Result</em>' containment reference.
+ * @see #getResult()
+ * @generated
+ */
+ void setResult(TestResult value);
+} // TestCase
diff --git a/tests/org.eclipse.egf.core.test.model/src/test/TestFactory.java b/tests/org.eclipse.egf.core.test.model/src/test/TestFactory.java
new file mode 100644
index 0000000..0db928b
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/src/test/TestFactory.java
@@ -0,0 +1,91 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test;
+
+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 test.TestPackage
+ * @generated
+ */
+public interface TestFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ TestFactory eINSTANCE = test.impl.TestFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Suite</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Suite</em>'.
+ * @generated
+ */
+ TestSuite createTestSuite();
+
+ /**
+ * Returns a new object of class '<em>Exception Test Result</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Exception Test Result</em>'.
+ * @generated
+ */
+ ExceptionTestResult createExceptionTestResult();
+
+ /**
+ * Returns a new object of class '<em>Validation Error Test Result</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Validation Error Test Result</em>'.
+ * @generated
+ */
+ ValidationErrorTestResult createValidationErrorTestResult();
+
+ /**
+ * Returns a new object of class '<em>Console Output Test Result</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Console Output Test Result</em>'.
+ * @generated
+ */
+ ConsoleOutputTestResult createConsoleOutputTestResult();
+
+ /**
+ * Returns a new object of class '<em>EGF Test Case</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>EGF Test Case</em>'.
+ * @generated
+ */
+ EGFTestCase createEGFTestCase();
+
+/**
+ * Returns a new object of class '<em>File Output Test Result</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>File Output Test Result</em>'.
+ * @generated
+ */
+ FileOutputTestResult createFileOutputTestResult();
+
+/**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ TestPackage getTestPackage();
+
+} //TestFactory
diff --git a/tests/org.eclipse.egf.core.test.model/src/test/TestPackage.java b/tests/org.eclipse.egf.core.test.model/src/test/TestPackage.java
new file mode 100644
index 0000000..b37e23e
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/src/test/TestPackage.java
@@ -0,0 +1,815 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see test.TestFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface TestPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "test";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/egf/1.0.0/test";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "test";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ TestPackage eINSTANCE = test.impl.TestPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link test.Test <em>Test</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see test.Test
+ * @see test.impl.TestPackageImpl#getTest()
+ * @generated
+ */
+ int TEST = 0;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TEST__NAME = 0;
+
+ /**
+ * The number of structural features of the '<em>Test</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TEST_FEATURE_COUNT = 1;
+
+ /**
+ * The meta object id for the '{@link test.impl.TestSuiteImpl <em>Suite</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see test.impl.TestSuiteImpl
+ * @see test.impl.TestPackageImpl#getTestSuite()
+ * @generated
+ */
+ int TEST_SUITE = 1;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TEST_SUITE__NAME = TEST__NAME;
+
+ /**
+ * The feature id for the '<em><b>Tests</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TEST_SUITE__TESTS = TEST_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Suite</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TEST_SUITE_FEATURE_COUNT = TEST_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link test.impl.TestCaseImpl <em>Case</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see test.impl.TestCaseImpl
+ * @see test.impl.TestPackageImpl#getTestCase()
+ * @generated
+ */
+ int TEST_CASE = 2;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TEST_CASE__NAME = TEST__NAME;
+
+ /**
+ * The feature id for the '<em><b>Result</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TEST_CASE__RESULT = TEST_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Case</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TEST_CASE_FEATURE_COUNT = TEST_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link test.impl.TestResultImpl <em>Result</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see test.impl.TestResultImpl
+ * @see test.impl.TestPackageImpl#getTestResult()
+ * @generated
+ */
+ int TEST_RESULT = 3;
+
+ /**
+ * The number of structural features of the '<em>Result</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TEST_RESULT_FEATURE_COUNT = 0;
+
+
+ /**
+ * The meta object id for the '{@link test.impl.ExceptionTestResultImpl <em>Exception Test Result</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see test.impl.ExceptionTestResultImpl
+ * @see test.impl.TestPackageImpl#getExceptionTestResult()
+ * @generated
+ */
+ int EXCEPTION_TEST_RESULT = 4;
+
+ /**
+ * The feature id for the '<em><b>Exception Class</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXCEPTION_TEST_RESULT__EXCEPTION_CLASS = TEST_RESULT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Exception Message</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXCEPTION_TEST_RESULT__EXCEPTION_MESSAGE = TEST_RESULT_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Exception Test Result</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXCEPTION_TEST_RESULT_FEATURE_COUNT = TEST_RESULT_FEATURE_COUNT + 2;
+
+ /**
+ * The meta object id for the '{@link test.impl.ValidationErrorTestResultImpl <em>Validation Error Test Result</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see test.impl.ValidationErrorTestResultImpl
+ * @see test.impl.TestPackageImpl#getValidationErrorTestResult()
+ * @generated
+ */
+ int VALIDATION_ERROR_TEST_RESULT = 5;
+
+ /**
+ * The feature id for the '<em><b>Severity</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VALIDATION_ERROR_TEST_RESULT__SEVERITY = TEST_RESULT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Validation Error Test Result</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VALIDATION_ERROR_TEST_RESULT_FEATURE_COUNT = TEST_RESULT_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link test.impl.OutputTestResultImpl <em>Output Test Result</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see test.impl.OutputTestResultImpl
+ * @see test.impl.TestPackageImpl#getOutputTestResult()
+ * @generated
+ */
+ int OUTPUT_TEST_RESULT = 9;
+
+ /**
+ * The feature id for the '<em><b>Text</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int OUTPUT_TEST_RESULT__TEXT = TEST_RESULT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Output Test Result</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int OUTPUT_TEST_RESULT_FEATURE_COUNT = TEST_RESULT_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link test.impl.ConsoleOutputTestResultImpl <em>Console Output Test Result</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see test.impl.ConsoleOutputTestResultImpl
+ * @see test.impl.TestPackageImpl#getConsoleOutputTestResult()
+ * @generated
+ */
+ int CONSOLE_OUTPUT_TEST_RESULT = 6;
+
+ /**
+ * The feature id for the '<em><b>Text</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CONSOLE_OUTPUT_TEST_RESULT__TEXT = OUTPUT_TEST_RESULT__TEXT;
+
+ /**
+ * The number of structural features of the '<em>Console Output Test Result</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CONSOLE_OUTPUT_TEST_RESULT_FEATURE_COUNT = OUTPUT_TEST_RESULT_FEATURE_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link test.impl.EGFTestCaseImpl <em>EGF Test Case</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see test.impl.EGFTestCaseImpl
+ * @see test.impl.TestPackageImpl#getEGFTestCase()
+ * @generated
+ */
+ int EGF_TEST_CASE = 7;
+
+/**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EGF_TEST_CASE__NAME = TEST_CASE__NAME;
+
+/**
+ * The feature id for the '<em><b>Result</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EGF_TEST_CASE__RESULT = TEST_CASE__RESULT;
+
+/**
+ * The feature id for the '<em><b>Activity</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EGF_TEST_CASE__ACTIVITY = TEST_CASE_FEATURE_COUNT + 0;
+
+/**
+ * The number of structural features of the '<em>EGF Test Case</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EGF_TEST_CASE_FEATURE_COUNT = TEST_CASE_FEATURE_COUNT + 1;
+
+/**
+ * The meta object id for the '{@link test.impl.FileOutputTestResultImpl <em>File Output Test Result</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see test.impl.FileOutputTestResultImpl
+ * @see test.impl.TestPackageImpl#getFileOutputTestResult()
+ * @generated
+ */
+ int FILE_OUTPUT_TEST_RESULT = 8;
+
+/**
+ * The feature id for the '<em><b>Text</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FILE_OUTPUT_TEST_RESULT__TEXT = OUTPUT_TEST_RESULT__TEXT;
+
+/**
+ * The feature id for the '<em><b>IFile Path</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FILE_OUTPUT_TEST_RESULT__IFILE_PATH = OUTPUT_TEST_RESULT_FEATURE_COUNT + 0;
+
+/**
+ * The number of structural features of the '<em>File Output Test Result</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FILE_OUTPUT_TEST_RESULT_FEATURE_COUNT = OUTPUT_TEST_RESULT_FEATURE_COUNT + 1;
+
+/**
+ * The meta object id for the '{@link test.ValidationErrorSeverity <em>Validation Error Severity</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see test.ValidationErrorSeverity
+ * @see test.impl.TestPackageImpl#getValidationErrorSeverity()
+ * @generated
+ */
+ int VALIDATION_ERROR_SEVERITY = 10;
+
+
+ /**
+ * Returns the meta object for class '{@link test.Test <em>Test</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Test</em>'.
+ * @see test.Test
+ * @generated
+ */
+ EClass getTest();
+
+ /**
+ * Returns the meta object for the attribute '{@link test.Test#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see test.Test#getName()
+ * @see #getTest()
+ * @generated
+ */
+ EAttribute getTest_Name();
+
+ /**
+ * Returns the meta object for class '{@link test.TestSuite <em>Suite</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Suite</em>'.
+ * @see test.TestSuite
+ * @generated
+ */
+ EClass getTestSuite();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link test.TestSuite#getTests <em>Tests</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Tests</em>'.
+ * @see test.TestSuite#getTests()
+ * @see #getTestSuite()
+ * @generated
+ */
+ EReference getTestSuite_Tests();
+
+ /**
+ * Returns the meta object for class '{@link test.TestCase <em>Case</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Case</em>'.
+ * @see test.TestCase
+ * @generated
+ */
+ EClass getTestCase();
+
+ /**
+ * Returns the meta object for the containment reference '{@link test.TestCase#getResult <em>Result</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Result</em>'.
+ * @see test.TestCase#getResult()
+ * @see #getTestCase()
+ * @generated
+ */
+ EReference getTestCase_Result();
+
+ /**
+ * Returns the meta object for class '{@link test.TestResult <em>Result</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Result</em>'.
+ * @see test.TestResult
+ * @generated
+ */
+ EClass getTestResult();
+
+ /**
+ * Returns the meta object for class '{@link test.ExceptionTestResult <em>Exception Test Result</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Exception Test Result</em>'.
+ * @see test.ExceptionTestResult
+ * @generated
+ */
+ EClass getExceptionTestResult();
+
+ /**
+ * Returns the meta object for the attribute '{@link test.ExceptionTestResult#getExceptionClass <em>Exception Class</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Exception Class</em>'.
+ * @see test.ExceptionTestResult#getExceptionClass()
+ * @see #getExceptionTestResult()
+ * @generated
+ */
+ EAttribute getExceptionTestResult_ExceptionClass();
+
+ /**
+ * Returns the meta object for the attribute '{@link test.ExceptionTestResult#getExceptionMessage <em>Exception Message</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Exception Message</em>'.
+ * @see test.ExceptionTestResult#getExceptionMessage()
+ * @see #getExceptionTestResult()
+ * @generated
+ */
+ EAttribute getExceptionTestResult_ExceptionMessage();
+
+ /**
+ * Returns the meta object for class '{@link test.ValidationErrorTestResult <em>Validation Error Test Result</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Validation Error Test Result</em>'.
+ * @see test.ValidationErrorTestResult
+ * @generated
+ */
+ EClass getValidationErrorTestResult();
+
+ /**
+ * Returns the meta object for the attribute '{@link test.ValidationErrorTestResult#getSeverity <em>Severity</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Severity</em>'.
+ * @see test.ValidationErrorTestResult#getSeverity()
+ * @see #getValidationErrorTestResult()
+ * @generated
+ */
+ EAttribute getValidationErrorTestResult_Severity();
+
+ /**
+ * Returns the meta object for class '{@link test.ConsoleOutputTestResult <em>Console Output Test Result</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Console Output Test Result</em>'.
+ * @see test.ConsoleOutputTestResult
+ * @generated
+ */
+ EClass getConsoleOutputTestResult();
+
+ /**
+ * Returns the meta object for class '{@link test.EGFTestCase <em>EGF Test Case</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>EGF Test Case</em>'.
+ * @see test.EGFTestCase
+ * @generated
+ */
+ EClass getEGFTestCase();
+
+/**
+ * Returns the meta object for the reference '{@link test.EGFTestCase#getActivity <em>Activity</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Activity</em>'.
+ * @see test.EGFTestCase#getActivity()
+ * @see #getEGFTestCase()
+ * @generated
+ */
+ EReference getEGFTestCase_Activity();
+
+/**
+ * Returns the meta object for class '{@link test.FileOutputTestResult <em>File Output Test Result</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>File Output Test Result</em>'.
+ * @see test.FileOutputTestResult
+ * @generated
+ */
+ EClass getFileOutputTestResult();
+
+/**
+ * Returns the meta object for the attribute '{@link test.FileOutputTestResult#getIFilePath <em>IFile Path</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>IFile Path</em>'.
+ * @see test.FileOutputTestResult#getIFilePath()
+ * @see #getFileOutputTestResult()
+ * @generated
+ */
+ EAttribute getFileOutputTestResult_IFilePath();
+
+/**
+ * Returns the meta object for class '{@link test.OutputTestResult <em>Output Test Result</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Output Test Result</em>'.
+ * @see test.OutputTestResult
+ * @generated
+ */
+ EClass getOutputTestResult();
+
+/**
+ * Returns the meta object for the attribute '{@link test.OutputTestResult#getText <em>Text</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Text</em>'.
+ * @see test.OutputTestResult#getText()
+ * @see #getOutputTestResult()
+ * @generated
+ */
+ EAttribute getOutputTestResult_Text();
+
+/**
+ * Returns the meta object for enum '{@link test.ValidationErrorSeverity <em>Validation Error Severity</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for enum '<em>Validation Error Severity</em>'.
+ * @see test.ValidationErrorSeverity
+ * @generated
+ */
+ EEnum getValidationErrorSeverity();
+
+ /**
+ * 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
+ */
+ TestFactory getTestFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link test.Test <em>Test</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see test.Test
+ * @see test.impl.TestPackageImpl#getTest()
+ * @generated
+ */
+ EClass TEST = eINSTANCE.getTest();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute TEST__NAME = eINSTANCE.getTest_Name();
+
+ /**
+ * The meta object literal for the '{@link test.impl.TestSuiteImpl <em>Suite</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see test.impl.TestSuiteImpl
+ * @see test.impl.TestPackageImpl#getTestSuite()
+ * @generated
+ */
+ EClass TEST_SUITE = eINSTANCE.getTestSuite();
+
+ /**
+ * The meta object literal for the '<em><b>Tests</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference TEST_SUITE__TESTS = eINSTANCE.getTestSuite_Tests();
+
+ /**
+ * The meta object literal for the '{@link test.impl.TestCaseImpl <em>Case</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see test.impl.TestCaseImpl
+ * @see test.impl.TestPackageImpl#getTestCase()
+ * @generated
+ */
+ EClass TEST_CASE = eINSTANCE.getTestCase();
+
+ /**
+ * The meta object literal for the '<em><b>Result</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference TEST_CASE__RESULT = eINSTANCE.getTestCase_Result();
+
+ /**
+ * The meta object literal for the '{@link test.impl.TestResultImpl <em>Result</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see test.impl.TestResultImpl
+ * @see test.impl.TestPackageImpl#getTestResult()
+ * @generated
+ */
+ EClass TEST_RESULT = eINSTANCE.getTestResult();
+
+ /**
+ * The meta object literal for the '{@link test.impl.ExceptionTestResultImpl <em>Exception Test Result</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see test.impl.ExceptionTestResultImpl
+ * @see test.impl.TestPackageImpl#getExceptionTestResult()
+ * @generated
+ */
+ EClass EXCEPTION_TEST_RESULT = eINSTANCE.getExceptionTestResult();
+
+ /**
+ * The meta object literal for the '<em><b>Exception Class</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute EXCEPTION_TEST_RESULT__EXCEPTION_CLASS = eINSTANCE.getExceptionTestResult_ExceptionClass();
+
+ /**
+ * The meta object literal for the '<em><b>Exception Message</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute EXCEPTION_TEST_RESULT__EXCEPTION_MESSAGE = eINSTANCE.getExceptionTestResult_ExceptionMessage();
+
+ /**
+ * The meta object literal for the '{@link test.impl.ValidationErrorTestResultImpl <em>Validation Error Test Result</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see test.impl.ValidationErrorTestResultImpl
+ * @see test.impl.TestPackageImpl#getValidationErrorTestResult()
+ * @generated
+ */
+ EClass VALIDATION_ERROR_TEST_RESULT = eINSTANCE.getValidationErrorTestResult();
+
+ /**
+ * The meta object literal for the '<em><b>Severity</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute VALIDATION_ERROR_TEST_RESULT__SEVERITY = eINSTANCE.getValidationErrorTestResult_Severity();
+
+ /**
+ * The meta object literal for the '{@link test.impl.ConsoleOutputTestResultImpl <em>Console Output Test Result</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see test.impl.ConsoleOutputTestResultImpl
+ * @see test.impl.TestPackageImpl#getConsoleOutputTestResult()
+ * @generated
+ */
+ EClass CONSOLE_OUTPUT_TEST_RESULT = eINSTANCE.getConsoleOutputTestResult();
+
+ /**
+ * The meta object literal for the '{@link test.impl.EGFTestCaseImpl <em>EGF Test Case</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see test.impl.EGFTestCaseImpl
+ * @see test.impl.TestPackageImpl#getEGFTestCase()
+ * @generated
+ */
+ EClass EGF_TEST_CASE = eINSTANCE.getEGFTestCase();
+
+ /**
+ * The meta object literal for the '<em><b>Activity</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference EGF_TEST_CASE__ACTIVITY = eINSTANCE.getEGFTestCase_Activity();
+
+ /**
+ * The meta object literal for the '{@link test.impl.FileOutputTestResultImpl <em>File Output Test Result</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see test.impl.FileOutputTestResultImpl
+ * @see test.impl.TestPackageImpl#getFileOutputTestResult()
+ * @generated
+ */
+ EClass FILE_OUTPUT_TEST_RESULT = eINSTANCE.getFileOutputTestResult();
+
+ /**
+ * The meta object literal for the '<em><b>IFile Path</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute FILE_OUTPUT_TEST_RESULT__IFILE_PATH = eINSTANCE.getFileOutputTestResult_IFilePath();
+
+ /**
+ * The meta object literal for the '{@link test.impl.OutputTestResultImpl <em>Output Test Result</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see test.impl.OutputTestResultImpl
+ * @see test.impl.TestPackageImpl#getOutputTestResult()
+ * @generated
+ */
+ EClass OUTPUT_TEST_RESULT = eINSTANCE.getOutputTestResult();
+
+ /**
+ * The meta object literal for the '<em><b>Text</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute OUTPUT_TEST_RESULT__TEXT = eINSTANCE.getOutputTestResult_Text();
+
+ /**
+ * The meta object literal for the '{@link test.ValidationErrorSeverity <em>Validation Error Severity</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see test.ValidationErrorSeverity
+ * @see test.impl.TestPackageImpl#getValidationErrorSeverity()
+ * @generated
+ */
+ EEnum VALIDATION_ERROR_SEVERITY = eINSTANCE.getValidationErrorSeverity();
+
+ }
+
+} //TestPackage
diff --git a/tests/org.eclipse.egf.core.test.model/src/test/TestResult.java b/tests/org.eclipse.egf.core.test.model/src/test/TestResult.java
new file mode 100644
index 0000000..c76f43a
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/src/test/TestResult.java
@@ -0,0 +1,22 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Result</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see test.TestPackage#getTestResult()
+ * @model abstract="true"
+ * @generated
+ */
+public interface TestResult extends EObject {
+} // TestResult
diff --git a/tests/org.eclipse.egf.core.test.model/src/test/TestSuite.java b/tests/org.eclipse.egf.core.test.model/src/test/TestSuite.java
new file mode 100644
index 0000000..5c3bd0c
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/src/test/TestSuite.java
@@ -0,0 +1,44 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Suite</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link test.TestSuite#getTests <em>Tests</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see test.TestPackage#getTestSuite()
+ * @model
+ * @generated
+ */
+public interface TestSuite extends Test {
+ /**
+ * Returns the value of the '<em><b>Tests</b></em>' containment reference list.
+ * The list contents are of type {@link test.Test}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Tests</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>Tests</em>' containment reference list.
+ * @see test.TestPackage#getTestSuite_Tests()
+ * @model containment="true"
+ * @generated
+ */
+ EList<Test> getTests();
+
+} // TestSuite
diff --git a/tests/org.eclipse.egf.core.test.model/src/test/ValidationErrorSeverity.java b/tests/org.eclipse.egf.core.test.model/src/test/ValidationErrorSeverity.java
new file mode 100644
index 0000000..c808486
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/src/test/ValidationErrorSeverity.java
@@ -0,0 +1,239 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Validation Error Severity</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * @see test.TestPackage#getValidationErrorSeverity()
+ * @model
+ * @generated
+ */
+public enum ValidationErrorSeverity implements Enumerator {
+ /**
+ * The '<em><b>INFO</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #INFO_VALUE
+ * @generated
+ * @ordered
+ */
+ INFO(1, "INFO", "INFO"),
+
+ /**
+ * The '<em><b>WARNING</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #WARNING_VALUE
+ * @generated
+ * @ordered
+ */
+ WARNING(2, "WARNING", "WARNING"),
+
+ /**
+ * The '<em><b>ERROR</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #ERROR_VALUE
+ * @generated
+ * @ordered
+ */
+ ERROR(4, "ERROR", "ERROR");
+
+ /**
+ * The '<em><b>INFO</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>INFO</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #INFO
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int INFO_VALUE = 1;
+
+ /**
+ * The '<em><b>WARNING</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>WARNING</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #WARNING
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int WARNING_VALUE = 2;
+
+ /**
+ * The '<em><b>ERROR</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>ERROR</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #ERROR
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int ERROR_VALUE = 4;
+
+ /**
+ * An array of all the '<em><b>Validation Error Severity</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static final ValidationErrorSeverity[] VALUES_ARRAY =
+ new ValidationErrorSeverity[] {
+ INFO,
+ WARNING,
+ ERROR,
+ };
+
+ /**
+ * A public read-only list of all the '<em><b>Validation Error Severity</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final List<ValidationErrorSeverity> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+ /**
+ * Returns the '<em><b>Validation Error Severity</b></em>' literal with the specified literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static ValidationErrorSeverity get(String literal) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ ValidationErrorSeverity result = VALUES_ARRAY[i];
+ if (result.toString().equals(literal)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Validation Error Severity</b></em>' literal with the specified name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static ValidationErrorSeverity getByName(String name) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ ValidationErrorSeverity result = VALUES_ARRAY[i];
+ if (result.getName().equals(name)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Validation Error Severity</b></em>' literal with the specified integer value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static ValidationErrorSeverity get(int value) {
+ switch (value) {
+ case INFO_VALUE: return INFO;
+ case WARNING_VALUE: return WARNING;
+ case ERROR_VALUE: return ERROR;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final int value;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String name;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String literal;
+
+ /**
+ * Only this class can construct instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private ValidationErrorSeverity(int value, String name, String literal) {
+ this.value = value;
+ this.name = name;
+ this.literal = literal;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getLiteral() {
+ return literal;
+ }
+
+ /**
+ * Returns the literal value of the enumerator, which is its string representation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ return literal;
+ }
+
+} //ValidationErrorSeverity
diff --git a/tests/org.eclipse.egf.core.test.model/src/test/ValidationErrorTestResult.java b/tests/org.eclipse.egf.core.test.model/src/test/ValidationErrorTestResult.java
new file mode 100644
index 0000000..a9b349a
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/src/test/ValidationErrorTestResult.java
@@ -0,0 +1,56 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Validation Error Test Result</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link test.ValidationErrorTestResult#getSeverity <em>Severity</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see test.TestPackage#getValidationErrorTestResult()
+ * @model
+ * @generated
+ */
+public interface ValidationErrorTestResult extends TestResult {
+ /**
+ * Returns the value of the '<em><b>Severity</b></em>' attribute.
+ * The literals are from the enumeration {@link test.ValidationErrorSeverity}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Severity</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Severity</em>' attribute.
+ * @see test.ValidationErrorSeverity
+ * @see #setSeverity(ValidationErrorSeverity)
+ * @see test.TestPackage#getValidationErrorTestResult_Severity()
+ * @model required="true"
+ * @generated
+ */
+ ValidationErrorSeverity getSeverity();
+
+ /**
+ * Sets the value of the '{@link test.ValidationErrorTestResult#getSeverity <em>Severity</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Severity</em>' attribute.
+ * @see test.ValidationErrorSeverity
+ * @see #getSeverity()
+ * @generated
+ */
+ void setSeverity(ValidationErrorSeverity value);
+
+} // ValidationErrorTestResult
diff --git a/tests/org.eclipse.egf.core.test.model/src/test/impl/ConsoleOutputTestResultImpl.java b/tests/org.eclipse.egf.core.test.model/src/test/impl/ConsoleOutputTestResultImpl.java
new file mode 100644
index 0000000..9f709f7
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/src/test/impl/ConsoleOutputTestResultImpl.java
@@ -0,0 +1,45 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import test.ConsoleOutputTestResult;
+import test.TestPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Console Output Test Result</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class ConsoleOutputTestResultImpl extends OutputTestResultImpl implements ConsoleOutputTestResult {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ConsoleOutputTestResultImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TestPackage.Literals.CONSOLE_OUTPUT_TEST_RESULT;
+ }
+
+} //ConsoleOutputTestResultImpl
diff --git a/tests/org.eclipse.egf.core.test.model/src/test/impl/EGFTestCaseImpl.java b/tests/org.eclipse.egf.core.test.model/src/test/impl/EGFTestCaseImpl.java
new file mode 100644
index 0000000..527be7c
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/src/test/impl/EGFTestCaseImpl.java
@@ -0,0 +1,161 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test.impl;
+
+import org.eclipse.egf.model.fcore.Activity;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import test.EGFTestCase;
+import test.TestPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>EGF Test Case</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link test.impl.EGFTestCaseImpl#getActivity <em>Activity</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class EGFTestCaseImpl extends TestCaseImpl implements EGFTestCase {
+ /**
+ * The cached value of the '{@link #getActivity() <em>Activity</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getActivity()
+ * @generated
+ * @ordered
+ */
+ protected Activity activity;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EGFTestCaseImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TestPackage.Literals.EGF_TEST_CASE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Activity getActivity() {
+ if (activity != null && activity.eIsProxy()) {
+ InternalEObject oldActivity = (InternalEObject)activity;
+ activity = (Activity)eResolveProxy(oldActivity);
+ if (activity != oldActivity) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, TestPackage.EGF_TEST_CASE__ACTIVITY, oldActivity, activity));
+ }
+ }
+ return activity;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Activity basicGetActivity() {
+ return activity;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setActivity(Activity newActivity) {
+ Activity oldActivity = activity;
+ activity = newActivity;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, TestPackage.EGF_TEST_CASE__ACTIVITY, oldActivity, activity));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case TestPackage.EGF_TEST_CASE__ACTIVITY:
+ if (resolve) return getActivity();
+ return basicGetActivity();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case TestPackage.EGF_TEST_CASE__ACTIVITY:
+ setActivity((Activity)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case TestPackage.EGF_TEST_CASE__ACTIVITY:
+ setActivity((Activity)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case TestPackage.EGF_TEST_CASE__ACTIVITY:
+ return activity != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //EGFTestCaseImpl
diff --git a/tests/org.eclipse.egf.core.test.model/src/test/impl/ExceptionTestResultImpl.java b/tests/org.eclipse.egf.core.test.model/src/test/impl/ExceptionTestResultImpl.java
new file mode 100644
index 0000000..b98ed05
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/src/test/impl/ExceptionTestResultImpl.java
@@ -0,0 +1,208 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import test.ExceptionTestResult;
+import test.TestPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Exception Test Result</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link test.impl.ExceptionTestResultImpl#getExceptionClass <em>Exception Class</em>}</li>
+ * <li>{@link test.impl.ExceptionTestResultImpl#getExceptionMessage <em>Exception Message</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ExceptionTestResultImpl extends TestResultImpl implements ExceptionTestResult {
+ /**
+ * The cached value of the '{@link #getExceptionClass() <em>Exception Class</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getExceptionClass()
+ * @generated
+ * @ordered
+ */
+ protected Class<?> exceptionClass;
+
+ /**
+ * The default value of the '{@link #getExceptionMessage() <em>Exception Message</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getExceptionMessage()
+ * @generated
+ * @ordered
+ */
+ protected static final String EXCEPTION_MESSAGE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getExceptionMessage() <em>Exception Message</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getExceptionMessage()
+ * @generated
+ * @ordered
+ */
+ protected String exceptionMessage = EXCEPTION_MESSAGE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ExceptionTestResultImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TestPackage.Literals.EXCEPTION_TEST_RESULT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Class<?> getExceptionClass() {
+ return exceptionClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setExceptionClass(Class<?> newExceptionClass) {
+ Class<?> oldExceptionClass = exceptionClass;
+ exceptionClass = newExceptionClass;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, TestPackage.EXCEPTION_TEST_RESULT__EXCEPTION_CLASS, oldExceptionClass, exceptionClass));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getExceptionMessage() {
+ return exceptionMessage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setExceptionMessage(String newExceptionMessage) {
+ String oldExceptionMessage = exceptionMessage;
+ exceptionMessage = newExceptionMessage;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, TestPackage.EXCEPTION_TEST_RESULT__EXCEPTION_MESSAGE, oldExceptionMessage, exceptionMessage));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case TestPackage.EXCEPTION_TEST_RESULT__EXCEPTION_CLASS:
+ return getExceptionClass();
+ case TestPackage.EXCEPTION_TEST_RESULT__EXCEPTION_MESSAGE:
+ return getExceptionMessage();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case TestPackage.EXCEPTION_TEST_RESULT__EXCEPTION_CLASS:
+ setExceptionClass((Class<?>)newValue);
+ return;
+ case TestPackage.EXCEPTION_TEST_RESULT__EXCEPTION_MESSAGE:
+ setExceptionMessage((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case TestPackage.EXCEPTION_TEST_RESULT__EXCEPTION_CLASS:
+ setExceptionClass((Class<?>)null);
+ return;
+ case TestPackage.EXCEPTION_TEST_RESULT__EXCEPTION_MESSAGE:
+ setExceptionMessage(EXCEPTION_MESSAGE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case TestPackage.EXCEPTION_TEST_RESULT__EXCEPTION_CLASS:
+ return exceptionClass != null;
+ case TestPackage.EXCEPTION_TEST_RESULT__EXCEPTION_MESSAGE:
+ return EXCEPTION_MESSAGE_EDEFAULT == null ? exceptionMessage != null : !EXCEPTION_MESSAGE_EDEFAULT.equals(exceptionMessage);
+ }
+ 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(" (exceptionClass: ");
+ result.append(exceptionClass);
+ result.append(", exceptionMessage: ");
+ result.append(exceptionMessage);
+ result.append(')');
+ return result.toString();
+ }
+
+} //ExceptionTestResultImpl
diff --git a/tests/org.eclipse.egf.core.test.model/src/test/impl/FileOutputTestResultImpl.java b/tests/org.eclipse.egf.core.test.model/src/test/impl/FileOutputTestResultImpl.java
new file mode 100644
index 0000000..1a8c5f8
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/src/test/impl/FileOutputTestResultImpl.java
@@ -0,0 +1,167 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test.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.EObjectImpl;
+
+import test.FileOutputTestResult;
+import test.TestPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>File Output Test Result</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link test.impl.FileOutputTestResultImpl#getIFilePath <em>IFile Path</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class FileOutputTestResultImpl extends OutputTestResultImpl implements FileOutputTestResult {
+ /**
+ * The default value of the '{@link #getIFilePath() <em>IFile Path</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getIFilePath()
+ * @generated
+ * @ordered
+ */
+ protected static final String IFILE_PATH_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getIFilePath() <em>IFile Path</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getIFilePath()
+ * @generated
+ * @ordered
+ */
+ protected String iFilePath = IFILE_PATH_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected FileOutputTestResultImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TestPackage.Literals.FILE_OUTPUT_TEST_RESULT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getIFilePath() {
+ return iFilePath;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setIFilePath(String newIFilePath) {
+ String oldIFilePath = iFilePath;
+ iFilePath = newIFilePath;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, TestPackage.FILE_OUTPUT_TEST_RESULT__IFILE_PATH, oldIFilePath, iFilePath));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case TestPackage.FILE_OUTPUT_TEST_RESULT__IFILE_PATH:
+ return getIFilePath();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case TestPackage.FILE_OUTPUT_TEST_RESULT__IFILE_PATH:
+ setIFilePath((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case TestPackage.FILE_OUTPUT_TEST_RESULT__IFILE_PATH:
+ setIFilePath(IFILE_PATH_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case TestPackage.FILE_OUTPUT_TEST_RESULT__IFILE_PATH:
+ return IFILE_PATH_EDEFAULT == null ? iFilePath != null : !IFILE_PATH_EDEFAULT.equals(iFilePath);
+ }
+ 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(" (iFilePath: ");
+ result.append(iFilePath);
+ result.append(')');
+ return result.toString();
+ }
+
+} //FileOutputTestResultImpl
diff --git a/tests/org.eclipse.egf.core.test.model/src/test/impl/OutputTestResultImpl.java b/tests/org.eclipse.egf.core.test.model/src/test/impl/OutputTestResultImpl.java
new file mode 100644
index 0000000..218a3b8
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/src/test/impl/OutputTestResultImpl.java
@@ -0,0 +1,166 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import test.OutputTestResult;
+import test.TestPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Output Test Result</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link test.impl.OutputTestResultImpl#getText <em>Text</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class OutputTestResultImpl extends TestResultImpl implements OutputTestResult {
+ /**
+ * The default value of the '{@link #getText() <em>Text</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getText()
+ * @generated
+ * @ordered
+ */
+ protected static final String TEXT_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getText() <em>Text</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getText()
+ * @generated
+ * @ordered
+ */
+ protected String text = TEXT_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected OutputTestResultImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TestPackage.Literals.OUTPUT_TEST_RESULT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getText() {
+ return text;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setText(String newText) {
+ String oldText = text;
+ text = newText;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, TestPackage.OUTPUT_TEST_RESULT__TEXT, oldText, text));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case TestPackage.OUTPUT_TEST_RESULT__TEXT:
+ return getText();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case TestPackage.OUTPUT_TEST_RESULT__TEXT:
+ setText((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case TestPackage.OUTPUT_TEST_RESULT__TEXT:
+ setText(TEXT_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case TestPackage.OUTPUT_TEST_RESULT__TEXT:
+ return TEXT_EDEFAULT == null ? text != null : !TEXT_EDEFAULT.equals(text);
+ }
+ 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(" (text: ");
+ result.append(text);
+ result.append(')');
+ return result.toString();
+ }
+
+} //OutputTestResultImpl
diff --git a/tests/org.eclipse.egf.core.test.model/src/test/impl/TestCaseImpl.java b/tests/org.eclipse.egf.core.test.model/src/test/impl/TestCaseImpl.java
new file mode 100644
index 0000000..1830f7c
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/src/test/impl/TestCaseImpl.java
@@ -0,0 +1,248 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test.impl;
+
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import test.TestCase;
+import test.TestPackage;
+import test.TestResult;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Case</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link test.impl.TestCaseImpl#getName <em>Name</em>}</li>
+ * <li>{@link test.impl.TestCaseImpl#getResult <em>Result</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class TestCaseImpl extends EObjectImpl implements TestCase {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getResult() <em>Result</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getResult()
+ * @generated
+ * @ordered
+ */
+ protected TestResult result;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TestCaseImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TestPackage.Literals.TEST_CASE;
+ }
+
+ /**
+ * <!-- 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, TestPackage.TEST_CASE__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TestResult getResult() {
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetResult(TestResult newResult, NotificationChain msgs) {
+ TestResult oldResult = result;
+ result = newResult;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TestPackage.TEST_CASE__RESULT, oldResult, newResult);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setResult(TestResult newResult) {
+ if (newResult != result) {
+ NotificationChain msgs = null;
+ if (result != null)
+ msgs = ((InternalEObject)result).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - TestPackage.TEST_CASE__RESULT, null, msgs);
+ if (newResult != null)
+ msgs = ((InternalEObject)newResult).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - TestPackage.TEST_CASE__RESULT, null, msgs);
+ msgs = basicSetResult(newResult, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, TestPackage.TEST_CASE__RESULT, newResult, newResult));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case TestPackage.TEST_CASE__RESULT:
+ return basicSetResult(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case TestPackage.TEST_CASE__NAME:
+ return getName();
+ case TestPackage.TEST_CASE__RESULT:
+ return getResult();
+ }
+ 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 TestPackage.TEST_CASE__NAME:
+ setName((String)newValue);
+ return;
+ case TestPackage.TEST_CASE__RESULT:
+ setResult((TestResult)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case TestPackage.TEST_CASE__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case TestPackage.TEST_CASE__RESULT:
+ setResult((TestResult)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case TestPackage.TEST_CASE__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case TestPackage.TEST_CASE__RESULT:
+ return result != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: ");
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+} //TestCaseImpl
diff --git a/tests/org.eclipse.egf.core.test.model/src/test/impl/TestFactoryImpl.java b/tests/org.eclipse.egf.core.test.model/src/test/impl/TestFactoryImpl.java
new file mode 100644
index 0000000..decdccf
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/src/test/impl/TestFactoryImpl.java
@@ -0,0 +1,211 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import test.*;
+import test.ConsoleOutputTestResult;
+import test.ExceptionTestResult;
+import test.TestCase;
+import test.TestFactory;
+import test.TestPackage;
+import test.TestSuite;
+import test.ValidationErrorSeverity;
+import test.ValidationErrorTestResult;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TestFactoryImpl extends EFactoryImpl implements TestFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static TestFactory init() {
+ try {
+ TestFactory theTestFactory = (TestFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/egf/1.0.0/test");
+ if (theTestFactory != null) {
+ return theTestFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new TestFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TestFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case TestPackage.TEST_SUITE: return createTestSuite();
+ case TestPackage.EXCEPTION_TEST_RESULT: return createExceptionTestResult();
+ case TestPackage.VALIDATION_ERROR_TEST_RESULT: return createValidationErrorTestResult();
+ case TestPackage.CONSOLE_OUTPUT_TEST_RESULT: return createConsoleOutputTestResult();
+ case TestPackage.EGF_TEST_CASE: return createEGFTestCase();
+ case TestPackage.FILE_OUTPUT_TEST_RESULT: return createFileOutputTestResult();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object createFromString(EDataType eDataType, String initialValue) {
+ switch (eDataType.getClassifierID()) {
+ case TestPackage.VALIDATION_ERROR_SEVERITY:
+ return createValidationErrorSeverityFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String convertToString(EDataType eDataType, Object instanceValue) {
+ switch (eDataType.getClassifierID()) {
+ case TestPackage.VALIDATION_ERROR_SEVERITY:
+ return convertValidationErrorSeverityToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TestSuite createTestSuite() {
+ TestSuiteImpl testSuite = new TestSuiteImpl();
+ return testSuite;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ExceptionTestResult createExceptionTestResult() {
+ ExceptionTestResultImpl exceptionTestResult = new ExceptionTestResultImpl();
+ return exceptionTestResult;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ValidationErrorTestResult createValidationErrorTestResult() {
+ ValidationErrorTestResultImpl validationErrorTestResult = new ValidationErrorTestResultImpl();
+ return validationErrorTestResult;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ConsoleOutputTestResult createConsoleOutputTestResult() {
+ ConsoleOutputTestResultImpl consoleOutputTestResult = new ConsoleOutputTestResultImpl();
+ return consoleOutputTestResult;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EGFTestCase createEGFTestCase() {
+ EGFTestCaseImpl egfTestCase = new EGFTestCaseImpl();
+ return egfTestCase;
+ }
+
+/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FileOutputTestResult createFileOutputTestResult() {
+ FileOutputTestResultImpl fileOutputTestResult = new FileOutputTestResultImpl();
+ return fileOutputTestResult;
+ }
+
+/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ValidationErrorSeverity createValidationErrorSeverityFromString(EDataType eDataType, String initialValue) {
+ ValidationErrorSeverity result = ValidationErrorSeverity.get(initialValue);
+ if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertValidationErrorSeverityToString(EDataType eDataType, Object instanceValue) {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TestPackage getTestPackage() {
+ return (TestPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static TestPackage getPackage() {
+ return TestPackage.eINSTANCE;
+ }
+
+} //TestFactoryImpl
diff --git a/tests/org.eclipse.egf.core.test.model/src/test/impl/TestPackageImpl.java b/tests/org.eclipse.egf.core.test.model/src/test/impl/TestPackageImpl.java
new file mode 100644
index 0000000..575cc7b
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/src/test/impl/TestPackageImpl.java
@@ -0,0 +1,504 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test.impl;
+
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EGenericType;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import test.ConsoleOutputTestResult;
+import test.EGFTestCase;
+import test.ExceptionTestResult;
+import test.FileOutputTestResult;
+import test.OutputTestResult;
+import test.Test;
+import test.TestCase;
+import test.TestFactory;
+import test.TestPackage;
+import test.TestResult;
+import test.TestSuite;
+import test.ValidationErrorSeverity;
+import test.ValidationErrorTestResult;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TestPackageImpl extends EPackageImpl implements TestPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass testEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass testSuiteEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass testCaseEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass testResultEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass exceptionTestResultEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass validationErrorTestResultEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass consoleOutputTestResultEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass egfTestCaseEClass = null;
+
+/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass fileOutputTestResultEClass = null;
+
+/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass outputTestResultEClass = null;
+
+/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EEnum validationErrorSeverityEEnum = 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 test.TestPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private TestPackageImpl() {
+ super(eNS_URI, TestFactory.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 TestPackage#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 TestPackage init() {
+ if (isInited) return (TestPackage)EPackage.Registry.INSTANCE.getEPackage(TestPackage.eNS_URI);
+
+ // Obtain or create and register package
+ TestPackageImpl theTestPackage = (TestPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof TestPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new TestPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ FcorePackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theTestPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theTestPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theTestPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(TestPackage.eNS_URI, theTestPackage);
+ return theTestPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTest() {
+ return testEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getTest_Name() {
+ return (EAttribute)testEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTestSuite() {
+ return testSuiteEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getTestSuite_Tests() {
+ return (EReference)testSuiteEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTestCase() {
+ return testCaseEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getTestCase_Result() {
+ return (EReference)testCaseEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTestResult() {
+ return testResultEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getExceptionTestResult() {
+ return exceptionTestResultEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getExceptionTestResult_ExceptionClass() {
+ return (EAttribute)exceptionTestResultEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getExceptionTestResult_ExceptionMessage() {
+ return (EAttribute)exceptionTestResultEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getValidationErrorTestResult() {
+ return validationErrorTestResultEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getValidationErrorTestResult_Severity() {
+ return (EAttribute)validationErrorTestResultEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getConsoleOutputTestResult() {
+ return consoleOutputTestResultEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getEGFTestCase() {
+ return egfTestCaseEClass;
+ }
+
+/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getEGFTestCase_Activity() {
+ return (EReference)egfTestCaseEClass.getEStructuralFeatures().get(0);
+ }
+
+/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getFileOutputTestResult() {
+ return fileOutputTestResultEClass;
+ }
+
+/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getFileOutputTestResult_IFilePath() {
+ return (EAttribute)fileOutputTestResultEClass.getEStructuralFeatures().get(0);
+ }
+
+/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getOutputTestResult() {
+ return outputTestResultEClass;
+ }
+
+/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getOutputTestResult_Text() {
+ return (EAttribute)outputTestResultEClass.getEStructuralFeatures().get(0);
+ }
+
+/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EEnum getValidationErrorSeverity() {
+ return validationErrorSeverityEEnum;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TestFactory getTestFactory() {
+ return (TestFactory)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
+ testEClass = createEClass(TEST);
+ createEAttribute(testEClass, TEST__NAME);
+
+ testSuiteEClass = createEClass(TEST_SUITE);
+ createEReference(testSuiteEClass, TEST_SUITE__TESTS);
+
+ testCaseEClass = createEClass(TEST_CASE);
+ createEReference(testCaseEClass, TEST_CASE__RESULT);
+
+ testResultEClass = createEClass(TEST_RESULT);
+
+ exceptionTestResultEClass = createEClass(EXCEPTION_TEST_RESULT);
+ createEAttribute(exceptionTestResultEClass, EXCEPTION_TEST_RESULT__EXCEPTION_CLASS);
+ createEAttribute(exceptionTestResultEClass, EXCEPTION_TEST_RESULT__EXCEPTION_MESSAGE);
+
+ validationErrorTestResultEClass = createEClass(VALIDATION_ERROR_TEST_RESULT);
+ createEAttribute(validationErrorTestResultEClass, VALIDATION_ERROR_TEST_RESULT__SEVERITY);
+
+ consoleOutputTestResultEClass = createEClass(CONSOLE_OUTPUT_TEST_RESULT);
+
+ egfTestCaseEClass = createEClass(EGF_TEST_CASE);
+ createEReference(egfTestCaseEClass, EGF_TEST_CASE__ACTIVITY);
+
+ fileOutputTestResultEClass = createEClass(FILE_OUTPUT_TEST_RESULT);
+ createEAttribute(fileOutputTestResultEClass, FILE_OUTPUT_TEST_RESULT__IFILE_PATH);
+
+ outputTestResultEClass = createEClass(OUTPUT_TEST_RESULT);
+ createEAttribute(outputTestResultEClass, OUTPUT_TEST_RESULT__TEXT);
+
+ // Create enums
+ validationErrorSeverityEEnum = createEEnum(VALIDATION_ERROR_SEVERITY);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ FcorePackage theFcorePackage = (FcorePackage)EPackage.Registry.INSTANCE.getEPackage(FcorePackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ testSuiteEClass.getESuperTypes().add(this.getTest());
+ testCaseEClass.getESuperTypes().add(this.getTest());
+ exceptionTestResultEClass.getESuperTypes().add(this.getTestResult());
+ validationErrorTestResultEClass.getESuperTypes().add(this.getTestResult());
+ consoleOutputTestResultEClass.getESuperTypes().add(this.getOutputTestResult());
+ egfTestCaseEClass.getESuperTypes().add(this.getTestCase());
+ fileOutputTestResultEClass.getESuperTypes().add(this.getOutputTestResult());
+ outputTestResultEClass.getESuperTypes().add(this.getTestResult());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(testEClass, Test.class, "Test", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getTest_Name(), ecorePackage.getEString(), "name", null, 1, 1, Test.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(testSuiteEClass, TestSuite.class, "TestSuite", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getTestSuite_Tests(), this.getTest(), null, "tests", null, 0, -1, TestSuite.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(testCaseEClass, TestCase.class, "TestCase", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getTestCase_Result(), this.getTestResult(), null, "result", null, 0, 1, TestCase.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(testResultEClass, TestResult.class, "TestResult", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(exceptionTestResultEClass, ExceptionTestResult.class, "ExceptionTestResult", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ EGenericType g1 = createEGenericType(ecorePackage.getEJavaClass());
+ EGenericType g2 = createEGenericType();
+ g1.getETypeArguments().add(g2);
+ initEAttribute(getExceptionTestResult_ExceptionClass(), g1, "exceptionClass", null, 1, 1, ExceptionTestResult.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getExceptionTestResult_ExceptionMessage(), ecorePackage.getEString(), "exceptionMessage", null, 0, 1, ExceptionTestResult.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(validationErrorTestResultEClass, ValidationErrorTestResult.class, "ValidationErrorTestResult", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getValidationErrorTestResult_Severity(), this.getValidationErrorSeverity(), "severity", null, 1, 1, ValidationErrorTestResult.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(consoleOutputTestResultEClass, ConsoleOutputTestResult.class, "ConsoleOutputTestResult", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(egfTestCaseEClass, EGFTestCase.class, "EGFTestCase", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getEGFTestCase_Activity(), theFcorePackage.getActivity(), null, "activity", null, 1, 1, EGFTestCase.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(fileOutputTestResultEClass, FileOutputTestResult.class, "FileOutputTestResult", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getFileOutputTestResult_IFilePath(), ecorePackage.getEString(), "iFilePath", null, 1, 1, FileOutputTestResult.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(outputTestResultEClass, OutputTestResult.class, "OutputTestResult", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getOutputTestResult_Text(), ecorePackage.getEString(), "text", null, 1, 1, OutputTestResult.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Initialize enums and add enum literals
+ initEEnum(validationErrorSeverityEEnum, ValidationErrorSeverity.class, "ValidationErrorSeverity");
+ addEEnumLiteral(validationErrorSeverityEEnum, ValidationErrorSeverity.INFO);
+ addEEnumLiteral(validationErrorSeverityEEnum, ValidationErrorSeverity.WARNING);
+ addEEnumLiteral(validationErrorSeverityEEnum, ValidationErrorSeverity.ERROR);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //TestPackageImpl
diff --git a/tests/org.eclipse.egf.core.test.model/src/test/impl/TestResultImpl.java b/tests/org.eclipse.egf.core.test.model/src/test/impl/TestResultImpl.java
new file mode 100644
index 0000000..e0d819f
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/src/test/impl/TestResultImpl.java
@@ -0,0 +1,44 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import test.TestPackage;
+import test.TestResult;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Result</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class TestResultImpl extends EObjectImpl implements TestResult {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TestResultImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TestPackage.Literals.TEST_RESULT;
+ }
+
+} //TestResultImpl
diff --git a/tests/org.eclipse.egf.core.test.model/src/test/impl/TestSuiteImpl.java b/tests/org.eclipse.egf.core.test.model/src/test/impl/TestSuiteImpl.java
new file mode 100644
index 0000000..008dafd
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/src/test/impl/TestSuiteImpl.java
@@ -0,0 +1,222 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import test.Test;
+import test.TestPackage;
+import test.TestSuite;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Suite</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link test.impl.TestSuiteImpl#getName <em>Name</em>}</li>
+ * <li>{@link test.impl.TestSuiteImpl#getTests <em>Tests</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class TestSuiteImpl extends EObjectImpl implements TestSuite {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getTests() <em>Tests</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTests()
+ * @generated
+ * @ordered
+ */
+ protected EList<Test> tests;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TestSuiteImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TestPackage.Literals.TEST_SUITE;
+ }
+
+ /**
+ * <!-- 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, TestPackage.TEST_SUITE__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Test> getTests() {
+ if (tests == null) {
+ tests = new EObjectContainmentEList<Test>(Test.class, this, TestPackage.TEST_SUITE__TESTS);
+ }
+ return tests;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case TestPackage.TEST_SUITE__TESTS:
+ return ((InternalEList<?>)getTests()).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 TestPackage.TEST_SUITE__NAME:
+ return getName();
+ case TestPackage.TEST_SUITE__TESTS:
+ return getTests();
+ }
+ 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 TestPackage.TEST_SUITE__NAME:
+ setName((String)newValue);
+ return;
+ case TestPackage.TEST_SUITE__TESTS:
+ getTests().clear();
+ getTests().addAll((Collection<? extends Test>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case TestPackage.TEST_SUITE__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case TestPackage.TEST_SUITE__TESTS:
+ getTests().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case TestPackage.TEST_SUITE__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case TestPackage.TEST_SUITE__TESTS:
+ return tests != null && !tests.isEmpty();
+ }
+ 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();
+ }
+
+} //TestSuiteImpl
diff --git a/tests/org.eclipse.egf.core.test.model/src/test/impl/ValidationErrorTestResultImpl.java b/tests/org.eclipse.egf.core.test.model/src/test/impl/ValidationErrorTestResultImpl.java
new file mode 100644
index 0000000..18716e8
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/src/test/impl/ValidationErrorTestResultImpl.java
@@ -0,0 +1,165 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import test.TestPackage;
+import test.ValidationErrorSeverity;
+import test.ValidationErrorTestResult;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Validation Error Test Result</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link test.impl.ValidationErrorTestResultImpl#getSeverity <em>Severity</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ValidationErrorTestResultImpl extends TestResultImpl implements ValidationErrorTestResult {
+ /**
+ * The default value of the '{@link #getSeverity() <em>Severity</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSeverity()
+ * @generated
+ * @ordered
+ */
+ protected static final ValidationErrorSeverity SEVERITY_EDEFAULT = ValidationErrorSeverity.INFO;
+
+ /**
+ * The cached value of the '{@link #getSeverity() <em>Severity</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSeverity()
+ * @generated
+ * @ordered
+ */
+ protected ValidationErrorSeverity severity = SEVERITY_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ValidationErrorTestResultImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TestPackage.Literals.VALIDATION_ERROR_TEST_RESULT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ValidationErrorSeverity getSeverity() {
+ return severity;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSeverity(ValidationErrorSeverity newSeverity) {
+ ValidationErrorSeverity oldSeverity = severity;
+ severity = newSeverity == null ? SEVERITY_EDEFAULT : newSeverity;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, TestPackage.VALIDATION_ERROR_TEST_RESULT__SEVERITY, oldSeverity, severity));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case TestPackage.VALIDATION_ERROR_TEST_RESULT__SEVERITY:
+ return getSeverity();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case TestPackage.VALIDATION_ERROR_TEST_RESULT__SEVERITY:
+ setSeverity((ValidationErrorSeverity)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case TestPackage.VALIDATION_ERROR_TEST_RESULT__SEVERITY:
+ setSeverity(SEVERITY_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case TestPackage.VALIDATION_ERROR_TEST_RESULT__SEVERITY:
+ return severity != SEVERITY_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (severity: ");
+ result.append(severity);
+ result.append(')');
+ return result.toString();
+ }
+
+} //ValidationErrorTestResultImpl
diff --git a/tests/org.eclipse.egf.core.test.model/src/test/util/TestAdapterFactory.java b/tests/org.eclipse.egf.core.test.model/src/test/util/TestAdapterFactory.java
new file mode 100644
index 0000000..4cc6bad
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/src/test/util/TestAdapterFactory.java
@@ -0,0 +1,292 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test.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 test.*;
+import test.ConsoleOutputTestResult;
+import test.ExceptionTestResult;
+import test.Test;
+import test.TestCase;
+import test.TestPackage;
+import test.TestResult;
+import test.TestSuite;
+import test.ValidationErrorTestResult;
+
+/**
+ * <!-- 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 test.TestPackage
+ * @generated
+ */
+public class TestAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static TestPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TestAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = TestPackage.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 TestSwitch<Adapter> modelSwitch =
+ new TestSwitch<Adapter>() {
+ @Override
+ public Adapter caseTest(Test object) {
+ return createTestAdapter();
+ }
+ @Override
+ public Adapter caseTestSuite(TestSuite object) {
+ return createTestSuiteAdapter();
+ }
+ @Override
+ public Adapter caseTestCase(TestCase object) {
+ return createTestCaseAdapter();
+ }
+ @Override
+ public Adapter caseTestResult(TestResult object) {
+ return createTestResultAdapter();
+ }
+ @Override
+ public Adapter caseExceptionTestResult(ExceptionTestResult object) {
+ return createExceptionTestResultAdapter();
+ }
+ @Override
+ public Adapter caseValidationErrorTestResult(ValidationErrorTestResult object) {
+ return createValidationErrorTestResultAdapter();
+ }
+ @Override
+ public Adapter caseConsoleOutputTestResult(ConsoleOutputTestResult object) {
+ return createConsoleOutputTestResultAdapter();
+ }
+ @Override
+ public Adapter caseEGFTestCase(EGFTestCase object) {
+ return createEGFTestCaseAdapter();
+ }
+ @Override
+ public Adapter caseFileOutputTestResult(FileOutputTestResult object) {
+ return createFileOutputTestResultAdapter();
+ }
+ @Override
+ public Adapter caseOutputTestResult(OutputTestResult object) {
+ return createOutputTestResultAdapter();
+ }
+ @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 test.Test <em>Test</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 test.Test
+ * @generated
+ */
+ public Adapter createTestAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link test.TestSuite <em>Suite</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 test.TestSuite
+ * @generated
+ */
+ public Adapter createTestSuiteAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link test.TestCase <em>Case</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 test.TestCase
+ * @generated
+ */
+ public Adapter createTestCaseAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link test.TestResult <em>Result</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 test.TestResult
+ * @generated
+ */
+ public Adapter createTestResultAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link test.ExceptionTestResult <em>Exception Test Result</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 test.ExceptionTestResult
+ * @generated
+ */
+ public Adapter createExceptionTestResultAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link test.ValidationErrorTestResult <em>Validation Error Test Result</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 test.ValidationErrorTestResult
+ * @generated
+ */
+ public Adapter createValidationErrorTestResultAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link test.ConsoleOutputTestResult <em>Console Output Test Result</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 test.ConsoleOutputTestResult
+ * @generated
+ */
+ public Adapter createConsoleOutputTestResultAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link test.EGFTestCase <em>EGF Test Case</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 test.EGFTestCase
+ * @generated
+ */
+ public Adapter createEGFTestCaseAdapter() {
+ return null;
+ }
+
+/**
+ * Creates a new adapter for an object of class '{@link test.FileOutputTestResult <em>File Output Test Result</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 test.FileOutputTestResult
+ * @generated
+ */
+ public Adapter createFileOutputTestResultAdapter() {
+ return null;
+ }
+
+/**
+ * Creates a new adapter for an object of class '{@link test.OutputTestResult <em>Output Test Result</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 test.OutputTestResult
+ * @generated
+ */
+ public Adapter createOutputTestResultAdapter() {
+ 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;
+ }
+
+} //TestAdapterFactory
diff --git a/tests/org.eclipse.egf.core.test.model/src/test/util/TestSwitch.java b/tests/org.eclipse.egf.core.test.model/src/test/util/TestSwitch.java
new file mode 100644
index 0000000..2d65178
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.model/src/test/util/TestSwitch.java
@@ -0,0 +1,338 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package test.util;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import test.*;
+import test.ConsoleOutputTestResult;
+import test.ExceptionTestResult;
+import test.Test;
+import test.TestCase;
+import test.TestPackage;
+import test.TestResult;
+import test.TestSuite;
+import test.ValidationErrorTestResult;
+
+/**
+ * <!-- 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 test.TestPackage
+ * @generated
+ */
+public class TestSwitch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static TestPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TestSwitch() {
+ if (modelPackage == null) {
+ modelPackage = TestPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * 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
+ */
+ public T doSwitch(EObject theEObject) {
+ return doSwitch(theEObject.eClass(), theEObject);
+ }
+
+ /**
+ * 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
+ */
+ protected T doSwitch(EClass theEClass, EObject theEObject) {
+ if (theEClass.eContainer() == modelPackage) {
+ return doSwitch(theEClass.getClassifierID(), theEObject);
+ }
+ else {
+ List<EClass> eSuperTypes = theEClass.getESuperTypes();
+ return
+ eSuperTypes.isEmpty() ?
+ defaultCase(theEObject) :
+ doSwitch(eSuperTypes.get(0), theEObject);
+ }
+ }
+
+ /**
+ * 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
+ */
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case TestPackage.TEST: {
+ Test test = (Test)theEObject;
+ T result = caseTest(test);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case TestPackage.TEST_SUITE: {
+ TestSuite testSuite = (TestSuite)theEObject;
+ T result = caseTestSuite(testSuite);
+ if (result == null) result = caseTest(testSuite);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case TestPackage.TEST_CASE: {
+ TestCase testCase = (TestCase)theEObject;
+ T result = caseTestCase(testCase);
+ if (result == null) result = caseTest(testCase);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case TestPackage.TEST_RESULT: {
+ TestResult testResult = (TestResult)theEObject;
+ T result = caseTestResult(testResult);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case TestPackage.EXCEPTION_TEST_RESULT: {
+ ExceptionTestResult exceptionTestResult = (ExceptionTestResult)theEObject;
+ T result = caseExceptionTestResult(exceptionTestResult);
+ if (result == null) result = caseTestResult(exceptionTestResult);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case TestPackage.VALIDATION_ERROR_TEST_RESULT: {
+ ValidationErrorTestResult validationErrorTestResult = (ValidationErrorTestResult)theEObject;
+ T result = caseValidationErrorTestResult(validationErrorTestResult);
+ if (result == null) result = caseTestResult(validationErrorTestResult);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case TestPackage.CONSOLE_OUTPUT_TEST_RESULT: {
+ ConsoleOutputTestResult consoleOutputTestResult = (ConsoleOutputTestResult)theEObject;
+ T result = caseConsoleOutputTestResult(consoleOutputTestResult);
+ if (result == null) result = caseOutputTestResult(consoleOutputTestResult);
+ if (result == null) result = caseTestResult(consoleOutputTestResult);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case TestPackage.EGF_TEST_CASE: {
+ EGFTestCase egfTestCase = (EGFTestCase)theEObject;
+ T result = caseEGFTestCase(egfTestCase);
+ if (result == null) result = caseTestCase(egfTestCase);
+ if (result == null) result = caseTest(egfTestCase);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case TestPackage.FILE_OUTPUT_TEST_RESULT: {
+ FileOutputTestResult fileOutputTestResult = (FileOutputTestResult)theEObject;
+ T result = caseFileOutputTestResult(fileOutputTestResult);
+ if (result == null) result = caseOutputTestResult(fileOutputTestResult);
+ if (result == null) result = caseTestResult(fileOutputTestResult);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case TestPackage.OUTPUT_TEST_RESULT: {
+ OutputTestResult outputTestResult = (OutputTestResult)theEObject;
+ T result = caseOutputTestResult(outputTestResult);
+ if (result == null) result = caseTestResult(outputTestResult);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Test</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>Test</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTest(Test object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Suite</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>Suite</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTestSuite(TestSuite object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Case</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>Case</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTestCase(TestCase object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Result</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>Result</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTestResult(TestResult object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Exception Test Result</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>Exception Test Result</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseExceptionTestResult(ExceptionTestResult object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Validation Error Test Result</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>Validation Error Test Result</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseValidationErrorTestResult(ValidationErrorTestResult object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Console Output Test Result</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>Console Output Test Result</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseConsoleOutputTestResult(ConsoleOutputTestResult object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EGF Test Case</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>EGF Test Case</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseEGFTestCase(EGFTestCase object) {
+ return null;
+ }
+
+/**
+ * Returns the result of interpreting the object as an instance of '<em>File Output Test Result</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>File Output Test Result</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseFileOutputTestResult(FileOutputTestResult object) {
+ return null;
+ }
+
+/**
+ * Returns the result of interpreting the object as an instance of '<em>Output Test Result</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>Output Test Result</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseOutputTestResult(OutputTestResult 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
+ */
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //TestSwitch
diff --git a/tests/org.eclipse.egf.core.test.pattern/.classpath b/tests/org.eclipse.egf.core.test.pattern/.classpath
new file mode 100644
index 0000000..1445275
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/.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/tests/org.eclipse.egf.core.test.pattern/.project b/tests/org.eclipse.egf.core.test.pattern/.project
new file mode 100644
index 0000000..df56db4
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.core.test.pattern</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/tests/org.eclipse.egf.core.test.pattern/.settings/org.eclipse.core.resources.prefs b/tests/org.eclipse.egf.core.test.pattern/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..8005022
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Wed Feb 17 16:09:47 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/tests/org.eclipse.egf.core.test.pattern/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.egf.core.test.pattern/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..2190397
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Thu Feb 25 12:06:40 CET 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/tests/org.eclipse.egf.core.test.pattern/META-INF/MANIFEST.MF b/tests/org.eclipse.egf.core.test.pattern/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..b1992e5
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/META-INF/MANIFEST.MF
@@ -0,0 +1,24 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.core.test.pattern;singleton:=true
+Bundle-Version: 0.2.2.qualifier
+Bundle-ClassPath: .
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle:
+ org.eclipse.core.runtime,
+ org.eclipse.egf.pattern;visibility:=reexport,
+ org.eclipse.egf.pattern.ftask;visibility:=reexport,
+ org.eclipse.egf.core.producer,
+ org.eclipse.egf.model.ftask
+Bundle-ActivationPolicy: lazy
+Export-Package: callback_1.strategy,
+ inheritance_1,
+ inheritance_2,
+ inheritance_2_called,
+ inheritance_3,
+ inheritance_4.base,
+ inheritance_4.strategy,
+ org.eclipse.egf.core.test.pattern
diff --git a/tests/org.eclipse.egf.core.test.pattern/about.html b/tests/org.eclipse.egf.core.test.pattern/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/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/tests/org.eclipse.egf.core.test.pattern/build.properties b/tests/org.eclipse.egf.core.test.pattern/build.properties
new file mode 100644
index 0000000..d0c90db
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/build.properties
@@ -0,0 +1,28 @@
+##
+# 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
+##
+
+source.. = generated/,\
+ src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ templates/,\
+ fc/,\
+ test/,\
+ plugin.properties,\
+ about.html,\
+ plugin.xml,\
+ .settings/,\
+ bin/,\
+ result/,\
+ .svn/,\
+ model/
+src.includes = about.html
diff --git a/tests/org.eclipse.egf.core.test.pattern/fc/callback_1.fcore b/tests/org.eclipse.egf.core.test.pattern/fc/callback_1.fcore
new file mode 100644
index 0000000..06c6571
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/fc/callback_1.fcore
@@ -0,0 +1,86 @@
+<?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="_KylW0SLHEd-n0OdkUfG5hQ"
+ name="callback_1">
+ <viewpointContainer xmi:id="_gY70MCLHEd-n0OdkUfG5hQ">
+ <viewpoints xmi:type="pattern:PatternViewpoint" xmi:id="_gsIdACLHEd-n0OdkUfG5hQ">
+ <libraries xmi:id="_hVbRoCLHEd-n0OdkUfG5hQ" name="callback_1.strategy">
+ <elements xmi:type="pattern:Pattern" xmi:id="_r2MhsCLHEd-n0OdkUfG5hQ" name="PackagePattern"
+ headerMethod="#_r2MhsSLHEd-n0OdkUfG5hQ" footerMethod="#_r2MhtCLHEd-n0OdkUfG5hQ"
+ initMethod="#_r2MhsiLHEd-n0OdkUfG5hQ">
+ <methods xmi:id="_r2MhsSLHEd-n0OdkUfG5hQ" name="header" patternFilePath="templates/pattern._r2MhsCLHEd-n0OdkUfG5hQ/method._r2MhsSLHEd-n0OdkUfG5hQ.pt"/>
+ <methods xmi:id="_r2MhsiLHEd-n0OdkUfG5hQ" name="init" patternFilePath="templates/pattern._r2MhsCLHEd-n0OdkUfG5hQ/method._r2MhsiLHEd-n0OdkUfG5hQ.pt"/>
+ <methods xmi:id="_r2MhsyLHEd-n0OdkUfG5hQ" name="body" patternFilePath="templates/pattern._r2MhsCLHEd-n0OdkUfG5hQ/method._r2MhsyLHEd-n0OdkUfG5hQ.pt"/>
+ <methods xmi:id="_r2MhtCLHEd-n0OdkUfG5hQ" name="footer" patternFilePath="templates/pattern._r2MhsCLHEd-n0OdkUfG5hQ/method._r2MhtCLHEd-n0OdkUfG5hQ.pt"/>
+ <methods xmi:id="_5_xrgCLHEd-n0OdkUfG5hQ" name="before" patternFilePath="templates/pattern._r2MhsCLHEd-n0OdkUfG5hQ/method._5_xrgCLHEd-n0OdkUfG5hQ.pt"/>
+ <methods xmi:id="_6rI8sCLHEd-n0OdkUfG5hQ" name="after" patternFilePath="templates/pattern._r2MhsCLHEd-n0OdkUfG5hQ/method._6rI8sCLHEd-n0OdkUfG5hQ.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_7Nc_kCLHEd-n0OdkUfG5hQ"
+ called="#_5_xrgCLHEd-n0OdkUfG5hQ"/>
+ <orchestration xmi:type="pattern:BackCall" xmi:id="_8gmpgCLHEd-n0OdkUfG5hQ"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_7gw9ICLHEd-n0OdkUfG5hQ"
+ called="#_6rI8sCLHEd-n0OdkUfG5hQ"/>
+ <parameters xmi:id="_2FGlsCLHEd-n0OdkUfG5hQ" name="parameter" type="http://www.eclipse.org/emf/2002/Ecore#//EPackage"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_r2MhtiLHEd-n0OdkUfG5hQ"
+ name="JET"/>
+ </elements>
+ <elements xmi:type="pattern:Pattern" xmi:id="_sqZl0CLHEd-n0OdkUfG5hQ" name="ClassPattern"
+ headerMethod="#_sqZl0SLHEd-n0OdkUfG5hQ" footerMethod="#_sqZl1CLHEd-n0OdkUfG5hQ"
+ initMethod="#_sqZl0iLHEd-n0OdkUfG5hQ">
+ <methods xmi:id="_sqZl0SLHEd-n0OdkUfG5hQ" name="header" patternFilePath="templates/pattern._sqZl0CLHEd-n0OdkUfG5hQ/method._sqZl0SLHEd-n0OdkUfG5hQ.pt"/>
+ <methods xmi:id="_sqZl0iLHEd-n0OdkUfG5hQ" name="init" patternFilePath="templates/pattern._sqZl0CLHEd-n0OdkUfG5hQ/method._sqZl0iLHEd-n0OdkUfG5hQ.pt"/>
+ <methods xmi:id="_sqZl0yLHEd-n0OdkUfG5hQ" name="body" patternFilePath="templates/pattern._sqZl0CLHEd-n0OdkUfG5hQ/method._sqZl0yLHEd-n0OdkUfG5hQ.pt"/>
+ <methods xmi:id="_sqZl1CLHEd-n0OdkUfG5hQ" name="footer" patternFilePath="templates/pattern._sqZl0CLHEd-n0OdkUfG5hQ/method._sqZl1CLHEd-n0OdkUfG5hQ.pt"/>
+ <methods xmi:id="_-HUvsCLHEd-n0OdkUfG5hQ" name="before" patternFilePath="templates/pattern._sqZl0CLHEd-n0OdkUfG5hQ/method._-HUvsCLHEd-n0OdkUfG5hQ.pt"/>
+ <methods xmi:id="_-4hjICLHEd-n0OdkUfG5hQ" name="after" patternFilePath="templates/pattern._sqZl0CLHEd-n0OdkUfG5hQ/method._-4hjICLHEd-n0OdkUfG5hQ.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="__QiagCLHEd-n0OdkUfG5hQ"
+ called="#_-HUvsCLHEd-n0OdkUfG5hQ"/>
+ <orchestration xmi:type="pattern:BackCall" xmi:id="_0doRkCLHEd-n0OdkUfG5hQ"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="__5XVECLHEd-n0OdkUfG5hQ"
+ called="#_-4hjICLHEd-n0OdkUfG5hQ"/>
+ <parameters xmi:id="_zwL8wCLHEd-n0OdkUfG5hQ" name="parameter" type="http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_sqZl1iLHEd-n0OdkUfG5hQ"
+ name="JET"/>
+ </elements>
+ <elements xmi:type="pattern:Pattern" xmi:id="_tCjnICLHEd-n0OdkUfG5hQ" name="AttributePattern"
+ headerMethod="#_tCjnISLHEd-n0OdkUfG5hQ" footerMethod="#_tCjnJCLHEd-n0OdkUfG5hQ"
+ initMethod="#_tCjnIiLHEd-n0OdkUfG5hQ">
+ <methods xmi:id="_tCjnISLHEd-n0OdkUfG5hQ" name="header" patternFilePath="templates/pattern._tCjnICLHEd-n0OdkUfG5hQ/method._tCjnISLHEd-n0OdkUfG5hQ.pt"/>
+ <methods xmi:id="_tCjnIiLHEd-n0OdkUfG5hQ" name="init" patternFilePath="templates/pattern._tCjnICLHEd-n0OdkUfG5hQ/method._tCjnIiLHEd-n0OdkUfG5hQ.pt"/>
+ <methods xmi:id="_tCjnIyLHEd-n0OdkUfG5hQ" name="body" patternFilePath="templates/pattern._tCjnICLHEd-n0OdkUfG5hQ/method._tCjnIyLHEd-n0OdkUfG5hQ.pt"/>
+ <methods xmi:id="_tCjnJCLHEd-n0OdkUfG5hQ" name="footer" patternFilePath="templates/pattern._tCjnICLHEd-n0OdkUfG5hQ/method._tCjnJCLHEd-n0OdkUfG5hQ.pt"/>
+ <methods xmi:id="_C7AhICLIEd-n0OdkUfG5hQ" name="after" patternFilePath="templates/pattern._tCjnICLHEd-n0OdkUfG5hQ/method._C7AhICLIEd-n0OdkUfG5hQ.pt"/>
+ <methods xmi:id="_DkaDcCLIEd-n0OdkUfG5hQ" name="before" patternFilePath="templates/pattern._tCjnICLHEd-n0OdkUfG5hQ/method._DkaDcCLIEd-n0OdkUfG5hQ.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_MfSTwCLIEd-n0OdkUfG5hQ"
+ called="#_tCjnIyLHEd-n0OdkUfG5hQ"/>
+ <parameters xmi:id="_w51asCLHEd-n0OdkUfG5hQ" name="parameter" type="http://www.eclipse.org/emf/2002/Ecore#//EAttribute"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_tCjnJiLHEd-n0OdkUfG5hQ"
+ name="JET"/>
+ </elements>
+ </libraries>
+ <libraries xmi:id="_RJfl0CLYEd-MKb12XlsvJw" name="ddd"/>
+ </viewpoints>
+ <viewpoints xmi:type="domain:DomainViewpoint" xmi:id="_kUGpQCLHEd-n0OdkUfG5hQ">
+ <domains xmi:type="domain:DomainURI" xmi:id="_mX2psCLHEd-n0OdkUfG5hQ" uri="platform:/plugin/org.eclipse.egf.core.test.pattern/model/mypackage.ecore"/>
+ </viewpoints>
+ </viewpointContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_orF3oCLHEd-n0OdkUfG5hQ">
+ <invocations xmi:id="_piQJICLHEd-n0OdkUfG5hQ" invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_8FZ3aof6eEd64XYPo3s6sPg">
+ <invocationContractContainer xmi:id="_rCoWwCLHEd-n0OdkUfG5hQ">
+ <invocationContracts xmi:id="_IHBdkCLJEd-n0OdkUfG5hQ" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_nz1HkSCaEd-Sse0r9LJWbA">
+ <type xmi:type="pattern:TypePatternList" xmi:id="_Ni2y8CUgEd-pNvuiR8OoHQ"
+ elements="#_hVbRoCLHEd-n0OdkUfG5hQ"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_Qh0foCLJEd-n0OdkUfG5hQ" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_DgB2IP6fEd64XaYPo3s6sPg">
+ <type xmi:type="domain:TypeDomainURI" xmi:id="_R4Yp8CLJEd-n0OdkUfG5hQ" domain="#_mX2psCLHEd-n0OdkUfG5hQ"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_VOV5ICLJEd-n0OdkUfG5hQ" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_L6JSwAHAEd-4faJMEplCjxw">
+ <type xmi:type="pattern:TypePatternExecutionReporter" xmi:id="_W-FYcCLJEd-n0OdkUfG5hQ"
+ value="org.eclipse.egf.core.test.pattern.JunitConsoleReporter"/>
+ </invocationContracts>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+</fcore:FactoryComponent>
diff --git a/tests/org.eclipse.egf.core.test.pattern/fc/inheritance_1.fcore b/tests/org.eclipse.egf.core.test.pattern/fc/inheritance_1.fcore
new file mode 100644
index 0000000..10b4a70
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/fc/inheritance_1.fcore
@@ -0,0 +1,62 @@
+<?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="_XB1QoBshEd-L7sk1dmRWLg"
+ description=" " name="inheritance_1">
+ <viewpointContainer xmi:id="_XvuRYBshEd-L7sk1dmRWLg">
+ <viewpoints xmi:type="pattern:PatternViewpoint" xmi:id="_YH3roBshEd-L7sk1dmRWLg">
+ <libraries xmi:id="_YWeIUBshEd-L7sk1dmRWLg" name="inheritance_1">
+ <elements xmi:type="pattern:Pattern" xmi:id="_Ynm7oBshEd-L7sk1dmRWLg" name="parent"
+ headerMethod="#_Ynm7oRshEd-L7sk1dmRWLg" footerMethod="#_Ynm7pBshEd-L7sk1dmRWLg"
+ initMethod="#_Ynm7ohshEd-L7sk1dmRWLg">
+ <methods xmi:id="_Ynm7oRshEd-L7sk1dmRWLg" name="header" patternFilePath="templates/pattern._Ynm7oBshEd-L7sk1dmRWLg/method._Ynm7oRshEd-L7sk1dmRWLg.pt"/>
+ <methods xmi:id="_Ynm7ohshEd-L7sk1dmRWLg" name="init" patternFilePath="templates/pattern._Ynm7oBshEd-L7sk1dmRWLg/method._Ynm7ohshEd-L7sk1dmRWLg.pt"/>
+ <methods xmi:id="_Ynm7oxshEd-L7sk1dmRWLg" name="body" patternFilePath="templates/pattern._Ynm7oBshEd-L7sk1dmRWLg/method._Ynm7oxshEd-L7sk1dmRWLg.pt"/>
+ <methods xmi:id="_Ynm7pBshEd-L7sk1dmRWLg" name="footer" patternFilePath="templates/pattern._Ynm7oBshEd-L7sk1dmRWLg/method._Ynm7pBshEd-L7sk1dmRWLg.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_eOH4MBshEd-L7sk1dmRWLg"
+ called="#_Ynm7oxshEd-L7sk1dmRWLg"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_Ynm7phshEd-L7sk1dmRWLg"
+ name="JET"/>
+ </elements>
+ <elements xmi:type="pattern:Pattern" xmi:id="_ZLg58BshEd-L7sk1dmRWLg" name="child"
+ headerMethod="#_ZLg58RshEd-L7sk1dmRWLg" footerMethod="#_ZLg59BshEd-L7sk1dmRWLg"
+ superPattern="#_Ynm7oBshEd-L7sk1dmRWLg" initMethod="#_ZLg58hshEd-L7sk1dmRWLg">
+ <methods xmi:id="_ZLg58RshEd-L7sk1dmRWLg" name="header" patternFilePath="templates/pattern._ZLg58BshEd-L7sk1dmRWLg/method._ZLg58RshEd-L7sk1dmRWLg.pt"/>
+ <methods xmi:id="_ZLg58hshEd-L7sk1dmRWLg" name="init" patternFilePath="templates/pattern._ZLg58BshEd-L7sk1dmRWLg/method._ZLg58hshEd-L7sk1dmRWLg.pt"/>
+ <methods xmi:id="_ZLg58xshEd-L7sk1dmRWLg" name="body" patternFilePath="templates/pattern._ZLg58BshEd-L7sk1dmRWLg/method._ZLg58xshEd-L7sk1dmRWLg.pt"/>
+ <methods xmi:id="_ZLg59BshEd-L7sk1dmRWLg" name="footer" patternFilePath="templates/pattern._ZLg58BshEd-L7sk1dmRWLg/method._ZLg59BshEd-L7sk1dmRWLg.pt"/>
+ <orchestration xmi:type="pattern:SuperCall" xmi:id="_ZLg59RshEd-L7sk1dmRWLg"/>
+ <parameters xmi:id="_dqAwABuZEd-L7sk1dmRWLg" name="parameter" type="http://www.eclipse.org/emf/2002/Ecore#//EClass">
+ <query xmi:type="pattern:BasicQuery" xmi:id="_eaE7ABuZEd-L7sk1dmRWLg"
+ extensionId="org.eclipse.egf.pattern.basic.query"/>
+ </parameters>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_ZLg59hshEd-L7sk1dmRWLg"
+ name="JET"/>
+ </elements>
+ </libraries>
+ </viewpoints>
+ <viewpoints xmi:type="domain:DomainViewpoint" xmi:id="_AJ9EgBsiEd-L7sk1dmRWLg">
+ <domains xmi:type="domain:DomainURI" xmi:id="_CQ9NQBsiEd-L7sk1dmRWLg" uri="platform:/plugin/org.eclipse.emf.codegen.ecore/model/GenModel.ecore"/>
+ </viewpoints>
+ </viewpointContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_uWUq0BshEd-L7sk1dmRWLg">
+ <invocations xmi:id="_u57uMBshEd-L7sk1dmRWLg" invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.pattern.ftask/Default_pattern_strategy_task.fcore#_8FZ3of6eeEd64XYPo3s6sPg">
+ <invocationContractContainer xmi:id="_xMHMMBshEd-L7sk1dmRWLg">
+ <invocationContracts xmi:id="_xbd20BshEd-L7sk1dmRWLg" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Default_pattern_strategy_task.fcore#_DgB2IP6fEd64XYPo3s6esPg">
+ <type xmi:type="domain:TypeDomainURI" xmi:id="_8f2xUBshEd-L7sk1dmRWLg" description=""
+ domain="#_CQ9NQBsiEd-L7sk1dmRWLg"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_xqETgBshEd-L7sk1dmRWLg" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Default_pattern_strategy_task.fcore#_-GBrkP6eEd64XeYPo3s6sPg">
+ <type xmi:type="pattern:TypePatternList" xmi:id="_EdPDkCHxEd-V4KH4GeEy-w"
+ elements="#_ZLg58BshEd-L7sk1dmRWLg"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_vnBb4CUgEd-pNvuiR8OoHQ" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Default_pattern_strategy_task.fcore#_L6JSwAHAEd-4fJMEpleCjxw">
+ <type xmi:type="pattern:TypePatternExecutionReporter" xmi:id="_wyfwgCUgEd-pNvuiR8OoHQ"
+ value="org.eclipse.egf.core.test.pattern.JunitConsoleReporter"/>
+ </invocationContracts>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+</fcore:FactoryComponent>
diff --git a/tests/org.eclipse.egf.core.test.pattern/fc/inheritance_2.fcore b/tests/org.eclipse.egf.core.test.pattern/fc/inheritance_2.fcore
new file mode 100644
index 0000000..8d2759b
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/fc/inheritance_2.fcore
@@ -0,0 +1,91 @@
+<?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="_mTlnECH-Ed-CStHKuCL0dg"
+ description=" " name="inheritance_2">
+ <viewpointContainer xmi:id="_nfk5ECH-Ed-CStHKuCL0dg">
+ <viewpoints xmi:type="pattern:PatternViewpoint" xmi:id="_nfk5ESH-Ed-CStHKuCL0dg">
+ <libraries xmi:id="_nfk5EiH-Ed-CStHKuCL0dg" name="inheritance_2">
+ <elements xmi:type="pattern:Pattern" xmi:id="_nfk5EyH-Ed-CStHKuCL0dg" name="parent"
+ headerMethod="#_nfk5FCH-Ed-CStHKuCL0dg" footerMethod="#_nfk5FyH-Ed-CStHKuCL0dg"
+ initMethod="#_nfk5FSH-Ed-CStHKuCL0dg">
+ <methods xmi:id="_nfk5FCH-Ed-CStHKuCL0dg" name="header" patternFilePath="templates/pattern._nfk5EyH-Ed-CStHKuCL0dg/method._R32xcSH4Ed-TGv7R8gz0bQ.pt"/>
+ <methods xmi:id="_nfk5FSH-Ed-CStHKuCL0dg" name="init" patternFilePath="templates/pattern._nfk5EyH-Ed-CStHKuCL0dg/method._R32xciH4Ed-TGv7R8gz0bQ.pt"/>
+ <methods xmi:id="_nfk5FiH-Ed-CStHKuCL0dg" name="body" patternFilePath="templates/pattern._nfk5EyH-Ed-CStHKuCL0dg/method._R32xcyH4Ed-TGv7R8gz0bQ.pt"/>
+ <methods xmi:id="_nfk5FyH-Ed-CStHKuCL0dg" name="footer" patternFilePath="templates/pattern._nfk5EyH-Ed-CStHKuCL0dg/method._R32xdCH4Ed-TGv7R8gz0bQ.pt"/>
+ <methods xmi:id="_25qJACIgEd-puPzASIa3Rw" name="setVariables" patternFilePath="templates/pattern._nfk5EyH-Ed-CStHKuCL0dg/method._25qJACIgEd-puPzASIa3Rw.pt"/>
+ <methods xmi:id="_Ky8yMCIiEd-puPzASIa3Rw" name="putVariablesInContesxt"
+ patternFilePath="templates/pattern._nfk5EyH-Ed-CStHKuCL0dg/method._Ky8yMCIiEd-puPzASIa3Rw.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_PbLhkCIiEd-puPzASIa3Rw"
+ called="#_25qJACIgEd-puPzASIa3Rw"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_nfk5GCH-Ed-CStHKuCL0dg"
+ called="#_nfk5FiH-Ed-CStHKuCL0dg"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_PlYmcCIiEd-puPzASIa3Rw"
+ called="#_Ky8yMCIiEd-puPzASIa3Rw"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_nfk5GSH-Ed-CStHKuCL0dg"
+ name="JET"/>
+ <variables xmi:id="_fC42QCIiEd-puPzASIa3Rw" name="targetFile" type="java.lang.String"/>
+ </elements>
+ <elements xmi:type="pattern:Pattern" xmi:id="_nfk5GiH-Ed-CStHKuCL0dg" name="child"
+ headerMethod="#_nfk5GyH-Ed-CStHKuCL0dg" footerMethod="#_nfk5HyH-Ed-CStHKuCL0dg"
+ superPattern="#_nfk5EyH-Ed-CStHKuCL0dg" initMethod="#_nfk5HCH-Ed-CStHKuCL0dg">
+ <methods xmi:id="_nfk5GyH-Ed-CStHKuCL0dg" name="header" patternFilePath="templates/pattern._nfk5GiH-Ed-CStHKuCL0dg/method._SSFPUSH4Ed-TGv7R8gz0bQ.pt"/>
+ <methods xmi:id="_nfk5HCH-Ed-CStHKuCL0dg" name="init" patternFilePath="templates/pattern._nfk5GiH-Ed-CStHKuCL0dg/method._SSFPUiH4Ed-TGv7R8gz0bQ.pt"/>
+ <methods xmi:id="_nfk5HiH-Ed-CStHKuCL0dg" name="body" patternFilePath="templates/pattern._nfk5GiH-Ed-CStHKuCL0dg/method._SSFPUyH4Ed-TGv7R8gz0bQ.pt"/>
+ <methods xmi:id="_nfk5HyH-Ed-CStHKuCL0dg" name="footer" patternFilePath="templates/pattern._nfk5GiH-Ed-CStHKuCL0dg/method._SSFPVCH4Ed-TGv7R8gz0bQ.pt"/>
+ <methods xmi:id="_nfk5ICH-Ed-CStHKuCL0dg" name="setToInject" patternFilePath="templates/pattern._nfk5GiH-Ed-CStHKuCL0dg/method.__i-PYCH4Ed-TGv7R8gz0bQ.pt"/>
+ <methods xmi:id="_an3ccCIiEd-puPzASIa3Rw" name="setVariables" patternFilePath="templates/pattern._nfk5GiH-Ed-CStHKuCL0dg/method._an3ccCIiEd-puPzASIa3Rw.pt"/>
+ <orchestration xmi:type="pattern:SuperCall" xmi:id="_nfk5IyH-Ed-CStHKuCL0dg"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_nfk5JCH-Ed-CStHKuCL0dg"
+ called="#_nfk5ICH-Ed-CStHKuCL0dg"/>
+ <orchestration xmi:type="pattern:PatternInjectedCall" xmi:id="_nfk5JSH-Ed-CStHKuCL0dg"
+ called="#_nfk5LCH-Ed-CStHKuCL0dg" context="#_nfk5KSH-Ed-CStHKuCL0dg"/>
+ <parameters xmi:id="_nfk5JyH-Ed-CStHKuCL0dg" name="parameter" type="http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_nfk5KCH-Ed-CStHKuCL0dg"
+ name="JET"/>
+ <variables xmi:id="_nfk5KSH-Ed-CStHKuCL0dg" name="toInject" type="http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+ </elements>
+ </libraries>
+ <libraries xmi:id="_nfk5KyH-Ed-CStHKuCL0dg" name="inheritance_2_called">
+ <elements xmi:type="pattern:Pattern" xmi:id="_nfk5LCH-Ed-CStHKuCL0dg" name="calledByInjection"
+ headerMethod="#_nfk5LSH-Ed-CStHKuCL0dg" footerMethod="#_nfk5MCH-Ed-CStHKuCL0dg"
+ initMethod="#_nfk5LiH-Ed-CStHKuCL0dg">
+ <methods xmi:id="_nfk5LSH-Ed-CStHKuCL0dg" name="header" patternFilePath="templates/pattern._nfk5LCH-Ed-CStHKuCL0dg/method._OaMfISH1Ed-TGv7R8gz0bQ.pt"/>
+ <methods xmi:id="_nfk5LiH-Ed-CStHKuCL0dg" name="init" patternFilePath="templates/pattern._nfk5LCH-Ed-CStHKuCL0dg/method._OaMfIiH1Ed-TGv7R8gz0bQ.pt"/>
+ <methods xmi:id="_nfk5LyH-Ed-CStHKuCL0dg" name="body" patternFilePath="templates/pattern._nfk5LCH-Ed-CStHKuCL0dg/method._OaMfIyH1Ed-TGv7R8gz0bQ.pt"/>
+ <methods xmi:id="_nfk5MCH-Ed-CStHKuCL0dg" name="footer" patternFilePath="templates/pattern._nfk5LCH-Ed-CStHKuCL0dg/method._OaMfJCH1Ed-TGv7R8gz0bQ.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_nfk5MSH-Ed-CStHKuCL0dg"
+ called="#_nfk5LyH-Ed-CStHKuCL0dg"/>
+ <parameters xmi:id="_nfk5MiH-Ed-CStHKuCL0dg" name="parameter" type="http://www.eclipse.org/emf/2002/Ecore#//EAttribute">
+ <query xmi:type="pattern:BasicQuery" xmi:id="_nfk5MyH-Ed-CStHKuCL0dg"
+ extensionId="org.eclipse.egf.pattern.query.EObjectInjectedContextQuery"/>
+ </parameters>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_nfk5NCH-Ed-CStHKuCL0dg"
+ name="JET"/>
+ </elements>
+ </libraries>
+ </viewpoints>
+ <viewpoints xmi:type="domain:DomainViewpoint" xmi:id="_nfk5NSH-Ed-CStHKuCL0dg">
+ <domains xmi:type="domain:DomainURI" xmi:id="_nfk5NiH-Ed-CStHKuCL0dg" uri="platform:/plugin/org.eclipse.emf.codegen.ecore/model/GenModel.ecore"/>
+ </viewpoints>
+ </viewpointContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_nfk5NyH-Ed-CStHKuCL0dg">
+ <invocations xmi:id="_nfk5OCH-Ed-CStHKuCL0dg" invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_8FZ3aof6eEd64XYPo3s6sPg">
+ <invocationContractContainer xmi:id="_nfk5OSH-Ed-CStHKuCL0dg">
+ <invocationContracts xmi:id="_nfk5OiH-Ed-CStHKuCL0dg" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_nz1HkSCaEd-Sse0r9LJWbA">
+ <type xmi:type="pattern:TypePatternList" xmi:id="_dlxSYSUfEd-pNvuiR8OoHQ"
+ elements="#_nfk5GiH-Ed-CStHKuCL0dg"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_nfk5PCH-Ed-CStHKuCL0dg" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_DgB2IP6fEd64XaYPo3s6sPg">
+ <type xmi:type="domain:TypeDomainURI" xmi:id="_nfk5PSH-Ed-CStHKuCL0dg" domain="#_nfk5NiH-Ed-CStHKuCL0dg"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_nfk5PiH-Ed-CStHKuCL0dg" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_L6JSwAHAEd-4faJMEplCjxw">
+ <type xmi:type="pattern:TypePatternExecutionReporter" xmi:id="_nfk5PyH-Ed-CStHKuCL0dg"
+ value="org.eclipse.egf.core.test.pattern.JunitConsoleReporter"/>
+ </invocationContracts>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+</fcore:FactoryComponent>
diff --git a/tests/org.eclipse.egf.core.test.pattern/fc/inheritance_3.fcore b/tests/org.eclipse.egf.core.test.pattern/fc/inheritance_3.fcore
new file mode 100644
index 0000000..ccddf09
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/fc/inheritance_3.fcore
@@ -0,0 +1,81 @@
+<?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="_mQLQQCIKEd-l6L0LIketyw"
+ description=" " name="inheritance_3">
+ <viewpointContainer xmi:id="_nF5-YCIKEd-l6L0LIketyw">
+ <viewpoints xmi:type="pattern:PatternViewpoint" xmi:id="_nd4ZgCIKEd-l6L0LIketyw">
+ <libraries xmi:id="_6caJ8CITEd-XdOucj2euiQ" name="inheritance_3">
+ <elements xmi:type="pattern:Pattern" xmi:id="_72W_cCITEd-XdOucj2euiQ" name="parent"
+ headerMethod="#_72W_cSITEd-XdOucj2euiQ" footerMethod="#_72W_dCITEd-XdOucj2euiQ"
+ initMethod="#_72W_ciITEd-XdOucj2euiQ">
+ <methods xmi:id="_72W_cSITEd-XdOucj2euiQ" name="header" patternFilePath="templates/pattern._72W_cCITEd-XdOucj2euiQ/method._72W_cSITEd-XdOucj2euiQ.pt"/>
+ <methods xmi:id="_72W_ciITEd-XdOucj2euiQ" name="init" patternFilePath="templates/pattern._72W_cCITEd-XdOucj2euiQ/method._72W_ciITEd-XdOucj2euiQ.pt"/>
+ <methods xmi:id="_72W_cyITEd-XdOucj2euiQ" name="body" patternFilePath="templates/pattern._72W_cCITEd-XdOucj2euiQ/method._72W_cyITEd-XdOucj2euiQ.pt"/>
+ <methods xmi:id="_72W_dCITEd-XdOucj2euiQ" name="footer" patternFilePath="templates/pattern._72W_cCITEd-XdOucj2euiQ/method._72W_dCITEd-XdOucj2euiQ.pt"/>
+ <methods xmi:id="_G4w88CIUEd-XdOucj2euiQ" name="mywork" patternFilePath="templates/pattern._72W_cCITEd-XdOucj2euiQ/method._G4w88CIUEd-XdOucj2euiQ.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_HQxNQCIUEd-XdOucj2euiQ"
+ called="#_G4w88CIUEd-XdOucj2euiQ"/>
+ <parameters xmi:id="_Kj7fwCIXEd-XdOucj2euiQ" name="parameter" type="http://www.eclipse.org/emf/2002/Ecore#//EClass">
+ <query xmi:type="pattern:BasicQuery" xmi:id="_YzkOQCIXEd-XdOucj2euiQ"
+ extensionId="org.eclipse.egf.pattern.basic.query"/>
+ </parameters>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_72W_diITEd-XdOucj2euiQ"
+ name="JET"/>
+ </elements>
+ <elements xmi:type="pattern:Pattern" xmi:id="_-HLLgCITEd-XdOucj2euiQ" name="child"
+ headerMethod="#_-HLLgSITEd-XdOucj2euiQ" footerMethod="#_-HLLhCITEd-XdOucj2euiQ"
+ superPattern="#_72W_cCITEd-XdOucj2euiQ" initMethod="#_-HLLgiITEd-XdOucj2euiQ">
+ <methods xmi:id="_-HLLgSITEd-XdOucj2euiQ" name="header" patternFilePath="templates/pattern._-HLLgCITEd-XdOucj2euiQ/method._-HLLgSITEd-XdOucj2euiQ.pt"/>
+ <methods xmi:id="_-HLLgiITEd-XdOucj2euiQ" name="init" patternFilePath="templates/pattern._-HLLgCITEd-XdOucj2euiQ/method._-HLLgiITEd-XdOucj2euiQ.pt"/>
+ <methods xmi:id="_-HLLgyITEd-XdOucj2euiQ" name="body" patternFilePath="templates/pattern._-HLLgCITEd-XdOucj2euiQ/method._-HLLgyITEd-XdOucj2euiQ.pt"/>
+ <methods xmi:id="_-HLLhCITEd-XdOucj2euiQ" name="footer" patternFilePath="templates/pattern._-HLLgCITEd-XdOucj2euiQ/method._-HLLhCITEd-XdOucj2euiQ.pt"/>
+ <methods xmi:id="_JBYPQCIUEd-XdOucj2euiQ" name="hehe" patternFilePath="templates/pattern._-HLLgCITEd-XdOucj2euiQ/method._JBYPQCIUEd-XdOucj2euiQ.pt"/>
+ <orchestration xmi:type="pattern:SuperCall" xmi:id="_-HLLhSITEd-XdOucj2euiQ"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_JZi3oCIUEd-XdOucj2euiQ"
+ called="#_JBYPQCIUEd-XdOucj2euiQ"/>
+ <orchestration xmi:type="pattern:PatternCall" xmi:id="_jVCJQCIUEd-XdOucj2euiQ"
+ called="#_AHSpICIUEd-XdOucj2euiQ"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_-HLLhiITEd-XdOucj2euiQ"
+ name="JET"/>
+ </elements>
+ <elements xmi:type="pattern:Pattern" xmi:id="_AHSpICIUEd-XdOucj2euiQ" name="called"
+ headerMethod="#_AHSpISIUEd-XdOucj2euiQ" footerMethod="#_AHSpJCIUEd-XdOucj2euiQ"
+ initMethod="#_AHSpIiIUEd-XdOucj2euiQ">
+ <methods xmi:id="_AHSpISIUEd-XdOucj2euiQ" name="header" patternFilePath="templates/pattern._AHSpICIUEd-XdOucj2euiQ/method._AHSpISIUEd-XdOucj2euiQ.pt"/>
+ <methods xmi:id="_AHSpIiIUEd-XdOucj2euiQ" name="init" patternFilePath="templates/pattern._AHSpICIUEd-XdOucj2euiQ/method._AHSpIiIUEd-XdOucj2euiQ.pt"/>
+ <methods xmi:id="_AHSpIyIUEd-XdOucj2euiQ" name="body" patternFilePath="templates/pattern._AHSpICIUEd-XdOucj2euiQ/method._AHSpIyIUEd-XdOucj2euiQ.pt"/>
+ <methods xmi:id="_AHSpJCIUEd-XdOucj2euiQ" name="footer" patternFilePath="templates/pattern._AHSpICIUEd-XdOucj2euiQ/method._AHSpJCIUEd-XdOucj2euiQ.pt"/>
+ <orchestration xmi:type="pattern:SuperCall" xmi:id="_AHSpJSIUEd-XdOucj2euiQ"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_ltVdYCIUEd-XdOucj2euiQ"
+ called="#_AHSpIyIUEd-XdOucj2euiQ"/>
+ <parameters xmi:id="_MGvWUCIXEd-XdOucj2euiQ" name="parameter" type="http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_AHSpJiIUEd-XdOucj2euiQ"
+ name="JET"/>
+ </elements>
+ </libraries>
+ </viewpoints>
+ <viewpoints xmi:type="domain:DomainViewpoint" xmi:id="_lt5zMCIWEd-XdOucj2euiQ">
+ <domains xmi:type="domain:DomainURI" xmi:id="_oniSwCIWEd-XdOucj2euiQ" uri="platform:/plugin/org.eclipse.egf.core.test.pattern/model/mypackage.ecore"/>
+ </viewpoints>
+ </viewpointContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_n7RgICIKEd-l6L0LIketyw">
+ <invocations xmi:id="_pQXDwCIKEd-l6L0LIketyw" invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.pattern.ftask/Pattern_task.fcore#_XVvo0Be4Ed-DaY2uHNBaQg">
+ <invocationContractContainer xmi:id="_WjRG8CIUEd-XdOucj2euiQ">
+ <invocationContracts xmi:id="_W00xACIUEd-XdOucj2euiQ" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Pattern_task.fcore#_tsP7UBe5Ed-O0P2188kAmA">
+ <type xmi:type="pattern:TypePatternList" xmi:id="_pYAKUCUfEd-pNvuiR8OoHQ"
+ elements="#_-HLLgCITEd-XdOucj2euiQ"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_cp9GcCIWEd-XdOucj2euiQ" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Pattern_task.fcore#_7-xlwBe5Ed-O0P2188kAmA">
+ <type xmi:type="pattern:TypePatternExecutionReporter" xmi:id="_eOjswCIWEd-XdOucj2euiQ"
+ value="org.eclipse.egf.core.test.pattern.JunitConsoleReporter"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_hOQioCIXEd-XdOucj2euiQ" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Pattern_task.fcore#_4ngvABe5Ed-O0P2188kAmA">
+ <type xmi:type="domain:TypeDomainURI" xmi:id="_ij4RwCIXEd-XdOucj2euiQ" domain="#_oniSwCIWEd-XdOucj2euiQ"/>
+ </invocationContracts>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+</fcore:FactoryComponent>
diff --git a/tests/org.eclipse.egf.core.test.pattern/fc/inheritance_4.fcore b/tests/org.eclipse.egf.core.test.pattern/fc/inheritance_4.fcore
new file mode 100644
index 0000000..ee44ee7
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/fc/inheritance_4.fcore
@@ -0,0 +1,65 @@
+<?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="_8e1X4CIXEd-XdOucj2euiQ"
+ description=" " name="inheritance_4">
+ <viewpointContainer xmi:id="_9goMECIXEd-XdOucj2euiQ">
+ <viewpoints xmi:type="domain:DomainViewpoint" xmi:id="_9yoiECIXEd-XdOucj2euiQ">
+ <domains xmi:type="domain:DomainURI" xmi:id="_-K6fMCIXEd-XdOucj2euiQ" uri="platform:/plugin/org.eclipse.egf.core.test.pattern/model/mypackage.ecore"/>
+ </viewpoints>
+ <viewpoints xmi:type="pattern:PatternViewpoint" xmi:id="_A-L4ECIYEd-XdOucj2euiQ">
+ <libraries xmi:id="_BUZ_sCIYEd-XdOucj2euiQ" name="inheritance_4.strategy">
+ <elements xmi:type="pattern:Pattern" xmi:id="_CzArsCIYEd-XdOucj2euiQ" name="classPattern"
+ headerMethod="#_CzArsSIYEd-XdOucj2euiQ" footerMethod="#_CzArtCIYEd-XdOucj2euiQ"
+ superPattern="#_IF6vwCIYEd-XdOucj2euiQ" initMethod="#_CzArsiIYEd-XdOucj2euiQ">
+ <methods xmi:id="_CzArsSIYEd-XdOucj2euiQ" name="header" patternFilePath="templates/pattern._CzArsCIYEd-XdOucj2euiQ/method._CzArsSIYEd-XdOucj2euiQ.pt"/>
+ <methods xmi:id="_CzArsiIYEd-XdOucj2euiQ" name="init" patternFilePath="templates/pattern._CzArsCIYEd-XdOucj2euiQ/method._CzArsiIYEd-XdOucj2euiQ.pt"/>
+ <methods xmi:id="_CzArsyIYEd-XdOucj2euiQ" name="body" patternFilePath="templates/pattern._CzArsCIYEd-XdOucj2euiQ/method._CzArsyIYEd-XdOucj2euiQ.pt"/>
+ <methods xmi:id="_CzArtCIYEd-XdOucj2euiQ" name="footer" patternFilePath="templates/pattern._CzArsCIYEd-XdOucj2euiQ/method._CzArtCIYEd-XdOucj2euiQ.pt"/>
+ <methods xmi:id="_PVTuoCIYEd-XdOucj2euiQ" name="work" patternFilePath="templates/pattern._CzArsCIYEd-XdOucj2euiQ/method._PVTuoCIYEd-XdOucj2euiQ.pt"/>
+ <orchestration xmi:type="pattern:SuperCall" xmi:id="_CzArtSIYEd-XdOucj2euiQ"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_PpLs4CIYEd-XdOucj2euiQ"
+ called="#_PVTuoCIYEd-XdOucj2euiQ"/>
+ <parameters xmi:id="_N0Z8kCIYEd-XdOucj2euiQ" name="parameter" type="http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_CzArtiIYEd-XdOucj2euiQ"
+ name="JET"/>
+ </elements>
+ </libraries>
+ <libraries xmi:id="_G5O6MCIYEd-XdOucj2euiQ" name="base">
+ <elements xmi:type="pattern:Pattern" xmi:id="_IF6vwCIYEd-XdOucj2euiQ" name="BasePattern"
+ headerMethod="#_IF6vwSIYEd-XdOucj2euiQ" footerMethod="#_IF6vxCIYEd-XdOucj2euiQ"
+ initMethod="#_IF6vwiIYEd-XdOucj2euiQ">
+ <methods xmi:id="_IF6vwSIYEd-XdOucj2euiQ" name="header" patternFilePath="templates/pattern._IF6vwCIYEd-XdOucj2euiQ/method._IF6vwSIYEd-XdOucj2euiQ.pt"/>
+ <methods xmi:id="_IF6vwiIYEd-XdOucj2euiQ" name="init" patternFilePath="templates/pattern._IF6vwCIYEd-XdOucj2euiQ/method._IF6vwiIYEd-XdOucj2euiQ.pt"/>
+ <methods xmi:id="_IF6vwyIYEd-XdOucj2euiQ" name="body" patternFilePath="templates/pattern._IF6vwCIYEd-XdOucj2euiQ/method._IF6vwyIYEd-XdOucj2euiQ.pt"/>
+ <methods xmi:id="_IF6vxCIYEd-XdOucj2euiQ" name="footer" patternFilePath="templates/pattern._IF6vwCIYEd-XdOucj2euiQ/method._IF6vxCIYEd-XdOucj2euiQ.pt"/>
+ <methods xmi:id="_J3HnoCIYEd-XdOucj2euiQ" name="pipo" patternFilePath="templates/pattern._IF6vwCIYEd-XdOucj2euiQ/method._J3HnoCIYEd-XdOucj2euiQ.pt"/>
+ <orchestration xmi:type="pattern:SuperCall" xmi:id="_IF6vxSIYEd-XdOucj2euiQ"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_KNHs0CIYEd-XdOucj2euiQ"
+ called="#_J3HnoCIYEd-XdOucj2euiQ"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_IF6vxiIYEd-XdOucj2euiQ"
+ name="JET"/>
+ </elements>
+ </libraries>
+ </viewpoints>
+ </viewpointContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_WmwjACIYEd-XdOucj2euiQ">
+ <invocations xmi:id="_W-AlYCIYEd-XdOucj2euiQ" invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_8FZ3aof6eEd64XYPo3s6sPg">
+ <invocationContractContainer xmi:id="_ZZizsCIYEd-XdOucj2euiQ">
+ <invocationContracts xmi:id="_ZpwZ8CIYEd-XdOucj2euiQ" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_DgB2IP6fEd64XaYPo3s6sPg">
+ <type xmi:type="domain:TypeDomainURI" xmi:id="_atV94CIYEd-XdOucj2euiQ" domain="#_-K6fMCIXEd-XdOucj2euiQ"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_cA2NICIYEd-XdOucj2euiQ" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_nz1HkSCaEd-Sse0r9LJWbA">
+ <type xmi:type="pattern:TypePatternList" xmi:id="_yk8bACUfEd-pNvuiR8OoHQ"
+ elements="#_BUZ_sCIYEd-XdOucj2euiQ"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_JaPMcCIaEd-XdOucj2euiQ" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_L6JSwAHAEd-4faJMEplCjxw">
+ <type xmi:type="pattern:TypePatternExecutionReporter" xmi:id="_KisCQCIaEd-XdOucj2euiQ"
+ value="org.eclipse.egf.core.test.pattern.JunitConsoleReporter"/>
+ </invocationContracts>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+</fcore:FactoryComponent>
diff --git a/tests/org.eclipse.egf.core.test.pattern/fc/no_callback_1.fcore b/tests/org.eclipse.egf.core.test.pattern/fc/no_callback_1.fcore
new file mode 100644
index 0000000..9c1203f
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/fc/no_callback_1.fcore
@@ -0,0 +1,73 @@
+<?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="_gUlg4CLhEd-F8rS2HRRtPA"
+ name="no_callback_1">
+ <viewpointContainer xmi:id="_hBsegCLhEd-F8rS2HRRtPA">
+ <viewpoints xmi:type="domain:DomainViewpoint" xmi:id="_hhKBsCLhEd-F8rS2HRRtPA">
+ <domains xmi:type="domain:DomainURI" xmi:id="_isPUwCLhEd-F8rS2HRRtPA" uri="platform:/plugin/org.eclipse.egf.core.test.pattern/model/mypackage.ecore"/>
+ </viewpoints>
+ <viewpoints xmi:type="pattern:PatternViewpoint" xmi:id="_jQWHYCLhEd-F8rS2HRRtPA">
+ <libraries xmi:id="_kq4LsCLhEd-F8rS2HRRtPA" name="no_callback.strategy">
+ <elements xmi:type="pattern:Pattern" xmi:id="_oBErcCLhEd-F8rS2HRRtPA" name="ClassPattern"
+ headerMethod="#_oBErcSLhEd-F8rS2HRRtPA" footerMethod="#_oBErdCLhEd-F8rS2HRRtPA"
+ initMethod="#_oBErciLhEd-F8rS2HRRtPA">
+ <methods xmi:id="_oBErcSLhEd-F8rS2HRRtPA" name="header" patternFilePath="templates/pattern._oBErcCLhEd-F8rS2HRRtPA/method._oBErcSLhEd-F8rS2HRRtPA.pt"/>
+ <methods xmi:id="_oBErciLhEd-F8rS2HRRtPA" name="init" patternFilePath="templates/pattern._oBErcCLhEd-F8rS2HRRtPA/method._oBErciLhEd-F8rS2HRRtPA.pt"/>
+ <methods xmi:id="_oBErcyLhEd-F8rS2HRRtPA" name="body" patternFilePath="templates/pattern._oBErcCLhEd-F8rS2HRRtPA/method._oBErcyLhEd-F8rS2HRRtPA.pt"/>
+ <methods xmi:id="_oBErdCLhEd-F8rS2HRRtPA" name="footer" patternFilePath="templates/pattern._oBErcCLhEd-F8rS2HRRtPA/method._oBErdCLhEd-F8rS2HRRtPA.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_POjXkCLiEd-F8rS2HRRtPA"
+ called="#_oBErcyLhEd-F8rS2HRRtPA"/>
+ <parameters xmi:id="_p0r-ICLhEd-F8rS2HRRtPA" name="parameter" type="http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_oBErdiLhEd-F8rS2HRRtPA"
+ name="JET"/>
+ </elements>
+ <elements xmi:type="pattern:Pattern" xmi:id="_oboggCLhEd-F8rS2HRRtPA" name="AttributePattern"
+ headerMethod="#_oboggSLhEd-F8rS2HRRtPA" footerMethod="#_oboghCLhEd-F8rS2HRRtPA"
+ initMethod="#_oboggiLhEd-F8rS2HRRtPA">
+ <methods xmi:id="_oboggSLhEd-F8rS2HRRtPA" name="header" patternFilePath="templates/pattern._oboggCLhEd-F8rS2HRRtPA/method._oboggSLhEd-F8rS2HRRtPA.pt"/>
+ <methods xmi:id="_oboggiLhEd-F8rS2HRRtPA" name="init" patternFilePath="templates/pattern._oboggCLhEd-F8rS2HRRtPA/method._oboggiLhEd-F8rS2HRRtPA.pt"/>
+ <methods xmi:id="_oboggyLhEd-F8rS2HRRtPA" name="body" patternFilePath="templates/pattern._oboggCLhEd-F8rS2HRRtPA/method._oboggyLhEd-F8rS2HRRtPA.pt"/>
+ <methods xmi:id="_oboghCLhEd-F8rS2HRRtPA" name="footer" patternFilePath="templates/pattern._oboggCLhEd-F8rS2HRRtPA/method._oboghCLhEd-F8rS2HRRtPA.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_OlRKACLiEd-F8rS2HRRtPA"
+ called="#_oboggyLhEd-F8rS2HRRtPA"/>
+ <parameters xmi:id="_siIb0CLhEd-F8rS2HRRtPA" name="parameter" type="http://www.eclipse.org/emf/2002/Ecore#//EAttribute"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_oboghiLhEd-F8rS2HRRtPA"
+ name="JET"/>
+ </elements>
+ <elements xmi:type="pattern:Pattern" xmi:id="_o5IU0CLhEd-F8rS2HRRtPA" name="PackagePattern"
+ headerMethod="#_o5IU0SLhEd-F8rS2HRRtPA" footerMethod="#_o5IU1CLhEd-F8rS2HRRtPA"
+ initMethod="#_o5IU0iLhEd-F8rS2HRRtPA">
+ <methods xmi:id="_o5IU0SLhEd-F8rS2HRRtPA" name="header" patternFilePath="templates/pattern._o5IU0CLhEd-F8rS2HRRtPA/method._o5IU0SLhEd-F8rS2HRRtPA.pt"/>
+ <methods xmi:id="_o5IU0iLhEd-F8rS2HRRtPA" name="init" patternFilePath="templates/pattern._o5IU0CLhEd-F8rS2HRRtPA/method._o5IU0iLhEd-F8rS2HRRtPA.pt"/>
+ <methods xmi:id="_o5IU0yLhEd-F8rS2HRRtPA" name="body" patternFilePath="templates/pattern._o5IU0CLhEd-F8rS2HRRtPA/method._o5IU0yLhEd-F8rS2HRRtPA.pt"/>
+ <methods xmi:id="_o5IU1CLhEd-F8rS2HRRtPA" name="footer" patternFilePath="templates/pattern._o5IU0CLhEd-F8rS2HRRtPA/method._o5IU1CLhEd-F8rS2HRRtPA.pt"/>
+ <orchestration xmi:type="pattern:MethodCall" xmi:id="_Hv6bwCLiEd-F8rS2HRRtPA"
+ called="#_o5IU0yLhEd-F8rS2HRRtPA"/>
+ <parameters xmi:id="_umRd0CLhEd-F8rS2HRRtPA" name="parameter" type="http://www.eclipse.org/emf/2002/Ecore#//EPackage"/>
+ <nature xmi:type="jetpattern:JetNature" xmi:id="_o5IU1iLhEd-F8rS2HRRtPA"
+ name="JET"/>
+ </elements>
+ </libraries>
+ </viewpoints>
+ </viewpointContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_T9cvoCLiEd-F8rS2HRRtPA">
+ <invocations xmi:id="_UUsK8CLiEd-F8rS2HRRtPA" invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_8FZ3aof6eEd64XYPo3s6sPg">
+ <invocationContractContainer xmi:id="_VdLdACLiEd-F8rS2HRRtPA">
+ <invocationContracts xmi:id="_Vu-XoCLiEd-F8rS2HRRtPA" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_DgB2IP6fEd64XaYPo3s6sPg">
+ <type xmi:type="domain:TypeDomainURI" xmi:id="_Wpk-sCLiEd-F8rS2HRRtPA" domain="#_isPUwCLhEd-F8rS2HRRtPA"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_X-yeICLiEd-F8rS2HRRtPA" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_L6JSwAHAEd-4faJMEplCjxw">
+ <type xmi:type="pattern:TypePatternExecutionReporter" xmi:id="_ZNRqgCLiEd-F8rS2HRRtPA"
+ value="org.eclipse.egf.core.test.pattern.JunitConsoleReporter"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_axnyICLiEd-F8rS2HRRtPA" invokedContract="platform:/plugin/org.eclipse.egf.pattern.ftask/Model_driven_pattern_strategy_task.fcore#_nz1HkSCaEd-Sse0r9LJWbA">
+ <type xmi:type="pattern:TypePatternList" xmi:id="_VCUOICUgEd-pNvuiR8OoHQ"
+ elements="#_kq4LsCLhEd-F8rS2HRRtPA"/>
+ </invocationContracts>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+</fcore:FactoryComponent>
diff --git a/tests/org.eclipse.egf.core.test.pattern/generated/callback_1/strategy/AttributePattern.java b/tests/org.eclipse.egf.core.test.pattern/generated/callback_1/strategy/AttributePattern.java
new file mode 100644
index 0000000..01dff64
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/generated/callback_1/strategy/AttributePattern.java
@@ -0,0 +1,100 @@
+package callback_1.strategy;
+
+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 AttributePattern
+{
+ protected static String nl;
+ public static synchronized AttributePattern create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ AttributePattern result = new AttributePattern();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = " Attribute ";
+ protected final String TEXT_2 = NL;
+ protected final String TEXT_3 = NL;
+ protected final String TEXT_4 = NL;
+
+ public 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> parameterList = null;
+//this pattern can only be called by another (i.e. it's not an entry point in execution)
+
+
+for (Object parameterParameter : parameterList ) {
+
+this.parameter = (org.eclipse.emf.ecore.EAttribute)parameterParameter;
+
+
+ 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 index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_body(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+if (ictx.useReporter()){
+ ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));
+ Map<String, Object> parameterValues = new HashMap<String, Object>();
+ parameterValues.put("parameter", this.parameter);
+ ictx.getReporter().loopFinished(loop, ictx, parameterValues);
+ ictx.clearBuffer();}
+return loop;
+}
+
+protected org.eclipse.emf.ecore.EAttribute parameter = null;
+public void set_parameter(org.eclipse.emf.ecore.EAttribute object) {
+this.parameter = object;
+}
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append(parameter.getName());
+ stringBuffer.append(TEXT_2);
+ }
+ protected void method_after(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ }
+ protected void method_before(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ }
+ }
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/generated/callback_1/strategy/ClassPattern.java b/tests/org.eclipse.egf.core.test.pattern/generated/callback_1/strategy/ClassPattern.java
new file mode 100644
index 0000000..c95f21c
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/generated/callback_1/strategy/ClassPattern.java
@@ -0,0 +1,115 @@
+package callback_1.strategy;
+
+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 ClassPattern
+{
+ protected static String nl;
+ public static synchronized ClassPattern create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ ClassPattern result = new ClassPattern();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "//default content";
+ protected final String TEXT_2 = " [class ";
+ protected final String TEXT_3 = "]" + NL;
+ protected final String TEXT_4 = " [end class]" + NL;
+ protected final String TEXT_5 = NL;
+ protected final String TEXT_6 = NL;
+
+ public 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> parameterList = null;
+//this pattern can only be called by another (i.e. it's not an entry point in execution)
+
+
+for (Object parameterParameter : parameterList ) {
+
+this.parameter = (org.eclipse.emf.ecore.EClass)parameterParameter;
+
+
+ orchestration(ctx);
+
+}
+if (ctx.useReporter()){
+ ctx.getReporter().executionFinished(ctx.getExecutionBuffer().toString(), ctx);
+ ctx.clearBuffer();
+}
+
+ stringBuffer.append(TEXT_5);
+ stringBuffer.append(TEXT_6);
+ return stringBuffer.toString();
+ }
+public String orchestration(PatternContext ctx) throws Exception {
+InternalPatternContext ictx = (InternalPatternContext)ctx;
+int index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_before(ictx.getBuffer(), ictx);
+ {
+final Map<String, Object> parameters = new HashMap<String, Object>();
+index = ictx.getBuffer().length();
+ictx.getExecutionBuffer().append(ictx.getBuffer());
+parameters.put("parameter", this.parameter);
+CallbackContext ctx_callback = new CallbackContext(ictx);
+CallHelper.callBack(ctx_callback, parameters);
+}
+
+
+method_after(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+if (ictx.useReporter()){
+ ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));
+ Map<String, Object> parameterValues = new HashMap<String, Object>();
+ parameterValues.put("parameter", this.parameter);
+ ictx.getReporter().loopFinished(loop, ictx, parameterValues);
+ ictx.clearBuffer();}
+return loop;
+}
+
+protected org.eclipse.emf.ecore.EClass parameter = null;
+public void set_parameter(org.eclipse.emf.ecore.EClass object) {
+this.parameter = object;
+}
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ }
+ protected void method_before(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_2);
+ stringBuffer.append(parameter.getName());
+ stringBuffer.append(TEXT_3);
+ }
+ protected void method_after(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_4);
+ }
+ }
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/generated/callback_1/strategy/PackagePattern.java b/tests/org.eclipse.egf.core.test.pattern/generated/callback_1/strategy/PackagePattern.java
new file mode 100644
index 0000000..1e9c8d7
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/generated/callback_1/strategy/PackagePattern.java
@@ -0,0 +1,113 @@
+package callback_1.strategy;
+
+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 PackagePattern
+{
+ protected static String nl;
+ public static synchronized PackagePattern create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ PackagePattern result = new PackagePattern();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "[Package ";
+ protected final String TEXT_2 = "]" + NL;
+ protected final String TEXT_3 = "[End Package]" + NL + NL + NL;
+ protected final String TEXT_4 = NL;
+ protected final String TEXT_5 = NL;
+
+ public PackagePattern()
+ {
+ //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> parameterList = null;
+//this pattern can only be called by another (i.e. it's not an entry point in execution)
+
+
+for (Object parameterParameter : parameterList ) {
+
+this.parameter = (org.eclipse.emf.ecore.EPackage)parameterParameter;
+
+
+ orchestration(ctx);
+
+}
+if (ctx.useReporter()){
+ ctx.getReporter().executionFinished(ctx.getExecutionBuffer().toString(), ctx);
+ ctx.clearBuffer();
+}
+
+ stringBuffer.append(TEXT_4);
+ stringBuffer.append(TEXT_5);
+ return stringBuffer.toString();
+ }
+public String orchestration(PatternContext ctx) throws Exception {
+InternalPatternContext ictx = (InternalPatternContext)ctx;
+int index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_before(ictx.getBuffer(), ictx);
+ {
+final Map<String, Object> parameters = new HashMap<String, Object>();
+index = ictx.getBuffer().length();
+ictx.getExecutionBuffer().append(ictx.getBuffer());
+parameters.put("parameter", this.parameter);
+CallbackContext ctx_callback = new CallbackContext(ictx);
+CallHelper.callBack(ctx_callback, parameters);
+}
+
+
+method_after(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+if (ictx.useReporter()){
+ ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));
+ Map<String, Object> parameterValues = new HashMap<String, Object>();
+ parameterValues.put("parameter", this.parameter);
+ ictx.getReporter().loopFinished(loop, ictx, parameterValues);
+ ictx.clearBuffer();}
+return loop;
+}
+
+protected org.eclipse.emf.ecore.EPackage parameter = null;
+public void set_parameter(org.eclipse.emf.ecore.EPackage object) {
+this.parameter = object;
+}
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ }
+ protected void method_before(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append(parameter.getName());
+ stringBuffer.append(TEXT_2);
+ }
+ protected void method_after(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_3);
+ }
+ }
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/generated/inheritance_1/child.java b/tests/org.eclipse.egf.core.test.pattern/generated/inheritance_1/child.java
new file mode 100644
index 0000000..06cdf41
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/generated/inheritance_1/child.java
@@ -0,0 +1,91 @@
+package inheritance_1;
+
+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 child extends inheritance_1.parent {
+ protected static String nl;
+ public static synchronized child create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ child result = new child();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "fromChild : ";
+ protected final String TEXT_2 = NL;
+ protected final String TEXT_3 = NL;
+
+ public child()
+ {
+ //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;
+
+
+paramDesc = new IQuery.ParameterDescription("parameter", "http://www.eclipse.org/emf/2002/Ecore#//EClass");
+queryCtx = new HashMap<String, String>();
+List<Object> parameterList = QueryHelper.load(ctx, "org.eclipse.egf.pattern.basic.query").execute(paramDesc, queryCtx, ctx);
+
+
+for (Object parameterParameter : parameterList ) {
+
+this.parameter = (org.eclipse.emf.ecore.EClass)parameterParameter;
+
+
+ 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 index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+ super.orchestration(new SuperOrchestrationContext(ictx));
+
+
+String loop = ictx.getBuffer().toString();
+if (ictx.useReporter()){
+ ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));
+ Map<String, Object> parameterValues = new HashMap<String, Object>();
+ parameterValues.put("parameter", this.parameter);
+ ictx.getReporter().loopFinished(loop, ictx, parameterValues);
+ ictx.clearBuffer();}
+return loop;
+}
+
+protected org.eclipse.emf.ecore.EClass parameter = null;
+public void set_parameter(org.eclipse.emf.ecore.EClass object) {
+this.parameter = object;
+}
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append(parameter.getName());
+ }
+ }
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/generated/inheritance_1/parent.java b/tests/org.eclipse.egf.core.test.pattern/generated/inheritance_1/parent.java
new file mode 100644
index 0000000..7a4fac3
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/generated/inheritance_1/parent.java
@@ -0,0 +1,67 @@
+package inheritance_1;
+
+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 parent
+{
+ protected static String nl;
+ public static synchronized parent create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ parent result = new parent();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "fromParent";
+ protected final String TEXT_2 = NL;
+ protected final String TEXT_3 = NL;
+
+ public parent()
+ {
+ //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;
+
+ 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 index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_body(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+return loop;
+}
+
+
+ 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/tests/org.eclipse.egf.core.test.pattern/generated/inheritance_2/child.java b/tests/org.eclipse.egf.core.test.pattern/generated/inheritance_2/child.java
new file mode 100644
index 0000000..ba54995
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/generated/inheritance_2/child.java
@@ -0,0 +1,107 @@
+package inheritance_2;
+
+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 child extends inheritance_2.parent {
+ protected static String nl;
+ public static synchronized child create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ child result = new child();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "fromChild : ";
+ protected final String TEXT_2 = NL;
+ protected final String TEXT_3 = NL;
+
+ public child()
+ {
+ //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> parameterList = null;
+//this pattern can only be called by another (i.e. it's not an entry point in execution)
+
+
+for (Object parameterParameter : parameterList ) {
+
+this.parameter = (org.eclipse.emf.ecore.EClass)parameterParameter;
+
+
+ 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 index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+ super.orchestration(new SuperOrchestrationContext(ictx));
+
+
+method_setToInject(ictx.getBuffer(), ictx);
+ ExecutionContext ctx__rYY0ChjEdbINzmyJi3Kg = new ExecutionContext(ictx);
+ctx__rYY0ChjEdbINzmyJi3Kg.setValue(PatternContext.INJECTED_CONTEXT, toInject);
+CallHelper.execute("_nfk5LCH-Ed-CStHKuCL0dg", ctx__rYY0ChjEdbINzmyJi3Kg);
+
+
+
+String loop = ictx.getBuffer().toString();
+if (ictx.useReporter()){
+ ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));
+ Map<String, Object> parameterValues = new HashMap<String, Object>();
+ parameterValues.put("parameter", this.parameter);
+ ictx.getReporter().loopFinished(loop, ictx, parameterValues);
+ ictx.clearBuffer();}
+return loop;
+}
+
+protected org.eclipse.emf.ecore.EClass toInject = null;
+protected org.eclipse.emf.ecore.EClass parameter = null;
+public void set_parameter(org.eclipse.emf.ecore.EClass object) {
+this.parameter = object;
+}
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append(parameter.getName());
+ }
+ protected void method_setToInject(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ toInject = parameter;
+ }
+ protected void method_setVariables(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ targetFile = "/org.eclipse.egf.core.test.pattern/result/" + parameter.getName();
+ }
+ }
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/generated/inheritance_2/parent.java b/tests/org.eclipse.egf.core.test.pattern/generated/inheritance_2/parent.java
new file mode 100644
index 0000000..ec8f377
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/generated/inheritance_2/parent.java
@@ -0,0 +1,81 @@
+package inheritance_2;
+
+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 parent
+{
+ protected static String nl;
+ public static synchronized parent create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ parent result = new parent();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "fromParent";
+ protected final String TEXT_2 = NL;
+ protected final String TEXT_3 = NL;
+
+ public parent()
+ {
+ //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;
+
+ 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 index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_setVariables(ictx.getBuffer(), ictx);
+
+method_body(ictx.getBuffer(), ictx);
+
+method_putVariablesInContesxt(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+return loop;
+}
+
+protected java.lang.String targetFile = null;
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ }
+ protected void method_setVariables(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ targetFile = null;
+ }
+ protected void method_putVariablesInContesxt(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ ctx.setValue("targetFile", targetFile);
+ }
+ }
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/generated/inheritance_2_called/calledByInjection.java b/tests/org.eclipse.egf.core.test.pattern/generated/inheritance_2_called/calledByInjection.java
new file mode 100644
index 0000000..6ecb261
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/generated/inheritance_2_called/calledByInjection.java
@@ -0,0 +1,93 @@
+package inheritance_2_called;
+
+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 calledByInjection
+{
+ protected static String nl;
+ public static synchronized calledByInjection create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ calledByInjection result = new calledByInjection();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = " fromInjected : ";
+ protected final String TEXT_2 = NL;
+ protected final String TEXT_3 = NL;
+
+ public calledByInjection()
+ {
+ //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;
+
+
+paramDesc = new IQuery.ParameterDescription("parameter", "http://www.eclipse.org/emf/2002/Ecore#//EAttribute");
+queryCtx = new HashMap<String, String>();
+List<Object> parameterList = QueryHelper.load(ctx, "org.eclipse.egf.pattern.query.EObjectInjectedContextQuery").execute(paramDesc, queryCtx, ctx);
+
+
+for (Object parameterParameter : parameterList ) {
+
+this.parameter = (org.eclipse.emf.ecore.EAttribute)parameterParameter;
+
+
+ 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 index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_body(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+if (ictx.useReporter()){
+ ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));
+ Map<String, Object> parameterValues = new HashMap<String, Object>();
+ parameterValues.put("parameter", this.parameter);
+ ictx.getReporter().loopFinished(loop, ictx, parameterValues);
+ ictx.clearBuffer();}
+return loop;
+}
+
+protected org.eclipse.emf.ecore.EAttribute parameter = null;
+public void set_parameter(org.eclipse.emf.ecore.EAttribute object) {
+this.parameter = object;
+}
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append(parameter.getName());
+ }
+ }
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/generated/inheritance_3/called.java b/tests/org.eclipse.egf.core.test.pattern/generated/inheritance_3/called.java
new file mode 100644
index 0000000..4653926
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/generated/inheritance_3/called.java
@@ -0,0 +1,95 @@
+package inheritance_3;
+
+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 called
+{
+ protected static String nl;
+ public static synchronized called create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ called result = new called();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "//called on ";
+ protected final String TEXT_2 = NL;
+ protected final String TEXT_3 = NL;
+ protected final String TEXT_4 = NL;
+
+ public called()
+ {
+ //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> parameterList = null;
+//this pattern can only be called by another (i.e. it's not an entry point in execution)
+
+
+for (Object parameterParameter : parameterList ) {
+
+this.parameter = (org.eclipse.emf.ecore.EClass)parameterParameter;
+
+
+ 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 index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+
+method_body(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+if (ictx.useReporter()){
+ ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));
+ Map<String, Object> parameterValues = new HashMap<String, Object>();
+ parameterValues.put("parameter", this.parameter);
+ ictx.getReporter().loopFinished(loop, ictx, parameterValues);
+ ictx.clearBuffer();}
+return loop;
+}
+
+protected org.eclipse.emf.ecore.EClass parameter = null;
+public void set_parameter(org.eclipse.emf.ecore.EClass object) {
+this.parameter = object;
+}
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append(parameter.getName());
+ stringBuffer.append(TEXT_2);
+ }
+ }
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/generated/inheritance_3/child.java b/tests/org.eclipse.egf.core.test.pattern/generated/inheritance_3/child.java
new file mode 100644
index 0000000..5012d29
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/generated/inheritance_3/child.java
@@ -0,0 +1,104 @@
+package inheritance_3;
+
+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 child extends inheritance_3.parent {
+ protected static String nl;
+ public static synchronized child create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ child result = new child();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "//default content";
+ protected final String TEXT_2 = "// child on ";
+ protected final String TEXT_3 = NL;
+ protected final String TEXT_4 = NL;
+ protected final String TEXT_5 = NL;
+
+ public child()
+ {
+ //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;
+
+
+paramDesc = new IQuery.ParameterDescription("parameter", "http://www.eclipse.org/emf/2002/Ecore#//EClass");
+queryCtx = new HashMap<String, String>();
+List<Object> parameterList = QueryHelper.load(ctx, "org.eclipse.egf.pattern.basic.query").execute(paramDesc, queryCtx, ctx);
+
+
+for (Object parameterParameter : parameterList ) {
+
+this.parameter = (org.eclipse.emf.ecore.EClass)parameterParameter;
+
+
+ orchestration(ctx);
+
+}
+if (ctx.useReporter()){
+ ctx.getReporter().executionFinished(ctx.getExecutionBuffer().toString(), ctx);
+ ctx.clearBuffer();
+}
+
+ stringBuffer.append(TEXT_4);
+ stringBuffer.append(TEXT_5);
+ return stringBuffer.toString();
+ }
+public String orchestration(PatternContext ctx) throws Exception {
+InternalPatternContext ictx = (InternalPatternContext)ctx;
+int index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+ super.orchestration(new SuperOrchestrationContext(ictx));
+
+
+method_hehe(ictx.getBuffer(), ictx);
+ {
+final Map<String, Object> parameters = new HashMap<String, Object>();
+parameters.put("parameter", this.parameter);
+ExecutionContext ctx__r9b9oChjEdbINzmyJi3Kg = new ExecutionContext(ictx);
+CallHelper.executeWithInjection("_AHSpICIUEd-XdOucj2euiQ", ctx__r9b9oChjEdbINzmyJi3Kg, parameters);
+}
+
+
+String loop = ictx.getBuffer().toString();
+if (ictx.useReporter()){
+ ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));
+ Map<String, Object> parameterValues = new HashMap<String, Object>();
+ parameterValues.put("parameter", this.parameter);
+ ictx.getReporter().loopFinished(loop, ictx, parameterValues);
+ ictx.clearBuffer();}
+return loop;
+}
+
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ }
+ protected void method_hehe(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_2);
+ stringBuffer.append(parameter.getName());
+ stringBuffer.append(TEXT_3);
+ }
+ }
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/generated/inheritance_3/parent.java b/tests/org.eclipse.egf.core.test.pattern/generated/inheritance_3/parent.java
new file mode 100644
index 0000000..b03ed41
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/generated/inheritance_3/parent.java
@@ -0,0 +1,100 @@
+package inheritance_3;
+
+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 parent
+{
+ protected static String nl;
+ public static synchronized parent create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ parent result = new parent();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "//default content";
+ protected final String TEXT_2 = "//mywork on ";
+ protected final String TEXT_3 = NL;
+ protected final String TEXT_4 = NL;
+ protected final String TEXT_5 = NL;
+
+ public parent()
+ {
+ //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;
+
+
+paramDesc = new IQuery.ParameterDescription("parameter", "http://www.eclipse.org/emf/2002/Ecore#//EClass");
+queryCtx = new HashMap<String, String>();
+List<Object> parameterList = QueryHelper.load(ctx, "org.eclipse.egf.pattern.basic.query").execute(paramDesc, queryCtx, ctx);
+
+
+for (Object parameterParameter : parameterList ) {
+
+this.parameter = (org.eclipse.emf.ecore.EClass)parameterParameter;
+
+
+ orchestration(ctx);
+
+}
+if (ctx.useReporter()){
+ ctx.getReporter().executionFinished(ctx.getExecutionBuffer().toString(), ctx);
+ ctx.clearBuffer();
+}
+
+ stringBuffer.append(TEXT_4);
+ stringBuffer.append(TEXT_5);
+ return stringBuffer.toString();
+ }
+public String orchestration(PatternContext ctx) throws Exception {
+InternalPatternContext ictx = (InternalPatternContext)ctx;
+int index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_mywork(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+if (ictx.useReporter()){
+ ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));
+ Map<String, Object> parameterValues = new HashMap<String, Object>();
+ parameterValues.put("parameter", this.parameter);
+ ictx.getReporter().loopFinished(loop, ictx, parameterValues);
+ ictx.clearBuffer();}
+return loop;
+}
+
+protected org.eclipse.emf.ecore.EClass parameter = null;
+public void set_parameter(org.eclipse.emf.ecore.EClass object) {
+this.parameter = object;
+}
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ }
+ protected void method_mywork(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_2);
+ stringBuffer.append(parameter.getName());
+ stringBuffer.append(TEXT_3);
+ }
+ }
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/generated/inheritance_4/base/BasePattern.java b/tests/org.eclipse.egf.core.test.pattern/generated/inheritance_4/base/BasePattern.java
new file mode 100644
index 0000000..1997520
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/generated/inheritance_4/base/BasePattern.java
@@ -0,0 +1,74 @@
+package inheritance_4.base;
+
+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 BasePattern
+{
+ protected static String nl;
+ public static synchronized BasePattern create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ BasePattern result = new BasePattern();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "//default content";
+ protected final String TEXT_2 = "// Pipo from parent";
+ protected final String TEXT_3 = NL;
+ protected final String TEXT_4 = NL;
+
+ public BasePattern()
+ {
+ //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;
+
+ 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 index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+
+method_pipo(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+return loop;
+}
+
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ }
+ protected void method_pipo(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_2);
+ }
+ }
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/generated/inheritance_4/strategy/classPattern.java b/tests/org.eclipse.egf.core.test.pattern/generated/inheritance_4/strategy/classPattern.java
new file mode 100644
index 0000000..c8b32d5
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/generated/inheritance_4/strategy/classPattern.java
@@ -0,0 +1,100 @@
+package inheritance_4.strategy;
+
+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 classPattern extends inheritance_4.base.BasePattern {
+ protected static String nl;
+ public static synchronized classPattern create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ classPattern result = new classPattern();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "//default content";
+ protected final String TEXT_2 = "//additional work on ";
+ protected final String TEXT_3 = NL;
+ protected final String TEXT_4 = NL;
+ protected final String TEXT_5 = NL;
+
+ public 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> parameterList = null;
+//this pattern can only be called by another (i.e. it's not an entry point in execution)
+
+
+for (Object parameterParameter : parameterList ) {
+
+this.parameter = (org.eclipse.emf.ecore.EClass)parameterParameter;
+
+
+ orchestration(ctx);
+
+}
+if (ctx.useReporter()){
+ ctx.getReporter().executionFinished(ctx.getExecutionBuffer().toString(), ctx);
+ ctx.clearBuffer();
+}
+
+ stringBuffer.append(TEXT_4);
+ stringBuffer.append(TEXT_5);
+ return stringBuffer.toString();
+ }
+public String orchestration(PatternContext ctx) throws Exception {
+InternalPatternContext ictx = (InternalPatternContext)ctx;
+int index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+ super.orchestration(new SuperOrchestrationContext(ictx));
+
+
+method_work(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+if (ictx.useReporter()){
+ ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));
+ Map<String, Object> parameterValues = new HashMap<String, Object>();
+ parameterValues.put("parameter", this.parameter);
+ ictx.getReporter().loopFinished(loop, ictx, parameterValues);
+ ictx.clearBuffer();}
+return loop;
+}
+
+protected org.eclipse.emf.ecore.EClass parameter = null;
+public void set_parameter(org.eclipse.emf.ecore.EClass object) {
+this.parameter = object;
+}
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ }
+ protected void method_work(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_2);
+ stringBuffer.append(parameter.getName());
+ stringBuffer.append(TEXT_3);
+ }
+ }
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/generated/no_callback/strategy/AttributePattern.java b/tests/org.eclipse.egf.core.test.pattern/generated/no_callback/strategy/AttributePattern.java
new file mode 100644
index 0000000..b947841
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/generated/no_callback/strategy/AttributePattern.java
@@ -0,0 +1,94 @@
+package no_callback.strategy;
+
+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 AttributePattern
+{
+ protected static String nl;
+ public static synchronized AttributePattern create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ AttributePattern result = new AttributePattern();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "Attribute ";
+ protected final String TEXT_2 = NL;
+ protected final String TEXT_3 = NL;
+ protected final String TEXT_4 = NL;
+
+ public 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> parameterList = null;
+//this pattern can only be called by another (i.e. it's not an entry point in execution)
+
+
+for (Object parameterParameter : parameterList ) {
+
+this.parameter = (org.eclipse.emf.ecore.EAttribute)parameterParameter;
+
+
+ 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 index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_body(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+if (ictx.useReporter()){
+ ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));
+ Map<String, Object> parameterValues = new HashMap<String, Object>();
+ parameterValues.put("parameter", this.parameter);
+ ictx.getReporter().loopFinished(loop, ictx, parameterValues);
+ ictx.clearBuffer();}
+return loop;
+}
+
+protected org.eclipse.emf.ecore.EAttribute parameter = null;
+public void set_parameter(org.eclipse.emf.ecore.EAttribute object) {
+this.parameter = object;
+}
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append( parameter.getName());
+ stringBuffer.append(TEXT_2);
+ }
+ }
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/generated/no_callback/strategy/ClassPattern.java b/tests/org.eclipse.egf.core.test.pattern/generated/no_callback/strategy/ClassPattern.java
new file mode 100644
index 0000000..c71f7fc
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/generated/no_callback/strategy/ClassPattern.java
@@ -0,0 +1,94 @@
+package no_callback.strategy;
+
+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 ClassPattern
+{
+ protected static String nl;
+ public static synchronized ClassPattern create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ ClassPattern result = new 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 = NL;
+ protected final String TEXT_3 = NL;
+ protected final String TEXT_4 = NL;
+
+ public 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> parameterList = null;
+//this pattern can only be called by another (i.e. it's not an entry point in execution)
+
+
+for (Object parameterParameter : parameterList ) {
+
+this.parameter = (org.eclipse.emf.ecore.EClass)parameterParameter;
+
+
+ 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 index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_body(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+if (ictx.useReporter()){
+ ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));
+ Map<String, Object> parameterValues = new HashMap<String, Object>();
+ parameterValues.put("parameter", this.parameter);
+ ictx.getReporter().loopFinished(loop, ictx, parameterValues);
+ ictx.clearBuffer();}
+return loop;
+}
+
+protected org.eclipse.emf.ecore.EClass parameter = null;
+public void set_parameter(org.eclipse.emf.ecore.EClass object) {
+this.parameter = object;
+}
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append( parameter.getName());
+ stringBuffer.append(TEXT_2);
+ }
+ }
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/generated/no_callback/strategy/PackagePattern.java b/tests/org.eclipse.egf.core.test.pattern/generated/no_callback/strategy/PackagePattern.java
new file mode 100644
index 0000000..2e5dd2c
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/generated/no_callback/strategy/PackagePattern.java
@@ -0,0 +1,94 @@
+package no_callback.strategy;
+
+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 PackagePattern
+{
+ protected static String nl;
+ public static synchronized PackagePattern create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ PackagePattern result = new PackagePattern();
+ nl = null;
+ return result;
+ }
+
+ public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected final String TEXT_1 = "Package ";
+ protected final String TEXT_2 = NL;
+ protected final String TEXT_3 = NL;
+ protected final String TEXT_4 = NL;
+
+ public PackagePattern()
+ {
+ //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> parameterList = null;
+//this pattern can only be called by another (i.e. it's not an entry point in execution)
+
+
+for (Object parameterParameter : parameterList ) {
+
+this.parameter = (org.eclipse.emf.ecore.EPackage)parameterParameter;
+
+
+ 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 index = 0, executionIndex = ictx.getExecutionBuffer().length();
+
+
+method_body(ictx.getBuffer(), ictx);
+
+String loop = ictx.getBuffer().toString();
+if (ictx.useReporter()){
+ ictx.getExecutionBuffer().append(ictx.getBuffer().substring(index));
+ Map<String, Object> parameterValues = new HashMap<String, Object>();
+ parameterValues.put("parameter", this.parameter);
+ ictx.getReporter().loopFinished(loop, ictx, parameterValues);
+ ictx.clearBuffer();}
+return loop;
+}
+
+protected org.eclipse.emf.ecore.EPackage parameter = null;
+public void set_parameter(org.eclipse.emf.ecore.EPackage object) {
+this.parameter = object;
+}
+
+ protected void method_body(final StringBuffer stringBuffer, final PatternContext ctx)throws Exception {
+
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append( parameter.getName());
+ stringBuffer.append(TEXT_2);
+ }
+ }
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/model/model.ecd b/tests/org.eclipse.egf.core.test.pattern/model/model.ecd
new file mode 100644
index 0000000..e9267bd
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/model/model.ecd
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<editmodel:ClassDiagramEditModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editmodel="editmodel.xmi" xmlns:options="options.xmi" id="platform:/resource/pipo/model/(default package).ecore#/" metadata="emf-1.0" tag="100" key="32303037303533312D313030207069706F">
+ <model href="(default package).ecore#/"/>
+ <diagramOptions xsi:type="options:ClassDiagramOptions" properties="wireOptions=1;Product=eEmf" autoName="false"/>
+ <boardSetting snapToGeometry="true" gridEnabled="true" gridSpacing="15,15" gridOrigin="0,0" rulerUnit="pixel" gridVisibility="false">
+ <leftRuler/>
+ <topRuler/>
+ </boardSetting>
+ <classDiagramPreferences xsi:type="editmodel:EMFClassDiagramPreference" showPopupBars="true" showConnectionHandles="true" attributeSorter="Natural" methodSorter="Natural" showClassStereotype="true" showPackageStereotype="true"/>
+</editmodel:ClassDiagramEditModel>
diff --git a/tests/org.eclipse.egf.core.test.pattern/model/mypackage.ecore b/tests/org.eclipse.egf.core.test.pattern/model/mypackage.ecore
new file mode 100644
index 0000000..6b94da3
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/model/mypackage.ecore
@@ -0,0 +1,15 @@
+<?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="mypackage"
+ nsURI="http://mypackage" nsPrefix="mypackage">
+ <eClassifiers xsi:type="ecore:EClass" name="Employee">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Company">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="employees" upperBound="-1"
+ eType="#//Employee" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Test"/>
+</ecore:EPackage>
diff --git a/tests/org.eclipse.egf.core.test.pattern/model/mypackage.fcore b/tests/org.eclipse.egf.core.test.pattern/model/mypackage.fcore
new file mode 100644
index 0000000..80708c9
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/model/mypackage.fcore
@@ -0,0 +1,57 @@
+<?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:types="http://www.eclipse.org/egf/1.0.0/types" xmi:id="_DFx-URojEd-w55oZzb5nig"
+ name="mypackage.genmodel EMF Wrapper">
+ <viewpointContainer xmi:id="_DFx-UhojEd-w55oZzb5nig">
+ <viewpoints xmi:type="domain:DomainViewpoint" xmi:id="_DFx-UxojEd-w55oZzb5nig">
+ <domains xmi:type="domain:DomainURI" xmi:id="_DFx-VBojEd-w55oZzb5nig" uri="platform:/resource/D/model/mypackage.genmodel"/>
+ <domains xmi:type="domain:DomainURI" xmi:id="_DFx-VRojEd-w55oZzb5nig" uri="platform:/resource/D/model/mypackage.ecore"/>
+ </viewpoints>
+ </viewpointContainer>
+ <orchestration xmi:type="fprod:ProductionPlan" xmi:id="_DFx-VhojEd-w55oZzb5nig">
+ <orchestrationParameterContainer xmi:id="_DFx-VxojEd-w55oZzb5nig">
+ <orchestrationParameters xmi:id="_DFx-WBojEd-w55oZzb5nig" invocationContracts="#_DFx-XBojEd-w55oZzb5nig #_DFx-XxojEd-w55oZzb5nig #_DFx-YhojEd-w55oZzb5nig #_DFx-ZRojEd-w55oZzb5nig">
+ <type xmi:type="domain:TypeDomainURI" xmi:id="_DFx-WRojEd-w55oZzb5nig" domain="#_DFx-VBojEd-w55oZzb5nig"/>
+ </orchestrationParameters>
+ </orchestrationParameterContainer>
+ <invocations xmi:id="_DFx-WhojEd-w55oZzb5nig" invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.emf.wrapper/fcs/EMF_Wrapper.fcore#_E0utcP-KEd6BleG0RKg98A">
+ <invocationContractContainer xmi:id="_DFx-WxojEd-w55oZzb5nig">
+ <invocationContracts xmi:id="_DFx-XBojEd-w55oZzb5nig" orchestrationParameter="#_DFx-WBojEd-w55oZzb5nig"
+ invokedContract="platform:/plugin/org.eclipse.egf.emf.wrapper/fcs/EMF_Wrapper.fcore#_GjcSAP-KEd6BleG0RKg98A"/>
+ </invocationContractContainer>
+ </invocations>
+ <invocations xmi:id="_DFx-XRojEd-w55oZzb5nig" invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.emf.wrapper/fcs/EMF_Wrapper.fcore#_o5wBQADyEd-IF6GN14qe5g">
+ <invocationContractContainer xmi:id="_DFx-XhojEd-w55oZzb5nig">
+ <invocationContracts xmi:id="_DFx-XxojEd-w55oZzb5nig" orchestrationParameter="#_DFx-WBojEd-w55oZzb5nig"
+ invokedContract="platform:/plugin/org.eclipse.egf.emf.wrapper/fcs/EMF_Wrapper.fcore#_x4zwsAEjEd-sEofCqqFtwA"/>
+ </invocationContractContainer>
+ </invocations>
+ <invocations xmi:id="_DFx-YBojEd-w55oZzb5nig" invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.emf.wrapper/fcs/EMF_Wrapper.fcore#_tWWIYADyEd-IF6GN14qe5g">
+ <invocationContractContainer xmi:id="_DFx-YRojEd-w55oZzb5nig">
+ <invocationContracts xmi:id="_DFx-YhojEd-w55oZzb5nig" orchestrationParameter="#_DFx-WBojEd-w55oZzb5nig"
+ invokedContract="platform:/plugin/org.eclipse.egf.emf.wrapper/fcs/EMF_Wrapper.fcore#_xzsdcQDyEd-IF6GN14qe5g"/>
+ </invocationContractContainer>
+ </invocations>
+ <invocations xmi:id="_DFx-YxojEd-w55oZzb5nig" invokedActivity="ftask:Task platform:/plugin/org.eclipse.egf.emf.wrapper/fcs/EMF_Wrapper.fcore#_tv0_YADyEd-IF6GN14qe5g">
+ <invocationContractContainer xmi:id="_DFx-ZBojEd-w55oZzb5nig">
+ <invocationContracts xmi:id="_DFx-ZRojEd-w55oZzb5nig" orchestrationParameter="#_DFx-WBojEd-w55oZzb5nig"
+ invokedContract="platform:/plugin/org.eclipse.egf.emf.wrapper/fcs/EMF_Wrapper.fcore#_x7JJQQDyEd-IF6GN14qe5g"/>
+ </invocationContractContainer>
+ </invocations>
+ <invocations xmi:id="_DFx-ZhojEd-w55oZzb5nig" invokedActivity="fcore:FactoryComponent platform:/plugin/org.eclipse.egf.emf.docgen.html/egf/EmfDocGenHtml.fcore#_BxjIkAG0Ed-7fNNmMjB2jQ">
+ <invocationContractContainer xmi:id="_DFx-ZxojEd-w55oZzb5nig">
+ <invocationContracts xmi:id="_DFx-aBojEd-w55oZzb5nig" invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.emf.docgen.html/egf/EmfDocGenHtml.fcore#_Yp4VcAprEd-7fqY_JLtg2w">
+ <type xmi:type="domain:TypeDomainURI" xmi:id="_DFx-aRojEd-w55oZzb5nig" domain="#_DFx-VRojEd-w55oZzb5nig"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_DFx-ahojEd-w55oZzb5nig" invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.emf.docgen.html/egf/EmfDocGenHtml.fcore#_7NKWkApbEd-pyqf4uNW3tw">
+ <type xmi:type="types:TypeString" xmi:id="_DFx-axojEd-w55oZzb5nig" value="pipo.doc"/>
+ </invocationContracts>
+ <invocationContracts xmi:id="_DFx-bBojEd-w55oZzb5nig" invokedContract="fcore:FactoryComponentContract platform:/plugin/org.eclipse.egf.emf.docgen.html/egf/EmfDocGenHtml.fcore#_AvXa4ApcEd-pyqf4uNW3tw">
+ <type xmi:type="types:TypeString" xmi:id="_DFx-bRojEd-w55oZzb5nig" value="html"/>
+ </invocationContracts>
+ </invocationContractContainer>
+ </invocations>
+ </orchestration>
+</fcore:FactoryComponent>
diff --git a/tests/org.eclipse.egf.core.test.pattern/model/mypackage.genmodel b/tests/org.eclipse.egf.core.test.pattern/model/mypackage.genmodel
new file mode 100644
index 0000000..e3f7479
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/model/mypackage.genmodel
@@ -0,0 +1,18 @@
+<?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="/pipo/src"
+ modelPluginID="pipo" modelName="Mypackage" importerID="org.eclipse.emf.importer.ecore"
+ complianceLevel="6.0" copyrightFields="false">
+ <foreignModel>mypackage.ecore</foreignModel>
+ <genPackages prefix="Mypackage" disposableProviderFactory="true" ecorePackage="mypackage.ecore#/">
+ <genClasses ecoreClass="mypackage.ecore#//Employee">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute mypackage.ecore#//Employee/name"/>
+ </genClasses>
+ <genClasses ecoreClass="mypackage.ecore#//Company">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute mypackage.ecore#//Company/name"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference mypackage.ecore#//Company/employees"/>
+ </genClasses>
+ <genClasses ecoreClass="mypackage.ecore#//Test"/>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/tests/org.eclipse.egf.core.test.pattern/plugin.properties b/tests/org.eclipse.egf.core.test.pattern/plugin.properties
new file mode 100644
index 0000000..33e8972
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/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 Test Pattern (Incubation)
+providerName=Eclipse Modeling Project
diff --git a/tests/org.eclipse.egf.core.test.pattern/plugin.xml b/tests/org.eclipse.egf.core.test.pattern/plugin.xml
new file mode 100644
index 0000000..1ae4f6f
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/plugin.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+
+ <extension
+ point="org.eclipse.egf.core.test">
+ <EGFTestModel
+ modelPath="test/Pattern.test">
+ </EGFTestModel>
+ </extension>
+ <extension
+ point="org.eclipse.egf.core.fcore">
+ <fcore
+ id="fc/inheritance_1.fcore">
+ </fcore>
+ <fcore
+ id="fc/inheritance_2.fcore">
+ </fcore>
+ <fcore
+ id="fc/inheritance_3.fcore">
+ </fcore>
+ <fcore
+ id="fc/inheritance_4.fcore">
+ </fcore>
+ <fcore
+ id="model/mypackage.fcore">
+ </fcore>
+ <fcore
+ id="fc/callback_1.fcore">
+ </fcore>
+ <fcore
+ id="fc/no_callback_1.fcore">
+ </fcore>
+ </extension>
+
+</plugin>
diff --git a/tests/org.eclipse.egf.core.test.pattern/result/GenAnnotation b/tests/org.eclipse.egf.core.test.pattern/result/GenAnnotation
new file mode 100644
index 0000000..e3db1d5
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/result/GenAnnotation
@@ -0,0 +1 @@
+fromChild : GenAnnotation fromInjected : source
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/result/GenBase b/tests/org.eclipse.egf.core.test.pattern/result/GenBase
new file mode 100644
index 0000000..2b382d6
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/result/GenBase
@@ -0,0 +1 @@
+fromChild : GenBase
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/result/GenClass b/tests/org.eclipse.egf.core.test.pattern/result/GenClass
new file mode 100644
index 0000000..d022e5a
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/result/GenClass
@@ -0,0 +1 @@
+fromChild : GenClass fromInjected : provider fromInjected : image fromInjected : dynamic
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/result/GenClassifier b/tests/org.eclipse.egf.core.test.pattern/result/GenClassifier
new file mode 100644
index 0000000..b874fb3
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/result/GenClassifier
@@ -0,0 +1 @@
+fromChild : GenClassifier
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/result/GenDataType b/tests/org.eclipse.egf.core.test.pattern/result/GenDataType
new file mode 100644
index 0000000..5e795a6
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/result/GenDataType
@@ -0,0 +1 @@
+fromChild : GenDataType
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/result/GenEnum b/tests/org.eclipse.egf.core.test.pattern/result/GenEnum
new file mode 100644
index 0000000..57f430e
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/result/GenEnum
@@ -0,0 +1 @@
+fromChild : GenEnum fromInjected : typeSafeEnumCompatible
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/result/GenEnumLiteral b/tests/org.eclipse.egf.core.test.pattern/result/GenEnumLiteral
new file mode 100644
index 0000000..39d3b46
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/result/GenEnumLiteral
@@ -0,0 +1 @@
+fromChild : GenEnumLiteral
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/result/GenFeature b/tests/org.eclipse.egf.core.test.pattern/result/GenFeature
new file mode 100644
index 0000000..51f3602
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/result/GenFeature
@@ -0,0 +1 @@
+fromChild : GenFeature fromInjected : property fromInjected : notify fromInjected : children fromInjected : createChild fromInjected : propertyCategory fromInjected : propertyFilterFlags fromInjected : propertyDescription fromInjected : propertyMultiLine fromInjected : propertySortChoices
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/result/GenModel b/tests/org.eclipse.egf.core.test.pattern/result/GenModel
new file mode 100644
index 0000000..3a7f106
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/result/GenModel
@@ -0,0 +1 @@
+fromChild : GenModel fromInjected : copyrightText fromInjected : modelDirectory fromInjected : creationCommands fromInjected : creationIcons fromInjected : creationSubmenus fromInjected : editDirectory fromInjected : editorDirectory fromInjected : modelPluginID fromInjected : templateDirectory fromInjected : runtimeJar fromInjected : foreignModel fromInjected : dynamicTemplates fromInjected : redirection fromInjected : forceOverwrite fromInjected : nonExternalizedStringTag fromInjected : modelName fromInjected : modelPluginClass fromInjected : editPluginClass fromInjected : editorPluginClass fromInjected : updateClasspath fromInjected : generateSchema fromInjected : nonNLSMarkers fromInjected : staticPackages fromInjected : modelPluginVariables fromInjected : rootExtendsInterface fromInjected : rootExtendsClass fromInjected : rootImplementsInterface fromInjected : suppressEMFTypes fromInjected : suppressEMFMetaData fromInjected : suppressEMFModelTags fromInjected : suppressInterfaces fromInjected : featureMapWrapperInterface fromInjected : featureMapWrapperInternalInterface fromInjected : featureMapWrapperClass fromInjected : runtimeCompatibility fromInjected : richClientPlatform fromInjected : reflectiveDelegation fromInjected : codeFormatting fromInjected : testsDirectory fromInjected : testSuiteClass fromInjected : booleanFlagsField fromInjected : booleanFlagsReservedBits fromInjected : importerID fromInjected : bundleManifest fromInjected : featureDelegation fromInjected : containmentProxies fromInjected : minimalReflectiveMethods fromInjected : suppressContainment fromInjected : suppressNotification fromInjected : arrayAccessors fromInjected : suppressUnsettable fromInjected : facadeHelperClass fromInjected : complianceLevel fromInjected : suppressGenModelAnnotations fromInjected : copyrightFields fromInjected : binaryCompatibleReflectiveMethods fromInjected : publicConstructors fromInjected : templatePluginVariables fromInjected : providerRootExtendsClass fromInjected : editPluginID fromInjected : editPluginVariables fromInjected : editorPluginID fromInjected : editorPluginVariables fromInjected : testsPluginID fromInjected : testsPluginVariables fromInjected : optimizedHasChildren fromInjected : tableProviders fromInjected : colorProviders fromInjected : fontProviders fromInjected : runtimeVersion fromInjected : language fromInjected : packedEnums fromInjected : interfaceNamePattern fromInjected : classNamePattern
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/result/GenOperation b/tests/org.eclipse.egf.core.test.pattern/result/GenOperation
new file mode 100644
index 0000000..7f91849
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/result/GenOperation
@@ -0,0 +1 @@
+fromChild : GenOperation
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/result/GenPackage b/tests/org.eclipse.egf.core.test.pattern/result/GenPackage
new file mode 100644
index 0000000..c9e599f
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/result/GenPackage
@@ -0,0 +1 @@
+fromChild : GenPackage fromInjected : prefix fromInjected : basePackage fromInjected : resource fromInjected : disposableProviderFactory fromInjected : adapterFactory fromInjected : loadInitialization fromInjected : interfacePackageSuffix fromInjected : metaDataPackageSuffix fromInjected : classPackageSuffix fromInjected : utilityPackageSuffix fromInjected : providerPackageSuffix fromInjected : presentationPackageSuffix fromInjected : testsPackageSuffix fromInjected : generateExampleClass fromInjected : literalsInterface fromInjected : dataTypeConverters fromInjected : multipleEditorPages fromInjected : generateModelWizard fromInjected : extensibleProviderFactory fromInjected : childCreationExtenders fromInjected : contentTypeIdentifier fromInjected : fileExtensions
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/result/GenParameter b/tests/org.eclipse.egf.core.test.pattern/result/GenParameter
new file mode 100644
index 0000000..daae587
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/result/GenParameter
@@ -0,0 +1 @@
+fromChild : GenParameter
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/result/GenTypeParameter b/tests/org.eclipse.egf.core.test.pattern/result/GenTypeParameter
new file mode 100644
index 0000000..6d691e6
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/result/GenTypeParameter
@@ -0,0 +1 @@
+fromChild : GenTypeParameter
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/result/GenTypedElement b/tests/org.eclipse.egf.core.test.pattern/result/GenTypedElement
new file mode 100644
index 0000000..61a979a
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/result/GenTypedElement
@@ -0,0 +1 @@
+fromChild : GenTypedElement
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/src/org/eclipse/egf/core/test/pattern/JunitConsoleReporter.java b/tests/org.eclipse.egf.core.test.pattern/src/org/eclipse/egf/core/test/pattern/JunitConsoleReporter.java
new file mode 100644
index 0000000..6f8ddb4
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/src/org/eclipse/egf/core/test/pattern/JunitConsoleReporter.java
@@ -0,0 +1,23 @@
+package org.eclipse.egf.core.test.pattern;
+
+import java.util.Map;
+
+import org.eclipse.egf.model.pattern.PatternContext;
+import org.eclipse.egf.model.pattern.PatternExecutionReporter;
+
+public class JunitConsoleReporter implements PatternExecutionReporter{
+
+ public void executionFinished(String output, PatternContext context) {
+ System.out.println("exec finished:");
+ System.out.println(output);
+
+ }
+
+ public void loopFinished(String output, PatternContext context,
+ Map<String, Object> parameterValues) {
+ System.out.println("loop finished:");
+ System.out.println(output);
+
+ }
+
+}
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._-HLLgCITEd-XdOucj2euiQ/method._-HLLgSITEd-XdOucj2euiQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._-HLLgCITEd-XdOucj2euiQ/method._-HLLgSITEd-XdOucj2euiQ.pt
new file mode 100644
index 0000000..71ba41d
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._-HLLgCITEd-XdOucj2euiQ/method._-HLLgSITEd-XdOucj2euiQ.pt
@@ -0,0 +1 @@
+<%@ jet package="inheritance_3" class="child" 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/tests/org.eclipse.egf.core.test.pattern/templates/pattern._-HLLgCITEd-XdOucj2euiQ/method._-HLLgiITEd-XdOucj2euiQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._-HLLgCITEd-XdOucj2euiQ/method._-HLLgiITEd-XdOucj2euiQ.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._-HLLgCITEd-XdOucj2euiQ/method._-HLLgiITEd-XdOucj2euiQ.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._-HLLgCITEd-XdOucj2euiQ/method._-HLLgyITEd-XdOucj2euiQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._-HLLgCITEd-XdOucj2euiQ/method._-HLLgyITEd-XdOucj2euiQ.pt
new file mode 100644
index 0000000..8d16cca
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._-HLLgCITEd-XdOucj2euiQ/method._-HLLgyITEd-XdOucj2euiQ.pt
@@ -0,0 +1 @@
+//default content
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._-HLLgCITEd-XdOucj2euiQ/method._-HLLhCITEd-XdOucj2euiQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._-HLLgCITEd-XdOucj2euiQ/method._-HLLhCITEd-XdOucj2euiQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._-HLLgCITEd-XdOucj2euiQ/method._-HLLhCITEd-XdOucj2euiQ.pt
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._-HLLgCITEd-XdOucj2euiQ/method._JBYPQCIUEd-XdOucj2euiQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._-HLLgCITEd-XdOucj2euiQ/method._JBYPQCIUEd-XdOucj2euiQ.pt
new file mode 100644
index 0000000..da13326
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._-HLLgCITEd-XdOucj2euiQ/method._JBYPQCIUEd-XdOucj2euiQ.pt
@@ -0,0 +1,2 @@
+// child on <%=parameter.getName()%>
+
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._72W_cCITEd-XdOucj2euiQ/method._72W_cSITEd-XdOucj2euiQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._72W_cCITEd-XdOucj2euiQ/method._72W_cSITEd-XdOucj2euiQ.pt
new file mode 100644
index 0000000..ac0edc5
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._72W_cCITEd-XdOucj2euiQ/method._72W_cSITEd-XdOucj2euiQ.pt
@@ -0,0 +1 @@
+<%@ jet package="inheritance_3" class="parent" 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/tests/org.eclipse.egf.core.test.pattern/templates/pattern._72W_cCITEd-XdOucj2euiQ/method._72W_ciITEd-XdOucj2euiQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._72W_cCITEd-XdOucj2euiQ/method._72W_ciITEd-XdOucj2euiQ.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._72W_cCITEd-XdOucj2euiQ/method._72W_ciITEd-XdOucj2euiQ.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._72W_cCITEd-XdOucj2euiQ/method._72W_cyITEd-XdOucj2euiQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._72W_cCITEd-XdOucj2euiQ/method._72W_cyITEd-XdOucj2euiQ.pt
new file mode 100644
index 0000000..8d16cca
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._72W_cCITEd-XdOucj2euiQ/method._72W_cyITEd-XdOucj2euiQ.pt
@@ -0,0 +1 @@
+//default content
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._72W_cCITEd-XdOucj2euiQ/method._72W_dCITEd-XdOucj2euiQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._72W_cCITEd-XdOucj2euiQ/method._72W_dCITEd-XdOucj2euiQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._72W_cCITEd-XdOucj2euiQ/method._72W_dCITEd-XdOucj2euiQ.pt
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._72W_cCITEd-XdOucj2euiQ/method._G4w88CIUEd-XdOucj2euiQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._72W_cCITEd-XdOucj2euiQ/method._G4w88CIUEd-XdOucj2euiQ.pt
new file mode 100644
index 0000000..e34f4b1
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._72W_cCITEd-XdOucj2euiQ/method._G4w88CIUEd-XdOucj2euiQ.pt
@@ -0,0 +1,2 @@
+//mywork on <%=parameter.getName()%>
+
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._AHSpICIUEd-XdOucj2euiQ/method._AHSpISIUEd-XdOucj2euiQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._AHSpICIUEd-XdOucj2euiQ/method._AHSpISIUEd-XdOucj2euiQ.pt
new file mode 100644
index 0000000..6047061
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._AHSpICIUEd-XdOucj2euiQ/method._AHSpISIUEd-XdOucj2euiQ.pt
@@ -0,0 +1 @@
+<%@ jet package="inheritance_3" class="called" 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/tests/org.eclipse.egf.core.test.pattern/templates/pattern._AHSpICIUEd-XdOucj2euiQ/method._AHSpIiIUEd-XdOucj2euiQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._AHSpICIUEd-XdOucj2euiQ/method._AHSpIiIUEd-XdOucj2euiQ.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._AHSpICIUEd-XdOucj2euiQ/method._AHSpIiIUEd-XdOucj2euiQ.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._AHSpICIUEd-XdOucj2euiQ/method._AHSpIyIUEd-XdOucj2euiQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._AHSpICIUEd-XdOucj2euiQ/method._AHSpIyIUEd-XdOucj2euiQ.pt
new file mode 100644
index 0000000..78b33ce
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._AHSpICIUEd-XdOucj2euiQ/method._AHSpIyIUEd-XdOucj2euiQ.pt
@@ -0,0 +1,2 @@
+//called on <%=parameter.getName()%>
+
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._AHSpICIUEd-XdOucj2euiQ/method._AHSpJCIUEd-XdOucj2euiQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._AHSpICIUEd-XdOucj2euiQ/method._AHSpJCIUEd-XdOucj2euiQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._AHSpICIUEd-XdOucj2euiQ/method._AHSpJCIUEd-XdOucj2euiQ.pt
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._CzArsCIYEd-XdOucj2euiQ/method._CzArsSIYEd-XdOucj2euiQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._CzArsCIYEd-XdOucj2euiQ/method._CzArsSIYEd-XdOucj2euiQ.pt
new file mode 100644
index 0000000..5b4ce7f
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._CzArsCIYEd-XdOucj2euiQ/method._CzArsSIYEd-XdOucj2euiQ.pt
@@ -0,0 +1 @@
+<%@ jet package="inheritance_4.strategy" class="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/tests/org.eclipse.egf.core.test.pattern/templates/pattern._CzArsCIYEd-XdOucj2euiQ/method._CzArsiIYEd-XdOucj2euiQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._CzArsCIYEd-XdOucj2euiQ/method._CzArsiIYEd-XdOucj2euiQ.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._CzArsCIYEd-XdOucj2euiQ/method._CzArsiIYEd-XdOucj2euiQ.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._CzArsCIYEd-XdOucj2euiQ/method._CzArsyIYEd-XdOucj2euiQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._CzArsCIYEd-XdOucj2euiQ/method._CzArsyIYEd-XdOucj2euiQ.pt
new file mode 100644
index 0000000..8d16cca
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._CzArsCIYEd-XdOucj2euiQ/method._CzArsyIYEd-XdOucj2euiQ.pt
@@ -0,0 +1 @@
+//default content
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._CzArsCIYEd-XdOucj2euiQ/method._CzArtCIYEd-XdOucj2euiQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._CzArsCIYEd-XdOucj2euiQ/method._CzArtCIYEd-XdOucj2euiQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._CzArsCIYEd-XdOucj2euiQ/method._CzArtCIYEd-XdOucj2euiQ.pt
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._CzArsCIYEd-XdOucj2euiQ/method._PVTuoCIYEd-XdOucj2euiQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._CzArsCIYEd-XdOucj2euiQ/method._PVTuoCIYEd-XdOucj2euiQ.pt
new file mode 100644
index 0000000..d6e9e33
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._CzArsCIYEd-XdOucj2euiQ/method._PVTuoCIYEd-XdOucj2euiQ.pt
@@ -0,0 +1,2 @@
+//additional work on <%=parameter.getName()%>
+
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._IF6vwCIYEd-XdOucj2euiQ/method._IF6vwSIYEd-XdOucj2euiQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._IF6vwCIYEd-XdOucj2euiQ/method._IF6vwSIYEd-XdOucj2euiQ.pt
new file mode 100644
index 0000000..49243d9
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._IF6vwCIYEd-XdOucj2euiQ/method._IF6vwSIYEd-XdOucj2euiQ.pt
@@ -0,0 +1 @@
+<%@ jet package="inheritance_4.base" class="BasePattern" 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/tests/org.eclipse.egf.core.test.pattern/templates/pattern._IF6vwCIYEd-XdOucj2euiQ/method._IF6vwiIYEd-XdOucj2euiQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._IF6vwCIYEd-XdOucj2euiQ/method._IF6vwiIYEd-XdOucj2euiQ.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._IF6vwCIYEd-XdOucj2euiQ/method._IF6vwiIYEd-XdOucj2euiQ.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._IF6vwCIYEd-XdOucj2euiQ/method._IF6vwyIYEd-XdOucj2euiQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._IF6vwCIYEd-XdOucj2euiQ/method._IF6vwyIYEd-XdOucj2euiQ.pt
new file mode 100644
index 0000000..8d16cca
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._IF6vwCIYEd-XdOucj2euiQ/method._IF6vwyIYEd-XdOucj2euiQ.pt
@@ -0,0 +1 @@
+//default content
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._IF6vwCIYEd-XdOucj2euiQ/method._IF6vxCIYEd-XdOucj2euiQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._IF6vwCIYEd-XdOucj2euiQ/method._IF6vxCIYEd-XdOucj2euiQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._IF6vwCIYEd-XdOucj2euiQ/method._IF6vxCIYEd-XdOucj2euiQ.pt
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._IF6vwCIYEd-XdOucj2euiQ/method._J3HnoCIYEd-XdOucj2euiQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._IF6vwCIYEd-XdOucj2euiQ/method._J3HnoCIYEd-XdOucj2euiQ.pt
new file mode 100644
index 0000000..5103b39
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._IF6vwCIYEd-XdOucj2euiQ/method._J3HnoCIYEd-XdOucj2euiQ.pt
@@ -0,0 +1 @@
+// Pipo from parent
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._OaMfICH1Ed-TGv7R8gz0bQ/method._OaMfISH1Ed-TGv7R8gz0bQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._OaMfICH1Ed-TGv7R8gz0bQ/method._OaMfISH1Ed-TGv7R8gz0bQ.pt
new file mode 100644
index 0000000..18dcf75
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._OaMfICH1Ed-TGv7R8gz0bQ/method._OaMfISH1Ed-TGv7R8gz0bQ.pt
@@ -0,0 +1 @@
+<%@ jet package="inheritance_2_called" class="calledByInjection" 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/tests/org.eclipse.egf.core.test.pattern/templates/pattern._OaMfICH1Ed-TGv7R8gz0bQ/method._OaMfIiH1Ed-TGv7R8gz0bQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._OaMfICH1Ed-TGv7R8gz0bQ/method._OaMfIiH1Ed-TGv7R8gz0bQ.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._OaMfICH1Ed-TGv7R8gz0bQ/method._OaMfIiH1Ed-TGv7R8gz0bQ.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._OaMfICH1Ed-TGv7R8gz0bQ/method._OaMfIyH1Ed-TGv7R8gz0bQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._OaMfICH1Ed-TGv7R8gz0bQ/method._OaMfIyH1Ed-TGv7R8gz0bQ.pt
new file mode 100644
index 0000000..0e97207
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._OaMfICH1Ed-TGv7R8gz0bQ/method._OaMfIyH1Ed-TGv7R8gz0bQ.pt
@@ -0,0 +1 @@
+ fromInjected : <%=parameter.getName()%>
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._OaMfICH1Ed-TGv7R8gz0bQ/method._OaMfJCH1Ed-TGv7R8gz0bQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._OaMfICH1Ed-TGv7R8gz0bQ/method._OaMfJCH1Ed-TGv7R8gz0bQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._OaMfICH1Ed-TGv7R8gz0bQ/method._OaMfJCH1Ed-TGv7R8gz0bQ.pt
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._R32xcCH4Ed-TGv7R8gz0bQ/method._R32xcSH4Ed-TGv7R8gz0bQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._R32xcCH4Ed-TGv7R8gz0bQ/method._R32xcSH4Ed-TGv7R8gz0bQ.pt
new file mode 100644
index 0000000..b545a76
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._R32xcCH4Ed-TGv7R8gz0bQ/method._R32xcSH4Ed-TGv7R8gz0bQ.pt
@@ -0,0 +1 @@
+<%@ jet package="inheritance_2" class="parent" 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/tests/org.eclipse.egf.core.test.pattern/templates/pattern._R32xcCH4Ed-TGv7R8gz0bQ/method._R32xciH4Ed-TGv7R8gz0bQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._R32xcCH4Ed-TGv7R8gz0bQ/method._R32xciH4Ed-TGv7R8gz0bQ.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._R32xcCH4Ed-TGv7R8gz0bQ/method._R32xciH4Ed-TGv7R8gz0bQ.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._R32xcCH4Ed-TGv7R8gz0bQ/method._R32xcyH4Ed-TGv7R8gz0bQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._R32xcCH4Ed-TGv7R8gz0bQ/method._R32xcyH4Ed-TGv7R8gz0bQ.pt
new file mode 100644
index 0000000..c2f4ac3
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._R32xcCH4Ed-TGv7R8gz0bQ/method._R32xcyH4Ed-TGv7R8gz0bQ.pt
@@ -0,0 +1 @@
+fromParent
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._R32xcCH4Ed-TGv7R8gz0bQ/method._R32xdCH4Ed-TGv7R8gz0bQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._R32xcCH4Ed-TGv7R8gz0bQ/method._R32xdCH4Ed-TGv7R8gz0bQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._R32xcCH4Ed-TGv7R8gz0bQ/method._R32xdCH4Ed-TGv7R8gz0bQ.pt
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._SSFPUCH4Ed-TGv7R8gz0bQ/method._ACOsUCH7Ed-TGv7R8gz0bQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._SSFPUCH4Ed-TGv7R8gz0bQ/method._ACOsUCH7Ed-TGv7R8gz0bQ.pt
new file mode 100644
index 0000000..7e8a230
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._SSFPUCH4Ed-TGv7R8gz0bQ/method._ACOsUCH7Ed-TGv7R8gz0bQ.pt
@@ -0,0 +1 @@
+<%targetFile = "/org.eclipse.egf.core.test.pattern/result/" + parameter.getName();%>
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._SSFPUCH4Ed-TGv7R8gz0bQ/method._CSxLkCH7Ed-TGv7R8gz0bQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._SSFPUCH4Ed-TGv7R8gz0bQ/method._CSxLkCH7Ed-TGv7R8gz0bQ.pt
new file mode 100644
index 0000000..a8c6044
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._SSFPUCH4Ed-TGv7R8gz0bQ/method._CSxLkCH7Ed-TGv7R8gz0bQ.pt
@@ -0,0 +1 @@
+<%ctx.setValue("targetFile", targetFile);%>
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._SSFPUCH4Ed-TGv7R8gz0bQ/method._SSFPUSH4Ed-TGv7R8gz0bQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._SSFPUCH4Ed-TGv7R8gz0bQ/method._SSFPUSH4Ed-TGv7R8gz0bQ.pt
new file mode 100644
index 0000000..e6c3d6f
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._SSFPUCH4Ed-TGv7R8gz0bQ/method._SSFPUSH4Ed-TGv7R8gz0bQ.pt
@@ -0,0 +1 @@
+<%@ jet package="inheritance_2" class="child" 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/tests/org.eclipse.egf.core.test.pattern/templates/pattern._SSFPUCH4Ed-TGv7R8gz0bQ/method._SSFPUiH4Ed-TGv7R8gz0bQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._SSFPUCH4Ed-TGv7R8gz0bQ/method._SSFPUiH4Ed-TGv7R8gz0bQ.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._SSFPUCH4Ed-TGv7R8gz0bQ/method._SSFPUiH4Ed-TGv7R8gz0bQ.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._SSFPUCH4Ed-TGv7R8gz0bQ/method._SSFPUyH4Ed-TGv7R8gz0bQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._SSFPUCH4Ed-TGv7R8gz0bQ/method._SSFPUyH4Ed-TGv7R8gz0bQ.pt
new file mode 100644
index 0000000..1ffe987
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._SSFPUCH4Ed-TGv7R8gz0bQ/method._SSFPUyH4Ed-TGv7R8gz0bQ.pt
@@ -0,0 +1 @@
+fromChild : <%=parameter.getName()%>
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._SSFPUCH4Ed-TGv7R8gz0bQ/method._SSFPVCH4Ed-TGv7R8gz0bQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._SSFPUCH4Ed-TGv7R8gz0bQ/method._SSFPVCH4Ed-TGv7R8gz0bQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._SSFPUCH4Ed-TGv7R8gz0bQ/method._SSFPVCH4Ed-TGv7R8gz0bQ.pt
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._SSFPUCH4Ed-TGv7R8gz0bQ/method.__i-PYCH4Ed-TGv7R8gz0bQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._SSFPUCH4Ed-TGv7R8gz0bQ/method.__i-PYCH4Ed-TGv7R8gz0bQ.pt
new file mode 100644
index 0000000..40a85bd
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._SSFPUCH4Ed-TGv7R8gz0bQ/method.__i-PYCH4Ed-TGv7R8gz0bQ.pt
@@ -0,0 +1 @@
+<%toInject = parameter;%>
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._Ynm7oBshEd-L7sk1dmRWLg/method._Ynm7oRshEd-L7sk1dmRWLg.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._Ynm7oBshEd-L7sk1dmRWLg/method._Ynm7oRshEd-L7sk1dmRWLg.pt
new file mode 100644
index 0000000..8b951aa
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._Ynm7oBshEd-L7sk1dmRWLg/method._Ynm7oRshEd-L7sk1dmRWLg.pt
@@ -0,0 +1 @@
+<%@ jet package="inheritance_1" class="parent" imports="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/tests/org.eclipse.egf.core.test.pattern/templates/pattern._Ynm7oBshEd-L7sk1dmRWLg/method._Ynm7ohshEd-L7sk1dmRWLg.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._Ynm7oBshEd-L7sk1dmRWLg/method._Ynm7ohshEd-L7sk1dmRWLg.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._Ynm7oBshEd-L7sk1dmRWLg/method._Ynm7ohshEd-L7sk1dmRWLg.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._Ynm7oBshEd-L7sk1dmRWLg/method._Ynm7oxshEd-L7sk1dmRWLg.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._Ynm7oBshEd-L7sk1dmRWLg/method._Ynm7oxshEd-L7sk1dmRWLg.pt
new file mode 100644
index 0000000..648246d
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._Ynm7oBshEd-L7sk1dmRWLg/method._Ynm7oxshEd-L7sk1dmRWLg.pt
@@ -0,0 +1 @@
+fromParent
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._Ynm7oBshEd-L7sk1dmRWLg/method._Ynm7pBshEd-L7sk1dmRWLg.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._Ynm7oBshEd-L7sk1dmRWLg/method._Ynm7pBshEd-L7sk1dmRWLg.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._Ynm7oBshEd-L7sk1dmRWLg/method._Ynm7pBshEd-L7sk1dmRWLg.pt
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._Ynm7oBshEd-L7sk1dmRWLg/method._vXY08CIhEd-puPzASIa3Rw.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._Ynm7oBshEd-L7sk1dmRWLg/method._vXY08CIhEd-puPzASIa3Rw.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._Ynm7oBshEd-L7sk1dmRWLg/method._vXY08CIhEd-puPzASIa3Rw.pt
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._ZLg58BshEd-L7sk1dmRWLg/method._ZLg58RshEd-L7sk1dmRWLg.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._ZLg58BshEd-L7sk1dmRWLg/method._ZLg58RshEd-L7sk1dmRWLg.pt
new file mode 100644
index 0000000..06976fd
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._ZLg58BshEd-L7sk1dmRWLg/method._ZLg58RshEd-L7sk1dmRWLg.pt
@@ -0,0 +1 @@
+<%@ jet package="inheritance_1" class="child" imports="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/tests/org.eclipse.egf.core.test.pattern/templates/pattern._ZLg58BshEd-L7sk1dmRWLg/method._ZLg58hshEd-L7sk1dmRWLg.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._ZLg58BshEd-L7sk1dmRWLg/method._ZLg58hshEd-L7sk1dmRWLg.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._ZLg58BshEd-L7sk1dmRWLg/method._ZLg58hshEd-L7sk1dmRWLg.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._ZLg58BshEd-L7sk1dmRWLg/method._ZLg58xshEd-L7sk1dmRWLg.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._ZLg58BshEd-L7sk1dmRWLg/method._ZLg58xshEd-L7sk1dmRWLg.pt
new file mode 100644
index 0000000..e6830d6
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._ZLg58BshEd-L7sk1dmRWLg/method._ZLg58xshEd-L7sk1dmRWLg.pt
@@ -0,0 +1 @@
+fromChild : <%=parameter.getName()%>
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._ZLg58BshEd-L7sk1dmRWLg/method._ZLg59BshEd-L7sk1dmRWLg.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._ZLg58BshEd-L7sk1dmRWLg/method._ZLg59BshEd-L7sk1dmRWLg.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._ZLg58BshEd-L7sk1dmRWLg/method._ZLg59BshEd-L7sk1dmRWLg.pt
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._ZLg58BshEd-L7sk1dmRWLg/method._yCPRoCIhEd-puPzASIa3Rw.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._ZLg58BshEd-L7sk1dmRWLg/method._yCPRoCIhEd-puPzASIa3Rw.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._ZLg58BshEd-L7sk1dmRWLg/method._yCPRoCIhEd-puPzASIa3Rw.pt
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5EyH-Ed-CStHKuCL0dg/method._25qJACIgEd-puPzASIa3Rw.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5EyH-Ed-CStHKuCL0dg/method._25qJACIgEd-puPzASIa3Rw.pt
new file mode 100644
index 0000000..065054f
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5EyH-Ed-CStHKuCL0dg/method._25qJACIgEd-puPzASIa3Rw.pt
@@ -0,0 +1 @@
+<%targetFile = null;%>
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5EyH-Ed-CStHKuCL0dg/method._Ky8yMCIiEd-puPzASIa3Rw.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5EyH-Ed-CStHKuCL0dg/method._Ky8yMCIiEd-puPzASIa3Rw.pt
new file mode 100644
index 0000000..a8c6044
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5EyH-Ed-CStHKuCL0dg/method._Ky8yMCIiEd-puPzASIa3Rw.pt
@@ -0,0 +1 @@
+<%ctx.setValue("targetFile", targetFile);%>
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5EyH-Ed-CStHKuCL0dg/method._R32xcSH4Ed-TGv7R8gz0bQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5EyH-Ed-CStHKuCL0dg/method._R32xcSH4Ed-TGv7R8gz0bQ.pt
new file mode 100644
index 0000000..b545a76
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5EyH-Ed-CStHKuCL0dg/method._R32xcSH4Ed-TGv7R8gz0bQ.pt
@@ -0,0 +1 @@
+<%@ jet package="inheritance_2" class="parent" 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/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5EyH-Ed-CStHKuCL0dg/method._R32xciH4Ed-TGv7R8gz0bQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5EyH-Ed-CStHKuCL0dg/method._R32xciH4Ed-TGv7R8gz0bQ.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5EyH-Ed-CStHKuCL0dg/method._R32xciH4Ed-TGv7R8gz0bQ.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5EyH-Ed-CStHKuCL0dg/method._R32xcyH4Ed-TGv7R8gz0bQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5EyH-Ed-CStHKuCL0dg/method._R32xcyH4Ed-TGv7R8gz0bQ.pt
new file mode 100644
index 0000000..c2f4ac3
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5EyH-Ed-CStHKuCL0dg/method._R32xcyH4Ed-TGv7R8gz0bQ.pt
@@ -0,0 +1 @@
+fromParent
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5EyH-Ed-CStHKuCL0dg/method._R32xdCH4Ed-TGv7R8gz0bQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5EyH-Ed-CStHKuCL0dg/method._R32xdCH4Ed-TGv7R8gz0bQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5EyH-Ed-CStHKuCL0dg/method._R32xdCH4Ed-TGv7R8gz0bQ.pt
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5GiH-Ed-CStHKuCL0dg/method._5qA7UCIhEd-puPzASIa3Rw.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5GiH-Ed-CStHKuCL0dg/method._5qA7UCIhEd-puPzASIa3Rw.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5GiH-Ed-CStHKuCL0dg/method._5qA7UCIhEd-puPzASIa3Rw.pt
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5GiH-Ed-CStHKuCL0dg/method._ACOsUCH7Ed-TGv7R8gz0bQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5GiH-Ed-CStHKuCL0dg/method._ACOsUCH7Ed-TGv7R8gz0bQ.pt
new file mode 100644
index 0000000..7e8a230
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5GiH-Ed-CStHKuCL0dg/method._ACOsUCH7Ed-TGv7R8gz0bQ.pt
@@ -0,0 +1 @@
+<%targetFile = "/org.eclipse.egf.core.test.pattern/result/" + parameter.getName();%>
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5GiH-Ed-CStHKuCL0dg/method._CSxLkCH7Ed-TGv7R8gz0bQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5GiH-Ed-CStHKuCL0dg/method._CSxLkCH7Ed-TGv7R8gz0bQ.pt
new file mode 100644
index 0000000..a8c6044
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5GiH-Ed-CStHKuCL0dg/method._CSxLkCH7Ed-TGv7R8gz0bQ.pt
@@ -0,0 +1 @@
+<%ctx.setValue("targetFile", targetFile);%>
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5GiH-Ed-CStHKuCL0dg/method._SSFPUSH4Ed-TGv7R8gz0bQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5GiH-Ed-CStHKuCL0dg/method._SSFPUSH4Ed-TGv7R8gz0bQ.pt
new file mode 100644
index 0000000..e6c3d6f
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5GiH-Ed-CStHKuCL0dg/method._SSFPUSH4Ed-TGv7R8gz0bQ.pt
@@ -0,0 +1 @@
+<%@ jet package="inheritance_2" class="child" 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/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5GiH-Ed-CStHKuCL0dg/method._SSFPUiH4Ed-TGv7R8gz0bQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5GiH-Ed-CStHKuCL0dg/method._SSFPUiH4Ed-TGv7R8gz0bQ.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5GiH-Ed-CStHKuCL0dg/method._SSFPUiH4Ed-TGv7R8gz0bQ.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5GiH-Ed-CStHKuCL0dg/method._SSFPUyH4Ed-TGv7R8gz0bQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5GiH-Ed-CStHKuCL0dg/method._SSFPUyH4Ed-TGv7R8gz0bQ.pt
new file mode 100644
index 0000000..1ffe987
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5GiH-Ed-CStHKuCL0dg/method._SSFPUyH4Ed-TGv7R8gz0bQ.pt
@@ -0,0 +1 @@
+fromChild : <%=parameter.getName()%>
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5GiH-Ed-CStHKuCL0dg/method._SSFPVCH4Ed-TGv7R8gz0bQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5GiH-Ed-CStHKuCL0dg/method._SSFPVCH4Ed-TGv7R8gz0bQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5GiH-Ed-CStHKuCL0dg/method._SSFPVCH4Ed-TGv7R8gz0bQ.pt
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5GiH-Ed-CStHKuCL0dg/method.__i-PYCH4Ed-TGv7R8gz0bQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5GiH-Ed-CStHKuCL0dg/method.__i-PYCH4Ed-TGv7R8gz0bQ.pt
new file mode 100644
index 0000000..40a85bd
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5GiH-Ed-CStHKuCL0dg/method.__i-PYCH4Ed-TGv7R8gz0bQ.pt
@@ -0,0 +1 @@
+<%toInject = parameter;%>
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5GiH-Ed-CStHKuCL0dg/method._an3ccCIiEd-puPzASIa3Rw.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5GiH-Ed-CStHKuCL0dg/method._an3ccCIiEd-puPzASIa3Rw.pt
new file mode 100644
index 0000000..7e8a230
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5GiH-Ed-CStHKuCL0dg/method._an3ccCIiEd-puPzASIa3Rw.pt
@@ -0,0 +1 @@
+<%targetFile = "/org.eclipse.egf.core.test.pattern/result/" + parameter.getName();%>
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5LCH-Ed-CStHKuCL0dg/method._0j7LQCIhEd-puPzASIa3Rw.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5LCH-Ed-CStHKuCL0dg/method._0j7LQCIhEd-puPzASIa3Rw.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5LCH-Ed-CStHKuCL0dg/method._0j7LQCIhEd-puPzASIa3Rw.pt
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5LCH-Ed-CStHKuCL0dg/method._GhXoQCIiEd-puPzASIa3Rw.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5LCH-Ed-CStHKuCL0dg/method._GhXoQCIiEd-puPzASIa3Rw.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5LCH-Ed-CStHKuCL0dg/method._GhXoQCIiEd-puPzASIa3Rw.pt
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5LCH-Ed-CStHKuCL0dg/method._OaMfISH1Ed-TGv7R8gz0bQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5LCH-Ed-CStHKuCL0dg/method._OaMfISH1Ed-TGv7R8gz0bQ.pt
new file mode 100644
index 0000000..18dcf75
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5LCH-Ed-CStHKuCL0dg/method._OaMfISH1Ed-TGv7R8gz0bQ.pt
@@ -0,0 +1 @@
+<%@ jet package="inheritance_2_called" class="calledByInjection" 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/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5LCH-Ed-CStHKuCL0dg/method._OaMfIiH1Ed-TGv7R8gz0bQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5LCH-Ed-CStHKuCL0dg/method._OaMfIiH1Ed-TGv7R8gz0bQ.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5LCH-Ed-CStHKuCL0dg/method._OaMfIiH1Ed-TGv7R8gz0bQ.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5LCH-Ed-CStHKuCL0dg/method._OaMfIyH1Ed-TGv7R8gz0bQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5LCH-Ed-CStHKuCL0dg/method._OaMfIyH1Ed-TGv7R8gz0bQ.pt
new file mode 100644
index 0000000..0e97207
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5LCH-Ed-CStHKuCL0dg/method._OaMfIyH1Ed-TGv7R8gz0bQ.pt
@@ -0,0 +1 @@
+ fromInjected : <%=parameter.getName()%>
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5LCH-Ed-CStHKuCL0dg/method._OaMfJCH1Ed-TGv7R8gz0bQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5LCH-Ed-CStHKuCL0dg/method._OaMfJCH1Ed-TGv7R8gz0bQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._nfk5LCH-Ed-CStHKuCL0dg/method._OaMfJCH1Ed-TGv7R8gz0bQ.pt
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._o5IU0CLhEd-F8rS2HRRtPA/method._o5IU0SLhEd-F8rS2HRRtPA.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._o5IU0CLhEd-F8rS2HRRtPA/method._o5IU0SLhEd-F8rS2HRRtPA.pt
new file mode 100644
index 0000000..ec59345
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._o5IU0CLhEd-F8rS2HRRtPA/method._o5IU0SLhEd-F8rS2HRRtPA.pt
@@ -0,0 +1 @@
+<%@ jet package="no_callback.strategy" class="PackagePattern" 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/tests/org.eclipse.egf.core.test.pattern/templates/pattern._o5IU0CLhEd-F8rS2HRRtPA/method._o5IU0iLhEd-F8rS2HRRtPA.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._o5IU0CLhEd-F8rS2HRRtPA/method._o5IU0iLhEd-F8rS2HRRtPA.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._o5IU0CLhEd-F8rS2HRRtPA/method._o5IU0iLhEd-F8rS2HRRtPA.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._o5IU0CLhEd-F8rS2HRRtPA/method._o5IU0yLhEd-F8rS2HRRtPA.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._o5IU0CLhEd-F8rS2HRRtPA/method._o5IU0yLhEd-F8rS2HRRtPA.pt
new file mode 100644
index 0000000..4dc9058
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._o5IU0CLhEd-F8rS2HRRtPA/method._o5IU0yLhEd-F8rS2HRRtPA.pt
@@ -0,0 +1,2 @@
+Package <%= parameter.getName()%>
+
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._o5IU0CLhEd-F8rS2HRRtPA/method._o5IU1CLhEd-F8rS2HRRtPA.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._o5IU0CLhEd-F8rS2HRRtPA/method._o5IU1CLhEd-F8rS2HRRtPA.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._o5IU0CLhEd-F8rS2HRRtPA/method._o5IU1CLhEd-F8rS2HRRtPA.pt
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._oBErcCLhEd-F8rS2HRRtPA/method._oBErcSLhEd-F8rS2HRRtPA.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._oBErcCLhEd-F8rS2HRRtPA/method._oBErcSLhEd-F8rS2HRRtPA.pt
new file mode 100644
index 0000000..f6dccc2
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._oBErcCLhEd-F8rS2HRRtPA/method._oBErcSLhEd-F8rS2HRRtPA.pt
@@ -0,0 +1 @@
+<%@ jet package="no_callback.strategy" class="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/tests/org.eclipse.egf.core.test.pattern/templates/pattern._oBErcCLhEd-F8rS2HRRtPA/method._oBErciLhEd-F8rS2HRRtPA.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._oBErcCLhEd-F8rS2HRRtPA/method._oBErciLhEd-F8rS2HRRtPA.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._oBErcCLhEd-F8rS2HRRtPA/method._oBErciLhEd-F8rS2HRRtPA.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._oBErcCLhEd-F8rS2HRRtPA/method._oBErcyLhEd-F8rS2HRRtPA.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._oBErcCLhEd-F8rS2HRRtPA/method._oBErcyLhEd-F8rS2HRRtPA.pt
new file mode 100644
index 0000000..0b1e082
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._oBErcCLhEd-F8rS2HRRtPA/method._oBErcyLhEd-F8rS2HRRtPA.pt
@@ -0,0 +1,2 @@
+Class <%= parameter.getName()%>
+
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._oBErcCLhEd-F8rS2HRRtPA/method._oBErdCLhEd-F8rS2HRRtPA.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._oBErcCLhEd-F8rS2HRRtPA/method._oBErdCLhEd-F8rS2HRRtPA.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._oBErcCLhEd-F8rS2HRRtPA/method._oBErdCLhEd-F8rS2HRRtPA.pt
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._oboggCLhEd-F8rS2HRRtPA/method._oboggSLhEd-F8rS2HRRtPA.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._oboggCLhEd-F8rS2HRRtPA/method._oboggSLhEd-F8rS2HRRtPA.pt
new file mode 100644
index 0000000..25b6caa
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._oboggCLhEd-F8rS2HRRtPA/method._oboggSLhEd-F8rS2HRRtPA.pt
@@ -0,0 +1 @@
+<%@ jet package="no_callback.strategy" class="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/tests/org.eclipse.egf.core.test.pattern/templates/pattern._oboggCLhEd-F8rS2HRRtPA/method._oboggiLhEd-F8rS2HRRtPA.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._oboggCLhEd-F8rS2HRRtPA/method._oboggiLhEd-F8rS2HRRtPA.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._oboggCLhEd-F8rS2HRRtPA/method._oboggiLhEd-F8rS2HRRtPA.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._oboggCLhEd-F8rS2HRRtPA/method._oboggyLhEd-F8rS2HRRtPA.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._oboggCLhEd-F8rS2HRRtPA/method._oboggyLhEd-F8rS2HRRtPA.pt
new file mode 100644
index 0000000..4f491f2
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._oboggCLhEd-F8rS2HRRtPA/method._oboggyLhEd-F8rS2HRRtPA.pt
@@ -0,0 +1,2 @@
+Attribute <%= parameter.getName()%>
+
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._oboggCLhEd-F8rS2HRRtPA/method._oboghCLhEd-F8rS2HRRtPA.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._oboggCLhEd-F8rS2HRRtPA/method._oboghCLhEd-F8rS2HRRtPA.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._oboggCLhEd-F8rS2HRRtPA/method._oboghCLhEd-F8rS2HRRtPA.pt
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._r2MhsCLHEd-n0OdkUfG5hQ/method._5_xrgCLHEd-n0OdkUfG5hQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._r2MhsCLHEd-n0OdkUfG5hQ/method._5_xrgCLHEd-n0OdkUfG5hQ.pt
new file mode 100644
index 0000000..7056017
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._r2MhsCLHEd-n0OdkUfG5hQ/method._5_xrgCLHEd-n0OdkUfG5hQ.pt
@@ -0,0 +1,2 @@
+[Package <%=parameter.getName()%>]
+
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._r2MhsCLHEd-n0OdkUfG5hQ/method._6rI8sCLHEd-n0OdkUfG5hQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._r2MhsCLHEd-n0OdkUfG5hQ/method._6rI8sCLHEd-n0OdkUfG5hQ.pt
new file mode 100644
index 0000000..f470e03
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._r2MhsCLHEd-n0OdkUfG5hQ/method._6rI8sCLHEd-n0OdkUfG5hQ.pt
@@ -0,0 +1,4 @@
+[End Package]
+
+
+
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._r2MhsCLHEd-n0OdkUfG5hQ/method._r2MhsSLHEd-n0OdkUfG5hQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._r2MhsCLHEd-n0OdkUfG5hQ/method._r2MhsSLHEd-n0OdkUfG5hQ.pt
new file mode 100644
index 0000000..c01e22c
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._r2MhsCLHEd-n0OdkUfG5hQ/method._r2MhsSLHEd-n0OdkUfG5hQ.pt
@@ -0,0 +1 @@
+<%@ jet package="callback_1.strategy" class="PackagePattern" 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/tests/org.eclipse.egf.core.test.pattern/templates/pattern._r2MhsCLHEd-n0OdkUfG5hQ/method._r2MhsiLHEd-n0OdkUfG5hQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._r2MhsCLHEd-n0OdkUfG5hQ/method._r2MhsiLHEd-n0OdkUfG5hQ.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._r2MhsCLHEd-n0OdkUfG5hQ/method._r2MhsiLHEd-n0OdkUfG5hQ.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._r2MhsCLHEd-n0OdkUfG5hQ/method._r2MhsyLHEd-n0OdkUfG5hQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._r2MhsCLHEd-n0OdkUfG5hQ/method._r2MhsyLHEd-n0OdkUfG5hQ.pt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._r2MhsCLHEd-n0OdkUfG5hQ/method._r2MhsyLHEd-n0OdkUfG5hQ.pt
@@ -0,0 +1 @@
+
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._r2MhsCLHEd-n0OdkUfG5hQ/method._r2MhtCLHEd-n0OdkUfG5hQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._r2MhsCLHEd-n0OdkUfG5hQ/method._r2MhtCLHEd-n0OdkUfG5hQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._r2MhsCLHEd-n0OdkUfG5hQ/method._r2MhtCLHEd-n0OdkUfG5hQ.pt
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._sqZl0CLHEd-n0OdkUfG5hQ/method._-4hjICLHEd-n0OdkUfG5hQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._sqZl0CLHEd-n0OdkUfG5hQ/method._-4hjICLHEd-n0OdkUfG5hQ.pt
new file mode 100644
index 0000000..78694cf
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._sqZl0CLHEd-n0OdkUfG5hQ/method._-4hjICLHEd-n0OdkUfG5hQ.pt
@@ -0,0 +1,2 @@
+ [end class]
+
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._sqZl0CLHEd-n0OdkUfG5hQ/method._-HUvsCLHEd-n0OdkUfG5hQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._sqZl0CLHEd-n0OdkUfG5hQ/method._-HUvsCLHEd-n0OdkUfG5hQ.pt
new file mode 100644
index 0000000..43a9952
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._sqZl0CLHEd-n0OdkUfG5hQ/method._-HUvsCLHEd-n0OdkUfG5hQ.pt
@@ -0,0 +1,2 @@
+ [class <%=parameter.getName()%>]
+
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._sqZl0CLHEd-n0OdkUfG5hQ/method._sqZl0SLHEd-n0OdkUfG5hQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._sqZl0CLHEd-n0OdkUfG5hQ/method._sqZl0SLHEd-n0OdkUfG5hQ.pt
new file mode 100644
index 0000000..6a99800
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._sqZl0CLHEd-n0OdkUfG5hQ/method._sqZl0SLHEd-n0OdkUfG5hQ.pt
@@ -0,0 +1 @@
+<%@ jet package="callback_1.strategy" class="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/tests/org.eclipse.egf.core.test.pattern/templates/pattern._sqZl0CLHEd-n0OdkUfG5hQ/method._sqZl0iLHEd-n0OdkUfG5hQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._sqZl0CLHEd-n0OdkUfG5hQ/method._sqZl0iLHEd-n0OdkUfG5hQ.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._sqZl0CLHEd-n0OdkUfG5hQ/method._sqZl0iLHEd-n0OdkUfG5hQ.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._sqZl0CLHEd-n0OdkUfG5hQ/method._sqZl0yLHEd-n0OdkUfG5hQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._sqZl0CLHEd-n0OdkUfG5hQ/method._sqZl0yLHEd-n0OdkUfG5hQ.pt
new file mode 100644
index 0000000..8d16cca
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._sqZl0CLHEd-n0OdkUfG5hQ/method._sqZl0yLHEd-n0OdkUfG5hQ.pt
@@ -0,0 +1 @@
+//default content
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._sqZl0CLHEd-n0OdkUfG5hQ/method._sqZl1CLHEd-n0OdkUfG5hQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._sqZl0CLHEd-n0OdkUfG5hQ/method._sqZl1CLHEd-n0OdkUfG5hQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._sqZl0CLHEd-n0OdkUfG5hQ/method._sqZl1CLHEd-n0OdkUfG5hQ.pt
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._tCjnICLHEd-n0OdkUfG5hQ/method._C7AhICLIEd-n0OdkUfG5hQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._tCjnICLHEd-n0OdkUfG5hQ/method._C7AhICLIEd-n0OdkUfG5hQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._tCjnICLHEd-n0OdkUfG5hQ/method._C7AhICLIEd-n0OdkUfG5hQ.pt
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._tCjnICLHEd-n0OdkUfG5hQ/method._DkaDcCLIEd-n0OdkUfG5hQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._tCjnICLHEd-n0OdkUfG5hQ/method._DkaDcCLIEd-n0OdkUfG5hQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._tCjnICLHEd-n0OdkUfG5hQ/method._DkaDcCLIEd-n0OdkUfG5hQ.pt
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._tCjnICLHEd-n0OdkUfG5hQ/method._tCjnISLHEd-n0OdkUfG5hQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._tCjnICLHEd-n0OdkUfG5hQ/method._tCjnISLHEd-n0OdkUfG5hQ.pt
new file mode 100644
index 0000000..f2f1967
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._tCjnICLHEd-n0OdkUfG5hQ/method._tCjnISLHEd-n0OdkUfG5hQ.pt
@@ -0,0 +1 @@
+<%@ jet package="callback_1.strategy" class="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/tests/org.eclipse.egf.core.test.pattern/templates/pattern._tCjnICLHEd-n0OdkUfG5hQ/method._tCjnIiLHEd-n0OdkUfG5hQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._tCjnICLHEd-n0OdkUfG5hQ/method._tCjnIiLHEd-n0OdkUfG5hQ.pt
new file mode 100644
index 0000000..d630053
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._tCjnICLHEd-n0OdkUfG5hQ/method._tCjnIiLHEd-n0OdkUfG5hQ.pt
@@ -0,0 +1 @@
+<%// add initialisation of the pattern variables (declaration has been already done).%>
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._tCjnICLHEd-n0OdkUfG5hQ/method._tCjnIyLHEd-n0OdkUfG5hQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._tCjnICLHEd-n0OdkUfG5hQ/method._tCjnIyLHEd-n0OdkUfG5hQ.pt
new file mode 100644
index 0000000..954fc4e
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._tCjnICLHEd-n0OdkUfG5hQ/method._tCjnIyLHEd-n0OdkUfG5hQ.pt
@@ -0,0 +1,2 @@
+ Attribute <%=parameter.getName()%>
+
diff --git a/tests/org.eclipse.egf.core.test.pattern/templates/pattern._tCjnICLHEd-n0OdkUfG5hQ/method._tCjnJCLHEd-n0OdkUfG5hQ.pt b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._tCjnICLHEd-n0OdkUfG5hQ/method._tCjnJCLHEd-n0OdkUfG5hQ.pt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/templates/pattern._tCjnICLHEd-n0OdkUfG5hQ/method._tCjnJCLHEd-n0OdkUfG5hQ.pt
diff --git a/tests/org.eclipse.egf.core.test.pattern/test/Pattern.test b/tests/org.eclipse.egf.core.test.pattern/test/Pattern.test
new file mode 100644
index 0000000..528a375
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test.pattern/test/Pattern.test
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<test:TestSuite xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:fcore="http://www.eclipse.org/egf/1.0.0/fcore" xmlns:test="http://www.eclipse.org/egf/1.0.0/test" name="Pattern Test Suite">
+ <tests xsi:type="test:TestSuite" name="Inheritance">
+ <tests xsi:type="test:EGFTestCase" name="inheritance_1">
+ <result xsi:type="test:ConsoleOutputTestResult" text="loop finished:
fromChild : GenModel
loop finished:
fromChild : GenPackage
loop finished:
fromChild : GenClass
loop finished:
fromChild : GenFeature
loop finished:
fromChild : GenBase
loop finished:
fromChild : GenEnum
loop finished:
fromChild : GenEnumLiteral
loop finished:
fromChild : GenClassifier
loop finished:
fromChild : GenDataType
loop finished:
fromChild : GenOperation
loop finished:
fromChild : GenParameter
loop finished:
fromChild : GenTypedElement
loop finished:
fromChild : GenAnnotation
loop finished:
fromChild : GenTypeParameter
exec finished:
fromChild : GenModelfromChild : GenPackagefromChild : GenClassfromChild : GenFeaturefromChild : GenBasefromChild : GenEnumfromChild : GenEnumLiteralfromChild : GenClassifierfromChild : GenDataTypefromChild : GenOperationfromChild : GenParameterfromChild : GenTypedElementfromChild : GenAnnotationfromChild : GenTypeParameter
"/>
+ <activity xsi:type="fcore:FactoryComponent" href="../fc/inheritance_1.fcore#_XB1QoBshEd-L7sk1dmRWLg"/>
+ </tests>
+ <tests xsi:type="test:EGFTestCase" name="inheritance_2">
+ <result xsi:type="test:ConsoleOutputTestResult" text="loop finished:
fromChild : GenModel fromInjected : copyrightText fromInjected : modelDirectory fromInjected : creationCommands fromInjected : creationIcons fromInjected : creationSubmenus fromInjected : editDirectory fromInjected : editorDirectory fromInjected : modelPluginID fromInjected : templateDirectory fromInjected : runtimeJar fromInjected : foreignModel fromInjected : dynamicTemplates fromInjected : redirection fromInjected : forceOverwrite fromInjected : nonExternalizedStringTag fromInjected : modelName fromInjected : modelPluginClass fromInjected : editPluginClass fromInjected : editorPluginClass fromInjected : updateClasspath fromInjected : generateSchema fromInjected : nonNLSMarkers fromInjected : staticPackages fromInjected : modelPluginVariables fromInjected : rootExtendsInterface fromInjected : rootExtendsClass fromInjected : rootImplementsInterface fromInjected : suppressEMFTypes fromInjected : suppressEMFMetaData fromInjected : suppressEMFModelTags fromInjected : suppressInterfaces fromInjected : featureMapWrapperInterface fromInjected : featureMapWrapperInternalInterface fromInjected : featureMapWrapperClass fromInjected : runtimeCompatibility fromInjected : richClientPlatform fromInjected : reflectiveDelegation fromInjected : codeFormatting fromInjected : testsDirectory fromInjected : testSuiteClass fromInjected : booleanFlagsField fromInjected : booleanFlagsReservedBits fromInjected : importerID fromInjected : bundleManifest fromInjected : featureDelegation fromInjected : containmentProxies fromInjected : minimalReflectiveMethods fromInjected : suppressContainment fromInjected : suppressNotification fromInjected : arrayAccessors fromInjected : suppressUnsettable fromInjected : facadeHelperClass fromInjected : complianceLevel fromInjected : suppressGenModelAnnotations fromInjected : copyrightFields fromInjected : binaryCompatibleReflectiveMethods fromInjected : publicConstructors fromInjected : templatePluginVariables fromInjected : providerRootExtendsClass fromInjected : editPluginID fromInjected : editPluginVariables fromInjected : editorPluginID fromInjected : editorPluginVariables fromInjected : testsPluginID fromInjected : testsPluginVariables fromInjected : optimizedHasChildren fromInjected : tableProviders fromInjected : colorProviders fromInjected : fontProviders fromInjected : runtimeVersion fromInjected : language fromInjected : packedEnums fromInjected : interfaceNamePattern fromInjected : classNamePattern
loop finished:
fromChild : GenPackage fromInjected : prefix fromInjected : basePackage fromInjected : resource fromInjected : disposableProviderFactory fromInjected : adapterFactory fromInjected : loadInitialization fromInjected : interfacePackageSuffix fromInjected : metaDataPackageSuffix fromInjected : classPackageSuffix fromInjected : utilityPackageSuffix fromInjected : providerPackageSuffix fromInjected : presentationPackageSuffix fromInjected : testsPackageSuffix fromInjected : generateExampleClass fromInjected : literalsInterface fromInjected : dataTypeConverters fromInjected : multipleEditorPages fromInjected : generateModelWizard fromInjected : extensibleProviderFactory fromInjected : childCreationExtenders fromInjected : contentTypeIdentifier fromInjected : fileExtensions
loop finished:
fromChild : GenClass fromInjected : provider fromInjected : image fromInjected : dynamic
loop finished:
fromChild : GenFeature fromInjected : property fromInjected : notify fromInjected : children fromInjected : createChild fromInjected : propertyCategory fromInjected : propertyFilterFlags fromInjected : propertyDescription fromInjected : propertyMultiLine fromInjected : propertySortChoices
loop finished:
fromChild : GenBase
loop finished:
fromChild : GenEnum fromInjected : typeSafeEnumCompatible
loop finished:
fromChild : GenEnumLiteral
loop finished:
fromChild : GenClassifier
loop finished:
fromChild : GenDataType
loop finished:
fromChild : GenOperation
loop finished:
fromChild : GenParameter
loop finished:
fromChild : GenTypedElement
loop finished:
fromChild : GenAnnotation fromInjected : source
loop finished:
fromChild : GenTypeParameter
exec finished:
fromChild : GenModel fromInjected : copyrightText fromInjected : modelDirectory fromInjected : creationCommands fromInjected : creationIcons fromInjected : creationSubmenus fromInjected : editDirectory fromInjected : editorDirectory fromInjected : modelPluginID fromInjected : templateDirectory fromInjected : runtimeJar fromInjected : foreignModel fromInjected : dynamicTemplates fromInjected : redirection fromInjected : forceOverwrite fromInjected : nonExternalizedStringTag fromInjected : modelName fromInjected : modelPluginClass fromInjected : editPluginClass fromInjected : editorPluginClass fromInjected : updateClasspath fromInjected : generateSchema fromInjected : nonNLSMarkers fromInjected : staticPackages fromInjected : modelPluginVariables fromInjected : rootExtendsInterface fromInjected : rootExtendsClass fromInjected : rootImplementsInterface fromInjected : suppressEMFTypes fromInjected : suppressEMFMetaData fromInjected : suppressEMFModelTags fromInjected : suppressInterfaces fromInjected : featureMapWrapperInterface fromInjected : featureMapWrapperInternalInterface fromInjected : featureMapWrapperClass fromInjected : runtimeCompatibility fromInjected : richClientPlatform fromInjected : reflectiveDelegation fromInjected : codeFormatting fromInjected : testsDirectory fromInjected : testSuiteClass fromInjected : booleanFlagsField fromInjected : booleanFlagsReservedBits fromInjected : importerID fromInjected : bundleManifest fromInjected : featureDelegation fromInjected : containmentProxies fromInjected : minimalReflectiveMethods fromInjected : suppressContainment fromInjected : suppressNotification fromInjected : arrayAccessors fromInjected : suppressUnsettable fromInjected : facadeHelperClass fromInjected : complianceLevel fromInjected : suppressGenModelAnnotations fromInjected : copyrightFields fromInjected : binaryCompatibleReflectiveMethods fromInjected : publicConstructors fromInjected : templatePluginVariables fromInjected : providerRootExtendsClass fromInjected : editPluginID fromInjected : editPluginVariables fromInjected : editorPluginID fromInjected : editorPluginVariables fromInjected : testsPluginID fromInjected : testsPluginVariables fromInjected : optimizedHasChildren fromInjected : tableProviders fromInjected : colorProviders fromInjected : fontProviders fromInjected : runtimeVersion fromInjected : language fromInjected : packedEnums fromInjected : interfaceNamePattern fromInjected : classNamePatternfromChild : GenPackage fromInjected : prefix fromInjected : basePackage fromInjected : resource fromInjected : disposableProviderFactory fromInjected : adapterFactory fromInjected : loadInitialization fromInjected : interfacePackageSuffix fromInjected : metaDataPackageSuffix fromInjected : classPackageSuffix fromInjected : utilityPackageSuffix fromInjected : providerPackageSuffix fromInjected : presentationPackageSuffix fromInjected : testsPackageSuffix fromInjected : generateExampleClass fromInjected : literalsInterface fromInjected : dataTypeConverters fromInjected : multipleEditorPages fromInjected : generateModelWizard fromInjected : extensibleProviderFactory fromInjected : childCreationExtenders fromInjected : contentTypeIdentifier fromInjected : fileExtensionsfromChild : GenClass fromInjected : provider fromInjected : image fromInjected : dynamicfromChild : GenFeature fromInjected : property fromInjected : notify fromInjected : children fromInjected : createChild fromInjected : propertyCategory fromInjected : propertyFilterFlags fromInjected : propertyDescription fromInjected : propertyMultiLine fromInjected : propertySortChoicesfromChild : GenBasefromChild : GenEnum fromInjected : typeSafeEnumCompatiblefromChild : GenEnumLiteralfromChild : GenClassifierfromChild : GenDataTypefromChild : GenOperationfromChild : GenParameterfromChild : GenTypedElementfromChild : GenAnnotation fromInjected : sourcefromChild : GenTypeParameter
"/>
+ <activity xsi:type="fcore:FactoryComponent" href="../fc/inheritance_2.fcore#_mTlnECH-Ed-CStHKuCL0dg"/>
+ </tests>
+ <tests xsi:type="test:EGFTestCase" name="inheritance_3">
+ <result xsi:type="test:ConsoleOutputTestResult" text="loop finished:
//mywork on Employee
// child on Employee
//called on Employee

loop finished:
//mywork on Company
// child on Company
//called on Company

loop finished:
//mywork on Test
// child on Test
//called on Test

exec finished:
//mywork on Employee
// child on Employee
//called on Employee
//mywork on Company
// child on Company
//called on Company
//mywork on Test
// child on Test
//called on Test

"/>
+ <activity xsi:type="fcore:FactoryComponent" href="../fc/inheritance_3.fcore#_mQLQQCIKEd-l6L0LIketyw"/>
+ </tests>
+ <tests xsi:type="test:EGFTestCase" name="inheritance_4">
+ <result xsi:type="test:ConsoleOutputTestResult" text="loop finished:
// Pipo from parent//additional work on Employee

loop finished:
// Pipo from parent//additional work on Company

loop finished:
// Pipo from parent//additional work on Test

exec finished:
// Pipo from parent//additional work on Employee
// Pipo from parent//additional work on Company
// Pipo from parent//additional work on Test

"/>
+ <activity xsi:type="fcore:FactoryComponent" href="../fc/inheritance_4.fcore#_8e1X4CIXEd-XdOucj2euiQ"/>
+ </tests>
+ </tests>
+ <tests xsi:type="test:TestSuite" name="model driven strategy & Callback">
+ <tests xsi:type="test:EGFTestCase" name="callback 1">
+ <result xsi:type="test:ConsoleOutputTestResult" text="loop finished:
 Attribute name

loop finished:
 [class Employee]
 [end class]

loop finished:
 Attribute name

loop finished:
 [class Company]
 [end class]

loop finished:
 [class Test]
 [end class]

loop finished:
[Package mypackage]
[End Package]



exec finished:
[Package mypackage]
 [class Employee]
 Attribute name
 [end class]
 [class Company]
 Attribute name
 [end class]
 [class Test]
 [end class]
[End Package]



"/>
+ <activity xsi:type="fcore:FactoryComponent" href="../fc/callback_1.fcore#_KylW0SLHEd-n0OdkUfG5hQ"/>
+ </tests>
+ <tests xsi:type="test:EGFTestCase" name="callback 2">
+ <result xsi:type="test:ConsoleOutputTestResult" text="loop finished:
Package mypackage

loop finished:
Class Employee

loop finished:
Attribute name

loop finished:
Class Company

loop finished:
Attribute name

loop finished:
Class Test

exec finished:
Package mypackage
Class Employee
Attribute name
Class Company
Attribute name
Class Test

"/>
+ <activity xsi:type="fcore:FactoryComponent" href="../fc/no_callback_1.fcore#_gUlg4CLhEd-F8rS2HRRtPA"/>
+ </tests>
+ </tests>
+</test:TestSuite>
diff --git a/tests/org.eclipse.egf.core.test/.classpath b/tests/org.eclipse.egf.core.test/.classpath
new file mode 100644
index 0000000..69ed702
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="test"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/org.eclipse.egf.core.test/.project b/tests/org.eclipse.egf.core.test/.project
new file mode 100644
index 0000000..77f650f
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.egf.core.test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/org.eclipse.egf.core.test/.settings/org.eclipse.core.resources.prefs b/tests/org.eclipse.egf.core.test/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..48d61a7
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Wed Feb 17 16:15:12 CET 2010
+eclipse.preferences.version=1
+encoding/about.html=ISO-8859-1
diff --git a/tests/org.eclipse.egf.core.test/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.egf.core.test/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..083d2be
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Wed Oct 14 13:49:14 CEST 2009
+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/tests/org.eclipse.egf.core.test/EGF_Core_Tests.launch b/tests/org.eclipse.egf.core.test/EGF_Core_Tests.launch
new file mode 100644
index 0000000..092829c
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test/EGF_Core_Tests.launch
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.egf.core.test/test/org/eclipse/egf/core/test/AllTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.egf.core.test.AllTests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.egf.core.test"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms128m -Xmx512m -XX:PermSize=256M -XX:MaxPermSize=512M"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.platform.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="false"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="timestamp" value="1266421517703"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="false"/>
+</launchConfiguration>
diff --git a/tests/org.eclipse.egf.core.test/META-INF/MANIFEST.MF b/tests/org.eclipse.egf.core.test/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..4b0392e
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test/META-INF/MANIFEST.MF
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.egf.core.test;singleton:=true
+Bundle-Version: 0.2.2.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.egf.core.test.EGFCoreTestPlugin
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle:
+ org.eclipse.core.runtime,
+ org.junit,
+ org.eclipse.egf.ftask.producer,
+ org.eclipse.egf.core.test.model,
+ org.eclipse.egf.example.task.h1
+Bundle-ActivationPolicy: lazy
diff --git a/tests/org.eclipse.egf.core.test/about.html b/tests/org.eclipse.egf.core.test/about.html
new file mode 100644
index 0000000..7e766fe
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test/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/tests/org.eclipse.egf.core.test/build.properties b/tests/org.eclipse.egf.core.test/build.properties
new file mode 100644
index 0000000..28f4dec
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test/build.properties
@@ -0,0 +1,22 @@
+##
+# 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
+##
+
+source.. = src/,\
+ test/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ schema/,\
+ EGF_Core_Tests.launch,\
+ plugin.properties,\
+ plugin.xml,\
+ about.html
+src.includes = about.html
diff --git a/tests/org.eclipse.egf.core.test/plugin.properties b/tests/org.eclipse.egf.core.test/plugin.properties
new file mode 100644
index 0000000..c090108
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test/plugin.properties
@@ -0,0 +1,15 @@
+##
+# 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 Core Test (Incubation)
+providerName=Eclipse Modeling Project
+
+EGF_Test_Schema= EGF Test Schema
diff --git a/tests/org.eclipse.egf.core.test/plugin.xml b/tests/org.eclipse.egf.core.test/plugin.xml
new file mode 100644
index 0000000..ef15295
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test/plugin.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+ <extension-point
+ id="org.eclipse.egf.core.test"
+ name="%EGF_Test_Schema"
+ schema="schema/org.eclipse.egf.core.test.exsd"
+ />
+
+</plugin>
diff --git a/tests/org.eclipse.egf.core.test/schema/org.eclipse.egf.core.test.exsd b/tests/org.eclipse.egf.core.test/schema/org.eclipse.egf.core.test.exsd
new file mode 100644
index 0000000..ec9a30c
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test/schema/org.eclipse.egf.core.test.exsd
@@ -0,0 +1,102 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.egf.core.test" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.egf.core.test" id="org.eclipse.egf.core.test" name="EGF test"/>
+ </appinfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <sequence minOccurs="1" maxOccurs="unbounded">
+ <element ref="EGFTestModel" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="EGFTestModel">
+ <complexType>
+ <attribute name="modelPath" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="resource"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
diff --git a/tests/org.eclipse.egf.core.test/src/org/eclipse/egf/core/test/EGFCoreTestPlugin.java b/tests/org.eclipse.egf.core.test/src/org/eclipse/egf/core/test/EGFCoreTestPlugin.java
new file mode 100644
index 0000000..1a27a3c
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test/src/org/eclipse/egf/core/test/EGFCoreTestPlugin.java
@@ -0,0 +1,55 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.test;
+
+import org.eclipse.egf.common.activator.EGFAbstractPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class EGFCoreTestPlugin extends EGFAbstractPlugin {
+
+ // The shared instance
+ private static EGFCoreTestPlugin __plugin;
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.Plugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ __plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ __plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static EGFCoreTestPlugin getDefault() {
+ return __plugin;
+ }
+
+}
diff --git a/tests/org.eclipse.egf.core.test/test/org/eclipse/egf/core/test/AllTests.java b/tests/org.eclipse.egf.core.test/test/org/eclipse/egf/core/test/AllTests.java
new file mode 100644
index 0000000..d74e98d
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test/test/org/eclipse/egf/core/test/AllTests.java
@@ -0,0 +1,37 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.egf.core.test.factorycomponent.ContextFactoryComponent;
+import org.eclipse.egf.core.test.model.validation.ModelValidation;
+import org.eclipse.egf.core.test.task.ContextTask;
+
+/**
+ * @author Xavier Maysonnave
+ *
+ */
+public class AllTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("EGF Core Test Suite"); //$NON-NLS-1$
+
+ new ModelTestHelper().addModelTest(suite);
+
+ suite.addTest(ModelValidation.suite());
+ suite.addTest(ContextFactoryComponent.suite());
+ suite.addTest(ContextTask.suite());
+
+ return suite;
+ }
+}
diff --git a/tests/org.eclipse.egf.core.test/test/org/eclipse/egf/core/test/ModelTestCase.java b/tests/org.eclipse.egf.core.test/test/org/eclipse/egf/core/test/ModelTestCase.java
new file mode 100644
index 0000000..f01c354
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test/test/org/eclipse/egf/core/test/ModelTestCase.java
@@ -0,0 +1,210 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.test;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.PrintStream;
+import java.io.StringReader;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.core.producer.MissingExtensionException;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.producer.EGFProducerPlugin;
+import org.eclipse.egf.producer.manager.ActivityManagerProducer;
+import org.eclipse.egf.producer.manager.IActivityManager;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.ecore.util.Diagnostician;
+
+import test.ConsoleOutputTestResult;
+import test.EGFTestCase;
+import test.ExceptionTestResult;
+import test.FileOutputTestResult;
+import test.TestResult;
+import test.ValidationErrorTestResult;
+
+/**
+ * @author Matthieu Helleboid
+ *
+ */
+public class ModelTestCase extends junit.framework.TestCase {
+
+ private EGFTestCase testCase;
+
+ public ModelTestCase(EGFTestCase testCase) {
+ super(testCase.getName());
+ this.testCase = testCase;
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ @Override
+ protected void runTest() throws Throwable {
+ PrintStream out = System.out;
+
+ ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
+ System.setOut(new PrintStream(byteArrayOutputStream));
+
+ Activity activity = testCase.getActivity();
+ TestResult result = testCase.getResult();
+
+ try {
+ runActivity(activity, result);
+ handleConsoleOutputTestResult(byteArrayOutputStream, result);
+ handleFileOutputTestResult(result);
+ } catch (Exception e) {
+ handleExceptionTestResult(result, e);
+ } finally {
+ System.setOut(out);
+ }
+ }
+
+ private void handleFileOutputTestResult(TestResult result) {
+ if (result instanceof FileOutputTestResult) {
+ FileOutputTestResult fileOutputTestResult = (FileOutputTestResult) result;
+
+ String expectedString = fileOutputTestResult.getText();
+ String iFilePath = fileOutputTestResult.getIFilePath();
+ IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(iFilePath));
+
+ if (!file.exists())
+ fail("The expected file " + iFilePath + " should exist");
+
+ long fileLength = new File(file.getRawLocationURI()).length();
+ // If both are null, it's ok
+ if (expectedString == null && fileLength == 0)
+ return;
+
+ // If one is not null, it's not ok
+ assertNotSame("The file " + iFilePath + " should not be empty.", fileLength, 0);
+ assertNotNull("The file " + iFilePath + " should be empty.", expectedString);
+
+ try {
+ BufferedReader expectedReader = new BufferedReader(new StringReader(expectedString));
+ BufferedReader resultReader = new BufferedReader(new InputStreamReader(file.getContents()));
+ compareContent(expectedReader, resultReader);
+ } catch (CoreException e) {
+ fail("The expected file " + iFilePath + " cannot be read : " + e.getMessage());
+ }
+ }
+ }
+
+ private void handleConsoleOutputTestResult(ByteArrayOutputStream byteArrayOutputStream, TestResult result) {
+ if (result instanceof ConsoleOutputTestResult) {
+ ConsoleOutputTestResult consoleOutputTestResult = (ConsoleOutputTestResult) result;
+
+ String expectedString = consoleOutputTestResult.getText();
+ String resultString = byteArrayOutputStream.toString();
+
+ // If both are null, it's ok
+ if (expectedString == null && resultString == null)
+ return;
+
+ // If one is not null, it's not ok
+ assertNotNull("There is no output but a result was expected <[" + expectedString + "]>", resultString);
+ assertNotNull("There is a output but no result was expected <[" + resultString + "]>", expectedString);
+
+ BufferedReader expectedReader = new BufferedReader(new StringReader(expectedString));
+ BufferedReader resultReader = new BufferedReader(new StringReader(resultString));
+
+ compareContent(expectedReader, resultReader);
+ }
+ }
+
+ private void compareContent(BufferedReader expectedReader, BufferedReader resultReader) {
+ // will compare line by line
+ BufferedReader expectedStringReader = expectedReader;
+ BufferedReader resultStringReader = resultReader;
+ int line = 1;
+ try {
+ while (true) {
+ String expectedStringLine = expectedStringReader.readLine();
+ String resultStringLine = resultStringReader.readLine();
+
+ // If both are null, it's ok
+ if (expectedStringLine == null && resultStringLine == null)
+ return;
+
+ assertEquals("at line " + line++, expectedStringLine, resultStringLine);
+ }
+ } catch (Exception e) {
+ fail(e.getMessage());
+ } finally {
+ try {
+ expectedStringReader.close();
+ } catch (IOException e) {
+ fail(e.getMessage());
+ }
+ try {
+ resultStringReader.close();
+ } catch (IOException e) {
+ fail(e.getMessage());
+ }
+ }
+ }
+
+ private void handleExceptionTestResult(TestResult result, Exception e) {
+ if (result instanceof ExceptionTestResult) {
+ ExceptionTestResult exceptionTestResult = (ExceptionTestResult) result;
+ assertEquals(exceptionTestResult.getExceptionClass(), e.getClass());
+ if (exceptionTestResult.getExceptionMessage() != null)
+ assertEquals(exceptionTestResult.getExceptionMessage(), e.getMessage());
+ } else if (result != null) {
+ fail("No exceptionTestResult was attended : <[" + e.getClass().getName() + " " + e.getMessage() + "]>"); //$NON-NLS-1$
+ }
+ }
+
+ private void handleValidationErrorTestResult(TestResult result, Diagnostic diagnostic) {
+ if (result instanceof ValidationErrorTestResult) {
+ ValidationErrorTestResult validationErrorTestResult = (ValidationErrorTestResult) result;
+ assertEquals(validationErrorTestResult.getSeverity().getValue(), diagnostic.getSeverity());
+ } else if (result != null) {
+ fail("No validationErrorTestResult was attended : <[" + diagnostic.toString() + "]>"); //$NON-NLS-1$
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ private void runActivity(Activity activity, TestResult result) throws MissingExtensionException, InvocationException {
+ Diagnostician diagnostician = new Diagnostician();
+ if (activity == null)
+ fail("Cannot execute a test if the activity is null.");
+ Diagnostic diagnostic = diagnostician.validate(activity);
+
+ if (diagnostic.getSeverity() != Diagnostic.OK)
+ handleValidationErrorTestResult(result, diagnostic);
+
+ ActivityManagerProducer producer = EGFProducerPlugin.getActivityManagerProducer(activity);
+ IActivityManager manager = producer.createActivityManager(activity);
+
+ try {
+ manager.initializeContext();
+ manager.invoke(new NullProgressMonitor());
+ } finally {
+ manager.dispose();
+ }
+ }
+}
\ No newline at end of file
diff --git a/tests/org.eclipse.egf.core.test/test/org/eclipse/egf/core/test/ModelTestHelper.java b/tests/org.eclipse.egf.core.test/test/org/eclipse/egf/core/test/ModelTestHelper.java
new file mode 100644
index 0000000..6ae50c4
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test/test/org/eclipse/egf/core/test/ModelTestHelper.java
@@ -0,0 +1,71 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.test;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+
+import test.EGFTestCase;
+import test.TestSuite;
+import test.util.TestSwitch;
+
+/**
+ * @author Matthieu Helleboid
+ *
+ */
+public class ModelTestHelper {
+
+ private static final String MODEL_PATH = "modelPath"; //$NON-NLS-1$
+
+ private static final String PLATFORM_PLUGIN = "platform:/plugin/"; //$NON-NLS-1$
+
+ private final static String TEST_EXTENSION_NAME = "org.eclipse.egf.core.test"; //$NON-NLS-1$
+
+ public void addModelTest(junit.framework.TestSuite junitSuite) {
+
+ IConfigurationElement[] configurationElementsFor = Platform.getExtensionRegistry().getConfigurationElementsFor(TEST_EXTENSION_NAME);
+ for (IConfigurationElement iConfigurationElement : configurationElementsFor) {
+ String contributorName = iConfigurationElement.getContributor().getName();
+ String modelPath = iConfigurationElement.getAttribute(MODEL_PATH);
+ Resource resource = getResource(contributorName, modelPath);
+ EObject rootElement = resource.getContents().get(0);
+ junitSuite.addTest(new JUnitSwitch().doSwitch(rootElement));
+ }
+ }
+
+ public static Resource getResource(String contributorName, String modelPath) {
+ URI uri = URI.createURI(PLATFORM_PLUGIN + contributorName + "/" + modelPath); //$NON-NLS-1$
+ Resource resource = new ResourceSetImpl().getResource(uri, true);
+ return resource;
+ }
+
+ private static class JUnitSwitch extends TestSwitch<junit.framework.Test> {
+
+ @Override
+ public junit.framework.TestSuite caseTestSuite(TestSuite object) {
+ junit.framework.TestSuite testSuite = new junit.framework.TestSuite(object.getName());
+ for (EObject eObject : object.eContents())
+ testSuite.addTest(doSwitch(eObject));
+
+ return testSuite;
+ }
+
+ @Override
+ public junit.framework.TestCase caseEGFTestCase(EGFTestCase object) {
+ return new ModelTestCase(object);
+ }
+
+ }
+}
diff --git a/tests/org.eclipse.egf.core.test/test/org/eclipse/egf/core/test/context/factorycomponent/resource/ContextFactoryComponentResource.java b/tests/org.eclipse.egf.core.test/test/org/eclipse/egf/core/test/context/factorycomponent/resource/ContextFactoryComponentResource.java
new file mode 100644
index 0000000..787c56d
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test/test/org/eclipse/egf/core/test/context/factorycomponent/resource/ContextFactoryComponentResource.java
@@ -0,0 +1,161 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.test.context.factorycomponent.resource;
+
+import java.util.Collection;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.egf.core.helper.ResourceHelper;
+import org.eclipse.egf.core.test.EGFCoreTestPlugin;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.fcore.FactoryComponent;
+import org.eclipse.egf.producer.EGFProducerPlugin;
+import org.eclipse.egf.producer.manager.ActivityManagerProducer;
+import org.eclipse.egf.producer.manager.FactoryComponentManagerFactory;
+import org.eclipse.egf.producer.manager.IActivityManager;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.osgi.util.NLS;
+
+public class ContextFactoryComponentResource extends TestCase {
+
+ public static Test suite() {
+ return new TestSuite(ContextFactoryComponentResource.class);
+ }
+
+ public void testInvokeFC1() throws Exception {
+
+ ResourceSet resourceSet = new ResourceSetImpl();
+ URI uri = URI.createURI("platform:/plugin/org.eclipse.egf.example.fcs/fc/fc1.fcore"); //$NON-NLS-1$
+
+ // Load Resource
+ Resource resource = ResourceHelper.loadResource(resourceSet, uri);
+ assertNotNull(NLS.bind("Unable to load Resource ''{0}''", uri.toString()), resource); //$NON-NLS-1$
+
+ // Fetch Activity
+ EObject eObject = resource.getContents().get(0);
+ assertTrue(NLS.bind("We Expected to find a ''FactoryComponent'' however we found ''{0}''", eObject.eClass().getName()), eObject instanceof Activity); //$NON-NLS-1$
+
+ // Invoke Activity
+ Activity activity = (Activity) eObject;
+
+ ActivityManagerProducer<Activity> producer = EGFProducerPlugin.getActivityManagerProducer(activity);
+
+ IActivityManager<Activity> manager = producer.createActivityManager(activity);
+
+ try {
+ manager.initializeContext();
+ manager.invoke(new NullProgressMonitor());
+ } catch (Exception e) {
+ EGFCoreTestPlugin.getDefault().logError(e);
+ fail(e.getMessage());
+ return;
+ } finally {
+ try {
+ manager.dispose();
+ } catch (Exception e) {
+ EGFCoreTestPlugin.getDefault().logError(e);
+ fail(e.getMessage());
+ return;
+ }
+ }
+
+ }
+
+ public void testContractFC1() throws Exception {
+
+ ResourceSet resourceSet = new ResourceSetImpl();
+ URI uri = URI.createURI("platform:/plugin/org.eclipse.egf.example.fcs/fc/fc1.fcore"); //$NON-NLS-1$
+
+ // Load Resource
+ Resource resource = ResourceHelper.loadResource(resourceSet, uri);
+ assertNotNull(NLS.bind("Unable to load Resource ''{0}''", uri.toString()), resource); //$NON-NLS-1$
+
+ // Fetch FactoryComponent
+ EObject eObject = resource.getContents().get(0);
+ assertTrue(NLS.bind("We Expected to find a ''FactoryComponent'' however we found ''{0}''", eObject.eClass().getName()), eObject instanceof FactoryComponent); //$NON-NLS-1$
+
+ // Invoke FactoryComponent
+ FactoryComponent fc = (FactoryComponent) eObject;
+
+ IActivityManager<FactoryComponent> manager = FactoryComponentManagerFactory.createProductionManager(fc);
+ try {
+ manager.initializeContext();
+ manager.invoke(new NullProgressMonitor());
+ } catch (Exception e) {
+ EGFCoreTestPlugin.getDefault().logError(e);
+ fail(e.getMessage());
+ return;
+ } finally {
+ try {
+ manager.dispose();
+ } catch (Exception e) {
+ EGFCoreTestPlugin.getDefault().logError(e);
+ fail(e.getMessage());
+ return;
+ }
+ }
+
+ Float amount = manager.getProductionContext().getOutputValue("amount", Float.class); //$NON-NLS-1$
+
+ assertEquals(new Float("110"), amount); //$NON-NLS-1$
+
+ }
+
+ @SuppressWarnings("unchecked")
+ public void testContractList() throws Exception {
+
+ ResourceSet resourceSet = new ResourceSetImpl();
+ URI uri = URI.createURI("platform:/plugin/org.eclipse.egf.example.fcs/fc/fc1.fcore"); //$NON-NLS-1$
+
+ // Load Resource
+ Resource resource = ResourceHelper.loadResource(resourceSet, uri);
+ assertNotNull(NLS.bind("Unable to load Resource ''{0}''", uri.toString()), resource); //$NON-NLS-1$
+
+ // Fetch FactoryComponent
+ EObject eObject = resource.getContents().get(0);
+ assertTrue(NLS.bind("We Expected to find a ''FactoryComponent'' however we found ''{0}''", eObject.eClass().getName()), eObject instanceof FactoryComponent); //$NON-NLS-1$
+
+ // Invoke FactoryComponent
+ FactoryComponent fc = (FactoryComponent) eObject;
+
+ IActivityManager<FactoryComponent> manager = FactoryComponentManagerFactory.createProductionManager(fc);
+ try {
+ manager.initializeContext();
+ manager.invoke(new NullProgressMonitor());
+ } catch (Exception e) {
+ EGFCoreTestPlugin.getDefault().logError(e);
+ fail(e.getMessage());
+ return;
+ } finally {
+ try {
+ manager.dispose();
+ } catch (Exception e) {
+ EGFCoreTestPlugin.getDefault().logError(e);
+ fail(e.getMessage());
+ return;
+ }
+ }
+
+ Collection<String> parameters = manager.getProductionContext().getOutputValue("parameters", Collection.class); //$NON-NLS-1$
+
+ assertEquals(2, parameters.size());
+
+ }
+
+}
diff --git a/tests/org.eclipse.egf.core.test/test/org/eclipse/egf/core/test/context/task/memory/ContextTaskMemory.java b/tests/org.eclipse.egf.core.test/test/org/eclipse/egf/core/test/context/task/memory/ContextTaskMemory.java
new file mode 100644
index 0000000..20cc044
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test/test/org/eclipse/egf/core/test/context/task/memory/ContextTaskMemory.java
@@ -0,0 +1,157 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.test.context.task.memory;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.egf.core.producer.InvocationException;
+import org.eclipse.egf.core.test.EGFCoreTestPlugin;
+import org.eclipse.egf.ftask.producer.manager.TaskManagerFactory;
+import org.eclipse.egf.model.fcore.Contract;
+import org.eclipse.egf.model.fcore.ContractContainer;
+import org.eclipse.egf.model.fcore.ContractMode;
+import org.eclipse.egf.model.fcore.FcoreFactory;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.ftask.FtaskFactory;
+import org.eclipse.egf.model.ftask.Task;
+import org.eclipse.egf.model.types.TypeCollection;
+import org.eclipse.egf.model.types.TypeFloat;
+import org.eclipse.egf.model.types.TypeGeneratorAdapterFactory;
+import org.eclipse.egf.model.types.TypeInteger;
+import org.eclipse.egf.model.types.TypesFactory;
+import org.eclipse.egf.producer.EGFProducerPlugin;
+import org.eclipse.egf.producer.manager.ActivityManagerProducer;
+import org.eclipse.egf.producer.manager.IActivityManager;
+import org.eclipse.emf.codegen.ecore.generator.GeneratorAdapterFactory;
+import org.eclipse.emf.codegen.ecore.genmodel.generator.GenModelGeneratorAdapterFactory;
+
+public class ContextTaskMemory extends TestCase {
+
+ public static Test suite() {
+ return new TestSuite(ContextTaskMemory.class);
+ }
+
+ public void testContractH1() throws Exception {
+
+ Task task = FtaskFactory.eINSTANCE.createTask();
+ task.setImplementation("org.eclipse.egf.example.task.h1.H1"); //$NON-NLS-1$
+ task.setKind("java"); //$NON-NLS-1$
+
+ ActivityManagerProducer<Task> producer = EGFProducerPlugin.getActivityManagerProducer(task);
+
+ IActivityManager<?> manager = producer.createActivityManager(EGFCoreTestPlugin.getDefault().getBundle(), task);
+ try {
+ manager.initializeContext();
+ manager.invoke(new NullProgressMonitor());
+ } catch (InvocationException ie) {
+ return;
+ } catch (Exception e) {
+ EGFCoreTestPlugin.getDefault().logError(e);
+ fail(e.getMessage());
+ return;
+ } finally {
+ try {
+ manager.dispose();
+ } catch (Exception e) {
+ EGFCoreTestPlugin.getDefault().logError(e);
+ fail(e.getMessage());
+ return;
+ }
+ }
+
+ fail("InvocationException is expected"); //$NON-NLS-1$
+
+ }
+
+ public void testOutputContractClassNotTheSameH1() throws Exception {
+
+ Task task = FtaskFactory.eINSTANCE.createTask();
+ task.setImplementation("org.eclipse.egf.example.task.h1.H1"); //$NON-NLS-1$
+ task.setKind("java"); //$NON-NLS-1$
+
+ ContractContainer contracts = FcoreFactory.eINSTANCE.createContractContainer();
+ task.eSet(FcorePackage.Literals.ACTIVITY__CONTRACT_CONTAINER, contracts);
+
+ Contract quantity = FcoreFactory.eINSTANCE.createContract();
+ quantity.setName("quantity"); //$NON-NLS-1$
+ quantity.setMode(ContractMode.IN);
+ contracts.getContracts().add(quantity);
+
+ TypeInteger quantityType = TypesFactory.eINSTANCE.createTypeInteger();
+ quantityType.setValue(100);
+ quantity.eSet(FcorePackage.Literals.CONTRACT__TYPE, quantityType);
+
+ Contract price = FcoreFactory.eINSTANCE.createContract();
+ price.setName("price"); //$NON-NLS-1$
+ price.setMode(ContractMode.IN);
+ contracts.getContracts().add(price);
+
+ TypeFloat priceType = TypesFactory.eINSTANCE.createTypeFloat();
+ priceType.setValue(new Float("10.5")); //$NON-NLS-1$
+ price.eSet(FcorePackage.Literals.CONTRACT__TYPE, priceType);
+
+ Contract parameters = FcoreFactory.eINSTANCE.createContract();
+ parameters.setName("parameters"); //$NON-NLS-1$
+ parameters.setMode(ContractMode.IN_OUT);
+ contracts.getContracts().add(parameters);
+
+ TypeCollection parametersType = TypesFactory.eINSTANCE.createTypeCollection();
+ parametersType.setValue("java.util.ArrayList"); //$NON-NLS-1$
+ parameters.eSet(FcorePackage.Literals.CONTRACT__TYPE, parametersType);
+
+ Contract amount = FcoreFactory.eINSTANCE.createContract();
+ amount.setName("amount"); //$NON-NLS-1$
+ amount.setMode(ContractMode.OUT);
+ contracts.getContracts().add(amount);
+
+ TypeFloat amountType = TypesFactory.eINSTANCE.createTypeFloat();
+ amount.eSet(FcorePackage.Literals.CONTRACT__TYPE, amountType);
+
+ Contract generatorAdapterFactory = FcoreFactory.eINSTANCE.createContract();
+ generatorAdapterFactory.setName("generatorAdapterFactory"); //$NON-NLS-1$
+ generatorAdapterFactory.setMode(ContractMode.OUT);
+ contracts.getContracts().add(generatorAdapterFactory);
+
+ TypeGeneratorAdapterFactory generatorAdapterFactoryType = TypesFactory.eINSTANCE.createTypeGeneratorAdapterFactory();
+ generatorAdapterFactoryType.setValue("org.eclipse.emf.codegen.ecore.genmodel.generator.GenModelGeneratorAdapterFactory"); //$NON-NLS-1$
+ generatorAdapterFactory.eSet(FcorePackage.Literals.CONTRACT__TYPE, generatorAdapterFactoryType);
+
+ // Beware, we use the test plugin bundle here, the manifest should import the bundle who contains the task
+ // Otherwise it will fail to load it
+ IActivityManager<Task> manager = TaskManagerFactory.createProductionManager(EGFCoreTestPlugin.getDefault().getBundle(), task);
+
+ GeneratorAdapterFactory defaultValue = null;
+
+ try {
+ manager.initializeContext();
+ defaultValue = manager.getProductionContext().getOutputValue("generatorAdapterFactory", GeneratorAdapterFactory.class); //$NON-NLS-1$
+ manager.invoke(new NullProgressMonitor());
+ } catch (Exception e) {
+ EGFCoreTestPlugin.getDefault().logError(e);
+ fail(e.getMessage());
+ return;
+ } finally {
+ try {
+ manager.dispose();
+ } catch (Exception e) {
+ EGFCoreTestPlugin.getDefault().logError(e);
+ fail(e.getMessage());
+ return;
+ }
+ }
+
+ assertNotSame(manager.getProductionContext().getOutputValue("generatorAdapterFactory", GenModelGeneratorAdapterFactory.class), defaultValue); //$NON-NLS-1$
+
+ }
+}
diff --git a/tests/org.eclipse.egf.core.test/test/org/eclipse/egf/core/test/context/task/resource/ContextTaskResource.java b/tests/org.eclipse.egf.core.test/test/org/eclipse/egf/core/test/context/task/resource/ContextTaskResource.java
new file mode 100644
index 0000000..c2d3899
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test/test/org/eclipse/egf/core/test/context/task/resource/ContextTaskResource.java
@@ -0,0 +1,162 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.test.context.task.resource;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.egf.core.helper.ResourceHelper;
+import org.eclipse.egf.core.test.EGFCoreTestPlugin;
+import org.eclipse.egf.ftask.producer.manager.TaskManagerFactory;
+import org.eclipse.egf.model.fcore.Activity;
+import org.eclipse.egf.model.ftask.Task;
+import org.eclipse.egf.producer.EGFProducerPlugin;
+import org.eclipse.egf.producer.manager.ActivityManagerProducer;
+import org.eclipse.egf.producer.manager.IActivityManager;
+import org.eclipse.emf.codegen.ecore.generator.GeneratorAdapterFactory;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.osgi.util.NLS;
+
+public class ContextTaskResource extends TestCase {
+
+ public static Test suite() {
+ return new TestSuite(ContextTaskResource.class);
+ }
+
+ public void testInvokeH1() throws Exception {
+
+ ResourceSet resourceSet = new ResourceSetImpl();
+ URI uri = URI.createURI("platform:/plugin/org.eclipse.egf.example.task.h1/task_h1.fcore"); //$NON-NLS-1$
+
+ // Load Resource
+ Resource resource = ResourceHelper.loadResource(resourceSet, uri);
+ assertNotNull(NLS.bind("Unable to load Resource ''{0}''", uri.toString()), resource); //$NON-NLS-1$
+
+ // Fetch Activity
+ EObject eObject = resource.getContents().get(0);
+ assertTrue(NLS.bind("We Expected to find an ''Task'' however we found ''{0}''", eObject.eClass().getName()), eObject instanceof Activity); //$NON-NLS-1$
+
+ // Invoke Activity
+ Activity activity = (Activity) eObject;
+
+ ActivityManagerProducer<Activity> producer = EGFProducerPlugin.getActivityManagerProducer(activity);
+
+ IActivityManager<Activity> manager = producer.createActivityManager(activity);
+
+ try {
+ manager.initializeContext();
+ manager.invoke(new NullProgressMonitor());
+ } catch (Exception e) {
+ EGFCoreTestPlugin.getDefault().logError(e);
+ fail(e.getMessage());
+ return;
+ } finally {
+ try {
+ manager.dispose();
+ } catch (Exception e) {
+ EGFCoreTestPlugin.getDefault().logError(e);
+ fail(e.getMessage());
+ return;
+ }
+ }
+
+ }
+
+ public void testContractH1() throws Exception {
+
+ ResourceSet resourceSet = new ResourceSetImpl();
+ URI uri = URI.createURI("platform:/plugin/org.eclipse.egf.example.task.h1/task_h1.fcore"); //$NON-NLS-1$
+
+ // Load Resource
+ Resource resource = ResourceHelper.loadResource(resourceSet, uri);
+ assertNotNull(NLS.bind("Unable to load Resource ''{0}''", uri.toString()), resource); //$NON-NLS-1$
+
+ // Fetch Task Java
+ EObject eObject = resource.getContents().get(0);
+ assertTrue(NLS.bind("We Expected to find an ''Task'' however we found ''{0}''", eObject.eClass().getName()), eObject instanceof Task); //$NON-NLS-1$
+
+ // Invoke Task Java
+ Task task = (Task) eObject;
+
+ IActivityManager<Task> manager = TaskManagerFactory.createProductionManager(task);
+
+ try {
+ manager.initializeContext();
+ manager.invoke(new NullProgressMonitor());
+ } catch (Exception e) {
+ EGFCoreTestPlugin.getDefault().logError(e);
+ fail(e.getMessage());
+ return;
+ } finally {
+ try {
+ manager.dispose();
+ } catch (Exception e) {
+ EGFCoreTestPlugin.getDefault().logError(e);
+ fail(e.getMessage());
+ return;
+ }
+ }
+
+ Float amount = manager.getProductionContext().getOutputValue("amount", Float.class); //$NON-NLS-1$
+
+ assertEquals(new Float("1050"), amount); //$NON-NLS-1$
+
+ }
+
+ public void testOutputContractClassNotTheSameH1() throws Exception {
+
+ ResourceSet resourceSet = new ResourceSetImpl();
+ URI uri = URI.createURI("platform:/plugin/org.eclipse.egf.example.task.h1/task_h1.fcore"); //$NON-NLS-1$
+
+ // Load Resource
+ Resource resource = ResourceHelper.loadResource(resourceSet, uri);
+ assertNotNull(NLS.bind("Unable to load Resource ''{0}''", uri.toString()), resource); //$NON-NLS-1$
+
+ // Fetch Task
+ EObject eObject = resource.getContents().get(0);
+ assertTrue(NLS.bind("We Expected to find an ''Task'' however we found ''{0}''", eObject.eClass().getName()), eObject instanceof Task); //$NON-NLS-1$
+
+ // Invoke Task
+ Task task = (Task) eObject;
+
+ IActivityManager<Task> manager = TaskManagerFactory.createProductionManager(task);
+
+ GeneratorAdapterFactory defaultValue = null;
+
+ try {
+ manager.initializeContext();
+ defaultValue = manager.getProductionContext().getOutputValue("generatorAdapterFactory", GeneratorAdapterFactory.class); //$NON-NLS-1$
+ manager.invoke(new NullProgressMonitor());
+ } catch (Exception e) {
+ EGFCoreTestPlugin.getDefault().logError(e);
+ fail(e.getMessage());
+ return;
+ } finally {
+ try {
+ manager.dispose();
+ } catch (Exception e) {
+ EGFCoreTestPlugin.getDefault().logError(e);
+ fail(e.getMessage());
+ return;
+ }
+ }
+
+ assertNotSame(manager.getProductionContext().getOutputValue("generatorAdapterFactory", GeneratorAdapterFactory.class), defaultValue); //$NON-NLS-1$
+
+ }
+
+}
diff --git a/tests/org.eclipse.egf.core.test/test/org/eclipse/egf/core/test/factorycomponent/ContextFactoryComponent.java b/tests/org.eclipse.egf.core.test/test/org/eclipse/egf/core/test/factorycomponent/ContextFactoryComponent.java
new file mode 100644
index 0000000..9d938c4
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test/test/org/eclipse/egf/core/test/factorycomponent/ContextFactoryComponent.java
@@ -0,0 +1,27 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.test.factorycomponent;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.egf.core.test.context.factorycomponent.resource.ContextFactoryComponentResource;
+
+public class ContextFactoryComponent extends TestCase {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("EGF Core Context FactoryComponent Test Suite"); //$NON-NLS-1$
+ suite.addTest(ContextFactoryComponentResource.suite());
+ return suite;
+ }
+
+}
diff --git a/tests/org.eclipse.egf.core.test/test/org/eclipse/egf/core/test/model/validation/ModelValidation.java b/tests/org.eclipse.egf.core.test/test/org/eclipse/egf/core/test/model/validation/ModelValidation.java
new file mode 100644
index 0000000..f32c79a
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test/test/org/eclipse/egf/core/test/model/validation/ModelValidation.java
@@ -0,0 +1,27 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.test.model.validation;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.egf.core.test.model.validation.fprod.FprodContractValidation;
+
+public class ModelValidation extends TestCase {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("EGF Model Test Suite"); //$NON-NLS-1$
+ suite.addTest(FprodContractValidation.suite());
+ return suite;
+ }
+
+}
diff --git a/tests/org.eclipse.egf.core.test/test/org/eclipse/egf/core/test/model/validation/fprod/FprodContractValidation.java b/tests/org.eclipse.egf.core.test/test/org/eclipse/egf/core/test/model/validation/fprod/FprodContractValidation.java
new file mode 100644
index 0000000..5f9a201
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test/test/org/eclipse/egf/core/test/model/validation/fprod/FprodContractValidation.java
@@ -0,0 +1,128 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.test.model.validation.fprod;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.egf.model.fcore.Contract;
+import org.eclipse.egf.model.fcore.ContractContainer;
+import org.eclipse.egf.model.fcore.ContractMode;
+import org.eclipse.egf.model.fcore.FcoreFactory;
+import org.eclipse.egf.model.fcore.FcorePackage;
+import org.eclipse.egf.model.ftask.FtaskFactory;
+import org.eclipse.egf.model.ftask.Task;
+import org.eclipse.egf.model.types.TypeString;
+import org.eclipse.egf.model.types.TypesFactory;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.ecore.util.Diagnostician;
+
+public class FprodContractValidation extends TestCase {
+
+ public static Test suite() {
+ return new TestSuite(FprodContractValidation.class);
+ }
+
+ public void testInContractName() throws Exception {
+
+ Task task = FtaskFactory.eINSTANCE.createTask();
+ task.setKind("java"); //$NON-NLS-1$
+
+ ContractContainer contracts = FcoreFactory.eINSTANCE.createContractContainer();
+ task.eSet(FcorePackage.Literals.ACTIVITY__CONTRACT_CONTAINER, contracts);
+
+ Contract name1 = FcoreFactory.eINSTANCE.createContract();
+ name1.setName("name"); //$NON-NLS-1$
+ name1.setMode(ContractMode.IN);
+ contracts.getContracts().add(name1);
+
+ TypeString name1Type = TypesFactory.eINSTANCE.createTypeString();
+ name1.eSet(FcorePackage.Literals.CONTRACT__TYPE, name1Type);
+
+ Contract name2 = FcoreFactory.eINSTANCE.createContract();
+ name2.setName("name"); //$NON-NLS-1$
+ name2.setMode(ContractMode.IN);
+ contracts.getContracts().add(name2);
+
+ TypeString name2Type = TypesFactory.eINSTANCE.createTypeString();
+ name2.eSet(FcorePackage.Literals.CONTRACT__TYPE, name2Type);
+
+ Diagnostician diagnostician = new Diagnostician();
+ Diagnostic diagnostic = diagnostician.validate(contracts);
+
+ assertTrue(diagnostic.getSeverity() == Diagnostic.ERROR);
+
+ }
+
+ public void testOutContractName() throws Exception {
+
+ Task task = FtaskFactory.eINSTANCE.createTask();
+ task.setKind("java"); //$NON-NLS-1$
+
+ ContractContainer contracts = FcoreFactory.eINSTANCE.createContractContainer();
+ task.eSet(FcorePackage.Literals.ACTIVITY__CONTRACT_CONTAINER, contracts);
+
+ Contract name1 = FcoreFactory.eINSTANCE.createContract();
+ name1.setName("name"); //$NON-NLS-1$
+ name1.setMode(ContractMode.OUT);
+ contracts.getContracts().add(name1);
+
+ TypeString name1Type = TypesFactory.eINSTANCE.createTypeString();
+ name1.eSet(FcorePackage.Literals.CONTRACT__TYPE, name1Type);
+
+ Contract name2 = FcoreFactory.eINSTANCE.createContract();
+ name2.setName("name"); //$NON-NLS-1$
+ name2.setMode(ContractMode.OUT);
+ contracts.getContracts().add(name2);
+
+ TypeString name2Type = TypesFactory.eINSTANCE.createTypeString();
+ name2.eSet(FcorePackage.Literals.CONTRACT__TYPE, name2Type);
+
+ Diagnostician diagnostician = new Diagnostician();
+ Diagnostic diagnostic = diagnostician.validate(contracts);
+
+ assertTrue(diagnostic.getSeverity() == Diagnostic.ERROR);
+
+ }
+
+ public void testContractName() throws Exception {
+
+ Task task = FtaskFactory.eINSTANCE.createTask();
+ task.setKind("java"); //$NON-NLS-1$)
+
+ ContractContainer contracts = FcoreFactory.eINSTANCE.createContractContainer();
+ task.eSet(FcorePackage.Literals.ACTIVITY__CONTRACT_CONTAINER, contracts);
+
+ Contract name1 = FcoreFactory.eINSTANCE.createContract();
+ name1.setName("name"); //$NON-NLS-1$
+ name1.setMode(ContractMode.IN);
+ contracts.getContracts().add(name1);
+
+ TypeString name1Type = TypesFactory.eINSTANCE.createTypeString();
+ name1.eSet(FcorePackage.Literals.CONTRACT__TYPE, name1Type);
+
+ Contract name2 = FcoreFactory.eINSTANCE.createContract();
+ name2.setName("name"); //$NON-NLS-1$
+ name2.setMode(ContractMode.OUT);
+ contracts.getContracts().add(name2);
+
+ TypeString name2Type = TypesFactory.eINSTANCE.createTypeString();
+ name2.eSet(FcorePackage.Literals.CONTRACT__TYPE, name2Type);
+
+ Diagnostician diagnostician = new Diagnostician();
+ Diagnostic diagnostic = diagnostician.validate(contracts);
+
+ assertTrue(diagnostic.getSeverity() == Diagnostic.OK);
+
+ }
+
+}
diff --git a/tests/org.eclipse.egf.core.test/test/org/eclipse/egf/core/test/task/ContextTask.java b/tests/org.eclipse.egf.core.test/test/org/eclipse/egf/core/test/task/ContextTask.java
new file mode 100644
index 0000000..0cbc09b
--- /dev/null
+++ b/tests/org.eclipse.egf.core.test/test/org/eclipse/egf/core/test/task/ContextTask.java
@@ -0,0 +1,29 @@
+/**
+ * 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
+ */
+package org.eclipse.egf.core.test.task;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.egf.core.test.context.task.memory.ContextTaskMemory;
+import org.eclipse.egf.core.test.context.task.resource.ContextTaskResource;
+
+public class ContextTask extends TestCase {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("EGF Core Context Task Test Suite"); //$NON-NLS-1$
+ suite.addTest(ContextTaskResource.suite());
+ suite.addTest(ContextTaskMemory.suite());
+ return suite;
+ }
+
+}